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
$c== :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
== :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$c/= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
/= :: 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
$ccompare :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Ordering
compare :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Ordering
$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
>= :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled -> Bool
$cmax :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
max :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
$cmin :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
min :: SetIdentityFeedbackForwardingEnabled
-> SetIdentityFeedbackForwardingEnabled
-> 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
$cshowsPrec :: Int -> SetIdentityFeedbackForwardingEnabled -> ShowS
showsPrec :: Int -> SetIdentityFeedbackForwardingEnabled -> ShowS
$cshow :: SetIdentityFeedbackForwardingEnabled -> String
show :: SetIdentityFeedbackForwardingEnabled -> String
$cshowList :: [SetIdentityFeedbackForwardingEnabled] -> ShowS
showList :: [SetIdentityFeedbackForwardingEnabled] -> ShowS
Show, Typeable)

-- | ServiceConfiguration: 'SesConfiguration'
instance SignQuery SetIdentityFeedbackForwardingEnabled where
    type ServiceConfiguration SetIdentityFeedbackForwardingEnabled = SesConfiguration
    signQuery :: forall queryType.
SetIdentityFeedbackForwardingEnabled
-> ServiceConfiguration
     SetIdentityFeedbackForwardingEnabled queryType
-> SignatureData
-> SignedQuery
signQuery SetIdentityFeedbackForwardingEnabled{Bool
Text
sffForwardingEnabled :: SetIdentityFeedbackForwardingEnabled -> Bool
sffIdentity :: SetIdentityFeedbackForwardingEnabled -> Text
sffForwardingEnabled :: Bool
sffIdentity :: Text
..} =
        [(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
$c== :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Bool
== :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Bool
$c/= :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Bool
/= :: 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
$ccompare :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Ordering
compare :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Ordering
$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
>= :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse -> Bool
$cmax :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
max :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
$cmin :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
min :: SetIdentityFeedbackForwardingEnabledResponse
-> SetIdentityFeedbackForwardingEnabledResponse
-> 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
$cshowsPrec :: Int -> SetIdentityFeedbackForwardingEnabledResponse -> ShowS
showsPrec :: Int -> SetIdentityFeedbackForwardingEnabledResponse -> ShowS
$cshow :: SetIdentityFeedbackForwardingEnabledResponse -> String
show :: SetIdentityFeedbackForwardingEnabledResponse -> String
$cshowList :: [SetIdentityFeedbackForwardingEnabledResponse] -> ShowS
showList :: [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 a. a -> Response SesMetadata a
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)
SetIdentityFeedbackForwardingEnabledResponse
-> ResourceT IO SetIdentityFeedbackForwardingEnabledResponse
forall a. a -> ResourceT IO a
forall (m :: * -> *) a. Monad m => a -> m a
return