{-# 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.DeleteReceiptRuleSet
(
DeleteReceiptRuleSet (..),
newDeleteReceiptRuleSet,
deleteReceiptRuleSet_ruleSetName,
DeleteReceiptRuleSetResponse (..),
newDeleteReceiptRuleSetResponse,
deleteReceiptRuleSetResponse_httpStatus,
)
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 DeleteReceiptRuleSet = DeleteReceiptRuleSet'
{
DeleteReceiptRuleSet -> Text
ruleSetName :: Prelude.Text
}
deriving (DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
(DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool)
-> (DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool)
-> Eq DeleteReceiptRuleSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
$c/= :: DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
== :: DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
$c== :: DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
Prelude.Eq, ReadPrec [DeleteReceiptRuleSet]
ReadPrec DeleteReceiptRuleSet
Int -> ReadS DeleteReceiptRuleSet
ReadS [DeleteReceiptRuleSet]
(Int -> ReadS DeleteReceiptRuleSet)
-> ReadS [DeleteReceiptRuleSet]
-> ReadPrec DeleteReceiptRuleSet
-> ReadPrec [DeleteReceiptRuleSet]
-> Read DeleteReceiptRuleSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReceiptRuleSet]
$creadListPrec :: ReadPrec [DeleteReceiptRuleSet]
readPrec :: ReadPrec DeleteReceiptRuleSet
$creadPrec :: ReadPrec DeleteReceiptRuleSet
readList :: ReadS [DeleteReceiptRuleSet]
$creadList :: ReadS [DeleteReceiptRuleSet]
readsPrec :: Int -> ReadS DeleteReceiptRuleSet
$creadsPrec :: Int -> ReadS DeleteReceiptRuleSet
Prelude.Read, Int -> DeleteReceiptRuleSet -> ShowS
[DeleteReceiptRuleSet] -> ShowS
DeleteReceiptRuleSet -> String
(Int -> DeleteReceiptRuleSet -> ShowS)
-> (DeleteReceiptRuleSet -> String)
-> ([DeleteReceiptRuleSet] -> ShowS)
-> Show DeleteReceiptRuleSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReceiptRuleSet] -> ShowS
$cshowList :: [DeleteReceiptRuleSet] -> ShowS
show :: DeleteReceiptRuleSet -> String
$cshow :: DeleteReceiptRuleSet -> String
showsPrec :: Int -> DeleteReceiptRuleSet -> ShowS
$cshowsPrec :: Int -> DeleteReceiptRuleSet -> ShowS
Prelude.Show, (forall x. DeleteReceiptRuleSet -> Rep DeleteReceiptRuleSet x)
-> (forall x. Rep DeleteReceiptRuleSet x -> DeleteReceiptRuleSet)
-> Generic DeleteReceiptRuleSet
forall x. Rep DeleteReceiptRuleSet x -> DeleteReceiptRuleSet
forall x. DeleteReceiptRuleSet -> Rep DeleteReceiptRuleSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReceiptRuleSet x -> DeleteReceiptRuleSet
$cfrom :: forall x. DeleteReceiptRuleSet -> Rep DeleteReceiptRuleSet x
Prelude.Generic)
newDeleteReceiptRuleSet ::
Prelude.Text ->
DeleteReceiptRuleSet
newDeleteReceiptRuleSet :: Text -> DeleteReceiptRuleSet
newDeleteReceiptRuleSet Text
pRuleSetName_ =
DeleteReceiptRuleSet' :: Text -> DeleteReceiptRuleSet
DeleteReceiptRuleSet' {$sel:ruleSetName:DeleteReceiptRuleSet' :: Text
ruleSetName = Text
pRuleSetName_}
deleteReceiptRuleSet_ruleSetName :: Lens.Lens' DeleteReceiptRuleSet Prelude.Text
deleteReceiptRuleSet_ruleSetName :: (Text -> f Text) -> DeleteReceiptRuleSet -> f DeleteReceiptRuleSet
deleteReceiptRuleSet_ruleSetName = (DeleteReceiptRuleSet -> Text)
-> (DeleteReceiptRuleSet -> Text -> DeleteReceiptRuleSet)
-> Lens DeleteReceiptRuleSet DeleteReceiptRuleSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReceiptRuleSet' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRuleSet' :: DeleteReceiptRuleSet -> Text
ruleSetName} -> Text
ruleSetName) (\s :: DeleteReceiptRuleSet
s@DeleteReceiptRuleSet' {} Text
a -> DeleteReceiptRuleSet
s {$sel:ruleSetName:DeleteReceiptRuleSet' :: Text
ruleSetName = Text
a} :: DeleteReceiptRuleSet)
instance Core.AWSRequest DeleteReceiptRuleSet where
type
AWSResponse DeleteReceiptRuleSet =
DeleteReceiptRuleSetResponse
request :: DeleteReceiptRuleSet -> Request DeleteReceiptRuleSet
request = Service -> DeleteReceiptRuleSet -> Request DeleteReceiptRuleSet
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteReceiptRuleSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteReceiptRuleSet)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteReceiptRuleSet))
-> Logger
-> Service
-> Proxy DeleteReceiptRuleSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteReceiptRuleSet)))
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
"DeleteReceiptRuleSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteReceiptRuleSetResponse
DeleteReceiptRuleSetResponse'
(Int -> DeleteReceiptRuleSetResponse)
-> Either String Int -> Either String DeleteReceiptRuleSetResponse
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))
)
instance Prelude.Hashable DeleteReceiptRuleSet
instance Prelude.NFData DeleteReceiptRuleSet
instance Core.ToHeaders DeleteReceiptRuleSet where
toHeaders :: DeleteReceiptRuleSet -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteReceiptRuleSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteReceiptRuleSet where
toPath :: DeleteReceiptRuleSet -> ByteString
toPath = ByteString -> DeleteReceiptRuleSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteReceiptRuleSet where
toQuery :: DeleteReceiptRuleSet -> QueryString
toQuery DeleteReceiptRuleSet' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRuleSet' :: DeleteReceiptRuleSet -> 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
"DeleteReceiptRuleSet" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"RuleSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
ruleSetName
]
data DeleteReceiptRuleSetResponse = DeleteReceiptRuleSetResponse'
{
DeleteReceiptRuleSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
(DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool)
-> (DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool)
-> Eq DeleteReceiptRuleSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
$c/= :: DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
== :: DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
$c== :: DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReceiptRuleSetResponse]
ReadPrec DeleteReceiptRuleSetResponse
Int -> ReadS DeleteReceiptRuleSetResponse
ReadS [DeleteReceiptRuleSetResponse]
(Int -> ReadS DeleteReceiptRuleSetResponse)
-> ReadS [DeleteReceiptRuleSetResponse]
-> ReadPrec DeleteReceiptRuleSetResponse
-> ReadPrec [DeleteReceiptRuleSetResponse]
-> Read DeleteReceiptRuleSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReceiptRuleSetResponse]
$creadListPrec :: ReadPrec [DeleteReceiptRuleSetResponse]
readPrec :: ReadPrec DeleteReceiptRuleSetResponse
$creadPrec :: ReadPrec DeleteReceiptRuleSetResponse
readList :: ReadS [DeleteReceiptRuleSetResponse]
$creadList :: ReadS [DeleteReceiptRuleSetResponse]
readsPrec :: Int -> ReadS DeleteReceiptRuleSetResponse
$creadsPrec :: Int -> ReadS DeleteReceiptRuleSetResponse
Prelude.Read, Int -> DeleteReceiptRuleSetResponse -> ShowS
[DeleteReceiptRuleSetResponse] -> ShowS
DeleteReceiptRuleSetResponse -> String
(Int -> DeleteReceiptRuleSetResponse -> ShowS)
-> (DeleteReceiptRuleSetResponse -> String)
-> ([DeleteReceiptRuleSetResponse] -> ShowS)
-> Show DeleteReceiptRuleSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReceiptRuleSetResponse] -> ShowS
$cshowList :: [DeleteReceiptRuleSetResponse] -> ShowS
show :: DeleteReceiptRuleSetResponse -> String
$cshow :: DeleteReceiptRuleSetResponse -> String
showsPrec :: Int -> DeleteReceiptRuleSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteReceiptRuleSetResponse -> ShowS
Prelude.Show, (forall x.
DeleteReceiptRuleSetResponse -> Rep DeleteReceiptRuleSetResponse x)
-> (forall x.
Rep DeleteReceiptRuleSetResponse x -> DeleteReceiptRuleSetResponse)
-> Generic DeleteReceiptRuleSetResponse
forall x.
Rep DeleteReceiptRuleSetResponse x -> DeleteReceiptRuleSetResponse
forall x.
DeleteReceiptRuleSetResponse -> Rep DeleteReceiptRuleSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReceiptRuleSetResponse x -> DeleteReceiptRuleSetResponse
$cfrom :: forall x.
DeleteReceiptRuleSetResponse -> Rep DeleteReceiptRuleSetResponse x
Prelude.Generic)
newDeleteReceiptRuleSetResponse ::
Prelude.Int ->
DeleteReceiptRuleSetResponse
newDeleteReceiptRuleSetResponse :: Int -> DeleteReceiptRuleSetResponse
newDeleteReceiptRuleSetResponse Int
pHttpStatus_ =
DeleteReceiptRuleSetResponse' :: Int -> DeleteReceiptRuleSetResponse
DeleteReceiptRuleSetResponse'
{ $sel:httpStatus:DeleteReceiptRuleSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteReceiptRuleSetResponse_httpStatus :: Lens.Lens' DeleteReceiptRuleSetResponse Prelude.Int
deleteReceiptRuleSetResponse_httpStatus :: (Int -> f Int)
-> DeleteReceiptRuleSetResponse -> f DeleteReceiptRuleSetResponse
deleteReceiptRuleSetResponse_httpStatus = (DeleteReceiptRuleSetResponse -> Int)
-> (DeleteReceiptRuleSetResponse
-> Int -> DeleteReceiptRuleSetResponse)
-> Lens
DeleteReceiptRuleSetResponse DeleteReceiptRuleSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReceiptRuleSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReceiptRuleSetResponse' :: DeleteReceiptRuleSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReceiptRuleSetResponse
s@DeleteReceiptRuleSetResponse' {} Int
a -> DeleteReceiptRuleSetResponse
s {$sel:httpStatus:DeleteReceiptRuleSetResponse' :: Int
httpStatus = Int
a} :: DeleteReceiptRuleSetResponse)
instance Prelude.NFData DeleteReceiptRuleSetResponse