{-# 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.DeleteConfigurationSet
(
DeleteConfigurationSet (..),
newDeleteConfigurationSet,
deleteConfigurationSet_configurationSetName,
DeleteConfigurationSetResponse (..),
newDeleteConfigurationSetResponse,
deleteConfigurationSetResponse_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 DeleteConfigurationSet = DeleteConfigurationSet'
{
DeleteConfigurationSet -> Text
configurationSetName :: Prelude.Text
}
deriving (DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
(DeleteConfigurationSet -> DeleteConfigurationSet -> Bool)
-> (DeleteConfigurationSet -> DeleteConfigurationSet -> Bool)
-> Eq DeleteConfigurationSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
== :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
$c/= :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
/= :: DeleteConfigurationSet -> DeleteConfigurationSet -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSet]
ReadPrec DeleteConfigurationSet
Int -> ReadS DeleteConfigurationSet
ReadS [DeleteConfigurationSet]
(Int -> ReadS DeleteConfigurationSet)
-> ReadS [DeleteConfigurationSet]
-> ReadPrec DeleteConfigurationSet
-> ReadPrec [DeleteConfigurationSet]
-> Read DeleteConfigurationSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DeleteConfigurationSet
readsPrec :: Int -> ReadS DeleteConfigurationSet
$creadList :: ReadS [DeleteConfigurationSet]
readList :: ReadS [DeleteConfigurationSet]
$creadPrec :: ReadPrec DeleteConfigurationSet
readPrec :: ReadPrec DeleteConfigurationSet
$creadListPrec :: ReadPrec [DeleteConfigurationSet]
readListPrec :: ReadPrec [DeleteConfigurationSet]
Prelude.Read, Int -> DeleteConfigurationSet -> ShowS
[DeleteConfigurationSet] -> ShowS
DeleteConfigurationSet -> String
(Int -> DeleteConfigurationSet -> ShowS)
-> (DeleteConfigurationSet -> String)
-> ([DeleteConfigurationSet] -> ShowS)
-> Show DeleteConfigurationSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteConfigurationSet -> ShowS
showsPrec :: Int -> DeleteConfigurationSet -> ShowS
$cshow :: DeleteConfigurationSet -> String
show :: DeleteConfigurationSet -> String
$cshowList :: [DeleteConfigurationSet] -> ShowS
showList :: [DeleteConfigurationSet] -> ShowS
Prelude.Show, (forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x)
-> (forall x.
Rep DeleteConfigurationSet x -> DeleteConfigurationSet)
-> Generic DeleteConfigurationSet
forall x. Rep DeleteConfigurationSet x -> DeleteConfigurationSet
forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x
from :: forall x. DeleteConfigurationSet -> Rep DeleteConfigurationSet x
$cto :: forall x. Rep DeleteConfigurationSet x -> DeleteConfigurationSet
to :: forall x. Rep DeleteConfigurationSet x -> DeleteConfigurationSet
Prelude.Generic)
newDeleteConfigurationSet ::
Prelude.Text ->
DeleteConfigurationSet
newDeleteConfigurationSet :: Text -> DeleteConfigurationSet
newDeleteConfigurationSet Text
pConfigurationSetName_ =
DeleteConfigurationSet'
{ $sel:configurationSetName:DeleteConfigurationSet' :: Text
configurationSetName =
Text
pConfigurationSetName_
}
deleteConfigurationSet_configurationSetName :: Lens.Lens' DeleteConfigurationSet Prelude.Text
deleteConfigurationSet_configurationSetName :: Lens' DeleteConfigurationSet Text
deleteConfigurationSet_configurationSetName = (DeleteConfigurationSet -> Text)
-> (DeleteConfigurationSet -> Text -> DeleteConfigurationSet)
-> Lens' DeleteConfigurationSet Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSet' {Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
configurationSetName :: Text
configurationSetName} -> Text
configurationSetName) (\s :: DeleteConfigurationSet
s@DeleteConfigurationSet' {} Text
a -> DeleteConfigurationSet
s {configurationSetName = a} :: DeleteConfigurationSet)
instance Core.AWSRequest DeleteConfigurationSet where
type
AWSResponse DeleteConfigurationSet =
DeleteConfigurationSetResponse
request :: (Service -> Service)
-> DeleteConfigurationSet -> Request DeleteConfigurationSet
request Service -> Service
overrides =
Service -> DeleteConfigurationSet -> Request DeleteConfigurationSet
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 DeleteConfigurationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteConfigurationSet)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteConfigurationSet))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteConfigurationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteConfigurationSet)))
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
"DeleteConfigurationSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteConfigurationSetResponse
DeleteConfigurationSetResponse'
(Int -> DeleteConfigurationSetResponse)
-> Either String Int
-> Either String DeleteConfigurationSetResponse
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 DeleteConfigurationSet where
hashWithSalt :: Int -> DeleteConfigurationSet -> Int
hashWithSalt Int
_salt DeleteConfigurationSet' {Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
configurationSetName :: Text
..} =
Int
_salt Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
configurationSetName
instance Prelude.NFData DeleteConfigurationSet where
rnf :: DeleteConfigurationSet -> ()
rnf DeleteConfigurationSet' {Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
configurationSetName :: Text
..} =
Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
configurationSetName
instance Data.ToHeaders DeleteConfigurationSet where
toHeaders :: DeleteConfigurationSet -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteConfigurationSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteConfigurationSet where
toPath :: DeleteConfigurationSet -> ByteString
toPath = ByteString -> DeleteConfigurationSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteConfigurationSet where
toQuery :: DeleteConfigurationSet -> QueryString
toQuery DeleteConfigurationSet' {Text
$sel:configurationSetName:DeleteConfigurationSet' :: DeleteConfigurationSet -> Text
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
"DeleteConfigurationSet" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"ConfigurationSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
configurationSetName
]
data DeleteConfigurationSetResponse = DeleteConfigurationSetResponse'
{
DeleteConfigurationSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
(DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool)
-> (DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool)
-> Eq DeleteConfigurationSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
== :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
$c/= :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
/= :: DeleteConfigurationSetResponse
-> DeleteConfigurationSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteConfigurationSetResponse]
ReadPrec DeleteConfigurationSetResponse
Int -> ReadS DeleteConfigurationSetResponse
ReadS [DeleteConfigurationSetResponse]
(Int -> ReadS DeleteConfigurationSetResponse)
-> ReadS [DeleteConfigurationSetResponse]
-> ReadPrec DeleteConfigurationSetResponse
-> ReadPrec [DeleteConfigurationSetResponse]
-> Read DeleteConfigurationSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS DeleteConfigurationSetResponse
readsPrec :: Int -> ReadS DeleteConfigurationSetResponse
$creadList :: ReadS [DeleteConfigurationSetResponse]
readList :: ReadS [DeleteConfigurationSetResponse]
$creadPrec :: ReadPrec DeleteConfigurationSetResponse
readPrec :: ReadPrec DeleteConfigurationSetResponse
$creadListPrec :: ReadPrec [DeleteConfigurationSetResponse]
readListPrec :: ReadPrec [DeleteConfigurationSetResponse]
Prelude.Read, Int -> DeleteConfigurationSetResponse -> ShowS
[DeleteConfigurationSetResponse] -> ShowS
DeleteConfigurationSetResponse -> String
(Int -> DeleteConfigurationSetResponse -> ShowS)
-> (DeleteConfigurationSetResponse -> String)
-> ([DeleteConfigurationSetResponse] -> ShowS)
-> Show DeleteConfigurationSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeleteConfigurationSetResponse -> ShowS
showsPrec :: Int -> DeleteConfigurationSetResponse -> ShowS
$cshow :: DeleteConfigurationSetResponse -> String
show :: DeleteConfigurationSetResponse -> String
$cshowList :: [DeleteConfigurationSetResponse] -> ShowS
showList :: [DeleteConfigurationSetResponse] -> ShowS
Prelude.Show, (forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x)
-> (forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse)
-> Generic DeleteConfigurationSetResponse
forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse
forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x
from :: forall x.
DeleteConfigurationSetResponse
-> Rep DeleteConfigurationSetResponse x
$cto :: forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse
to :: forall x.
Rep DeleteConfigurationSetResponse x
-> DeleteConfigurationSetResponse
Prelude.Generic)
newDeleteConfigurationSetResponse ::
Prelude.Int ->
DeleteConfigurationSetResponse
newDeleteConfigurationSetResponse :: Int -> DeleteConfigurationSetResponse
newDeleteConfigurationSetResponse Int
pHttpStatus_ =
DeleteConfigurationSetResponse'
{ $sel:httpStatus:DeleteConfigurationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteConfigurationSetResponse_httpStatus :: Lens.Lens' DeleteConfigurationSetResponse Prelude.Int
deleteConfigurationSetResponse_httpStatus :: Lens' DeleteConfigurationSetResponse Int
deleteConfigurationSetResponse_httpStatus = (DeleteConfigurationSetResponse -> Int)
-> (DeleteConfigurationSetResponse
-> Int -> DeleteConfigurationSetResponse)
-> Lens' DeleteConfigurationSetResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConfigurationSetResponse' {Int
$sel:httpStatus:DeleteConfigurationSetResponse' :: DeleteConfigurationSetResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: DeleteConfigurationSetResponse
s@DeleteConfigurationSetResponse' {} Int
a -> DeleteConfigurationSetResponse
s {httpStatus = a} :: DeleteConfigurationSetResponse)
instance
Prelude.NFData
DeleteConfigurationSetResponse
where
rnf :: DeleteConfigurationSetResponse -> ()
rnf DeleteConfigurationSetResponse' {Int
$sel:httpStatus:DeleteConfigurationSetResponse' :: DeleteConfigurationSetResponse -> Int
httpStatus :: Int
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus