{-# 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.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 DeleteReceiptRuleSet = DeleteReceiptRuleSet'
{
DeleteReceiptRuleSet -> Text
ruleSetName :: Prelude.Text
}
deriving (DeleteReceiptRuleSet -> DeleteReceiptRuleSet -> Bool
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]
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
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. 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' {$sel:ruleSetName:DeleteReceiptRuleSet' :: Text
ruleSetName = Text
pRuleSetName_}
deleteReceiptRuleSet_ruleSetName :: Lens.Lens' DeleteReceiptRuleSet Prelude.Text
deleteReceiptRuleSet_ruleSetName :: Lens' DeleteReceiptRuleSet Text
deleteReceiptRuleSet_ruleSetName = 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 :: (Service -> Service)
-> DeleteReceiptRuleSet -> Request DeleteReceiptRuleSet
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 DeleteReceiptRuleSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteReceiptRuleSet)))
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
"DeleteReceiptRuleSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteReceiptRuleSetResponse
DeleteReceiptRuleSetResponse'
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 DeleteReceiptRuleSet where
hashWithSalt :: Int -> DeleteReceiptRuleSet -> Int
hashWithSalt Int
_salt DeleteReceiptRuleSet' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRuleSet' :: DeleteReceiptRuleSet -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleSetName
instance Prelude.NFData DeleteReceiptRuleSet where
rnf :: DeleteReceiptRuleSet -> ()
rnf DeleteReceiptRuleSet' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRuleSet' :: DeleteReceiptRuleSet -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
ruleSetName
instance Data.ToHeaders DeleteReceiptRuleSet where
toHeaders :: DeleteReceiptRuleSet -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteReceiptRuleSet where
toPath :: DeleteReceiptRuleSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteReceiptRuleSet where
toQuery :: DeleteReceiptRuleSet -> QueryString
toQuery DeleteReceiptRuleSet' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRuleSet' :: DeleteReceiptRuleSet -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteReceiptRuleSet" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"RuleSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
ruleSetName
]
data DeleteReceiptRuleSetResponse = DeleteReceiptRuleSetResponse'
{
DeleteReceiptRuleSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReceiptRuleSetResponse
-> DeleteReceiptRuleSetResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteReceiptRuleSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteReceiptRuleSetResponse_httpStatus :: Lens.Lens' DeleteReceiptRuleSetResponse Prelude.Int
deleteReceiptRuleSetResponse_httpStatus :: Lens' DeleteReceiptRuleSetResponse Int
deleteReceiptRuleSetResponse_httpStatus = 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 where
rnf :: DeleteReceiptRuleSetResponse -> ()
rnf DeleteReceiptRuleSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReceiptRuleSetResponse' :: DeleteReceiptRuleSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus