{-# 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.DeleteReceiptRule
(
DeleteReceiptRule (..),
newDeleteReceiptRule,
deleteReceiptRule_ruleSetName,
deleteReceiptRule_ruleName,
DeleteReceiptRuleResponse (..),
newDeleteReceiptRuleResponse,
deleteReceiptRuleResponse_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 DeleteReceiptRule = DeleteReceiptRule'
{
DeleteReceiptRule -> Text
ruleSetName :: Prelude.Text,
DeleteReceiptRule -> Text
ruleName :: Prelude.Text
}
deriving (DeleteReceiptRule -> DeleteReceiptRule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReceiptRule -> DeleteReceiptRule -> Bool
$c/= :: DeleteReceiptRule -> DeleteReceiptRule -> Bool
== :: DeleteReceiptRule -> DeleteReceiptRule -> Bool
$c== :: DeleteReceiptRule -> DeleteReceiptRule -> Bool
Prelude.Eq, ReadPrec [DeleteReceiptRule]
ReadPrec DeleteReceiptRule
Int -> ReadS DeleteReceiptRule
ReadS [DeleteReceiptRule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReceiptRule]
$creadListPrec :: ReadPrec [DeleteReceiptRule]
readPrec :: ReadPrec DeleteReceiptRule
$creadPrec :: ReadPrec DeleteReceiptRule
readList :: ReadS [DeleteReceiptRule]
$creadList :: ReadS [DeleteReceiptRule]
readsPrec :: Int -> ReadS DeleteReceiptRule
$creadsPrec :: Int -> ReadS DeleteReceiptRule
Prelude.Read, Int -> DeleteReceiptRule -> ShowS
[DeleteReceiptRule] -> ShowS
DeleteReceiptRule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReceiptRule] -> ShowS
$cshowList :: [DeleteReceiptRule] -> ShowS
show :: DeleteReceiptRule -> String
$cshow :: DeleteReceiptRule -> String
showsPrec :: Int -> DeleteReceiptRule -> ShowS
$cshowsPrec :: Int -> DeleteReceiptRule -> ShowS
Prelude.Show, forall x. Rep DeleteReceiptRule x -> DeleteReceiptRule
forall x. DeleteReceiptRule -> Rep DeleteReceiptRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteReceiptRule x -> DeleteReceiptRule
$cfrom :: forall x. DeleteReceiptRule -> Rep DeleteReceiptRule x
Prelude.Generic)
newDeleteReceiptRule ::
Prelude.Text ->
Prelude.Text ->
DeleteReceiptRule
newDeleteReceiptRule :: Text -> Text -> DeleteReceiptRule
newDeleteReceiptRule Text
pRuleSetName_ Text
pRuleName_ =
DeleteReceiptRule'
{ $sel:ruleSetName:DeleteReceiptRule' :: Text
ruleSetName = Text
pRuleSetName_,
$sel:ruleName:DeleteReceiptRule' :: Text
ruleName = Text
pRuleName_
}
deleteReceiptRule_ruleSetName :: Lens.Lens' DeleteReceiptRule Prelude.Text
deleteReceiptRule_ruleSetName :: Lens' DeleteReceiptRule Text
deleteReceiptRule_ruleSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReceiptRule' {Text
ruleSetName :: Text
$sel:ruleSetName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
ruleSetName} -> Text
ruleSetName) (\s :: DeleteReceiptRule
s@DeleteReceiptRule' {} Text
a -> DeleteReceiptRule
s {$sel:ruleSetName:DeleteReceiptRule' :: Text
ruleSetName = Text
a} :: DeleteReceiptRule)
deleteReceiptRule_ruleName :: Lens.Lens' DeleteReceiptRule Prelude.Text
deleteReceiptRule_ruleName :: Lens' DeleteReceiptRule Text
deleteReceiptRule_ruleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReceiptRule' {Text
ruleName :: Text
$sel:ruleName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
ruleName} -> Text
ruleName) (\s :: DeleteReceiptRule
s@DeleteReceiptRule' {} Text
a -> DeleteReceiptRule
s {$sel:ruleName:DeleteReceiptRule' :: Text
ruleName = Text
a} :: DeleteReceiptRule)
instance Core.AWSRequest DeleteReceiptRule where
type
AWSResponse DeleteReceiptRule =
DeleteReceiptRuleResponse
request :: (Service -> Service)
-> DeleteReceiptRule -> Request DeleteReceiptRule
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 DeleteReceiptRule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteReceiptRule)))
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
"DeleteReceiptRuleResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteReceiptRuleResponse
DeleteReceiptRuleResponse'
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 DeleteReceiptRule where
hashWithSalt :: Int -> DeleteReceiptRule -> Int
hashWithSalt Int
_salt DeleteReceiptRule' {Text
ruleName :: Text
ruleSetName :: Text
$sel:ruleName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
$sel:ruleSetName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleSetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
ruleName
instance Prelude.NFData DeleteReceiptRule where
rnf :: DeleteReceiptRule -> ()
rnf DeleteReceiptRule' {Text
ruleName :: Text
ruleSetName :: Text
$sel:ruleName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
$sel:ruleSetName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
ruleSetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
ruleName
instance Data.ToHeaders DeleteReceiptRule where
toHeaders :: DeleteReceiptRule -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeleteReceiptRule where
toPath :: DeleteReceiptRule -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteReceiptRule where
toQuery :: DeleteReceiptRule -> QueryString
toQuery DeleteReceiptRule' {Text
ruleName :: Text
ruleSetName :: Text
$sel:ruleName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
$sel:ruleSetName:DeleteReceiptRule' :: DeleteReceiptRule -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeleteReceiptRule" :: 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,
ByteString
"RuleName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
ruleName
]
data DeleteReceiptRuleResponse = DeleteReceiptRuleResponse'
{
DeleteReceiptRuleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteReceiptRuleResponse -> DeleteReceiptRuleResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteReceiptRuleResponse -> DeleteReceiptRuleResponse -> Bool
$c/= :: DeleteReceiptRuleResponse -> DeleteReceiptRuleResponse -> Bool
== :: DeleteReceiptRuleResponse -> DeleteReceiptRuleResponse -> Bool
$c== :: DeleteReceiptRuleResponse -> DeleteReceiptRuleResponse -> Bool
Prelude.Eq, ReadPrec [DeleteReceiptRuleResponse]
ReadPrec DeleteReceiptRuleResponse
Int -> ReadS DeleteReceiptRuleResponse
ReadS [DeleteReceiptRuleResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteReceiptRuleResponse]
$creadListPrec :: ReadPrec [DeleteReceiptRuleResponse]
readPrec :: ReadPrec DeleteReceiptRuleResponse
$creadPrec :: ReadPrec DeleteReceiptRuleResponse
readList :: ReadS [DeleteReceiptRuleResponse]
$creadList :: ReadS [DeleteReceiptRuleResponse]
readsPrec :: Int -> ReadS DeleteReceiptRuleResponse
$creadsPrec :: Int -> ReadS DeleteReceiptRuleResponse
Prelude.Read, Int -> DeleteReceiptRuleResponse -> ShowS
[DeleteReceiptRuleResponse] -> ShowS
DeleteReceiptRuleResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteReceiptRuleResponse] -> ShowS
$cshowList :: [DeleteReceiptRuleResponse] -> ShowS
show :: DeleteReceiptRuleResponse -> String
$cshow :: DeleteReceiptRuleResponse -> String
showsPrec :: Int -> DeleteReceiptRuleResponse -> ShowS
$cshowsPrec :: Int -> DeleteReceiptRuleResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteReceiptRuleResponse x -> DeleteReceiptRuleResponse
forall x.
DeleteReceiptRuleResponse -> Rep DeleteReceiptRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteReceiptRuleResponse x -> DeleteReceiptRuleResponse
$cfrom :: forall x.
DeleteReceiptRuleResponse -> Rep DeleteReceiptRuleResponse x
Prelude.Generic)
newDeleteReceiptRuleResponse ::
Prelude.Int ->
DeleteReceiptRuleResponse
newDeleteReceiptRuleResponse :: Int -> DeleteReceiptRuleResponse
newDeleteReceiptRuleResponse Int
pHttpStatus_ =
DeleteReceiptRuleResponse'
{ $sel:httpStatus:DeleteReceiptRuleResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteReceiptRuleResponse_httpStatus :: Lens.Lens' DeleteReceiptRuleResponse Prelude.Int
deleteReceiptRuleResponse_httpStatus :: Lens' DeleteReceiptRuleResponse Int
deleteReceiptRuleResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteReceiptRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReceiptRuleResponse' :: DeleteReceiptRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteReceiptRuleResponse
s@DeleteReceiptRuleResponse' {} Int
a -> DeleteReceiptRuleResponse
s {$sel:httpStatus:DeleteReceiptRuleResponse' :: Int
httpStatus = Int
a} :: DeleteReceiptRuleResponse)
instance Prelude.NFData DeleteReceiptRuleResponse where
rnf :: DeleteReceiptRuleResponse -> ()
rnf DeleteReceiptRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteReceiptRuleResponse' :: DeleteReceiptRuleResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus