{-# 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.CreateXMLClassifierRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateXMLClassifierRequest = CreateXMLClassifierRequest'
{
CreateXMLClassifierRequest -> Maybe Text
rowTag :: Prelude.Maybe Prelude.Text,
CreateXMLClassifierRequest -> Text
classification :: Prelude.Text,
CreateXMLClassifierRequest -> Text
name :: Prelude.Text
}
deriving (CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool
(CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool)
-> (CreateXMLClassifierRequest
-> CreateXMLClassifierRequest -> Bool)
-> Eq CreateXMLClassifierRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool
$c/= :: CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool
== :: CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool
$c== :: CreateXMLClassifierRequest -> CreateXMLClassifierRequest -> Bool
Prelude.Eq, ReadPrec [CreateXMLClassifierRequest]
ReadPrec CreateXMLClassifierRequest
Int -> ReadS CreateXMLClassifierRequest
ReadS [CreateXMLClassifierRequest]
(Int -> ReadS CreateXMLClassifierRequest)
-> ReadS [CreateXMLClassifierRequest]
-> ReadPrec CreateXMLClassifierRequest
-> ReadPrec [CreateXMLClassifierRequest]
-> Read CreateXMLClassifierRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateXMLClassifierRequest]
$creadListPrec :: ReadPrec [CreateXMLClassifierRequest]
readPrec :: ReadPrec CreateXMLClassifierRequest
$creadPrec :: ReadPrec CreateXMLClassifierRequest
readList :: ReadS [CreateXMLClassifierRequest]
$creadList :: ReadS [CreateXMLClassifierRequest]
readsPrec :: Int -> ReadS CreateXMLClassifierRequest
$creadsPrec :: Int -> ReadS CreateXMLClassifierRequest
Prelude.Read, Int -> CreateXMLClassifierRequest -> ShowS
[CreateXMLClassifierRequest] -> ShowS
CreateXMLClassifierRequest -> String
(Int -> CreateXMLClassifierRequest -> ShowS)
-> (CreateXMLClassifierRequest -> String)
-> ([CreateXMLClassifierRequest] -> ShowS)
-> Show CreateXMLClassifierRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateXMLClassifierRequest] -> ShowS
$cshowList :: [CreateXMLClassifierRequest] -> ShowS
show :: CreateXMLClassifierRequest -> String
$cshow :: CreateXMLClassifierRequest -> String
showsPrec :: Int -> CreateXMLClassifierRequest -> ShowS
$cshowsPrec :: Int -> CreateXMLClassifierRequest -> ShowS
Prelude.Show, (forall x.
CreateXMLClassifierRequest -> Rep CreateXMLClassifierRequest x)
-> (forall x.
Rep CreateXMLClassifierRequest x -> CreateXMLClassifierRequest)
-> Generic CreateXMLClassifierRequest
forall x.
Rep CreateXMLClassifierRequest x -> CreateXMLClassifierRequest
forall x.
CreateXMLClassifierRequest -> Rep CreateXMLClassifierRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateXMLClassifierRequest x -> CreateXMLClassifierRequest
$cfrom :: forall x.
CreateXMLClassifierRequest -> Rep CreateXMLClassifierRequest x
Prelude.Generic)
newCreateXMLClassifierRequest ::
Prelude.Text ->
Prelude.Text ->
CreateXMLClassifierRequest
newCreateXMLClassifierRequest :: Text -> Text -> CreateXMLClassifierRequest
newCreateXMLClassifierRequest Text
pClassification_ Text
pName_ =
CreateXMLClassifierRequest' :: Maybe Text -> Text -> Text -> CreateXMLClassifierRequest
CreateXMLClassifierRequest'
{ $sel:rowTag:CreateXMLClassifierRequest' :: Maybe Text
rowTag =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:classification:CreateXMLClassifierRequest' :: Text
classification = Text
pClassification_,
$sel:name:CreateXMLClassifierRequest' :: Text
name = Text
pName_
}
createXMLClassifierRequest_rowTag :: Lens.Lens' CreateXMLClassifierRequest (Prelude.Maybe Prelude.Text)
createXMLClassifierRequest_rowTag :: (Maybe Text -> f (Maybe Text))
-> CreateXMLClassifierRequest -> f CreateXMLClassifierRequest
createXMLClassifierRequest_rowTag = (CreateXMLClassifierRequest -> Maybe Text)
-> (CreateXMLClassifierRequest
-> Maybe Text -> CreateXMLClassifierRequest)
-> Lens
CreateXMLClassifierRequest
CreateXMLClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateXMLClassifierRequest' {Maybe Text
rowTag :: Maybe Text
$sel:rowTag:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Maybe Text
rowTag} -> Maybe Text
rowTag) (\s :: CreateXMLClassifierRequest
s@CreateXMLClassifierRequest' {} Maybe Text
a -> CreateXMLClassifierRequest
s {$sel:rowTag:CreateXMLClassifierRequest' :: Maybe Text
rowTag = Maybe Text
a} :: CreateXMLClassifierRequest)
createXMLClassifierRequest_classification :: Lens.Lens' CreateXMLClassifierRequest Prelude.Text
createXMLClassifierRequest_classification :: (Text -> f Text)
-> CreateXMLClassifierRequest -> f CreateXMLClassifierRequest
createXMLClassifierRequest_classification = (CreateXMLClassifierRequest -> Text)
-> (CreateXMLClassifierRequest
-> Text -> CreateXMLClassifierRequest)
-> Lens
CreateXMLClassifierRequest CreateXMLClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateXMLClassifierRequest' {Text
classification :: Text
$sel:classification:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Text
classification} -> Text
classification) (\s :: CreateXMLClassifierRequest
s@CreateXMLClassifierRequest' {} Text
a -> CreateXMLClassifierRequest
s {$sel:classification:CreateXMLClassifierRequest' :: Text
classification = Text
a} :: CreateXMLClassifierRequest)
createXMLClassifierRequest_name :: Lens.Lens' CreateXMLClassifierRequest Prelude.Text
createXMLClassifierRequest_name :: (Text -> f Text)
-> CreateXMLClassifierRequest -> f CreateXMLClassifierRequest
createXMLClassifierRequest_name = (CreateXMLClassifierRequest -> Text)
-> (CreateXMLClassifierRequest
-> Text -> CreateXMLClassifierRequest)
-> Lens
CreateXMLClassifierRequest CreateXMLClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateXMLClassifierRequest' {Text
name :: Text
$sel:name:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Text
name} -> Text
name) (\s :: CreateXMLClassifierRequest
s@CreateXMLClassifierRequest' {} Text
a -> CreateXMLClassifierRequest
s {$sel:name:CreateXMLClassifierRequest' :: Text
name = Text
a} :: CreateXMLClassifierRequest)
instance Prelude.Hashable CreateXMLClassifierRequest
instance Prelude.NFData CreateXMLClassifierRequest
instance Core.ToJSON CreateXMLClassifierRequest where
toJSON :: CreateXMLClassifierRequest -> Value
toJSON CreateXMLClassifierRequest' {Maybe Text
Text
name :: Text
classification :: Text
rowTag :: Maybe Text
$sel:name:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Text
$sel:classification:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Text
$sel:rowTag:CreateXMLClassifierRequest' :: CreateXMLClassifierRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RowTag" 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
rowTag,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"Classification" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
classification),
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)
]
)