{-# 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.SES.Types.ConfigurationSet where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigurationSet = ConfigurationSet'
{
ConfigurationSet -> Text
name :: Prelude.Text
}
deriving (ConfigurationSet -> ConfigurationSet -> Bool
(ConfigurationSet -> ConfigurationSet -> Bool)
-> (ConfigurationSet -> ConfigurationSet -> Bool)
-> Eq ConfigurationSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationSet -> ConfigurationSet -> Bool
$c/= :: ConfigurationSet -> ConfigurationSet -> Bool
== :: ConfigurationSet -> ConfigurationSet -> Bool
$c== :: ConfigurationSet -> ConfigurationSet -> Bool
Prelude.Eq, ReadPrec [ConfigurationSet]
ReadPrec ConfigurationSet
Int -> ReadS ConfigurationSet
ReadS [ConfigurationSet]
(Int -> ReadS ConfigurationSet)
-> ReadS [ConfigurationSet]
-> ReadPrec ConfigurationSet
-> ReadPrec [ConfigurationSet]
-> Read ConfigurationSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationSet]
$creadListPrec :: ReadPrec [ConfigurationSet]
readPrec :: ReadPrec ConfigurationSet
$creadPrec :: ReadPrec ConfigurationSet
readList :: ReadS [ConfigurationSet]
$creadList :: ReadS [ConfigurationSet]
readsPrec :: Int -> ReadS ConfigurationSet
$creadsPrec :: Int -> ReadS ConfigurationSet
Prelude.Read, Int -> ConfigurationSet -> ShowS
[ConfigurationSet] -> ShowS
ConfigurationSet -> String
(Int -> ConfigurationSet -> ShowS)
-> (ConfigurationSet -> String)
-> ([ConfigurationSet] -> ShowS)
-> Show ConfigurationSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationSet] -> ShowS
$cshowList :: [ConfigurationSet] -> ShowS
show :: ConfigurationSet -> String
$cshow :: ConfigurationSet -> String
showsPrec :: Int -> ConfigurationSet -> ShowS
$cshowsPrec :: Int -> ConfigurationSet -> ShowS
Prelude.Show, (forall x. ConfigurationSet -> Rep ConfigurationSet x)
-> (forall x. Rep ConfigurationSet x -> ConfigurationSet)
-> Generic ConfigurationSet
forall x. Rep ConfigurationSet x -> ConfigurationSet
forall x. ConfigurationSet -> Rep ConfigurationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigurationSet x -> ConfigurationSet
$cfrom :: forall x. ConfigurationSet -> Rep ConfigurationSet x
Prelude.Generic)
newConfigurationSet ::
Prelude.Text ->
ConfigurationSet
newConfigurationSet :: Text -> ConfigurationSet
newConfigurationSet Text
pName_ =
ConfigurationSet' :: Text -> ConfigurationSet
ConfigurationSet' {$sel:name:ConfigurationSet' :: Text
name = Text
pName_}
configurationSet_name :: Lens.Lens' ConfigurationSet Prelude.Text
configurationSet_name :: (Text -> f Text) -> ConfigurationSet -> f ConfigurationSet
configurationSet_name = (ConfigurationSet -> Text)
-> (ConfigurationSet -> Text -> ConfigurationSet)
-> Lens ConfigurationSet ConfigurationSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationSet' {Text
name :: Text
$sel:name:ConfigurationSet' :: ConfigurationSet -> Text
name} -> Text
name) (\s :: ConfigurationSet
s@ConfigurationSet' {} Text
a -> ConfigurationSet
s {$sel:name:ConfigurationSet' :: Text
name = Text
a} :: ConfigurationSet)
instance Core.FromXML ConfigurationSet where
parseXML :: [Node] -> Either String ConfigurationSet
parseXML [Node]
x =
Text -> ConfigurationSet
ConfigurationSet' (Text -> ConfigurationSet)
-> Either String Text -> Either String ConfigurationSet
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Name")
instance Prelude.Hashable ConfigurationSet
instance Prelude.NFData ConfigurationSet
instance Core.ToQuery ConfigurationSet where
toQuery :: ConfigurationSet -> QueryString
toQuery ConfigurationSet' {Text
name :: Text
$sel:name:ConfigurationSet' :: ConfigurationSet -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Name" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
name]