{-# 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.UpdateCsvClassifierRequest 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 UpdateCsvClassifierRequest = UpdateCsvClassifierRequest'
{
UpdateCsvClassifierRequest -> Maybe Text
quoteSymbol :: Prelude.Maybe Prelude.Text,
:: Prelude.Maybe CsvHeaderOption,
UpdateCsvClassifierRequest -> Maybe Bool
disableValueTrimming :: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe [Prelude.Text],
UpdateCsvClassifierRequest -> Maybe Bool
allowSingleColumn :: Prelude.Maybe Prelude.Bool,
UpdateCsvClassifierRequest -> Maybe Text
delimiter :: Prelude.Maybe Prelude.Text,
UpdateCsvClassifierRequest -> Text
name :: Prelude.Text
}
deriving (UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool
(UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool)
-> (UpdateCsvClassifierRequest
-> UpdateCsvClassifierRequest -> Bool)
-> Eq UpdateCsvClassifierRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool
$c/= :: UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool
== :: UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool
$c== :: UpdateCsvClassifierRequest -> UpdateCsvClassifierRequest -> Bool
Prelude.Eq, ReadPrec [UpdateCsvClassifierRequest]
ReadPrec UpdateCsvClassifierRequest
Int -> ReadS UpdateCsvClassifierRequest
ReadS [UpdateCsvClassifierRequest]
(Int -> ReadS UpdateCsvClassifierRequest)
-> ReadS [UpdateCsvClassifierRequest]
-> ReadPrec UpdateCsvClassifierRequest
-> ReadPrec [UpdateCsvClassifierRequest]
-> Read UpdateCsvClassifierRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateCsvClassifierRequest]
$creadListPrec :: ReadPrec [UpdateCsvClassifierRequest]
readPrec :: ReadPrec UpdateCsvClassifierRequest
$creadPrec :: ReadPrec UpdateCsvClassifierRequest
readList :: ReadS [UpdateCsvClassifierRequest]
$creadList :: ReadS [UpdateCsvClassifierRequest]
readsPrec :: Int -> ReadS UpdateCsvClassifierRequest
$creadsPrec :: Int -> ReadS UpdateCsvClassifierRequest
Prelude.Read, Int -> UpdateCsvClassifierRequest -> ShowS
[UpdateCsvClassifierRequest] -> ShowS
UpdateCsvClassifierRequest -> String
(Int -> UpdateCsvClassifierRequest -> ShowS)
-> (UpdateCsvClassifierRequest -> String)
-> ([UpdateCsvClassifierRequest] -> ShowS)
-> Show UpdateCsvClassifierRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateCsvClassifierRequest] -> ShowS
$cshowList :: [UpdateCsvClassifierRequest] -> ShowS
show :: UpdateCsvClassifierRequest -> String
$cshow :: UpdateCsvClassifierRequest -> String
showsPrec :: Int -> UpdateCsvClassifierRequest -> ShowS
$cshowsPrec :: Int -> UpdateCsvClassifierRequest -> ShowS
Prelude.Show, (forall x.
UpdateCsvClassifierRequest -> Rep UpdateCsvClassifierRequest x)
-> (forall x.
Rep UpdateCsvClassifierRequest x -> UpdateCsvClassifierRequest)
-> Generic UpdateCsvClassifierRequest
forall x.
Rep UpdateCsvClassifierRequest x -> UpdateCsvClassifierRequest
forall x.
UpdateCsvClassifierRequest -> Rep UpdateCsvClassifierRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateCsvClassifierRequest x -> UpdateCsvClassifierRequest
$cfrom :: forall x.
UpdateCsvClassifierRequest -> Rep UpdateCsvClassifierRequest x
Prelude.Generic)
newUpdateCsvClassifierRequest ::
Prelude.Text ->
UpdateCsvClassifierRequest
newUpdateCsvClassifierRequest :: Text -> UpdateCsvClassifierRequest
newUpdateCsvClassifierRequest Text
pName_ =
UpdateCsvClassifierRequest' :: Maybe Text
-> Maybe CsvHeaderOption
-> Maybe Bool
-> Maybe [Text]
-> Maybe Bool
-> Maybe Text
-> Text
-> UpdateCsvClassifierRequest
UpdateCsvClassifierRequest'
{ $sel:quoteSymbol:UpdateCsvClassifierRequest' :: Maybe Text
quoteSymbol =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:containsHeader:UpdateCsvClassifierRequest' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
forall a. Maybe a
Prelude.Nothing,
$sel:disableValueTrimming:UpdateCsvClassifierRequest' :: Maybe Bool
disableValueTrimming = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:header:UpdateCsvClassifierRequest' :: Maybe [Text]
header = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:allowSingleColumn:UpdateCsvClassifierRequest' :: Maybe Bool
allowSingleColumn = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:delimiter:UpdateCsvClassifierRequest' :: Maybe Text
delimiter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateCsvClassifierRequest' :: Text
name = Text
pName_
}
updateCsvClassifierRequest_quoteSymbol :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe Prelude.Text)
updateCsvClassifierRequest_quoteSymbol :: (Maybe Text -> f (Maybe Text))
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest
updateCsvClassifierRequest_quoteSymbol = (UpdateCsvClassifierRequest -> Maybe Text)
-> (UpdateCsvClassifierRequest
-> Maybe Text -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe Text
quoteSymbol :: Maybe Text
$sel:quoteSymbol:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Text
quoteSymbol} -> Maybe Text
quoteSymbol) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe Text
a -> UpdateCsvClassifierRequest
s {$sel:quoteSymbol:UpdateCsvClassifierRequest' :: Maybe Text
quoteSymbol = Maybe Text
a} :: UpdateCsvClassifierRequest)
updateCsvClassifierRequest_containsHeader :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe CsvHeaderOption)
= (UpdateCsvClassifierRequest -> Maybe CsvHeaderOption)
-> (UpdateCsvClassifierRequest
-> Maybe CsvHeaderOption -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe CsvHeaderOption)
(Maybe CsvHeaderOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe CsvHeaderOption
containsHeader :: Maybe CsvHeaderOption
$sel:containsHeader:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe CsvHeaderOption
containsHeader} -> Maybe CsvHeaderOption
containsHeader) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe CsvHeaderOption
a -> UpdateCsvClassifierRequest
s {$sel:containsHeader:UpdateCsvClassifierRequest' :: Maybe CsvHeaderOption
containsHeader = Maybe CsvHeaderOption
a} :: UpdateCsvClassifierRequest)
updateCsvClassifierRequest_disableValueTrimming :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe Prelude.Bool)
updateCsvClassifierRequest_disableValueTrimming :: (Maybe Bool -> f (Maybe Bool))
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest
updateCsvClassifierRequest_disableValueTrimming = (UpdateCsvClassifierRequest -> Maybe Bool)
-> (UpdateCsvClassifierRequest
-> Maybe Bool -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe Bool
disableValueTrimming :: Maybe Bool
$sel:disableValueTrimming:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Bool
disableValueTrimming} -> Maybe Bool
disableValueTrimming) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe Bool
a -> UpdateCsvClassifierRequest
s {$sel:disableValueTrimming:UpdateCsvClassifierRequest' :: Maybe Bool
disableValueTrimming = Maybe Bool
a} :: UpdateCsvClassifierRequest)
updateCsvClassifierRequest_header :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe [Prelude.Text])
= (UpdateCsvClassifierRequest -> Maybe [Text])
-> (UpdateCsvClassifierRequest
-> Maybe [Text] -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe [Text]
header :: Maybe [Text]
$sel:header:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe [Text]
header} -> Maybe [Text]
header) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe [Text]
a -> UpdateCsvClassifierRequest
s {$sel:header:UpdateCsvClassifierRequest' :: Maybe [Text]
header = Maybe [Text]
a} :: UpdateCsvClassifierRequest) ((Maybe [Text] -> f (Maybe [Text]))
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateCsvClassifierRequest
-> f UpdateCsvClassifierRequest
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
updateCsvClassifierRequest_allowSingleColumn :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe Prelude.Bool)
updateCsvClassifierRequest_allowSingleColumn :: (Maybe Bool -> f (Maybe Bool))
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest
updateCsvClassifierRequest_allowSingleColumn = (UpdateCsvClassifierRequest -> Maybe Bool)
-> (UpdateCsvClassifierRequest
-> Maybe Bool -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe Bool
allowSingleColumn :: Maybe Bool
$sel:allowSingleColumn:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Bool
allowSingleColumn} -> Maybe Bool
allowSingleColumn) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe Bool
a -> UpdateCsvClassifierRequest
s {$sel:allowSingleColumn:UpdateCsvClassifierRequest' :: Maybe Bool
allowSingleColumn = Maybe Bool
a} :: UpdateCsvClassifierRequest)
updateCsvClassifierRequest_delimiter :: Lens.Lens' UpdateCsvClassifierRequest (Prelude.Maybe Prelude.Text)
updateCsvClassifierRequest_delimiter :: (Maybe Text -> f (Maybe Text))
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest
updateCsvClassifierRequest_delimiter = (UpdateCsvClassifierRequest -> Maybe Text)
-> (UpdateCsvClassifierRequest
-> Maybe Text -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest
UpdateCsvClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Maybe Text
delimiter :: Maybe Text
$sel:delimiter:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Text
delimiter} -> Maybe Text
delimiter) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Maybe Text
a -> UpdateCsvClassifierRequest
s {$sel:delimiter:UpdateCsvClassifierRequest' :: Maybe Text
delimiter = Maybe Text
a} :: UpdateCsvClassifierRequest)
updateCsvClassifierRequest_name :: Lens.Lens' UpdateCsvClassifierRequest Prelude.Text
updateCsvClassifierRequest_name :: (Text -> f Text)
-> UpdateCsvClassifierRequest -> f UpdateCsvClassifierRequest
updateCsvClassifierRequest_name = (UpdateCsvClassifierRequest -> Text)
-> (UpdateCsvClassifierRequest
-> Text -> UpdateCsvClassifierRequest)
-> Lens
UpdateCsvClassifierRequest UpdateCsvClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateCsvClassifierRequest' {Text
name :: Text
$sel:name:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Text
name} -> Text
name) (\s :: UpdateCsvClassifierRequest
s@UpdateCsvClassifierRequest' {} Text
a -> UpdateCsvClassifierRequest
s {$sel:name:UpdateCsvClassifierRequest' :: Text
name = Text
a} :: UpdateCsvClassifierRequest)
instance Prelude.Hashable UpdateCsvClassifierRequest
instance Prelude.NFData UpdateCsvClassifierRequest
instance Core.ToJSON UpdateCsvClassifierRequest where
toJSON :: UpdateCsvClassifierRequest -> Value
toJSON UpdateCsvClassifierRequest' {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:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Text
$sel:delimiter:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Text
$sel:allowSingleColumn:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Bool
$sel:header:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe [Text]
$sel:disableValueTrimming:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe Bool
$sel:containsHeader:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> Maybe CsvHeaderOption
$sel:quoteSymbol:UpdateCsvClassifierRequest' :: UpdateCsvClassifierRequest -> 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)
]
)