{-# 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.ExtensionField where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExtensionField = ExtensionField'
{
ExtensionField -> Text
name :: Prelude.Text,
ExtensionField -> Text
value :: Prelude.Text
}
deriving (ExtensionField -> ExtensionField -> Bool
(ExtensionField -> ExtensionField -> Bool)
-> (ExtensionField -> ExtensionField -> Bool) -> Eq ExtensionField
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExtensionField -> ExtensionField -> Bool
$c/= :: ExtensionField -> ExtensionField -> Bool
== :: ExtensionField -> ExtensionField -> Bool
$c== :: ExtensionField -> ExtensionField -> Bool
Prelude.Eq, ReadPrec [ExtensionField]
ReadPrec ExtensionField
Int -> ReadS ExtensionField
ReadS [ExtensionField]
(Int -> ReadS ExtensionField)
-> ReadS [ExtensionField]
-> ReadPrec ExtensionField
-> ReadPrec [ExtensionField]
-> Read ExtensionField
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExtensionField]
$creadListPrec :: ReadPrec [ExtensionField]
readPrec :: ReadPrec ExtensionField
$creadPrec :: ReadPrec ExtensionField
readList :: ReadS [ExtensionField]
$creadList :: ReadS [ExtensionField]
readsPrec :: Int -> ReadS ExtensionField
$creadsPrec :: Int -> ReadS ExtensionField
Prelude.Read, Int -> ExtensionField -> ShowS
[ExtensionField] -> ShowS
ExtensionField -> String
(Int -> ExtensionField -> ShowS)
-> (ExtensionField -> String)
-> ([ExtensionField] -> ShowS)
-> Show ExtensionField
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExtensionField] -> ShowS
$cshowList :: [ExtensionField] -> ShowS
show :: ExtensionField -> String
$cshow :: ExtensionField -> String
showsPrec :: Int -> ExtensionField -> ShowS
$cshowsPrec :: Int -> ExtensionField -> ShowS
Prelude.Show, (forall x. ExtensionField -> Rep ExtensionField x)
-> (forall x. Rep ExtensionField x -> ExtensionField)
-> Generic ExtensionField
forall x. Rep ExtensionField x -> ExtensionField
forall x. ExtensionField -> Rep ExtensionField x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExtensionField x -> ExtensionField
$cfrom :: forall x. ExtensionField -> Rep ExtensionField x
Prelude.Generic)
newExtensionField ::
Prelude.Text ->
Prelude.Text ->
ExtensionField
newExtensionField :: Text -> Text -> ExtensionField
newExtensionField Text
pName_ Text
pValue_ =
ExtensionField' :: Text -> Text -> ExtensionField
ExtensionField' {$sel:name:ExtensionField' :: Text
name = Text
pName_, $sel:value:ExtensionField' :: Text
value = Text
pValue_}
extensionField_name :: Lens.Lens' ExtensionField Prelude.Text
extensionField_name :: (Text -> f Text) -> ExtensionField -> f ExtensionField
extensionField_name = (ExtensionField -> Text)
-> (ExtensionField -> Text -> ExtensionField)
-> Lens ExtensionField ExtensionField Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExtensionField' {Text
name :: Text
$sel:name:ExtensionField' :: ExtensionField -> Text
name} -> Text
name) (\s :: ExtensionField
s@ExtensionField' {} Text
a -> ExtensionField
s {$sel:name:ExtensionField' :: Text
name = Text
a} :: ExtensionField)
extensionField_value :: Lens.Lens' ExtensionField Prelude.Text
extensionField_value :: (Text -> f Text) -> ExtensionField -> f ExtensionField
extensionField_value = (ExtensionField -> Text)
-> (ExtensionField -> Text -> ExtensionField)
-> Lens ExtensionField ExtensionField Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExtensionField' {Text
value :: Text
$sel:value:ExtensionField' :: ExtensionField -> Text
value} -> Text
value) (\s :: ExtensionField
s@ExtensionField' {} Text
a -> ExtensionField
s {$sel:value:ExtensionField' :: Text
value = Text
a} :: ExtensionField)
instance Prelude.Hashable ExtensionField
instance Prelude.NFData ExtensionField
instance Core.ToQuery ExtensionField where
toQuery :: ExtensionField -> QueryString
toQuery ExtensionField' {Text
value :: Text
name :: Text
$sel:value:ExtensionField' :: ExtensionField -> Text
$sel:name:ExtensionField' :: ExtensionField -> 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, ByteString
"Value" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
value]