{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.SendBulkTemplatedEmail
(
SendBulkTemplatedEmail (..),
newSendBulkTemplatedEmail,
sendBulkTemplatedEmail_returnPath,
sendBulkTemplatedEmail_configurationSetName,
sendBulkTemplatedEmail_sourceArn,
sendBulkTemplatedEmail_defaultTags,
sendBulkTemplatedEmail_returnPathArn,
sendBulkTemplatedEmail_templateArn,
sendBulkTemplatedEmail_defaultTemplateData,
sendBulkTemplatedEmail_replyToAddresses,
sendBulkTemplatedEmail_source,
sendBulkTemplatedEmail_template,
sendBulkTemplatedEmail_destinations,
SendBulkTemplatedEmailResponse (..),
newSendBulkTemplatedEmailResponse,
sendBulkTemplatedEmailResponse_httpStatus,
sendBulkTemplatedEmailResponse_status,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data SendBulkTemplatedEmail = SendBulkTemplatedEmail'
{
SendBulkTemplatedEmail -> Maybe Text
returnPath :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe [MessageTag]
defaultTags :: Prelude.Maybe [MessageTag],
SendBulkTemplatedEmail -> Maybe Text
returnPathArn :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe Text
templateArn :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe Text
defaultTemplateData :: Prelude.Maybe Prelude.Text,
SendBulkTemplatedEmail -> Maybe [Text]
replyToAddresses :: Prelude.Maybe [Prelude.Text],
SendBulkTemplatedEmail -> Text
source :: Prelude.Text,
SendBulkTemplatedEmail -> Text
template :: Prelude.Text,
SendBulkTemplatedEmail -> [BulkEmailDestination]
destinations :: [BulkEmailDestination]
}
deriving (SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool
(SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool)
-> (SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool)
-> Eq SendBulkTemplatedEmail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool
$c/= :: SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool
== :: SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool
$c== :: SendBulkTemplatedEmail -> SendBulkTemplatedEmail -> Bool
Prelude.Eq, ReadPrec [SendBulkTemplatedEmail]
ReadPrec SendBulkTemplatedEmail
Int -> ReadS SendBulkTemplatedEmail
ReadS [SendBulkTemplatedEmail]
(Int -> ReadS SendBulkTemplatedEmail)
-> ReadS [SendBulkTemplatedEmail]
-> ReadPrec SendBulkTemplatedEmail
-> ReadPrec [SendBulkTemplatedEmail]
-> Read SendBulkTemplatedEmail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendBulkTemplatedEmail]
$creadListPrec :: ReadPrec [SendBulkTemplatedEmail]
readPrec :: ReadPrec SendBulkTemplatedEmail
$creadPrec :: ReadPrec SendBulkTemplatedEmail
readList :: ReadS [SendBulkTemplatedEmail]
$creadList :: ReadS [SendBulkTemplatedEmail]
readsPrec :: Int -> ReadS SendBulkTemplatedEmail
$creadsPrec :: Int -> ReadS SendBulkTemplatedEmail
Prelude.Read, Int -> SendBulkTemplatedEmail -> ShowS
[SendBulkTemplatedEmail] -> ShowS
SendBulkTemplatedEmail -> String
(Int -> SendBulkTemplatedEmail -> ShowS)
-> (SendBulkTemplatedEmail -> String)
-> ([SendBulkTemplatedEmail] -> ShowS)
-> Show SendBulkTemplatedEmail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendBulkTemplatedEmail] -> ShowS
$cshowList :: [SendBulkTemplatedEmail] -> ShowS
show :: SendBulkTemplatedEmail -> String
$cshow :: SendBulkTemplatedEmail -> String
showsPrec :: Int -> SendBulkTemplatedEmail -> ShowS
$cshowsPrec :: Int -> SendBulkTemplatedEmail -> ShowS
Prelude.Show, (forall x. SendBulkTemplatedEmail -> Rep SendBulkTemplatedEmail x)
-> (forall x.
Rep SendBulkTemplatedEmail x -> SendBulkTemplatedEmail)
-> Generic SendBulkTemplatedEmail
forall x. Rep SendBulkTemplatedEmail x -> SendBulkTemplatedEmail
forall x. SendBulkTemplatedEmail -> Rep SendBulkTemplatedEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendBulkTemplatedEmail x -> SendBulkTemplatedEmail
$cfrom :: forall x. SendBulkTemplatedEmail -> Rep SendBulkTemplatedEmail x
Prelude.Generic)
newSendBulkTemplatedEmail ::
Prelude.Text ->
Prelude.Text ->
SendBulkTemplatedEmail
newSendBulkTemplatedEmail :: Text -> Text -> SendBulkTemplatedEmail
newSendBulkTemplatedEmail Text
pSource_ Text
pTemplate_ =
SendBulkTemplatedEmail' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [MessageTag]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Text
-> Text
-> [BulkEmailDestination]
-> SendBulkTemplatedEmail
SendBulkTemplatedEmail'
{ $sel:returnPath:SendBulkTemplatedEmail' :: Maybe Text
returnPath =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configurationSetName:SendBulkTemplatedEmail' :: Maybe Text
configurationSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:SendBulkTemplatedEmail' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultTags:SendBulkTemplatedEmail' :: Maybe [MessageTag]
defaultTags = Maybe [MessageTag]
forall a. Maybe a
Prelude.Nothing,
$sel:returnPathArn:SendBulkTemplatedEmail' :: Maybe Text
returnPathArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:templateArn:SendBulkTemplatedEmail' :: Maybe Text
templateArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultTemplateData:SendBulkTemplatedEmail' :: Maybe Text
defaultTemplateData = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:replyToAddresses:SendBulkTemplatedEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:source:SendBulkTemplatedEmail' :: Text
source = Text
pSource_,
$sel:template:SendBulkTemplatedEmail' :: Text
template = Text
pTemplate_,
$sel:destinations:SendBulkTemplatedEmail' :: [BulkEmailDestination]
destinations = [BulkEmailDestination]
forall a. Monoid a => a
Prelude.mempty
}
sendBulkTemplatedEmail_returnPath :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_returnPath :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_returnPath = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
returnPath :: Maybe Text
$sel:returnPath:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
returnPath} -> Maybe Text
returnPath) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:returnPath:SendBulkTemplatedEmail' :: Maybe Text
returnPath = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_configurationSetName :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_configurationSetName :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_configurationSetName = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:configurationSetName:SendBulkTemplatedEmail' :: Maybe Text
configurationSetName = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_sourceArn :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_sourceArn :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_sourceArn = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:sourceArn:SendBulkTemplatedEmail' :: Maybe Text
sourceArn = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_defaultTags :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe [MessageTag])
sendBulkTemplatedEmail_defaultTags :: (Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_defaultTags = (SendBulkTemplatedEmail -> Maybe [MessageTag])
-> (SendBulkTemplatedEmail
-> Maybe [MessageTag] -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe [MessageTag])
(Maybe [MessageTag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe [MessageTag]
defaultTags :: Maybe [MessageTag]
$sel:defaultTags:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe [MessageTag]
defaultTags} -> Maybe [MessageTag]
defaultTags) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe [MessageTag]
a -> SendBulkTemplatedEmail
s {$sel:defaultTags:SendBulkTemplatedEmail' :: Maybe [MessageTag]
defaultTags = Maybe [MessageTag]
a} :: SendBulkTemplatedEmail) ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail)
-> ((Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> (Maybe [MessageTag] -> f (Maybe [MessageTag]))
-> SendBulkTemplatedEmail
-> f SendBulkTemplatedEmail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MessageTag] [MessageTag] [MessageTag] [MessageTag]
-> Iso
(Maybe [MessageTag])
(Maybe [MessageTag])
(Maybe [MessageTag])
(Maybe [MessageTag])
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 [MessageTag] [MessageTag] [MessageTag] [MessageTag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendBulkTemplatedEmail_returnPathArn :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_returnPathArn :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_returnPathArn = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
returnPathArn :: Maybe Text
$sel:returnPathArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
returnPathArn} -> Maybe Text
returnPathArn) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:returnPathArn:SendBulkTemplatedEmail' :: Maybe Text
returnPathArn = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_templateArn :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_templateArn :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_templateArn = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
templateArn :: Maybe Text
$sel:templateArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
templateArn} -> Maybe Text
templateArn) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:templateArn:SendBulkTemplatedEmail' :: Maybe Text
templateArn = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_defaultTemplateData :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe Prelude.Text)
sendBulkTemplatedEmail_defaultTemplateData :: (Maybe Text -> f (Maybe Text))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_defaultTemplateData = (SendBulkTemplatedEmail -> Maybe Text)
-> (SendBulkTemplatedEmail -> Maybe Text -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe Text
defaultTemplateData :: Maybe Text
$sel:defaultTemplateData:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
defaultTemplateData} -> Maybe Text
defaultTemplateData) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe Text
a -> SendBulkTemplatedEmail
s {$sel:defaultTemplateData:SendBulkTemplatedEmail' :: Maybe Text
defaultTemplateData = Maybe Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_replyToAddresses :: Lens.Lens' SendBulkTemplatedEmail (Prelude.Maybe [Prelude.Text])
sendBulkTemplatedEmail_replyToAddresses :: (Maybe [Text] -> f (Maybe [Text]))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_replyToAddresses = (SendBulkTemplatedEmail -> Maybe [Text])
-> (SendBulkTemplatedEmail
-> Maybe [Text] -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Maybe [Text]
replyToAddresses :: Maybe [Text]
$sel:replyToAddresses:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe [Text]
replyToAddresses} -> Maybe [Text]
replyToAddresses) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Maybe [Text]
a -> SendBulkTemplatedEmail
s {$sel:replyToAddresses:SendBulkTemplatedEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
a} :: SendBulkTemplatedEmail) ((Maybe [Text] -> f (Maybe [Text]))
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SendBulkTemplatedEmail
-> f SendBulkTemplatedEmail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendBulkTemplatedEmail_source :: Lens.Lens' SendBulkTemplatedEmail Prelude.Text
sendBulkTemplatedEmail_source :: (Text -> f Text)
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_source = (SendBulkTemplatedEmail -> Text)
-> (SendBulkTemplatedEmail -> Text -> SendBulkTemplatedEmail)
-> Lens SendBulkTemplatedEmail SendBulkTemplatedEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Text
source :: Text
$sel:source:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Text
source} -> Text
source) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Text
a -> SendBulkTemplatedEmail
s {$sel:source:SendBulkTemplatedEmail' :: Text
source = Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_template :: Lens.Lens' SendBulkTemplatedEmail Prelude.Text
sendBulkTemplatedEmail_template :: (Text -> f Text)
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_template = (SendBulkTemplatedEmail -> Text)
-> (SendBulkTemplatedEmail -> Text -> SendBulkTemplatedEmail)
-> Lens SendBulkTemplatedEmail SendBulkTemplatedEmail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {Text
template :: Text
$sel:template:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Text
template} -> Text
template) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} Text
a -> SendBulkTemplatedEmail
s {$sel:template:SendBulkTemplatedEmail' :: Text
template = Text
a} :: SendBulkTemplatedEmail)
sendBulkTemplatedEmail_destinations :: Lens.Lens' SendBulkTemplatedEmail [BulkEmailDestination]
sendBulkTemplatedEmail_destinations :: ([BulkEmailDestination] -> f [BulkEmailDestination])
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail
sendBulkTemplatedEmail_destinations = (SendBulkTemplatedEmail -> [BulkEmailDestination])
-> (SendBulkTemplatedEmail
-> [BulkEmailDestination] -> SendBulkTemplatedEmail)
-> Lens
SendBulkTemplatedEmail
SendBulkTemplatedEmail
[BulkEmailDestination]
[BulkEmailDestination]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmail' {[BulkEmailDestination]
destinations :: [BulkEmailDestination]
$sel:destinations:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> [BulkEmailDestination]
destinations} -> [BulkEmailDestination]
destinations) (\s :: SendBulkTemplatedEmail
s@SendBulkTemplatedEmail' {} [BulkEmailDestination]
a -> SendBulkTemplatedEmail
s {$sel:destinations:SendBulkTemplatedEmail' :: [BulkEmailDestination]
destinations = [BulkEmailDestination]
a} :: SendBulkTemplatedEmail) (([BulkEmailDestination] -> f [BulkEmailDestination])
-> SendBulkTemplatedEmail -> f SendBulkTemplatedEmail)
-> (([BulkEmailDestination] -> f [BulkEmailDestination])
-> [BulkEmailDestination] -> f [BulkEmailDestination])
-> ([BulkEmailDestination] -> f [BulkEmailDestination])
-> SendBulkTemplatedEmail
-> f SendBulkTemplatedEmail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BulkEmailDestination] -> f [BulkEmailDestination])
-> [BulkEmailDestination] -> f [BulkEmailDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest SendBulkTemplatedEmail where
type
AWSResponse SendBulkTemplatedEmail =
SendBulkTemplatedEmailResponse
request :: SendBulkTemplatedEmail -> Request SendBulkTemplatedEmail
request = Service -> SendBulkTemplatedEmail -> Request SendBulkTemplatedEmail
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SendBulkTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendBulkTemplatedEmail)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse SendBulkTemplatedEmail))
-> Logger
-> Service
-> Proxy SendBulkTemplatedEmail
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SendBulkTemplatedEmail)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SendBulkTemplatedEmailResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> [BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse
SendBulkTemplatedEmailResponse'
(Int
-> [BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse)
-> Either String Int
-> Either
String
([BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either
String
([BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse)
-> Either String [BulkEmailDestinationStatus]
-> Either String SendBulkTemplatedEmailResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String [BulkEmailDestinationStatus])
-> Either String [BulkEmailDestinationStatus]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [BulkEmailDestinationStatus]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member"
)
)
instance Prelude.Hashable SendBulkTemplatedEmail
instance Prelude.NFData SendBulkTemplatedEmail
instance Core.ToHeaders SendBulkTemplatedEmail where
toHeaders :: SendBulkTemplatedEmail -> ResponseHeaders
toHeaders = ResponseHeaders -> SendBulkTemplatedEmail -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SendBulkTemplatedEmail where
toPath :: SendBulkTemplatedEmail -> ByteString
toPath = ByteString -> SendBulkTemplatedEmail -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SendBulkTemplatedEmail where
toQuery :: SendBulkTemplatedEmail -> QueryString
toQuery SendBulkTemplatedEmail' {[BulkEmailDestination]
Maybe [Text]
Maybe [MessageTag]
Maybe Text
Text
destinations :: [BulkEmailDestination]
template :: Text
source :: Text
replyToAddresses :: Maybe [Text]
defaultTemplateData :: Maybe Text
templateArn :: Maybe Text
returnPathArn :: Maybe Text
defaultTags :: Maybe [MessageTag]
sourceArn :: Maybe Text
configurationSetName :: Maybe Text
returnPath :: Maybe Text
$sel:destinations:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> [BulkEmailDestination]
$sel:template:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Text
$sel:source:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Text
$sel:replyToAddresses:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe [Text]
$sel:defaultTemplateData:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
$sel:templateArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
$sel:returnPathArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
$sel:defaultTags:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe [MessageTag]
$sel:sourceArn:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
$sel:configurationSetName:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
$sel:returnPath:SendBulkTemplatedEmail' :: SendBulkTemplatedEmail -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SendBulkTemplatedEmail" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ReturnPath" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
returnPath,
ByteString
"ConfigurationSetName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
configurationSetName,
ByteString
"SourceArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
sourceArn,
ByteString
"DefaultTags"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [MessageTag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([MessageTag] -> QueryString)
-> Maybe [MessageTag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MessageTag]
defaultTags),
ByteString
"ReturnPathArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
returnPathArn,
ByteString
"TemplateArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateArn,
ByteString
"DefaultTemplateData" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
defaultTemplateData,
ByteString
"ReplyToAddresses"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
replyToAddresses
),
ByteString
"Source" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
source,
ByteString
"Template" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
template,
ByteString
"Destinations"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [BulkEmailDestination] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" [BulkEmailDestination]
destinations
]
data SendBulkTemplatedEmailResponse = SendBulkTemplatedEmailResponse'
{
SendBulkTemplatedEmailResponse -> Int
httpStatus :: Prelude.Int,
SendBulkTemplatedEmailResponse -> [BulkEmailDestinationStatus]
status :: [BulkEmailDestinationStatus]
}
deriving (SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool
(SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool)
-> (SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool)
-> Eq SendBulkTemplatedEmailResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool
$c/= :: SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool
== :: SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool
$c== :: SendBulkTemplatedEmailResponse
-> SendBulkTemplatedEmailResponse -> Bool
Prelude.Eq, ReadPrec [SendBulkTemplatedEmailResponse]
ReadPrec SendBulkTemplatedEmailResponse
Int -> ReadS SendBulkTemplatedEmailResponse
ReadS [SendBulkTemplatedEmailResponse]
(Int -> ReadS SendBulkTemplatedEmailResponse)
-> ReadS [SendBulkTemplatedEmailResponse]
-> ReadPrec SendBulkTemplatedEmailResponse
-> ReadPrec [SendBulkTemplatedEmailResponse]
-> Read SendBulkTemplatedEmailResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendBulkTemplatedEmailResponse]
$creadListPrec :: ReadPrec [SendBulkTemplatedEmailResponse]
readPrec :: ReadPrec SendBulkTemplatedEmailResponse
$creadPrec :: ReadPrec SendBulkTemplatedEmailResponse
readList :: ReadS [SendBulkTemplatedEmailResponse]
$creadList :: ReadS [SendBulkTemplatedEmailResponse]
readsPrec :: Int -> ReadS SendBulkTemplatedEmailResponse
$creadsPrec :: Int -> ReadS SendBulkTemplatedEmailResponse
Prelude.Read, Int -> SendBulkTemplatedEmailResponse -> ShowS
[SendBulkTemplatedEmailResponse] -> ShowS
SendBulkTemplatedEmailResponse -> String
(Int -> SendBulkTemplatedEmailResponse -> ShowS)
-> (SendBulkTemplatedEmailResponse -> String)
-> ([SendBulkTemplatedEmailResponse] -> ShowS)
-> Show SendBulkTemplatedEmailResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendBulkTemplatedEmailResponse] -> ShowS
$cshowList :: [SendBulkTemplatedEmailResponse] -> ShowS
show :: SendBulkTemplatedEmailResponse -> String
$cshow :: SendBulkTemplatedEmailResponse -> String
showsPrec :: Int -> SendBulkTemplatedEmailResponse -> ShowS
$cshowsPrec :: Int -> SendBulkTemplatedEmailResponse -> ShowS
Prelude.Show, (forall x.
SendBulkTemplatedEmailResponse
-> Rep SendBulkTemplatedEmailResponse x)
-> (forall x.
Rep SendBulkTemplatedEmailResponse x
-> SendBulkTemplatedEmailResponse)
-> Generic SendBulkTemplatedEmailResponse
forall x.
Rep SendBulkTemplatedEmailResponse x
-> SendBulkTemplatedEmailResponse
forall x.
SendBulkTemplatedEmailResponse
-> Rep SendBulkTemplatedEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SendBulkTemplatedEmailResponse x
-> SendBulkTemplatedEmailResponse
$cfrom :: forall x.
SendBulkTemplatedEmailResponse
-> Rep SendBulkTemplatedEmailResponse x
Prelude.Generic)
newSendBulkTemplatedEmailResponse ::
Prelude.Int ->
SendBulkTemplatedEmailResponse
newSendBulkTemplatedEmailResponse :: Int -> SendBulkTemplatedEmailResponse
newSendBulkTemplatedEmailResponse Int
pHttpStatus_ =
SendBulkTemplatedEmailResponse' :: Int
-> [BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse
SendBulkTemplatedEmailResponse'
{ $sel:httpStatus:SendBulkTemplatedEmailResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:status:SendBulkTemplatedEmailResponse' :: [BulkEmailDestinationStatus]
status = [BulkEmailDestinationStatus]
forall a. Monoid a => a
Prelude.mempty
}
sendBulkTemplatedEmailResponse_httpStatus :: Lens.Lens' SendBulkTemplatedEmailResponse Prelude.Int
sendBulkTemplatedEmailResponse_httpStatus :: (Int -> f Int)
-> SendBulkTemplatedEmailResponse
-> f SendBulkTemplatedEmailResponse
sendBulkTemplatedEmailResponse_httpStatus = (SendBulkTemplatedEmailResponse -> Int)
-> (SendBulkTemplatedEmailResponse
-> Int -> SendBulkTemplatedEmailResponse)
-> Lens
SendBulkTemplatedEmailResponse
SendBulkTemplatedEmailResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmailResponse' {Int
httpStatus :: Int
$sel:httpStatus:SendBulkTemplatedEmailResponse' :: SendBulkTemplatedEmailResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SendBulkTemplatedEmailResponse
s@SendBulkTemplatedEmailResponse' {} Int
a -> SendBulkTemplatedEmailResponse
s {$sel:httpStatus:SendBulkTemplatedEmailResponse' :: Int
httpStatus = Int
a} :: SendBulkTemplatedEmailResponse)
sendBulkTemplatedEmailResponse_status :: Lens.Lens' SendBulkTemplatedEmailResponse [BulkEmailDestinationStatus]
sendBulkTemplatedEmailResponse_status :: ([BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus])
-> SendBulkTemplatedEmailResponse
-> f SendBulkTemplatedEmailResponse
sendBulkTemplatedEmailResponse_status = (SendBulkTemplatedEmailResponse -> [BulkEmailDestinationStatus])
-> (SendBulkTemplatedEmailResponse
-> [BulkEmailDestinationStatus] -> SendBulkTemplatedEmailResponse)
-> Lens
SendBulkTemplatedEmailResponse
SendBulkTemplatedEmailResponse
[BulkEmailDestinationStatus]
[BulkEmailDestinationStatus]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkTemplatedEmailResponse' {[BulkEmailDestinationStatus]
status :: [BulkEmailDestinationStatus]
$sel:status:SendBulkTemplatedEmailResponse' :: SendBulkTemplatedEmailResponse -> [BulkEmailDestinationStatus]
status} -> [BulkEmailDestinationStatus]
status) (\s :: SendBulkTemplatedEmailResponse
s@SendBulkTemplatedEmailResponse' {} [BulkEmailDestinationStatus]
a -> SendBulkTemplatedEmailResponse
s {$sel:status:SendBulkTemplatedEmailResponse' :: [BulkEmailDestinationStatus]
status = [BulkEmailDestinationStatus]
a} :: SendBulkTemplatedEmailResponse) (([BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus])
-> SendBulkTemplatedEmailResponse
-> f SendBulkTemplatedEmailResponse)
-> (([BulkEmailDestinationStatus]
-> f [BulkEmailDestinationStatus])
-> [BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus])
-> ([BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus])
-> SendBulkTemplatedEmailResponse
-> f SendBulkTemplatedEmailResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus])
-> [BulkEmailDestinationStatus] -> f [BulkEmailDestinationStatus]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
SendBulkTemplatedEmailResponse