{-# 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.PutConfigurationSetDeliveryOptions
(
PutConfigurationSetDeliveryOptions (..),
newPutConfigurationSetDeliveryOptions,
putConfigurationSetDeliveryOptions_deliveryOptions,
putConfigurationSetDeliveryOptions_configurationSetName,
PutConfigurationSetDeliveryOptionsResponse (..),
newPutConfigurationSetDeliveryOptionsResponse,
putConfigurationSetDeliveryOptionsResponse_httpStatus,
)
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.SES.Types
data PutConfigurationSetDeliveryOptions = PutConfigurationSetDeliveryOptions'
{
PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions
deliveryOptions :: Prelude.Maybe DeliveryOptions,
PutConfigurationSetDeliveryOptions -> Text
configurationSetName :: Prelude.Text
}
deriving (PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool
(PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool)
-> (PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool)
-> Eq PutConfigurationSetDeliveryOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool
== :: PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool
$c/= :: PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool
/= :: PutConfigurationSetDeliveryOptions
-> PutConfigurationSetDeliveryOptions -> Bool
Prelude.Eq, ReadPrec [PutConfigurationSetDeliveryOptions]
ReadPrec PutConfigurationSetDeliveryOptions
Int -> ReadS PutConfigurationSetDeliveryOptions
ReadS [PutConfigurationSetDeliveryOptions]
(Int -> ReadS PutConfigurationSetDeliveryOptions)
-> ReadS [PutConfigurationSetDeliveryOptions]
-> ReadPrec PutConfigurationSetDeliveryOptions
-> ReadPrec [PutConfigurationSetDeliveryOptions]
-> Read PutConfigurationSetDeliveryOptions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS PutConfigurationSetDeliveryOptions
readsPrec :: Int -> ReadS PutConfigurationSetDeliveryOptions
$creadList :: ReadS [PutConfigurationSetDeliveryOptions]
readList :: ReadS [PutConfigurationSetDeliveryOptions]
$creadPrec :: ReadPrec PutConfigurationSetDeliveryOptions
readPrec :: ReadPrec PutConfigurationSetDeliveryOptions
$creadListPrec :: ReadPrec [PutConfigurationSetDeliveryOptions]
readListPrec :: ReadPrec [PutConfigurationSetDeliveryOptions]
Prelude.Read, Int -> PutConfigurationSetDeliveryOptions -> ShowS
[PutConfigurationSetDeliveryOptions] -> ShowS
PutConfigurationSetDeliveryOptions -> String
(Int -> PutConfigurationSetDeliveryOptions -> ShowS)
-> (PutConfigurationSetDeliveryOptions -> String)
-> ([PutConfigurationSetDeliveryOptions] -> ShowS)
-> Show PutConfigurationSetDeliveryOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PutConfigurationSetDeliveryOptions -> ShowS
showsPrec :: Int -> PutConfigurationSetDeliveryOptions -> ShowS
$cshow :: PutConfigurationSetDeliveryOptions -> String
show :: PutConfigurationSetDeliveryOptions -> String
$cshowList :: [PutConfigurationSetDeliveryOptions] -> ShowS
showList :: [PutConfigurationSetDeliveryOptions] -> ShowS
Prelude.Show, (forall x.
PutConfigurationSetDeliveryOptions
-> Rep PutConfigurationSetDeliveryOptions x)
-> (forall x.
Rep PutConfigurationSetDeliveryOptions x
-> PutConfigurationSetDeliveryOptions)
-> Generic PutConfigurationSetDeliveryOptions
forall x.
Rep PutConfigurationSetDeliveryOptions x
-> PutConfigurationSetDeliveryOptions
forall x.
PutConfigurationSetDeliveryOptions
-> Rep PutConfigurationSetDeliveryOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
PutConfigurationSetDeliveryOptions
-> Rep PutConfigurationSetDeliveryOptions x
from :: forall x.
PutConfigurationSetDeliveryOptions
-> Rep PutConfigurationSetDeliveryOptions x
$cto :: forall x.
Rep PutConfigurationSetDeliveryOptions x
-> PutConfigurationSetDeliveryOptions
to :: forall x.
Rep PutConfigurationSetDeliveryOptions x
-> PutConfigurationSetDeliveryOptions
Prelude.Generic)
newPutConfigurationSetDeliveryOptions ::
Prelude.Text ->
PutConfigurationSetDeliveryOptions
newPutConfigurationSetDeliveryOptions :: Text -> PutConfigurationSetDeliveryOptions
newPutConfigurationSetDeliveryOptions
Text
pConfigurationSetName_ =
PutConfigurationSetDeliveryOptions'
{ $sel:deliveryOptions:PutConfigurationSetDeliveryOptions' :: Maybe DeliveryOptions
deliveryOptions =
Maybe DeliveryOptions
forall a. Maybe a
Prelude.Nothing,
$sel:configurationSetName:PutConfigurationSetDeliveryOptions' :: Text
configurationSetName =
Text
pConfigurationSetName_
}
putConfigurationSetDeliveryOptions_deliveryOptions :: Lens.Lens' PutConfigurationSetDeliveryOptions (Prelude.Maybe DeliveryOptions)
putConfigurationSetDeliveryOptions_deliveryOptions :: Lens' PutConfigurationSetDeliveryOptions (Maybe DeliveryOptions)
putConfigurationSetDeliveryOptions_deliveryOptions = (PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions)
-> (PutConfigurationSetDeliveryOptions
-> Maybe DeliveryOptions -> PutConfigurationSetDeliveryOptions)
-> Lens' PutConfigurationSetDeliveryOptions (Maybe DeliveryOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutConfigurationSetDeliveryOptions' {Maybe DeliveryOptions
$sel:deliveryOptions:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions
deliveryOptions :: Maybe DeliveryOptions
deliveryOptions} -> Maybe DeliveryOptions
deliveryOptions) (\s :: PutConfigurationSetDeliveryOptions
s@PutConfigurationSetDeliveryOptions' {} Maybe DeliveryOptions
a -> PutConfigurationSetDeliveryOptions
s {deliveryOptions = a} :: PutConfigurationSetDeliveryOptions)
putConfigurationSetDeliveryOptions_configurationSetName :: Lens.Lens' PutConfigurationSetDeliveryOptions Prelude.Text
putConfigurationSetDeliveryOptions_configurationSetName :: Lens' PutConfigurationSetDeliveryOptions Text
putConfigurationSetDeliveryOptions_configurationSetName = (PutConfigurationSetDeliveryOptions -> Text)
-> (PutConfigurationSetDeliveryOptions
-> Text -> PutConfigurationSetDeliveryOptions)
-> Lens' PutConfigurationSetDeliveryOptions Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutConfigurationSetDeliveryOptions' {Text
$sel:configurationSetName:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Text
configurationSetName :: Text
configurationSetName} -> Text
configurationSetName) (\s :: PutConfigurationSetDeliveryOptions
s@PutConfigurationSetDeliveryOptions' {} Text
a -> PutConfigurationSetDeliveryOptions
s {configurationSetName = a} :: PutConfigurationSetDeliveryOptions)
instance
Core.AWSRequest
PutConfigurationSetDeliveryOptions
where
type
AWSResponse PutConfigurationSetDeliveryOptions =
PutConfigurationSetDeliveryOptionsResponse
request :: (Service -> Service)
-> PutConfigurationSetDeliveryOptions
-> Request PutConfigurationSetDeliveryOptions
request Service -> Service
overrides =
Service
-> PutConfigurationSetDeliveryOptions
-> Request PutConfigurationSetDeliveryOptions
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutConfigurationSetDeliveryOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutConfigurationSetDeliveryOptions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse PutConfigurationSetDeliveryOptions))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutConfigurationSetDeliveryOptions
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse PutConfigurationSetDeliveryOptions)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"PutConfigurationSetDeliveryOptionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> PutConfigurationSetDeliveryOptionsResponse
PutConfigurationSetDeliveryOptionsResponse'
(Int -> PutConfigurationSetDeliveryOptionsResponse)
-> Either String Int
-> Either String PutConfigurationSetDeliveryOptionsResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall a. a -> Either String a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
PutConfigurationSetDeliveryOptions
where
hashWithSalt :: Int -> PutConfigurationSetDeliveryOptions -> Int
hashWithSalt
Int
_salt
PutConfigurationSetDeliveryOptions' {Maybe DeliveryOptions
Text
$sel:deliveryOptions:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions
$sel:configurationSetName:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Text
deliveryOptions :: Maybe DeliveryOptions
configurationSetName :: Text
..} =
Int
_salt
Int -> Maybe DeliveryOptions -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeliveryOptions
deliveryOptions
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
instance
Prelude.NFData
PutConfigurationSetDeliveryOptions
where
rnf :: PutConfigurationSetDeliveryOptions -> ()
rnf PutConfigurationSetDeliveryOptions' {Maybe DeliveryOptions
Text
$sel:deliveryOptions:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions
$sel:configurationSetName:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Text
deliveryOptions :: Maybe DeliveryOptions
configurationSetName :: Text
..} =
Maybe DeliveryOptions -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe DeliveryOptions
deliveryOptions
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
instance
Data.ToHeaders
PutConfigurationSetDeliveryOptions
where
toHeaders :: PutConfigurationSetDeliveryOptions -> ResponseHeaders
toHeaders = ResponseHeaders
-> PutConfigurationSetDeliveryOptions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
PutConfigurationSetDeliveryOptions
where
toPath :: PutConfigurationSetDeliveryOptions -> ByteString
toPath = ByteString -> PutConfigurationSetDeliveryOptions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
PutConfigurationSetDeliveryOptions
where
toQuery :: PutConfigurationSetDeliveryOptions -> QueryString
toQuery PutConfigurationSetDeliveryOptions' {Maybe DeliveryOptions
Text
$sel:deliveryOptions:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Maybe DeliveryOptions
$sel:configurationSetName:PutConfigurationSetDeliveryOptions' :: PutConfigurationSetDeliveryOptions -> Text
deliveryOptions :: Maybe DeliveryOptions
configurationSetName :: Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"PutConfigurationSetDeliveryOptions" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"DeliveryOptions" ByteString -> Maybe DeliveryOptions -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe DeliveryOptions
deliveryOptions,
ByteString
"ConfigurationSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
configurationSetName
]
data PutConfigurationSetDeliveryOptionsResponse = PutConfigurationSetDeliveryOptionsResponse'
{
PutConfigurationSetDeliveryOptionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool
(PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool)
-> (PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool)
-> Eq PutConfigurationSetDeliveryOptionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool
== :: PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool
$c/= :: PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool
/= :: PutConfigurationSetDeliveryOptionsResponse
-> PutConfigurationSetDeliveryOptionsResponse -> Bool
Prelude.Eq, ReadPrec [PutConfigurationSetDeliveryOptionsResponse]
ReadPrec PutConfigurationSetDeliveryOptionsResponse
Int -> ReadS PutConfigurationSetDeliveryOptionsResponse
ReadS [PutConfigurationSetDeliveryOptionsResponse]
(Int -> ReadS PutConfigurationSetDeliveryOptionsResponse)
-> ReadS [PutConfigurationSetDeliveryOptionsResponse]
-> ReadPrec PutConfigurationSetDeliveryOptionsResponse
-> ReadPrec [PutConfigurationSetDeliveryOptionsResponse]
-> Read PutConfigurationSetDeliveryOptionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS PutConfigurationSetDeliveryOptionsResponse
readsPrec :: Int -> ReadS PutConfigurationSetDeliveryOptionsResponse
$creadList :: ReadS [PutConfigurationSetDeliveryOptionsResponse]
readList :: ReadS [PutConfigurationSetDeliveryOptionsResponse]
$creadPrec :: ReadPrec PutConfigurationSetDeliveryOptionsResponse
readPrec :: ReadPrec PutConfigurationSetDeliveryOptionsResponse
$creadListPrec :: ReadPrec [PutConfigurationSetDeliveryOptionsResponse]
readListPrec :: ReadPrec [PutConfigurationSetDeliveryOptionsResponse]
Prelude.Read, Int -> PutConfigurationSetDeliveryOptionsResponse -> ShowS
[PutConfigurationSetDeliveryOptionsResponse] -> ShowS
PutConfigurationSetDeliveryOptionsResponse -> String
(Int -> PutConfigurationSetDeliveryOptionsResponse -> ShowS)
-> (PutConfigurationSetDeliveryOptionsResponse -> String)
-> ([PutConfigurationSetDeliveryOptionsResponse] -> ShowS)
-> Show PutConfigurationSetDeliveryOptionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PutConfigurationSetDeliveryOptionsResponse -> ShowS
showsPrec :: Int -> PutConfigurationSetDeliveryOptionsResponse -> ShowS
$cshow :: PutConfigurationSetDeliveryOptionsResponse -> String
show :: PutConfigurationSetDeliveryOptionsResponse -> String
$cshowList :: [PutConfigurationSetDeliveryOptionsResponse] -> ShowS
showList :: [PutConfigurationSetDeliveryOptionsResponse] -> ShowS
Prelude.Show, (forall x.
PutConfigurationSetDeliveryOptionsResponse
-> Rep PutConfigurationSetDeliveryOptionsResponse x)
-> (forall x.
Rep PutConfigurationSetDeliveryOptionsResponse x
-> PutConfigurationSetDeliveryOptionsResponse)
-> Generic PutConfigurationSetDeliveryOptionsResponse
forall x.
Rep PutConfigurationSetDeliveryOptionsResponse x
-> PutConfigurationSetDeliveryOptionsResponse
forall x.
PutConfigurationSetDeliveryOptionsResponse
-> Rep PutConfigurationSetDeliveryOptionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
PutConfigurationSetDeliveryOptionsResponse
-> Rep PutConfigurationSetDeliveryOptionsResponse x
from :: forall x.
PutConfigurationSetDeliveryOptionsResponse
-> Rep PutConfigurationSetDeliveryOptionsResponse x
$cto :: forall x.
Rep PutConfigurationSetDeliveryOptionsResponse x
-> PutConfigurationSetDeliveryOptionsResponse
to :: forall x.
Rep PutConfigurationSetDeliveryOptionsResponse x
-> PutConfigurationSetDeliveryOptionsResponse
Prelude.Generic)
newPutConfigurationSetDeliveryOptionsResponse ::
Prelude.Int ->
PutConfigurationSetDeliveryOptionsResponse
newPutConfigurationSetDeliveryOptionsResponse :: Int -> PutConfigurationSetDeliveryOptionsResponse
newPutConfigurationSetDeliveryOptionsResponse
Int
pHttpStatus_ =
PutConfigurationSetDeliveryOptionsResponse'
{ $sel:httpStatus:PutConfigurationSetDeliveryOptionsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
putConfigurationSetDeliveryOptionsResponse_httpStatus :: Lens.Lens' PutConfigurationSetDeliveryOptionsResponse Prelude.Int
putConfigurationSetDeliveryOptionsResponse_httpStatus :: Lens' PutConfigurationSetDeliveryOptionsResponse Int
putConfigurationSetDeliveryOptionsResponse_httpStatus = (PutConfigurationSetDeliveryOptionsResponse -> Int)
-> (PutConfigurationSetDeliveryOptionsResponse
-> Int -> PutConfigurationSetDeliveryOptionsResponse)
-> Lens' PutConfigurationSetDeliveryOptionsResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutConfigurationSetDeliveryOptionsResponse' {Int
$sel:httpStatus:PutConfigurationSetDeliveryOptionsResponse' :: PutConfigurationSetDeliveryOptionsResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: PutConfigurationSetDeliveryOptionsResponse
s@PutConfigurationSetDeliveryOptionsResponse' {} Int
a -> PutConfigurationSetDeliveryOptionsResponse
s {httpStatus = a} :: PutConfigurationSetDeliveryOptionsResponse)
instance
Prelude.NFData
PutConfigurationSetDeliveryOptionsResponse
where
rnf :: PutConfigurationSetDeliveryOptionsResponse -> ()
rnf PutConfigurationSetDeliveryOptionsResponse' {Int
$sel:httpStatus:PutConfigurationSetDeliveryOptionsResponse' :: PutConfigurationSetDeliveryOptionsResponse -> Int
httpStatus :: Int
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus