{-# 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.BouncedRecipientInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SES.Types.BounceType
import Amazonka.SES.Types.RecipientDsnFields
data BouncedRecipientInfo = BouncedRecipientInfo'
{
BouncedRecipientInfo -> Maybe BounceType
bounceType :: Prelude.Maybe BounceType,
BouncedRecipientInfo -> Maybe RecipientDsnFields
recipientDsnFields :: Prelude.Maybe RecipientDsnFields,
BouncedRecipientInfo -> Maybe Text
recipientArn :: Prelude.Maybe Prelude.Text,
BouncedRecipientInfo -> Text
recipient :: Prelude.Text
}
deriving (BouncedRecipientInfo -> BouncedRecipientInfo -> Bool
(BouncedRecipientInfo -> BouncedRecipientInfo -> Bool)
-> (BouncedRecipientInfo -> BouncedRecipientInfo -> Bool)
-> Eq BouncedRecipientInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BouncedRecipientInfo -> BouncedRecipientInfo -> Bool
$c/= :: BouncedRecipientInfo -> BouncedRecipientInfo -> Bool
== :: BouncedRecipientInfo -> BouncedRecipientInfo -> Bool
$c== :: BouncedRecipientInfo -> BouncedRecipientInfo -> Bool
Prelude.Eq, ReadPrec [BouncedRecipientInfo]
ReadPrec BouncedRecipientInfo
Int -> ReadS BouncedRecipientInfo
ReadS [BouncedRecipientInfo]
(Int -> ReadS BouncedRecipientInfo)
-> ReadS [BouncedRecipientInfo]
-> ReadPrec BouncedRecipientInfo
-> ReadPrec [BouncedRecipientInfo]
-> Read BouncedRecipientInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BouncedRecipientInfo]
$creadListPrec :: ReadPrec [BouncedRecipientInfo]
readPrec :: ReadPrec BouncedRecipientInfo
$creadPrec :: ReadPrec BouncedRecipientInfo
readList :: ReadS [BouncedRecipientInfo]
$creadList :: ReadS [BouncedRecipientInfo]
readsPrec :: Int -> ReadS BouncedRecipientInfo
$creadsPrec :: Int -> ReadS BouncedRecipientInfo
Prelude.Read, Int -> BouncedRecipientInfo -> ShowS
[BouncedRecipientInfo] -> ShowS
BouncedRecipientInfo -> String
(Int -> BouncedRecipientInfo -> ShowS)
-> (BouncedRecipientInfo -> String)
-> ([BouncedRecipientInfo] -> ShowS)
-> Show BouncedRecipientInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BouncedRecipientInfo] -> ShowS
$cshowList :: [BouncedRecipientInfo] -> ShowS
show :: BouncedRecipientInfo -> String
$cshow :: BouncedRecipientInfo -> String
showsPrec :: Int -> BouncedRecipientInfo -> ShowS
$cshowsPrec :: Int -> BouncedRecipientInfo -> ShowS
Prelude.Show, (forall x. BouncedRecipientInfo -> Rep BouncedRecipientInfo x)
-> (forall x. Rep BouncedRecipientInfo x -> BouncedRecipientInfo)
-> Generic BouncedRecipientInfo
forall x. Rep BouncedRecipientInfo x -> BouncedRecipientInfo
forall x. BouncedRecipientInfo -> Rep BouncedRecipientInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BouncedRecipientInfo x -> BouncedRecipientInfo
$cfrom :: forall x. BouncedRecipientInfo -> Rep BouncedRecipientInfo x
Prelude.Generic)
newBouncedRecipientInfo ::
Prelude.Text ->
BouncedRecipientInfo
newBouncedRecipientInfo :: Text -> BouncedRecipientInfo
newBouncedRecipientInfo Text
pRecipient_ =
BouncedRecipientInfo' :: Maybe BounceType
-> Maybe RecipientDsnFields
-> Maybe Text
-> Text
-> BouncedRecipientInfo
BouncedRecipientInfo'
{ $sel:bounceType:BouncedRecipientInfo' :: Maybe BounceType
bounceType = Maybe BounceType
forall a. Maybe a
Prelude.Nothing,
$sel:recipientDsnFields:BouncedRecipientInfo' :: Maybe RecipientDsnFields
recipientDsnFields = Maybe RecipientDsnFields
forall a. Maybe a
Prelude.Nothing,
$sel:recipientArn:BouncedRecipientInfo' :: Maybe Text
recipientArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recipient:BouncedRecipientInfo' :: Text
recipient = Text
pRecipient_
}
bouncedRecipientInfo_bounceType :: Lens.Lens' BouncedRecipientInfo (Prelude.Maybe BounceType)
bouncedRecipientInfo_bounceType :: (Maybe BounceType -> f (Maybe BounceType))
-> BouncedRecipientInfo -> f BouncedRecipientInfo
bouncedRecipientInfo_bounceType = (BouncedRecipientInfo -> Maybe BounceType)
-> (BouncedRecipientInfo
-> Maybe BounceType -> BouncedRecipientInfo)
-> Lens
BouncedRecipientInfo
BouncedRecipientInfo
(Maybe BounceType)
(Maybe BounceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BouncedRecipientInfo' {Maybe BounceType
bounceType :: Maybe BounceType
$sel:bounceType:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe BounceType
bounceType} -> Maybe BounceType
bounceType) (\s :: BouncedRecipientInfo
s@BouncedRecipientInfo' {} Maybe BounceType
a -> BouncedRecipientInfo
s {$sel:bounceType:BouncedRecipientInfo' :: Maybe BounceType
bounceType = Maybe BounceType
a} :: BouncedRecipientInfo)
bouncedRecipientInfo_recipientDsnFields :: Lens.Lens' BouncedRecipientInfo (Prelude.Maybe RecipientDsnFields)
bouncedRecipientInfo_recipientDsnFields :: (Maybe RecipientDsnFields -> f (Maybe RecipientDsnFields))
-> BouncedRecipientInfo -> f BouncedRecipientInfo
bouncedRecipientInfo_recipientDsnFields = (BouncedRecipientInfo -> Maybe RecipientDsnFields)
-> (BouncedRecipientInfo
-> Maybe RecipientDsnFields -> BouncedRecipientInfo)
-> Lens
BouncedRecipientInfo
BouncedRecipientInfo
(Maybe RecipientDsnFields)
(Maybe RecipientDsnFields)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BouncedRecipientInfo' {Maybe RecipientDsnFields
recipientDsnFields :: Maybe RecipientDsnFields
$sel:recipientDsnFields:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe RecipientDsnFields
recipientDsnFields} -> Maybe RecipientDsnFields
recipientDsnFields) (\s :: BouncedRecipientInfo
s@BouncedRecipientInfo' {} Maybe RecipientDsnFields
a -> BouncedRecipientInfo
s {$sel:recipientDsnFields:BouncedRecipientInfo' :: Maybe RecipientDsnFields
recipientDsnFields = Maybe RecipientDsnFields
a} :: BouncedRecipientInfo)
bouncedRecipientInfo_recipientArn :: Lens.Lens' BouncedRecipientInfo (Prelude.Maybe Prelude.Text)
bouncedRecipientInfo_recipientArn :: (Maybe Text -> f (Maybe Text))
-> BouncedRecipientInfo -> f BouncedRecipientInfo
bouncedRecipientInfo_recipientArn = (BouncedRecipientInfo -> Maybe Text)
-> (BouncedRecipientInfo -> Maybe Text -> BouncedRecipientInfo)
-> Lens
BouncedRecipientInfo BouncedRecipientInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BouncedRecipientInfo' {Maybe Text
recipientArn :: Maybe Text
$sel:recipientArn:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe Text
recipientArn} -> Maybe Text
recipientArn) (\s :: BouncedRecipientInfo
s@BouncedRecipientInfo' {} Maybe Text
a -> BouncedRecipientInfo
s {$sel:recipientArn:BouncedRecipientInfo' :: Maybe Text
recipientArn = Maybe Text
a} :: BouncedRecipientInfo)
bouncedRecipientInfo_recipient :: Lens.Lens' BouncedRecipientInfo Prelude.Text
bouncedRecipientInfo_recipient :: (Text -> f Text) -> BouncedRecipientInfo -> f BouncedRecipientInfo
bouncedRecipientInfo_recipient = (BouncedRecipientInfo -> Text)
-> (BouncedRecipientInfo -> Text -> BouncedRecipientInfo)
-> Lens BouncedRecipientInfo BouncedRecipientInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BouncedRecipientInfo' {Text
recipient :: Text
$sel:recipient:BouncedRecipientInfo' :: BouncedRecipientInfo -> Text
recipient} -> Text
recipient) (\s :: BouncedRecipientInfo
s@BouncedRecipientInfo' {} Text
a -> BouncedRecipientInfo
s {$sel:recipient:BouncedRecipientInfo' :: Text
recipient = Text
a} :: BouncedRecipientInfo)
instance Prelude.Hashable BouncedRecipientInfo
instance Prelude.NFData BouncedRecipientInfo
instance Core.ToQuery BouncedRecipientInfo where
toQuery :: BouncedRecipientInfo -> QueryString
toQuery BouncedRecipientInfo' {Maybe Text
Maybe BounceType
Maybe RecipientDsnFields
Text
recipient :: Text
recipientArn :: Maybe Text
recipientDsnFields :: Maybe RecipientDsnFields
bounceType :: Maybe BounceType
$sel:recipient:BouncedRecipientInfo' :: BouncedRecipientInfo -> Text
$sel:recipientArn:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe Text
$sel:recipientDsnFields:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe RecipientDsnFields
$sel:bounceType:BouncedRecipientInfo' :: BouncedRecipientInfo -> Maybe BounceType
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"BounceType" ByteString -> Maybe BounceType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe BounceType
bounceType,
ByteString
"RecipientDsnFields" ByteString -> Maybe RecipientDsnFields -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RecipientDsnFields
recipientDsnFields,
ByteString
"RecipientArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
recipientArn,
ByteString
"Recipient" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
recipient
]