module Aws.Ses.Commands.SetIdentityFeedbackForwardingEnabled
    ( SetIdentityFeedbackForwardingEnabled(..)
    , SetIdentityFeedbackForwardingEnabledResponse(..)
    ) where

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

-- | Change whether bounces and complaints for the given identity will be
-- forwarded as email.
data SetIdentityFeedbackForwardingEnabled =
    SetIdentityFeedbackForwardingEnabled
      { SetIdentityFeedbackForwardingEnabled -> Bool
sffForwardingEnabled :: Bool
      , SetIdentityFeedbackForwardingEnabled -> Text
sffIdentity          :: Text
      }
    deriving (SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
(SetIdentityFeedbackForwardingEnabled
 -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> Eq SetIdentityFeedbackForwardingEnabled
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c/= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
== :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c== :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
Eq, Eq SetIdentityFeedbackForwardingEnabled
Eq SetIdentityFeedbackForwardingEnabled
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Ordering)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled)
-> (SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled
    -> SetIdentityFeedbackForwardingEnabled)
-> Ord SetIdentityFeedbackForwardingEnabled
SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Ordering
SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
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 :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
$cmin :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
max :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
$cmax :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
>= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c>= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
> :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c> :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
<= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c<= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
< :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c< :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
compare :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Ordering
$ccompare :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Ordering
$cp1Ord :: Eq SetIdentityFeedbackForwardingEnabled
Ord, Int -> SetIdentityFeedbackForwardingEnabled -> ShowS
[SetIdentityFeedbackForwardingEnabled] -> ShowS
SetIdentityFeedbackForwardingEnabled -> String
(Int -> SetIdentityFeedbackForwardingEnabled -> ShowS)
-> (SetIdentityFeedbackForwardingEnabled -> String)
-> ([SetIdentityFeedbackForwardingEnabled] -> ShowS)
-> Show SetIdentityFeedbackForwardingEnabled
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityFeedbackForwardingEnabled] -> ShowS
$cshowList :: [SetIdentityFeedbackForwardingEnabled] -> ShowS
show :: SetIdentityFeedbackForwardingEnabled -> String
$cshow :: SetIdentityFeedbackForwardingEnabled -> String
showsPrec :: Int -> SetIdentityFeedbackForwardingEnabled -> ShowS
$cshowsPrec :: Int -> SetIdentityFeedbackForwardingEnabled -> ShowS
Show, Typeable)

-- | ServiceConfiguration: 'SesConfiguration'
instance SignQuery SetIdentityFeedbackForwardingEnabled where
    type ServiceConfiguration SetIdentityFeedbackForwardingEnabled = SesConfiguration
    signQuery :: SetIdentityFeedbackForwardingEnabled
-> ServiceConfiguration
     SetIdentityFeedbackForwardingEnabled queryType
-> SignatureData
-> SignedQuery
signQuery SetIdentityFeedbackForwardingEnabled{Bool
Text
sffIdentity :: Text
sffForwardingEnabled :: Bool
sffIdentity :: SetIdentityFeedbackForwardingEnabled -> Text
sffForwardingEnabled :: SetIdentityFeedbackForwardingEnabled -> Bool
..} =
        [(ByteString, ByteString)]
-> SesConfiguration queryType -> SignatureData -> SignedQuery
forall qt.
[(ByteString, ByteString)]
-> SesConfiguration qt -> SignatureData -> SignedQuery
sesSignQuery [ (ByteString
"Action",  ByteString
"SetIdentityFeedbackForwardingEnabled")
                     , (ByteString
"Identity",              Text -> ByteString
T.encodeUtf8 Text
sffIdentity)
                     , (ByteString
"ForwardingEnabled", Bool -> ByteString
awsBool Bool
sffForwardingEnabled)
                     ]

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

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

instance Transaction SetIdentityFeedbackForwardingEnabled SetIdentityFeedbackForwardingEnabledResponse

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