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