{-# 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.CreateConfigurationSet
(
CreateConfigurationSet (..),
newCreateConfigurationSet,
createConfigurationSet_configurationSet,
CreateConfigurationSetResponse (..),
newCreateConfigurationSetResponse,
createConfigurationSetResponse_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 CreateConfigurationSet = CreateConfigurationSet'
{
CreateConfigurationSet -> ConfigurationSet
configurationSet :: ConfigurationSet
}
deriving (CreateConfigurationSet -> CreateConfigurationSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
$c/= :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
== :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
$c== :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
Prelude.Eq, ReadPrec [CreateConfigurationSet]
ReadPrec CreateConfigurationSet
Int -> ReadS CreateConfigurationSet
ReadS [CreateConfigurationSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConfigurationSet]
$creadListPrec :: ReadPrec [CreateConfigurationSet]
readPrec :: ReadPrec CreateConfigurationSet
$creadPrec :: ReadPrec CreateConfigurationSet
readList :: ReadS [CreateConfigurationSet]
$creadList :: ReadS [CreateConfigurationSet]
readsPrec :: Int -> ReadS CreateConfigurationSet
$creadsPrec :: Int -> ReadS CreateConfigurationSet
Prelude.Read, Int -> CreateConfigurationSet -> ShowS
[CreateConfigurationSet] -> ShowS
CreateConfigurationSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConfigurationSet] -> ShowS
$cshowList :: [CreateConfigurationSet] -> ShowS
show :: CreateConfigurationSet -> String
$cshow :: CreateConfigurationSet -> String
showsPrec :: Int -> CreateConfigurationSet -> ShowS
$cshowsPrec :: Int -> CreateConfigurationSet -> ShowS
Prelude.Show, forall x. Rep CreateConfigurationSet x -> CreateConfigurationSet
forall x. CreateConfigurationSet -> Rep CreateConfigurationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConfigurationSet x -> CreateConfigurationSet
$cfrom :: forall x. CreateConfigurationSet -> Rep CreateConfigurationSet x
Prelude.Generic)
newCreateConfigurationSet ::
ConfigurationSet ->
CreateConfigurationSet
newCreateConfigurationSet :: ConfigurationSet -> CreateConfigurationSet
newCreateConfigurationSet ConfigurationSet
pConfigurationSet_ =
CreateConfigurationSet'
{ $sel:configurationSet:CreateConfigurationSet' :: ConfigurationSet
configurationSet =
ConfigurationSet
pConfigurationSet_
}
createConfigurationSet_configurationSet :: Lens.Lens' CreateConfigurationSet ConfigurationSet
createConfigurationSet_configurationSet :: Lens' CreateConfigurationSet ConfigurationSet
createConfigurationSet_configurationSet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSet' {ConfigurationSet
configurationSet :: ConfigurationSet
$sel:configurationSet:CreateConfigurationSet' :: CreateConfigurationSet -> ConfigurationSet
configurationSet} -> ConfigurationSet
configurationSet) (\s :: CreateConfigurationSet
s@CreateConfigurationSet' {} ConfigurationSet
a -> CreateConfigurationSet
s {$sel:configurationSet:CreateConfigurationSet' :: ConfigurationSet
configurationSet = ConfigurationSet
a} :: CreateConfigurationSet)
instance Core.AWSRequest CreateConfigurationSet where
type
AWSResponse CreateConfigurationSet =
CreateConfigurationSetResponse
request :: (Service -> Service)
-> CreateConfigurationSet -> Request CreateConfigurationSet
request Service -> Service
overrides =
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 CreateConfigurationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateConfigurationSet)))
response =
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
"CreateConfigurationSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> CreateConfigurationSetResponse
CreateConfigurationSetResponse'
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))
)
instance Prelude.Hashable CreateConfigurationSet where
hashWithSalt :: Int -> CreateConfigurationSet -> Int
hashWithSalt Int
_salt CreateConfigurationSet' {ConfigurationSet
configurationSet :: ConfigurationSet
$sel:configurationSet:CreateConfigurationSet' :: CreateConfigurationSet -> ConfigurationSet
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ConfigurationSet
configurationSet
instance Prelude.NFData CreateConfigurationSet where
rnf :: CreateConfigurationSet -> ()
rnf CreateConfigurationSet' {ConfigurationSet
configurationSet :: ConfigurationSet
$sel:configurationSet:CreateConfigurationSet' :: CreateConfigurationSet -> ConfigurationSet
..} =
forall a. NFData a => a -> ()
Prelude.rnf ConfigurationSet
configurationSet
instance Data.ToHeaders CreateConfigurationSet where
toHeaders :: CreateConfigurationSet -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateConfigurationSet where
toPath :: CreateConfigurationSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateConfigurationSet where
toQuery :: CreateConfigurationSet -> QueryString
toQuery CreateConfigurationSet' {ConfigurationSet
configurationSet :: ConfigurationSet
$sel:configurationSet:CreateConfigurationSet' :: CreateConfigurationSet -> ConfigurationSet
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateConfigurationSet" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSet" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ConfigurationSet
configurationSet
]
data CreateConfigurationSetResponse = CreateConfigurationSetResponse'
{
CreateConfigurationSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateConfigurationSetResponse
-> CreateConfigurationSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConfigurationSetResponse
-> CreateConfigurationSetResponse -> Bool
$c/= :: CreateConfigurationSetResponse
-> CreateConfigurationSetResponse -> Bool
== :: CreateConfigurationSetResponse
-> CreateConfigurationSetResponse -> Bool
$c== :: CreateConfigurationSetResponse
-> CreateConfigurationSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateConfigurationSetResponse]
ReadPrec CreateConfigurationSetResponse
Int -> ReadS CreateConfigurationSetResponse
ReadS [CreateConfigurationSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConfigurationSetResponse]
$creadListPrec :: ReadPrec [CreateConfigurationSetResponse]
readPrec :: ReadPrec CreateConfigurationSetResponse
$creadPrec :: ReadPrec CreateConfigurationSetResponse
readList :: ReadS [CreateConfigurationSetResponse]
$creadList :: ReadS [CreateConfigurationSetResponse]
readsPrec :: Int -> ReadS CreateConfigurationSetResponse
$creadsPrec :: Int -> ReadS CreateConfigurationSetResponse
Prelude.Read, Int -> CreateConfigurationSetResponse -> ShowS
[CreateConfigurationSetResponse] -> ShowS
CreateConfigurationSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConfigurationSetResponse] -> ShowS
$cshowList :: [CreateConfigurationSetResponse] -> ShowS
show :: CreateConfigurationSetResponse -> String
$cshow :: CreateConfigurationSetResponse -> String
showsPrec :: Int -> CreateConfigurationSetResponse -> ShowS
$cshowsPrec :: Int -> CreateConfigurationSetResponse -> ShowS
Prelude.Show, forall x.
Rep CreateConfigurationSetResponse x
-> CreateConfigurationSetResponse
forall x.
CreateConfigurationSetResponse
-> Rep CreateConfigurationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConfigurationSetResponse x
-> CreateConfigurationSetResponse
$cfrom :: forall x.
CreateConfigurationSetResponse
-> Rep CreateConfigurationSetResponse x
Prelude.Generic)
newCreateConfigurationSetResponse ::
Prelude.Int ->
CreateConfigurationSetResponse
newCreateConfigurationSetResponse :: Int -> CreateConfigurationSetResponse
newCreateConfigurationSetResponse Int
pHttpStatus_ =
CreateConfigurationSetResponse'
{ $sel:httpStatus:CreateConfigurationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
createConfigurationSetResponse_httpStatus :: Lens.Lens' CreateConfigurationSetResponse Prelude.Int
createConfigurationSetResponse_httpStatus :: Lens' CreateConfigurationSetResponse Int
createConfigurationSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Int
a -> CreateConfigurationSetResponse
s {$sel:httpStatus:CreateConfigurationSetResponse' :: Int
httpStatus = Int
a} :: CreateConfigurationSetResponse)
instance
Prelude.NFData
CreateConfigurationSetResponse
where
rnf :: CreateConfigurationSetResponse -> ()
rnf CreateConfigurationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus