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
(DeleteIdentity -> DeleteIdentity -> Bool)
-> (DeleteIdentity -> DeleteIdentity -> Bool) -> Eq DeleteIdentity
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
Eq DeleteIdentity
-> (DeleteIdentity -> DeleteIdentity -> Ordering)
-> (DeleteIdentity -> DeleteIdentity -> Bool)
-> (DeleteIdentity -> DeleteIdentity -> Bool)
-> (DeleteIdentity -> DeleteIdentity -> Bool)
-> (DeleteIdentity -> DeleteIdentity -> Bool)
-> (DeleteIdentity -> DeleteIdentity -> DeleteIdentity)
-> (DeleteIdentity -> DeleteIdentity -> DeleteIdentity)
-> Ord 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
$cp1Ord :: Eq DeleteIdentity
Ord, Int -> DeleteIdentity -> ShowS
[DeleteIdentity] -> ShowS
DeleteIdentity -> String
(Int -> DeleteIdentity -> ShowS)
-> (DeleteIdentity -> String)
-> ([DeleteIdentity] -> ShowS)
-> Show DeleteIdentity
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 :: DeleteIdentity
-> ServiceConfiguration DeleteIdentity queryType
-> SignatureData
-> SignedQuery
signQuery (DeleteIdentity Text
identity) =
        [(ByteString, ByteString)]
-> SesConfiguration queryType -> SignatureData -> SignedQuery
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
(DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> Eq DeleteIdentityResponse
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
Eq DeleteIdentityResponse
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Ordering)
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> (DeleteIdentityResponse -> DeleteIdentityResponse -> Bool)
-> (DeleteIdentityResponse
    -> DeleteIdentityResponse -> DeleteIdentityResponse)
-> (DeleteIdentityResponse
    -> DeleteIdentityResponse -> DeleteIdentityResponse)
-> Ord 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
$cp1Ord :: Eq DeleteIdentityResponse
Ord, Int -> DeleteIdentityResponse -> ShowS
[DeleteIdentityResponse] -> ShowS
DeleteIdentityResponse -> String
(Int -> DeleteIdentityResponse -> ShowS)
-> (DeleteIdentityResponse -> String)
-> ([DeleteIdentityResponse] -> ShowS)
-> Show DeleteIdentityResponse
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
_
        = (Cursor -> Response SesMetadata DeleteIdentityResponse)
-> IORef SesMetadata -> HTTPResponseConsumer DeleteIdentityResponse
forall a.
(Cursor -> Response SesMetadata a)
-> IORef SesMetadata -> HTTPResponseConsumer a
sesResponseConsumer ((Cursor -> Response SesMetadata DeleteIdentityResponse)
 -> IORef SesMetadata
 -> HTTPResponseConsumer DeleteIdentityResponse)
-> (Cursor -> Response SesMetadata DeleteIdentityResponse)
-> IORef SesMetadata
-> HTTPResponseConsumer DeleteIdentityResponse
forall a b. (a -> b) -> a -> b
$ \Cursor
_ -> DeleteIdentityResponse
-> Response SesMetadata DeleteIdentityResponse
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 = DeleteIdentityResponse
-> ResourceT IO (MemoryResponse DeleteIdentityResponse)
forall (m :: * -> *) a. Monad m => a -> m a
return