{-# 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.RecipientDsnFields where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.DsnAction
import Amazonka.SES.Types.ExtensionField
data RecipientDsnFields = RecipientDsnFields'
{
RecipientDsnFields -> Maybe Text
diagnosticCode :: Prelude.Maybe Prelude.Text,
RecipientDsnFields -> Maybe Text
remoteMta :: Prelude.Maybe Prelude.Text,
RecipientDsnFields -> Maybe Text
finalRecipient :: Prelude.Maybe Prelude.Text,
RecipientDsnFields -> Maybe [ExtensionField]
extensionFields :: Prelude.Maybe [ExtensionField],
RecipientDsnFields -> Maybe ISO8601
lastAttemptDate :: Prelude.Maybe Core.ISO8601,
RecipientDsnFields -> DsnAction
action :: DsnAction,
RecipientDsnFields -> Text
status :: Prelude.Text
}
deriving (RecipientDsnFields -> RecipientDsnFields -> Bool
(RecipientDsnFields -> RecipientDsnFields -> Bool)
-> (RecipientDsnFields -> RecipientDsnFields -> Bool)
-> Eq RecipientDsnFields
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipientDsnFields -> RecipientDsnFields -> Bool
$c/= :: RecipientDsnFields -> RecipientDsnFields -> Bool
== :: RecipientDsnFields -> RecipientDsnFields -> Bool
$c== :: RecipientDsnFields -> RecipientDsnFields -> Bool
Prelude.Eq, ReadPrec [RecipientDsnFields]
ReadPrec RecipientDsnFields
Int -> ReadS RecipientDsnFields
ReadS [RecipientDsnFields]
(Int -> ReadS RecipientDsnFields)
-> ReadS [RecipientDsnFields]
-> ReadPrec RecipientDsnFields
-> ReadPrec [RecipientDsnFields]
-> Read RecipientDsnFields
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecipientDsnFields]
$creadListPrec :: ReadPrec [RecipientDsnFields]
readPrec :: ReadPrec RecipientDsnFields
$creadPrec :: ReadPrec RecipientDsnFields
readList :: ReadS [RecipientDsnFields]
$creadList :: ReadS [RecipientDsnFields]
readsPrec :: Int -> ReadS RecipientDsnFields
$creadsPrec :: Int -> ReadS RecipientDsnFields
Prelude.Read, Int -> RecipientDsnFields -> ShowS
[RecipientDsnFields] -> ShowS
RecipientDsnFields -> String
(Int -> RecipientDsnFields -> ShowS)
-> (RecipientDsnFields -> String)
-> ([RecipientDsnFields] -> ShowS)
-> Show RecipientDsnFields
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipientDsnFields] -> ShowS
$cshowList :: [RecipientDsnFields] -> ShowS
show :: RecipientDsnFields -> String
$cshow :: RecipientDsnFields -> String
showsPrec :: Int -> RecipientDsnFields -> ShowS
$cshowsPrec :: Int -> RecipientDsnFields -> ShowS
Prelude.Show, (forall x. RecipientDsnFields -> Rep RecipientDsnFields x)
-> (forall x. Rep RecipientDsnFields x -> RecipientDsnFields)
-> Generic RecipientDsnFields
forall x. Rep RecipientDsnFields x -> RecipientDsnFields
forall x. RecipientDsnFields -> Rep RecipientDsnFields x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecipientDsnFields x -> RecipientDsnFields
$cfrom :: forall x. RecipientDsnFields -> Rep RecipientDsnFields x
Prelude.Generic)
newRecipientDsnFields ::
DsnAction ->
Prelude.Text ->
RecipientDsnFields
newRecipientDsnFields :: DsnAction -> Text -> RecipientDsnFields
newRecipientDsnFields DsnAction
pAction_ Text
pStatus_ =
RecipientDsnFields' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ExtensionField]
-> Maybe ISO8601
-> DsnAction
-> Text
-> RecipientDsnFields
RecipientDsnFields'
{ $sel:diagnosticCode:RecipientDsnFields' :: Maybe Text
diagnosticCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:remoteMta:RecipientDsnFields' :: Maybe Text
remoteMta = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:finalRecipient:RecipientDsnFields' :: Maybe Text
finalRecipient = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:extensionFields:RecipientDsnFields' :: Maybe [ExtensionField]
extensionFields = Maybe [ExtensionField]
forall a. Maybe a
Prelude.Nothing,
$sel:lastAttemptDate:RecipientDsnFields' :: Maybe ISO8601
lastAttemptDate = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:action:RecipientDsnFields' :: DsnAction
action = DsnAction
pAction_,
$sel:status:RecipientDsnFields' :: Text
status = Text
pStatus_
}
recipientDsnFields_diagnosticCode :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_diagnosticCode :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_diagnosticCode = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
diagnosticCode :: Maybe Text
$sel:diagnosticCode:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
diagnosticCode} -> Maybe Text
diagnosticCode) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:diagnosticCode:RecipientDsnFields' :: Maybe Text
diagnosticCode = Maybe Text
a} :: RecipientDsnFields)
recipientDsnFields_remoteMta :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_remoteMta :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_remoteMta = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
remoteMta :: Maybe Text
$sel:remoteMta:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
remoteMta} -> Maybe Text
remoteMta) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:remoteMta:RecipientDsnFields' :: Maybe Text
remoteMta = Maybe Text
a} :: RecipientDsnFields)
recipientDsnFields_finalRecipient :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.Text)
recipientDsnFields_finalRecipient :: (Maybe Text -> f (Maybe Text))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_finalRecipient = (RecipientDsnFields -> Maybe Text)
-> (RecipientDsnFields -> Maybe Text -> RecipientDsnFields)
-> Lens
RecipientDsnFields RecipientDsnFields (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe Text
finalRecipient :: Maybe Text
$sel:finalRecipient:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
finalRecipient} -> Maybe Text
finalRecipient) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe Text
a -> RecipientDsnFields
s {$sel:finalRecipient:RecipientDsnFields' :: Maybe Text
finalRecipient = Maybe Text
a} :: RecipientDsnFields)
recipientDsnFields_extensionFields :: Lens.Lens' RecipientDsnFields (Prelude.Maybe [ExtensionField])
recipientDsnFields_extensionFields :: (Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_extensionFields = (RecipientDsnFields -> Maybe [ExtensionField])
-> (RecipientDsnFields
-> Maybe [ExtensionField] -> RecipientDsnFields)
-> Lens
RecipientDsnFields
RecipientDsnFields
(Maybe [ExtensionField])
(Maybe [ExtensionField])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe [ExtensionField]
extensionFields :: Maybe [ExtensionField]
$sel:extensionFields:RecipientDsnFields' :: RecipientDsnFields -> Maybe [ExtensionField]
extensionFields} -> Maybe [ExtensionField]
extensionFields) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe [ExtensionField]
a -> RecipientDsnFields
s {$sel:extensionFields:RecipientDsnFields' :: Maybe [ExtensionField]
extensionFields = Maybe [ExtensionField]
a} :: RecipientDsnFields) ((Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> RecipientDsnFields -> f RecipientDsnFields)
-> ((Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> (Maybe [ExtensionField] -> f (Maybe [ExtensionField]))
-> RecipientDsnFields
-> f RecipientDsnFields
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ExtensionField] [ExtensionField] [ExtensionField] [ExtensionField]
-> Iso
(Maybe [ExtensionField])
(Maybe [ExtensionField])
(Maybe [ExtensionField])
(Maybe [ExtensionField])
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
[ExtensionField] [ExtensionField] [ExtensionField] [ExtensionField]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
recipientDsnFields_lastAttemptDate :: Lens.Lens' RecipientDsnFields (Prelude.Maybe Prelude.UTCTime)
recipientDsnFields_lastAttemptDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_lastAttemptDate = (RecipientDsnFields -> Maybe ISO8601)
-> (RecipientDsnFields -> Maybe ISO8601 -> RecipientDsnFields)
-> Lens
RecipientDsnFields
RecipientDsnFields
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Maybe ISO8601
lastAttemptDate :: Maybe ISO8601
$sel:lastAttemptDate:RecipientDsnFields' :: RecipientDsnFields -> Maybe ISO8601
lastAttemptDate} -> Maybe ISO8601
lastAttemptDate) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Maybe ISO8601
a -> RecipientDsnFields
s {$sel:lastAttemptDate:RecipientDsnFields' :: Maybe ISO8601
lastAttemptDate = Maybe ISO8601
a} :: RecipientDsnFields) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> RecipientDsnFields -> f RecipientDsnFields)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RecipientDsnFields
-> f RecipientDsnFields
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
recipientDsnFields_action :: Lens.Lens' RecipientDsnFields DsnAction
recipientDsnFields_action :: (DsnAction -> f DsnAction)
-> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_action = (RecipientDsnFields -> DsnAction)
-> (RecipientDsnFields -> DsnAction -> RecipientDsnFields)
-> Lens RecipientDsnFields RecipientDsnFields DsnAction DsnAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {DsnAction
action :: DsnAction
$sel:action:RecipientDsnFields' :: RecipientDsnFields -> DsnAction
action} -> DsnAction
action) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} DsnAction
a -> RecipientDsnFields
s {$sel:action:RecipientDsnFields' :: DsnAction
action = DsnAction
a} :: RecipientDsnFields)
recipientDsnFields_status :: Lens.Lens' RecipientDsnFields Prelude.Text
recipientDsnFields_status :: (Text -> f Text) -> RecipientDsnFields -> f RecipientDsnFields
recipientDsnFields_status = (RecipientDsnFields -> Text)
-> (RecipientDsnFields -> Text -> RecipientDsnFields)
-> Lens RecipientDsnFields RecipientDsnFields Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipientDsnFields' {Text
status :: Text
$sel:status:RecipientDsnFields' :: RecipientDsnFields -> Text
status} -> Text
status) (\s :: RecipientDsnFields
s@RecipientDsnFields' {} Text
a -> RecipientDsnFields
s {$sel:status:RecipientDsnFields' :: Text
status = Text
a} :: RecipientDsnFields)
instance Prelude.Hashable RecipientDsnFields
instance Prelude.NFData RecipientDsnFields
instance Core.ToQuery RecipientDsnFields where
toQuery :: RecipientDsnFields -> QueryString
toQuery RecipientDsnFields' {Maybe [ExtensionField]
Maybe Text
Maybe ISO8601
Text
DsnAction
status :: Text
action :: DsnAction
lastAttemptDate :: Maybe ISO8601
extensionFields :: Maybe [ExtensionField]
finalRecipient :: Maybe Text
remoteMta :: Maybe Text
diagnosticCode :: Maybe Text
$sel:status:RecipientDsnFields' :: RecipientDsnFields -> Text
$sel:action:RecipientDsnFields' :: RecipientDsnFields -> DsnAction
$sel:lastAttemptDate:RecipientDsnFields' :: RecipientDsnFields -> Maybe ISO8601
$sel:extensionFields:RecipientDsnFields' :: RecipientDsnFields -> Maybe [ExtensionField]
$sel:finalRecipient:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
$sel:remoteMta:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
$sel:diagnosticCode:RecipientDsnFields' :: RecipientDsnFields -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DiagnosticCode" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
diagnosticCode,
ByteString
"RemoteMta" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
remoteMta,
ByteString
"FinalRecipient" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
finalRecipient,
ByteString
"ExtensionFields"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [ExtensionField] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([ExtensionField] -> QueryString)
-> Maybe [ExtensionField] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExtensionField]
extensionFields
),
ByteString
"LastAttemptDate" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
lastAttemptDate,
ByteString
"Action" ByteString -> DsnAction -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: DsnAction
action,
ByteString
"Status" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
status
]