{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glue.Types.CsvClassifier
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.CsvClassifier where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.CsvHeaderOption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A classifier for custom @CSV@ content.
--
-- /See:/ 'newCsvClassifier' smart constructor.
data CsvClassifier = CsvClassifier'
  { -- | The time that this classifier was registered.
    CsvClassifier -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | A custom symbol to denote what combines content into a single column
    -- value. It must be different from the column delimiter.
    CsvClassifier -> Maybe Text
quoteSymbol :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the CSV file contains a header.
    CsvClassifier -> Maybe CsvHeaderOption
containsHeader :: Prelude.Maybe CsvHeaderOption,
    -- | The time that this classifier was last updated.
    CsvClassifier -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | Specifies not to trim values before identifying the type of column
    -- values. The default value is @true@.
    CsvClassifier -> Maybe Bool
disableValueTrimming :: Prelude.Maybe Prelude.Bool,
    -- | A list of strings representing column names.
    CsvClassifier -> Maybe [Text]
header :: Prelude.Maybe [Prelude.Text],
    -- | The version of this classifier.
    CsvClassifier -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | Enables the processing of files that contain only one column.
    CsvClassifier -> Maybe Bool
allowSingleColumn :: Prelude.Maybe Prelude.Bool,
    -- | A custom symbol to denote what separates each column entry in the row.
    CsvClassifier -> Maybe Text
delimiter :: Prelude.Maybe Prelude.Text,
    -- | The name of the classifier.
    CsvClassifier -> Text
name :: Prelude.Text
  }
  deriving (CsvClassifier -> CsvClassifier -> Bool
(CsvClassifier -> CsvClassifier -> Bool)
-> (CsvClassifier -> CsvClassifier -> Bool) -> Eq CsvClassifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CsvClassifier -> CsvClassifier -> Bool
$c/= :: CsvClassifier -> CsvClassifier -> Bool
== :: CsvClassifier -> CsvClassifier -> Bool
$c== :: CsvClassifier -> CsvClassifier -> Bool
Prelude.Eq, ReadPrec [CsvClassifier]
ReadPrec CsvClassifier
Int -> ReadS CsvClassifier
ReadS [CsvClassifier]
(Int -> ReadS CsvClassifier)
-> ReadS [CsvClassifier]
-> ReadPrec CsvClassifier
-> ReadPrec [CsvClassifier]
-> Read CsvClassifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CsvClassifier]
$creadListPrec :: ReadPrec [CsvClassifier]
readPrec :: ReadPrec CsvClassifier
$creadPrec :: ReadPrec CsvClassifier
readList :: ReadS [CsvClassifier]
$creadList :: ReadS [CsvClassifier]
readsPrec :: Int -> ReadS CsvClassifier
$creadsPrec :: Int -> ReadS CsvClassifier
Prelude.Read, Int -> CsvClassifier -> ShowS
[CsvClassifier] -> ShowS
CsvClassifier -> String
(Int -> CsvClassifier -> ShowS)
-> (CsvClassifier -> String)
-> ([CsvClassifier] -> ShowS)
-> Show CsvClassifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CsvClassifier] -> ShowS
$cshowList :: [CsvClassifier] -> ShowS
show :: CsvClassifier -> String
$cshow :: CsvClassifier -> String
showsPrec :: Int -> CsvClassifier -> ShowS
$cshowsPrec :: Int -> CsvClassifier -> ShowS
Prelude.Show, (forall x. CsvClassifier -> Rep CsvClassifier x)
-> (forall x. Rep CsvClassifier x -> CsvClassifier)
-> Generic CsvClassifier
forall x. Rep CsvClassifier x -> CsvClassifier
forall x. CsvClassifier -> Rep CsvClassifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CsvClassifier x -> CsvClassifier
$cfrom :: forall x. CsvClassifier -> Rep CsvClassifier x
Prelude.Generic)

-- |
-- Create a value of 'CsvClassifier' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationTime', 'csvClassifier_creationTime' - The time that this classifier was registered.
--
-- 'quoteSymbol', 'csvClassifier_quoteSymbol' - A custom symbol to denote what combines content into a single column
-- value. It must be different from the column delimiter.
--
-- 'containsHeader', 'csvClassifier_containsHeader' - Indicates whether the CSV file contains a header.
--
-- 'lastUpdated', 'csvClassifier_lastUpdated' - The time that this classifier was last updated.
--
-- 'disableValueTrimming', 'csvClassifier_disableValueTrimming' - Specifies not to trim values before identifying the type of column
-- values. The default value is @true@.
--
-- 'header', 'csvClassifier_header' - A list of strings representing column names.
--
-- 'version', 'csvClassifier_version' - The version of this classifier.
--
-- 'allowSingleColumn', 'csvClassifier_allowSingleColumn' - Enables the processing of files that contain only one column.
--
-- 'delimiter', 'csvClassifier_delimiter' - A custom symbol to denote what separates each column entry in the row.
--
-- 'name', 'csvClassifier_name' - The name of the classifier.
newCsvClassifier ::
  -- | 'name'
  Prelude.Text ->
  CsvClassifier
newCsvClassifier :: Text -> CsvClassifier
newCsvClassifier Text
pName_ =
  CsvClassifier' :: Maybe POSIX
-> Maybe Text
-> Maybe CsvHeaderOption
-> Maybe POSIX
-> Maybe Bool
-> Maybe [Text]
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Text
-> CsvClassifier
CsvClassifier'
    { $sel:creationTime:CsvClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:quoteSymbol:CsvClassifier' :: Maybe Text
quoteSymbol = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:containsHeader:CsvClassifier' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdated:CsvClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:disableValueTrimming:CsvClassifier' :: Maybe Bool
disableValueTrimming = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:header:CsvClassifier' :: Maybe [Text]
header = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:version:CsvClassifier' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:allowSingleColumn:CsvClassifier' :: Maybe Bool
allowSingleColumn = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:delimiter:CsvClassifier' :: Maybe Text
delimiter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CsvClassifier' :: Text
name = Text
pName_
    }

-- | The time that this classifier was registered.
csvClassifier_creationTime :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.UTCTime)
csvClassifier_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CsvClassifier -> f CsvClassifier
csvClassifier_creationTime = (CsvClassifier -> Maybe POSIX)
-> (CsvClassifier -> Maybe POSIX -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:CsvClassifier' :: CsvClassifier -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe POSIX
a -> CsvClassifier
s {$sel:creationTime:CsvClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: CsvClassifier) ((Maybe POSIX -> f (Maybe POSIX))
 -> CsvClassifier -> f CsvClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CsvClassifier
-> f CsvClassifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A custom symbol to denote what combines content into a single column
-- value. It must be different from the column delimiter.
csvClassifier_quoteSymbol :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.Text)
csvClassifier_quoteSymbol :: (Maybe Text -> f (Maybe Text)) -> CsvClassifier -> f CsvClassifier
csvClassifier_quoteSymbol = (CsvClassifier -> Maybe Text)
-> (CsvClassifier -> Maybe Text -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe Text
quoteSymbol :: Maybe Text
$sel:quoteSymbol:CsvClassifier' :: CsvClassifier -> Maybe Text
quoteSymbol} -> Maybe Text
quoteSymbol) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe Text
a -> CsvClassifier
s {$sel:quoteSymbol:CsvClassifier' :: Maybe Text
quoteSymbol = Maybe Text
a} :: CsvClassifier)

-- | Indicates whether the CSV file contains a header.
csvClassifier_containsHeader :: Lens.Lens' CsvClassifier (Prelude.Maybe CsvHeaderOption)
csvClassifier_containsHeader :: (Maybe CsvHeaderOption -> f (Maybe CsvHeaderOption))
-> CsvClassifier -> f CsvClassifier
csvClassifier_containsHeader = (CsvClassifier -> Maybe CsvHeaderOption)
-> (CsvClassifier -> Maybe CsvHeaderOption -> CsvClassifier)
-> Lens
     CsvClassifier
     CsvClassifier
     (Maybe CsvHeaderOption)
     (Maybe CsvHeaderOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe CsvHeaderOption
containsHeader :: Maybe CsvHeaderOption
$sel:containsHeader:CsvClassifier' :: CsvClassifier -> Maybe CsvHeaderOption
containsHeader} -> Maybe CsvHeaderOption
containsHeader) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe CsvHeaderOption
a -> CsvClassifier
s {$sel:containsHeader:CsvClassifier' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
a} :: CsvClassifier)

-- | The time that this classifier was last updated.
csvClassifier_lastUpdated :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.UTCTime)
csvClassifier_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CsvClassifier -> f CsvClassifier
csvClassifier_lastUpdated = (CsvClassifier -> Maybe POSIX)
-> (CsvClassifier -> Maybe POSIX -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:CsvClassifier' :: CsvClassifier -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe POSIX
a -> CsvClassifier
s {$sel:lastUpdated:CsvClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: CsvClassifier) ((Maybe POSIX -> f (Maybe POSIX))
 -> CsvClassifier -> f CsvClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CsvClassifier
-> f CsvClassifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies not to trim values before identifying the type of column
-- values. The default value is @true@.
csvClassifier_disableValueTrimming :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.Bool)
csvClassifier_disableValueTrimming :: (Maybe Bool -> f (Maybe Bool)) -> CsvClassifier -> f CsvClassifier
csvClassifier_disableValueTrimming = (CsvClassifier -> Maybe Bool)
-> (CsvClassifier -> Maybe Bool -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe Bool
disableValueTrimming :: Maybe Bool
$sel:disableValueTrimming:CsvClassifier' :: CsvClassifier -> Maybe Bool
disableValueTrimming} -> Maybe Bool
disableValueTrimming) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe Bool
a -> CsvClassifier
s {$sel:disableValueTrimming:CsvClassifier' :: Maybe Bool
disableValueTrimming = Maybe Bool
a} :: CsvClassifier)

-- | A list of strings representing column names.
csvClassifier_header :: Lens.Lens' CsvClassifier (Prelude.Maybe [Prelude.Text])
csvClassifier_header :: (Maybe [Text] -> f (Maybe [Text]))
-> CsvClassifier -> f CsvClassifier
csvClassifier_header = (CsvClassifier -> Maybe [Text])
-> (CsvClassifier -> Maybe [Text] -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe [Text]
header :: Maybe [Text]
$sel:header:CsvClassifier' :: CsvClassifier -> Maybe [Text]
header} -> Maybe [Text]
header) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe [Text]
a -> CsvClassifier
s {$sel:header:CsvClassifier' :: Maybe [Text]
header = Maybe [Text]
a} :: CsvClassifier) ((Maybe [Text] -> f (Maybe [Text]))
 -> CsvClassifier -> f CsvClassifier)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CsvClassifier
-> f CsvClassifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The version of this classifier.
csvClassifier_version :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.Integer)
csvClassifier_version :: (Maybe Integer -> f (Maybe Integer))
-> CsvClassifier -> f CsvClassifier
csvClassifier_version = (CsvClassifier -> Maybe Integer)
-> (CsvClassifier -> Maybe Integer -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe Integer
version :: Maybe Integer
$sel:version:CsvClassifier' :: CsvClassifier -> Maybe Integer
version} -> Maybe Integer
version) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe Integer
a -> CsvClassifier
s {$sel:version:CsvClassifier' :: Maybe Integer
version = Maybe Integer
a} :: CsvClassifier)

-- | Enables the processing of files that contain only one column.
csvClassifier_allowSingleColumn :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.Bool)
csvClassifier_allowSingleColumn :: (Maybe Bool -> f (Maybe Bool)) -> CsvClassifier -> f CsvClassifier
csvClassifier_allowSingleColumn = (CsvClassifier -> Maybe Bool)
-> (CsvClassifier -> Maybe Bool -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe Bool
allowSingleColumn :: Maybe Bool
$sel:allowSingleColumn:CsvClassifier' :: CsvClassifier -> Maybe Bool
allowSingleColumn} -> Maybe Bool
allowSingleColumn) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe Bool
a -> CsvClassifier
s {$sel:allowSingleColumn:CsvClassifier' :: Maybe Bool
allowSingleColumn = Maybe Bool
a} :: CsvClassifier)

-- | A custom symbol to denote what separates each column entry in the row.
csvClassifier_delimiter :: Lens.Lens' CsvClassifier (Prelude.Maybe Prelude.Text)
csvClassifier_delimiter :: (Maybe Text -> f (Maybe Text)) -> CsvClassifier -> f CsvClassifier
csvClassifier_delimiter = (CsvClassifier -> Maybe Text)
-> (CsvClassifier -> Maybe Text -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Maybe Text
delimiter :: Maybe Text
$sel:delimiter:CsvClassifier' :: CsvClassifier -> Maybe Text
delimiter} -> Maybe Text
delimiter) (\s :: CsvClassifier
s@CsvClassifier' {} Maybe Text
a -> CsvClassifier
s {$sel:delimiter:CsvClassifier' :: Maybe Text
delimiter = Maybe Text
a} :: CsvClassifier)

-- | The name of the classifier.
csvClassifier_name :: Lens.Lens' CsvClassifier Prelude.Text
csvClassifier_name :: (Text -> f Text) -> CsvClassifier -> f CsvClassifier
csvClassifier_name = (CsvClassifier -> Text)
-> (CsvClassifier -> Text -> CsvClassifier)
-> Lens CsvClassifier CsvClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CsvClassifier' {Text
name :: Text
$sel:name:CsvClassifier' :: CsvClassifier -> Text
name} -> Text
name) (\s :: CsvClassifier
s@CsvClassifier' {} Text
a -> CsvClassifier
s {$sel:name:CsvClassifier' :: Text
name = Text
a} :: CsvClassifier)

instance Core.FromJSON CsvClassifier where
  parseJSON :: Value -> Parser CsvClassifier
parseJSON =
    String
-> (Object -> Parser CsvClassifier)
-> Value
-> Parser CsvClassifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CsvClassifier"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe CsvHeaderOption
-> Maybe POSIX
-> Maybe Bool
-> Maybe [Text]
-> Maybe Integer
-> Maybe Bool
-> Maybe Text
-> Text
-> CsvClassifier
CsvClassifier'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe CsvHeaderOption
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe [Text]
 -> Maybe Integer
 -> Maybe Bool
 -> Maybe Text
 -> Text
 -> CsvClassifier)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe CsvHeaderOption
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> CsvClassifier)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe CsvHeaderOption
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> CsvClassifier)
-> Parser (Maybe Text)
-> Parser
     (Maybe CsvHeaderOption
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QuoteSymbol")
            Parser
  (Maybe CsvHeaderOption
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> CsvClassifier)
-> Parser (Maybe CsvHeaderOption)
-> Parser
     (Maybe POSIX
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CsvHeaderOption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContainsHeader")
            Parser
  (Maybe POSIX
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> CsvClassifier)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Bool
      -> Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdated")
            Parser
  (Maybe Bool
   -> Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> CsvClassifier)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Text]
      -> Maybe Integer
      -> Maybe Bool
      -> Maybe Text
      -> Text
      -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisableValueTrimming")
            Parser
  (Maybe [Text]
   -> Maybe Integer
   -> Maybe Bool
   -> Maybe Text
   -> Text
   -> CsvClassifier)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Integer
      -> Maybe Bool -> Maybe Text -> Text -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Header" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Integer
   -> Maybe Bool -> Maybe Text -> Text -> CsvClassifier)
-> Parser (Maybe Integer)
-> Parser (Maybe Bool -> Maybe Text -> Text -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
            Parser (Maybe Bool -> Maybe Text -> Text -> CsvClassifier)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Text -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AllowSingleColumn")
            Parser (Maybe Text -> Text -> CsvClassifier)
-> Parser (Maybe Text) -> Parser (Text -> CsvClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Delimiter")
            Parser (Text -> CsvClassifier)
-> Parser Text -> Parser CsvClassifier
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance Prelude.Hashable CsvClassifier

instance Prelude.NFData CsvClassifier