{-# 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 #-}
module Amazonka.Glue.Types.CreateCsvClassifierRequest where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.CsvHeaderOption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateCsvClassifierRequest = CreateCsvClassifierRequest'
{
CreateCsvClassifierRequest -> Maybe Text
quoteSymbol :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe CsvHeaderOption,
CreateCsvClassifierRequest -> Maybe Bool
disableValueTrimming :: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe [Prelude.Text],
CreateCsvClassifierRequest -> Maybe Bool
allowSingleColumn :: Prelude.Maybe Prelude.Bool,
CreateCsvClassifierRequest -> Maybe Text
delimiter :: Prelude.Maybe Prelude.Text,
CreateCsvClassifierRequest -> Text
name :: Prelude.Text
}
deriving (CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool
(CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool)
-> (CreateCsvClassifierRequest
-> CreateCsvClassifierRequest -> Bool)
-> Eq CreateCsvClassifierRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool
$c/= :: CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool
== :: CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool
$c== :: CreateCsvClassifierRequest -> CreateCsvClassifierRequest -> Bool
Prelude.Eq, ReadPrec [CreateCsvClassifierRequest]
ReadPrec CreateCsvClassifierRequest
Int -> ReadS CreateCsvClassifierRequest
ReadS [CreateCsvClassifierRequest]
(Int -> ReadS CreateCsvClassifierRequest)
-> ReadS [CreateCsvClassifierRequest]
-> ReadPrec CreateCsvClassifierRequest
-> ReadPrec [CreateCsvClassifierRequest]
-> Read CreateCsvClassifierRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCsvClassifierRequest]
$creadListPrec :: ReadPrec [CreateCsvClassifierRequest]
readPrec :: ReadPrec CreateCsvClassifierRequest
$creadPrec :: ReadPrec CreateCsvClassifierRequest
readList :: ReadS [CreateCsvClassifierRequest]
$creadList :: ReadS [CreateCsvClassifierRequest]
readsPrec :: Int -> ReadS CreateCsvClassifierRequest
$creadsPrec :: Int -> ReadS CreateCsvClassifierRequest
Prelude.Read, Int -> CreateCsvClassifierRequest -> ShowS
[CreateCsvClassifierRequest] -> ShowS
CreateCsvClassifierRequest -> String
(Int -> CreateCsvClassifierRequest -> ShowS)
-> (CreateCsvClassifierRequest -> String)
-> ([CreateCsvClassifierRequest] -> ShowS)
-> Show CreateCsvClassifierRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCsvClassifierRequest] -> ShowS
$cshowList :: [CreateCsvClassifierRequest] -> ShowS
show :: CreateCsvClassifierRequest -> String
$cshow :: CreateCsvClassifierRequest -> String
showsPrec :: Int -> CreateCsvClassifierRequest -> ShowS
$cshowsPrec :: Int -> CreateCsvClassifierRequest -> ShowS
Prelude.Show, (forall x.
CreateCsvClassifierRequest -> Rep CreateCsvClassifierRequest x)
-> (forall x.
Rep CreateCsvClassifierRequest x -> CreateCsvClassifierRequest)
-> Generic CreateCsvClassifierRequest
forall x.
Rep CreateCsvClassifierRequest x -> CreateCsvClassifierRequest
forall x.
CreateCsvClassifierRequest -> Rep CreateCsvClassifierRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCsvClassifierRequest x -> CreateCsvClassifierRequest
$cfrom :: forall x.
CreateCsvClassifierRequest -> Rep CreateCsvClassifierRequest x
Prelude.Generic)
newCreateCsvClassifierRequest ::
Prelude.Text ->
CreateCsvClassifierRequest
newCreateCsvClassifierRequest :: Text -> CreateCsvClassifierRequest
newCreateCsvClassifierRequest Text
pName_ =
CreateCsvClassifierRequest' :: Maybe Text
-> Maybe CsvHeaderOption
-> Maybe Bool
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Text
-> CreateCsvClassifierRequest
CreateCsvClassifierRequest'
{ $sel:quoteSymbol:CreateCsvClassifierRequest' :: Maybe Text
quoteSymbol =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:containsHeader:CreateCsvClassifierRequest' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
forall a. Maybe a
Prelude.Nothing,
$sel:disableValueTrimming:CreateCsvClassifierRequest' :: Maybe Bool
disableValueTrimming = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:header:CreateCsvClassifierRequest' :: Maybe [Text]
header = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:allowSingleColumn:CreateCsvClassifierRequest' :: Maybe Bool
allowSingleColumn = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:delimiter:CreateCsvClassifierRequest' :: Maybe Text
delimiter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateCsvClassifierRequest' :: Text
name = Text
pName_
}
createCsvClassifierRequest_quoteSymbol :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe Prelude.Text)
createCsvClassifierRequest_quoteSymbol :: (Maybe Text -> f (Maybe Text))
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest
createCsvClassifierRequest_quoteSymbol = (CreateCsvClassifierRequest -> Maybe Text)
-> (CreateCsvClassifierRequest
-> Maybe Text -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe Text
quoteSymbol :: Maybe Text
$sel:quoteSymbol:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Text
quoteSymbol} -> Maybe Text
quoteSymbol) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe Text
a -> CreateCsvClassifierRequest
s {$sel:quoteSymbol:CreateCsvClassifierRequest' :: Maybe Text
quoteSymbol = Maybe Text
a} :: CreateCsvClassifierRequest)
createCsvClassifierRequest_containsHeader :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe CsvHeaderOption)
= (CreateCsvClassifierRequest -> Maybe CsvHeaderOption)
-> (CreateCsvClassifierRequest
-> Maybe CsvHeaderOption -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe CsvHeaderOption)
(Maybe CsvHeaderOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe CsvHeaderOption
containsHeader :: Maybe CsvHeaderOption
$sel:containsHeader:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe CsvHeaderOption
containsHeader} -> Maybe CsvHeaderOption
containsHeader) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe CsvHeaderOption
a -> CreateCsvClassifierRequest
s {$sel:containsHeader:CreateCsvClassifierRequest' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
a} :: CreateCsvClassifierRequest)
createCsvClassifierRequest_disableValueTrimming :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe Prelude.Bool)
createCsvClassifierRequest_disableValueTrimming :: (Maybe Bool -> f (Maybe Bool))
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest
createCsvClassifierRequest_disableValueTrimming = (CreateCsvClassifierRequest -> Maybe Bool)
-> (CreateCsvClassifierRequest
-> Maybe Bool -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe Bool
disableValueTrimming :: Maybe Bool
$sel:disableValueTrimming:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Bool
disableValueTrimming} -> Maybe Bool
disableValueTrimming) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe Bool
a -> CreateCsvClassifierRequest
s {$sel:disableValueTrimming:CreateCsvClassifierRequest' :: Maybe Bool
disableValueTrimming = Maybe Bool
a} :: CreateCsvClassifierRequest)
createCsvClassifierRequest_header :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe [Prelude.Text])
= (CreateCsvClassifierRequest -> Maybe [Text])
-> (CreateCsvClassifierRequest
-> Maybe [Text] -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe [Text]
header :: Maybe [Text]
$sel:header:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe [Text]
header} -> Maybe [Text]
header) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe [Text]
a -> CreateCsvClassifierRequest
s {$sel:header:CreateCsvClassifierRequest' :: Maybe [Text]
header = Maybe [Text]
a} :: CreateCsvClassifierRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateCsvClassifierRequest
-> f CreateCsvClassifierRequest
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
createCsvClassifierRequest_allowSingleColumn :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe Prelude.Bool)
createCsvClassifierRequest_allowSingleColumn :: (Maybe Bool -> f (Maybe Bool))
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest
createCsvClassifierRequest_allowSingleColumn = (CreateCsvClassifierRequest -> Maybe Bool)
-> (CreateCsvClassifierRequest
-> Maybe Bool -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe Bool
allowSingleColumn :: Maybe Bool
$sel:allowSingleColumn:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Bool
allowSingleColumn} -> Maybe Bool
allowSingleColumn) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe Bool
a -> CreateCsvClassifierRequest
s {$sel:allowSingleColumn:CreateCsvClassifierRequest' :: Maybe Bool
allowSingleColumn = Maybe Bool
a} :: CreateCsvClassifierRequest)
createCsvClassifierRequest_delimiter :: Lens.Lens' CreateCsvClassifierRequest (Prelude.Maybe Prelude.Text)
createCsvClassifierRequest_delimiter :: (Maybe Text -> f (Maybe Text))
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest
createCsvClassifierRequest_delimiter = (CreateCsvClassifierRequest -> Maybe Text)
-> (CreateCsvClassifierRequest
-> Maybe Text -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest
CreateCsvClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Maybe Text
delimiter :: Maybe Text
$sel:delimiter:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Text
delimiter} -> Maybe Text
delimiter) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Maybe Text
a -> CreateCsvClassifierRequest
s {$sel:delimiter:CreateCsvClassifierRequest' :: Maybe Text
delimiter = Maybe Text
a} :: CreateCsvClassifierRequest)
createCsvClassifierRequest_name :: Lens.Lens' CreateCsvClassifierRequest Prelude.Text
createCsvClassifierRequest_name :: (Text -> f Text)
-> CreateCsvClassifierRequest -> f CreateCsvClassifierRequest
createCsvClassifierRequest_name = (CreateCsvClassifierRequest -> Text)
-> (CreateCsvClassifierRequest
-> Text -> CreateCsvClassifierRequest)
-> Lens
CreateCsvClassifierRequest CreateCsvClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCsvClassifierRequest' {Text
name :: Text
$sel:name:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Text
name} -> Text
name) (\s :: CreateCsvClassifierRequest
s@CreateCsvClassifierRequest' {} Text
a -> CreateCsvClassifierRequest
s {$sel:name:CreateCsvClassifierRequest' :: Text
name = Text
a} :: CreateCsvClassifierRequest)
instance Prelude.Hashable CreateCsvClassifierRequest
instance Prelude.NFData CreateCsvClassifierRequest
instance Core.ToJSON CreateCsvClassifierRequest where
toJSON :: CreateCsvClassifierRequest -> Value
toJSON CreateCsvClassifierRequest' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe CsvHeaderOption
Text
name :: Text
delimiter :: Maybe Text
allowSingleColumn :: Maybe Bool
header :: Maybe [Text]
disableValueTrimming :: Maybe Bool
containsHeader :: Maybe CsvHeaderOption
quoteSymbol :: Maybe Text
$sel:name:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Text
$sel:delimiter:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Text
$sel:allowSingleColumn:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Bool
$sel:header:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe [Text]
$sel:disableValueTrimming:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Bool
$sel:containsHeader:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe CsvHeaderOption
$sel:quoteSymbol:CreateCsvClassifierRequest' :: CreateCsvClassifierRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"QuoteSymbol" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
quoteSymbol,
(Text
"ContainsHeader" Text -> CsvHeaderOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CsvHeaderOption -> Pair) -> Maybe CsvHeaderOption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CsvHeaderOption
containsHeader,
(Text
"DisableValueTrimming" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableValueTrimming,
(Text
"Header" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
header,
(Text
"AllowSingleColumn" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
allowSingleColumn,
(Text
"Delimiter" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
delimiter,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)