module Aws.Ses.Commands.DeleteIdentity
    ( DeleteIdentity(..)
    , DeleteIdentityResponse(..)
    ) where

import Data.Text (Text)
import Data.Text.Encoding as T (encodeUtf8)
import Data.Typeable
import Aws.Core
import Aws.Ses.Core

-- | Delete an email address or domain
data DeleteIdentity  = DeleteIdentity Text
    deriving (DeleteIdentity -> DeleteIdentity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIdentity -> DeleteIdentity -> Bool
$c/= :: DeleteIdentity -> DeleteIdentity -> Bool
== :: DeleteIdentity -> DeleteIdentity -> Bool
$c== :: DeleteIdentity -> DeleteIdentity -> Bool
Eq, Eq DeleteIdentity
DeleteIdentity -> DeleteIdentity -> Bool
DeleteIdentity -> DeleteIdentity -> Ordering
DeleteIdentity -> DeleteIdentity -> DeleteIdentity
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeleteIdentity -> DeleteIdentity -> DeleteIdentity
$cmin :: DeleteIdentity -> DeleteIdentity -> DeleteIdentity
max :: DeleteIdentity -> DeleteIdentity -> DeleteIdentity
$cmax :: DeleteIdentity -> DeleteIdentity -> DeleteIdentity
>= :: DeleteIdentity -> DeleteIdentity -> Bool
$c>= :: DeleteIdentity -> DeleteIdentity -> Bool
> :: DeleteIdentity -> DeleteIdentity -> Bool
$c> :: DeleteIdentity -> DeleteIdentity -> Bool
<= :: DeleteIdentity -> DeleteIdentity -> Bool
$c<= :: DeleteIdentity -> DeleteIdentity -> Bool
< :: DeleteIdentity -> DeleteIdentity -> Bool
$c< :: DeleteIdentity -> DeleteIdentity -> Bool
compare :: DeleteIdentity -> DeleteIdentity -> Ordering
$ccompare :: DeleteIdentity -> DeleteIdentity -> Ordering
Ord, Int -> DeleteIdentity -> ShowS
[DeleteIdentity] -> ShowS
DeleteIdentity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIdentity] -> ShowS
$cshowList :: [DeleteIdentity] -> ShowS
show :: DeleteIdentity -> String
$cshow :: DeleteIdentity -> String
showsPrec :: Int -> DeleteIdentity -> ShowS
$cshowsPrec :: Int -> DeleteIdentity -> ShowS
Show, Typeable)

-- | ServiceConfiguration: 'SesConfiguration'
instance SignQuery DeleteIdentity where
    type ServiceConfiguration DeleteIdentity = SesConfiguration
    signQuery :: forall queryType.
DeleteIdentity
-> ServiceConfiguration DeleteIdentity queryType
-> SignatureData
-> SignedQuery
signQuery (DeleteIdentity Text
identity) =
        forall qt.
[(ByteString, ByteString)]
-> SesConfiguration qt -> SignatureData -> SignedQuery
sesSignQuery [ (ByteString
"Action", ByteString
"DeleteIdentity")
                     , (ByteString
"Identity", Text -> ByteString
T.encodeUtf8 Text
identity)
                     ]

-- | The response sent back by Amazon SES after a
-- 'DeleteIdentity' command.
data DeleteIdentityResponse = DeleteIdentityResponse
    deriving (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c/= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
== :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c== :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
Eq, Eq DeleteIdentityResponse
DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
DeleteIdentityResponse -> DeleteIdentityResponse -> Ordering
DeleteIdentityResponse
-> DeleteIdentityResponse -> DeleteIdentityResponse
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeleteIdentityResponse
-> DeleteIdentityResponse -> DeleteIdentityResponse
$cmin :: DeleteIdentityResponse
-> DeleteIdentityResponse -> DeleteIdentityResponse
max :: DeleteIdentityResponse
-> DeleteIdentityResponse -> DeleteIdentityResponse
$cmax :: DeleteIdentityResponse
-> DeleteIdentityResponse -> DeleteIdentityResponse
>= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c>= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
> :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c> :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
<= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c<= :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
< :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
$c< :: DeleteIdentityResponse -> DeleteIdentityResponse -> Bool
compare :: DeleteIdentityResponse -> DeleteIdentityResponse -> Ordering
$ccompare :: DeleteIdentityResponse -> DeleteIdentityResponse -> Ordering
Ord, Int -> DeleteIdentityResponse -> ShowS
[DeleteIdentityResponse] -> ShowS
DeleteIdentityResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIdentityResponse] -> ShowS
$cshowList :: [DeleteIdentityResponse] -> ShowS
show :: DeleteIdentityResponse -> String
$cshow :: DeleteIdentityResponse -> String
showsPrec :: Int -> DeleteIdentityResponse -> ShowS
$cshowsPrec :: Int -> DeleteIdentityResponse -> ShowS
Show, Typeable)


instance ResponseConsumer DeleteIdentity DeleteIdentityResponse where
    type ResponseMetadata DeleteIdentityResponse = SesMetadata
    responseConsumer :: Request
-> DeleteIdentity
-> IORef (ResponseMetadata DeleteIdentityResponse)
-> HTTPResponseConsumer DeleteIdentityResponse
responseConsumer Request
_ DeleteIdentity
_
        = forall a.
(Cursor -> Response SesMetadata a)
-> IORef SesMetadata -> HTTPResponseConsumer a
sesResponseConsumer forall a b. (a -> b) -> a -> b
$ \Cursor
_ -> forall (m :: * -> *) a. Monad m => a -> m a
return DeleteIdentityResponse
DeleteIdentityResponse


instance Transaction DeleteIdentity DeleteIdentityResponse where

instance AsMemoryResponse DeleteIdentityResponse where
    type MemoryResponse DeleteIdentityResponse = DeleteIdentityResponse
    loadToMemory :: DeleteIdentityResponse
-> ResourceT IO (MemoryResponse DeleteIdentityResponse)
loadToMemory = forall (m :: * -> *) a. Monad m => a -> m a
return