{-# 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.SESV2.SendBulkEmail
(
SendBulkEmail (..),
newSendBulkEmail,
sendBulkEmail_configurationSetName,
sendBulkEmail_defaultEmailTags,
sendBulkEmail_feedbackForwardingEmailAddress,
sendBulkEmail_feedbackForwardingEmailAddressIdentityArn,
sendBulkEmail_fromEmailAddress,
sendBulkEmail_fromEmailAddressIdentityArn,
sendBulkEmail_replyToAddresses,
sendBulkEmail_defaultContent,
sendBulkEmail_bulkEmailEntries,
SendBulkEmailResponse (..),
newSendBulkEmailResponse,
sendBulkEmailResponse_httpStatus,
sendBulkEmailResponse_bulkEmailEntryResults,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SESV2.Types
data SendBulkEmail = SendBulkEmail'
{
SendBulkEmail -> Maybe Text
configurationSetName :: Prelude.Maybe Prelude.Text,
SendBulkEmail -> Maybe [MessageTag]
defaultEmailTags :: Prelude.Maybe [MessageTag],
SendBulkEmail -> Maybe Text
feedbackForwardingEmailAddress :: Prelude.Maybe Prelude.Text,
SendBulkEmail -> Maybe Text
feedbackForwardingEmailAddressIdentityArn :: Prelude.Maybe Prelude.Text,
SendBulkEmail -> Maybe Text
fromEmailAddress :: Prelude.Maybe Prelude.Text,
SendBulkEmail -> Maybe Text
fromEmailAddressIdentityArn :: Prelude.Maybe Prelude.Text,
SendBulkEmail -> Maybe [Text]
replyToAddresses :: Prelude.Maybe [Prelude.Text],
SendBulkEmail -> BulkEmailContent
defaultContent :: BulkEmailContent,
SendBulkEmail -> [BulkEmailEntry]
bulkEmailEntries :: [BulkEmailEntry]
}
deriving (SendBulkEmail -> SendBulkEmail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendBulkEmail -> SendBulkEmail -> Bool
$c/= :: SendBulkEmail -> SendBulkEmail -> Bool
== :: SendBulkEmail -> SendBulkEmail -> Bool
$c== :: SendBulkEmail -> SendBulkEmail -> Bool
Prelude.Eq, ReadPrec [SendBulkEmail]
ReadPrec SendBulkEmail
Int -> ReadS SendBulkEmail
ReadS [SendBulkEmail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendBulkEmail]
$creadListPrec :: ReadPrec [SendBulkEmail]
readPrec :: ReadPrec SendBulkEmail
$creadPrec :: ReadPrec SendBulkEmail
readList :: ReadS [SendBulkEmail]
$creadList :: ReadS [SendBulkEmail]
readsPrec :: Int -> ReadS SendBulkEmail
$creadsPrec :: Int -> ReadS SendBulkEmail
Prelude.Read, Int -> SendBulkEmail -> ShowS
[SendBulkEmail] -> ShowS
SendBulkEmail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendBulkEmail] -> ShowS
$cshowList :: [SendBulkEmail] -> ShowS
show :: SendBulkEmail -> String
$cshow :: SendBulkEmail -> String
showsPrec :: Int -> SendBulkEmail -> ShowS
$cshowsPrec :: Int -> SendBulkEmail -> ShowS
Prelude.Show, forall x. Rep SendBulkEmail x -> SendBulkEmail
forall x. SendBulkEmail -> Rep SendBulkEmail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendBulkEmail x -> SendBulkEmail
$cfrom :: forall x. SendBulkEmail -> Rep SendBulkEmail x
Prelude.Generic)
newSendBulkEmail ::
BulkEmailContent ->
SendBulkEmail
newSendBulkEmail :: BulkEmailContent -> SendBulkEmail
newSendBulkEmail BulkEmailContent
pDefaultContent_ =
SendBulkEmail'
{ $sel:configurationSetName:SendBulkEmail' :: Maybe Text
configurationSetName =
forall a. Maybe a
Prelude.Nothing,
$sel:defaultEmailTags:SendBulkEmail' :: Maybe [MessageTag]
defaultEmailTags = forall a. Maybe a
Prelude.Nothing,
$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: Maybe Text
feedbackForwardingEmailAddress = forall a. Maybe a
Prelude.Nothing,
$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: Maybe Text
feedbackForwardingEmailAddressIdentityArn =
forall a. Maybe a
Prelude.Nothing,
$sel:fromEmailAddress:SendBulkEmail' :: Maybe Text
fromEmailAddress = forall a. Maybe a
Prelude.Nothing,
$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: Maybe Text
fromEmailAddressIdentityArn = forall a. Maybe a
Prelude.Nothing,
$sel:replyToAddresses:SendBulkEmail' :: Maybe [Text]
replyToAddresses = forall a. Maybe a
Prelude.Nothing,
$sel:defaultContent:SendBulkEmail' :: BulkEmailContent
defaultContent = BulkEmailContent
pDefaultContent_,
$sel:bulkEmailEntries:SendBulkEmail' :: [BulkEmailEntry]
bulkEmailEntries = forall a. Monoid a => a
Prelude.mempty
}
sendBulkEmail_configurationSetName :: Lens.Lens' SendBulkEmail (Prelude.Maybe Prelude.Text)
sendBulkEmail_configurationSetName :: Lens' SendBulkEmail (Maybe Text)
sendBulkEmail_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:SendBulkEmail' :: SendBulkEmail -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe Text
a -> SendBulkEmail
s {$sel:configurationSetName:SendBulkEmail' :: Maybe Text
configurationSetName = Maybe Text
a} :: SendBulkEmail)
sendBulkEmail_defaultEmailTags :: Lens.Lens' SendBulkEmail (Prelude.Maybe [MessageTag])
sendBulkEmail_defaultEmailTags :: Lens' SendBulkEmail (Maybe [MessageTag])
sendBulkEmail_defaultEmailTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe [MessageTag]
defaultEmailTags :: Maybe [MessageTag]
$sel:defaultEmailTags:SendBulkEmail' :: SendBulkEmail -> Maybe [MessageTag]
defaultEmailTags} -> Maybe [MessageTag]
defaultEmailTags) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe [MessageTag]
a -> SendBulkEmail
s {$sel:defaultEmailTags:SendBulkEmail' :: Maybe [MessageTag]
defaultEmailTags = Maybe [MessageTag]
a} :: SendBulkEmail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendBulkEmail_feedbackForwardingEmailAddress :: Lens.Lens' SendBulkEmail (Prelude.Maybe Prelude.Text)
sendBulkEmail_feedbackForwardingEmailAddress :: Lens' SendBulkEmail (Maybe Text)
sendBulkEmail_feedbackForwardingEmailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe Text
feedbackForwardingEmailAddress :: Maybe Text
$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
feedbackForwardingEmailAddress} -> Maybe Text
feedbackForwardingEmailAddress) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe Text
a -> SendBulkEmail
s {$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: Maybe Text
feedbackForwardingEmailAddress = Maybe Text
a} :: SendBulkEmail)
sendBulkEmail_feedbackForwardingEmailAddressIdentityArn :: Lens.Lens' SendBulkEmail (Prelude.Maybe Prelude.Text)
sendBulkEmail_feedbackForwardingEmailAddressIdentityArn :: Lens' SendBulkEmail (Maybe Text)
sendBulkEmail_feedbackForwardingEmailAddressIdentityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe Text
feedbackForwardingEmailAddressIdentityArn :: Maybe Text
$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
feedbackForwardingEmailAddressIdentityArn} -> Maybe Text
feedbackForwardingEmailAddressIdentityArn) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe Text
a -> SendBulkEmail
s {$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: Maybe Text
feedbackForwardingEmailAddressIdentityArn = Maybe Text
a} :: SendBulkEmail)
sendBulkEmail_fromEmailAddress :: Lens.Lens' SendBulkEmail (Prelude.Maybe Prelude.Text)
sendBulkEmail_fromEmailAddress :: Lens' SendBulkEmail (Maybe Text)
sendBulkEmail_fromEmailAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe Text
fromEmailAddress :: Maybe Text
$sel:fromEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
fromEmailAddress} -> Maybe Text
fromEmailAddress) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe Text
a -> SendBulkEmail
s {$sel:fromEmailAddress:SendBulkEmail' :: Maybe Text
fromEmailAddress = Maybe Text
a} :: SendBulkEmail)
sendBulkEmail_fromEmailAddressIdentityArn :: Lens.Lens' SendBulkEmail (Prelude.Maybe Prelude.Text)
sendBulkEmail_fromEmailAddressIdentityArn :: Lens' SendBulkEmail (Maybe Text)
sendBulkEmail_fromEmailAddressIdentityArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe Text
fromEmailAddressIdentityArn :: Maybe Text
$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
fromEmailAddressIdentityArn} -> Maybe Text
fromEmailAddressIdentityArn) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe Text
a -> SendBulkEmail
s {$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: Maybe Text
fromEmailAddressIdentityArn = Maybe Text
a} :: SendBulkEmail)
sendBulkEmail_replyToAddresses :: Lens.Lens' SendBulkEmail (Prelude.Maybe [Prelude.Text])
sendBulkEmail_replyToAddresses :: Lens' SendBulkEmail (Maybe [Text])
sendBulkEmail_replyToAddresses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {Maybe [Text]
replyToAddresses :: Maybe [Text]
$sel:replyToAddresses:SendBulkEmail' :: SendBulkEmail -> Maybe [Text]
replyToAddresses} -> Maybe [Text]
replyToAddresses) (\s :: SendBulkEmail
s@SendBulkEmail' {} Maybe [Text]
a -> SendBulkEmail
s {$sel:replyToAddresses:SendBulkEmail' :: Maybe [Text]
replyToAddresses = Maybe [Text]
a} :: SendBulkEmail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
sendBulkEmail_defaultContent :: Lens.Lens' SendBulkEmail BulkEmailContent
sendBulkEmail_defaultContent :: Lens' SendBulkEmail BulkEmailContent
sendBulkEmail_defaultContent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {BulkEmailContent
defaultContent :: BulkEmailContent
$sel:defaultContent:SendBulkEmail' :: SendBulkEmail -> BulkEmailContent
defaultContent} -> BulkEmailContent
defaultContent) (\s :: SendBulkEmail
s@SendBulkEmail' {} BulkEmailContent
a -> SendBulkEmail
s {$sel:defaultContent:SendBulkEmail' :: BulkEmailContent
defaultContent = BulkEmailContent
a} :: SendBulkEmail)
sendBulkEmail_bulkEmailEntries :: Lens.Lens' SendBulkEmail [BulkEmailEntry]
sendBulkEmail_bulkEmailEntries :: Lens' SendBulkEmail [BulkEmailEntry]
sendBulkEmail_bulkEmailEntries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmail' {[BulkEmailEntry]
bulkEmailEntries :: [BulkEmailEntry]
$sel:bulkEmailEntries:SendBulkEmail' :: SendBulkEmail -> [BulkEmailEntry]
bulkEmailEntries} -> [BulkEmailEntry]
bulkEmailEntries) (\s :: SendBulkEmail
s@SendBulkEmail' {} [BulkEmailEntry]
a -> SendBulkEmail
s {$sel:bulkEmailEntries:SendBulkEmail' :: [BulkEmailEntry]
bulkEmailEntries = [BulkEmailEntry]
a} :: SendBulkEmail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest SendBulkEmail where
type
AWSResponse SendBulkEmail =
SendBulkEmailResponse
request :: (Service -> Service) -> SendBulkEmail -> Request SendBulkEmail
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SendBulkEmail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SendBulkEmail)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> [BulkEmailEntryResult] -> SendBulkEmailResponse
SendBulkEmailResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"BulkEmailEntryResults"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable SendBulkEmail where
hashWithSalt :: Int -> SendBulkEmail -> Int
hashWithSalt Int
_salt SendBulkEmail' {[BulkEmailEntry]
Maybe [Text]
Maybe [MessageTag]
Maybe Text
BulkEmailContent
bulkEmailEntries :: [BulkEmailEntry]
defaultContent :: BulkEmailContent
replyToAddresses :: Maybe [Text]
fromEmailAddressIdentityArn :: Maybe Text
fromEmailAddress :: Maybe Text
feedbackForwardingEmailAddressIdentityArn :: Maybe Text
feedbackForwardingEmailAddress :: Maybe Text
defaultEmailTags :: Maybe [MessageTag]
configurationSetName :: Maybe Text
$sel:bulkEmailEntries:SendBulkEmail' :: SendBulkEmail -> [BulkEmailEntry]
$sel:defaultContent:SendBulkEmail' :: SendBulkEmail -> BulkEmailContent
$sel:replyToAddresses:SendBulkEmail' :: SendBulkEmail -> Maybe [Text]
$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:fromEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:defaultEmailTags:SendBulkEmail' :: SendBulkEmail -> Maybe [MessageTag]
$sel:configurationSetName:SendBulkEmail' :: SendBulkEmail -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationSetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MessageTag]
defaultEmailTags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
feedbackForwardingEmailAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
feedbackForwardingEmailAddressIdentityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fromEmailAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fromEmailAddressIdentityArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
replyToAddresses
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` BulkEmailContent
defaultContent
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [BulkEmailEntry]
bulkEmailEntries
instance Prelude.NFData SendBulkEmail where
rnf :: SendBulkEmail -> ()
rnf SendBulkEmail' {[BulkEmailEntry]
Maybe [Text]
Maybe [MessageTag]
Maybe Text
BulkEmailContent
bulkEmailEntries :: [BulkEmailEntry]
defaultContent :: BulkEmailContent
replyToAddresses :: Maybe [Text]
fromEmailAddressIdentityArn :: Maybe Text
fromEmailAddress :: Maybe Text
feedbackForwardingEmailAddressIdentityArn :: Maybe Text
feedbackForwardingEmailAddress :: Maybe Text
defaultEmailTags :: Maybe [MessageTag]
configurationSetName :: Maybe Text
$sel:bulkEmailEntries:SendBulkEmail' :: SendBulkEmail -> [BulkEmailEntry]
$sel:defaultContent:SendBulkEmail' :: SendBulkEmail -> BulkEmailContent
$sel:replyToAddresses:SendBulkEmail' :: SendBulkEmail -> Maybe [Text]
$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:fromEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:defaultEmailTags:SendBulkEmail' :: SendBulkEmail -> Maybe [MessageTag]
$sel:configurationSetName:SendBulkEmail' :: SendBulkEmail -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MessageTag]
defaultEmailTags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
feedbackForwardingEmailAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
feedbackForwardingEmailAddressIdentityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fromEmailAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fromEmailAddressIdentityArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
replyToAddresses
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf BulkEmailContent
defaultContent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [BulkEmailEntry]
bulkEmailEntries
instance Data.ToHeaders SendBulkEmail where
toHeaders :: SendBulkEmail -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON SendBulkEmail where
toJSON :: SendBulkEmail -> Value
toJSON SendBulkEmail' {[BulkEmailEntry]
Maybe [Text]
Maybe [MessageTag]
Maybe Text
BulkEmailContent
bulkEmailEntries :: [BulkEmailEntry]
defaultContent :: BulkEmailContent
replyToAddresses :: Maybe [Text]
fromEmailAddressIdentityArn :: Maybe Text
fromEmailAddress :: Maybe Text
feedbackForwardingEmailAddressIdentityArn :: Maybe Text
feedbackForwardingEmailAddress :: Maybe Text
defaultEmailTags :: Maybe [MessageTag]
configurationSetName :: Maybe Text
$sel:bulkEmailEntries:SendBulkEmail' :: SendBulkEmail -> [BulkEmailEntry]
$sel:defaultContent:SendBulkEmail' :: SendBulkEmail -> BulkEmailContent
$sel:replyToAddresses:SendBulkEmail' :: SendBulkEmail -> Maybe [Text]
$sel:fromEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:fromEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddressIdentityArn:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:feedbackForwardingEmailAddress:SendBulkEmail' :: SendBulkEmail -> Maybe Text
$sel:defaultEmailTags:SendBulkEmail' :: SendBulkEmail -> Maybe [MessageTag]
$sel:configurationSetName:SendBulkEmail' :: SendBulkEmail -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ConfigurationSetName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
configurationSetName,
(Key
"DefaultEmailTags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MessageTag]
defaultEmailTags,
(Key
"FeedbackForwardingEmailAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
feedbackForwardingEmailAddress,
(Key
"FeedbackForwardingEmailAddressIdentityArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
feedbackForwardingEmailAddressIdentityArn,
(Key
"FromEmailAddress" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fromEmailAddress,
(Key
"FromEmailAddressIdentityArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fromEmailAddressIdentityArn,
(Key
"ReplyToAddresses" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
replyToAddresses,
forall a. a -> Maybe a
Prelude.Just
(Key
"DefaultContent" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= BulkEmailContent
defaultContent),
forall a. a -> Maybe a
Prelude.Just
(Key
"BulkEmailEntries" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [BulkEmailEntry]
bulkEmailEntries)
]
)
instance Data.ToPath SendBulkEmail where
toPath :: SendBulkEmail -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/v2/email/outbound-bulk-emails"
instance Data.ToQuery SendBulkEmail where
toQuery :: SendBulkEmail -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data SendBulkEmailResponse = SendBulkEmailResponse'
{
SendBulkEmailResponse -> Int
httpStatus :: Prelude.Int,
SendBulkEmailResponse -> [BulkEmailEntryResult]
bulkEmailEntryResults :: [BulkEmailEntryResult]
}
deriving (SendBulkEmailResponse -> SendBulkEmailResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SendBulkEmailResponse -> SendBulkEmailResponse -> Bool
$c/= :: SendBulkEmailResponse -> SendBulkEmailResponse -> Bool
== :: SendBulkEmailResponse -> SendBulkEmailResponse -> Bool
$c== :: SendBulkEmailResponse -> SendBulkEmailResponse -> Bool
Prelude.Eq, ReadPrec [SendBulkEmailResponse]
ReadPrec SendBulkEmailResponse
Int -> ReadS SendBulkEmailResponse
ReadS [SendBulkEmailResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SendBulkEmailResponse]
$creadListPrec :: ReadPrec [SendBulkEmailResponse]
readPrec :: ReadPrec SendBulkEmailResponse
$creadPrec :: ReadPrec SendBulkEmailResponse
readList :: ReadS [SendBulkEmailResponse]
$creadList :: ReadS [SendBulkEmailResponse]
readsPrec :: Int -> ReadS SendBulkEmailResponse
$creadsPrec :: Int -> ReadS SendBulkEmailResponse
Prelude.Read, Int -> SendBulkEmailResponse -> ShowS
[SendBulkEmailResponse] -> ShowS
SendBulkEmailResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SendBulkEmailResponse] -> ShowS
$cshowList :: [SendBulkEmailResponse] -> ShowS
show :: SendBulkEmailResponse -> String
$cshow :: SendBulkEmailResponse -> String
showsPrec :: Int -> SendBulkEmailResponse -> ShowS
$cshowsPrec :: Int -> SendBulkEmailResponse -> ShowS
Prelude.Show, forall x. Rep SendBulkEmailResponse x -> SendBulkEmailResponse
forall x. SendBulkEmailResponse -> Rep SendBulkEmailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendBulkEmailResponse x -> SendBulkEmailResponse
$cfrom :: forall x. SendBulkEmailResponse -> Rep SendBulkEmailResponse x
Prelude.Generic)
newSendBulkEmailResponse ::
Prelude.Int ->
SendBulkEmailResponse
newSendBulkEmailResponse :: Int -> SendBulkEmailResponse
newSendBulkEmailResponse Int
pHttpStatus_ =
SendBulkEmailResponse'
{ $sel:httpStatus:SendBulkEmailResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:bulkEmailEntryResults:SendBulkEmailResponse' :: [BulkEmailEntryResult]
bulkEmailEntryResults = forall a. Monoid a => a
Prelude.mempty
}
sendBulkEmailResponse_httpStatus :: Lens.Lens' SendBulkEmailResponse Prelude.Int
sendBulkEmailResponse_httpStatus :: Lens' SendBulkEmailResponse Int
sendBulkEmailResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmailResponse' {Int
httpStatus :: Int
$sel:httpStatus:SendBulkEmailResponse' :: SendBulkEmailResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SendBulkEmailResponse
s@SendBulkEmailResponse' {} Int
a -> SendBulkEmailResponse
s {$sel:httpStatus:SendBulkEmailResponse' :: Int
httpStatus = Int
a} :: SendBulkEmailResponse)
sendBulkEmailResponse_bulkEmailEntryResults :: Lens.Lens' SendBulkEmailResponse [BulkEmailEntryResult]
sendBulkEmailResponse_bulkEmailEntryResults :: Lens' SendBulkEmailResponse [BulkEmailEntryResult]
sendBulkEmailResponse_bulkEmailEntryResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SendBulkEmailResponse' {[BulkEmailEntryResult]
bulkEmailEntryResults :: [BulkEmailEntryResult]
$sel:bulkEmailEntryResults:SendBulkEmailResponse' :: SendBulkEmailResponse -> [BulkEmailEntryResult]
bulkEmailEntryResults} -> [BulkEmailEntryResult]
bulkEmailEntryResults) (\s :: SendBulkEmailResponse
s@SendBulkEmailResponse' {} [BulkEmailEntryResult]
a -> SendBulkEmailResponse
s {$sel:bulkEmailEntryResults:SendBulkEmailResponse' :: [BulkEmailEntryResult]
bulkEmailEntryResults = [BulkEmailEntryResult]
a} :: SendBulkEmailResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData SendBulkEmailResponse where
rnf :: SendBulkEmailResponse -> ()
rnf SendBulkEmailResponse' {Int
[BulkEmailEntryResult]
bulkEmailEntryResults :: [BulkEmailEntryResult]
httpStatus :: Int
$sel:bulkEmailEntryResults:SendBulkEmailResponse' :: SendBulkEmailResponse -> [BulkEmailEntryResult]
$sel:httpStatus:SendBulkEmailResponse' :: SendBulkEmailResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [BulkEmailEntryResult]
bulkEmailEntryResults