{-# 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.SetIdentityFeedbackForwardingEnabled
(
SetIdentityFeedbackForwardingEnabled (..),
newSetIdentityFeedbackForwardingEnabled,
setIdentityFeedbackForwardingEnabled_identity,
setIdentityFeedbackForwardingEnabled_forwardingEnabled,
SetIdentityFeedbackForwardingEnabledResponse (..),
newSetIdentityFeedbackForwardingEnabledResponse,
setIdentityFeedbackForwardingEnabledResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data SetIdentityFeedbackForwardingEnabled = SetIdentityFeedbackForwardingEnabled'
{
SetIdentityFeedbackForwardingEnabled -> Text
identity :: Prelude.Text,
SetIdentityFeedbackForwardingEnabled -> Bool
forwardingEnabled :: Prelude.Bool
}
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
Prelude.Eq, ReadPrec [SetIdentityFeedbackForwardingEnabled]
ReadPrec SetIdentityFeedbackForwardingEnabled
Int -> ReadS SetIdentityFeedbackForwardingEnabled
ReadS [SetIdentityFeedbackForwardingEnabled]
(Int -> ReadS SetIdentityFeedbackForwardingEnabled)
-> ReadS [SetIdentityFeedbackForwardingEnabled]
-> ReadPrec SetIdentityFeedbackForwardingEnabled
-> ReadPrec [SetIdentityFeedbackForwardingEnabled]
-> Read SetIdentityFeedbackForwardingEnabled
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SetIdentityFeedbackForwardingEnabled
readsPrec :: Int -> ReadS SetIdentityFeedbackForwardingEnabled
$creadList :: ReadS [SetIdentityFeedbackForwardingEnabled]
readList :: ReadS [SetIdentityFeedbackForwardingEnabled]
$creadPrec :: ReadPrec SetIdentityFeedbackForwardingEnabled
readPrec :: ReadPrec SetIdentityFeedbackForwardingEnabled
$creadListPrec :: ReadPrec [SetIdentityFeedbackForwardingEnabled]
readListPrec :: ReadPrec [SetIdentityFeedbackForwardingEnabled]
Prelude.Read, 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
Prelude.Show, (forall x.
SetIdentityFeedbackForwardingEnabled
-> Rep SetIdentityFeedbackForwardingEnabled x)
-> (forall x.
Rep SetIdentityFeedbackForwardingEnabled x
-> SetIdentityFeedbackForwardingEnabled)
-> Generic SetIdentityFeedbackForwardingEnabled
forall x.
Rep SetIdentityFeedbackForwardingEnabled x
-> SetIdentityFeedbackForwardingEnabled
forall x.
SetIdentityFeedbackForwardingEnabled
-> Rep SetIdentityFeedbackForwardingEnabled x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetIdentityFeedbackForwardingEnabled
-> Rep SetIdentityFeedbackForwardingEnabled x
from :: forall x.
SetIdentityFeedbackForwardingEnabled
-> Rep SetIdentityFeedbackForwardingEnabled x
$cto :: forall x.
Rep SetIdentityFeedbackForwardingEnabled x
-> SetIdentityFeedbackForwardingEnabled
to :: forall x.
Rep SetIdentityFeedbackForwardingEnabled x
-> SetIdentityFeedbackForwardingEnabled
Prelude.Generic)
newSetIdentityFeedbackForwardingEnabled ::
Prelude.Text ->
Prelude.Bool ->
SetIdentityFeedbackForwardingEnabled
newSetIdentityFeedbackForwardingEnabled :: Text -> Bool -> SetIdentityFeedbackForwardingEnabled
newSetIdentityFeedbackForwardingEnabled
Text
pIdentity_
Bool
pForwardingEnabled_ =
SetIdentityFeedbackForwardingEnabled'
{ $sel:identity:SetIdentityFeedbackForwardingEnabled' :: Text
identity =
Text
pIdentity_,
$sel:forwardingEnabled:SetIdentityFeedbackForwardingEnabled' :: Bool
forwardingEnabled =
Bool
pForwardingEnabled_
}
setIdentityFeedbackForwardingEnabled_identity :: Lens.Lens' SetIdentityFeedbackForwardingEnabled Prelude.Text
setIdentityFeedbackForwardingEnabled_identity :: Lens' SetIdentityFeedbackForwardingEnabled Text
setIdentityFeedbackForwardingEnabled_identity = (SetIdentityFeedbackForwardingEnabled -> Text)
-> (SetIdentityFeedbackForwardingEnabled
-> Text -> SetIdentityFeedbackForwardingEnabled)
-> Lens' SetIdentityFeedbackForwardingEnabled Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityFeedbackForwardingEnabled' {Text
$sel:identity:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Text
identity :: Text
identity} -> Text
identity) (\s :: SetIdentityFeedbackForwardingEnabled
s@SetIdentityFeedbackForwardingEnabled' {} Text
a -> SetIdentityFeedbackForwardingEnabled
s {identity = a} :: SetIdentityFeedbackForwardingEnabled)
setIdentityFeedbackForwardingEnabled_forwardingEnabled :: Lens.Lens' SetIdentityFeedbackForwardingEnabled Prelude.Bool
setIdentityFeedbackForwardingEnabled_forwardingEnabled :: Lens' SetIdentityFeedbackForwardingEnabled Bool
setIdentityFeedbackForwardingEnabled_forwardingEnabled = (SetIdentityFeedbackForwardingEnabled -> Bool)
-> (SetIdentityFeedbackForwardingEnabled
-> Bool -> SetIdentityFeedbackForwardingEnabled)
-> Lens' SetIdentityFeedbackForwardingEnabled Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityFeedbackForwardingEnabled' {Bool
$sel:forwardingEnabled:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Bool
forwardingEnabled :: Bool
forwardingEnabled} -> Bool
forwardingEnabled) (\s :: SetIdentityFeedbackForwardingEnabled
s@SetIdentityFeedbackForwardingEnabled' {} Bool
a -> SetIdentityFeedbackForwardingEnabled
s {forwardingEnabled = a} :: SetIdentityFeedbackForwardingEnabled)
instance
Core.AWSRequest
SetIdentityFeedbackForwardingEnabled
where
type
AWSResponse SetIdentityFeedbackForwardingEnabled =
SetIdentityFeedbackForwardingEnabledResponse
request :: (Service -> Service)
-> SetIdentityFeedbackForwardingEnabled
-> Request SetIdentityFeedbackForwardingEnabled
request Service -> Service
overrides =
Service
-> SetIdentityFeedbackForwardingEnabled
-> Request SetIdentityFeedbackForwardingEnabled
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetIdentityFeedbackForwardingEnabled
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse SetIdentityFeedbackForwardingEnabled)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse SetIdentityFeedbackForwardingEnabled))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetIdentityFeedbackForwardingEnabled
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse SetIdentityFeedbackForwardingEnabled)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SetIdentityFeedbackForwardingEnabledResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> SetIdentityFeedbackForwardingEnabledResponse
SetIdentityFeedbackForwardingEnabledResponse'
(Int -> SetIdentityFeedbackForwardingEnabledResponse)
-> Either String Int
-> Either String SetIdentityFeedbackForwardingEnabledResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall a. a -> Either String a
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
SetIdentityFeedbackForwardingEnabled
where
hashWithSalt :: Int -> SetIdentityFeedbackForwardingEnabled -> Int
hashWithSalt
Int
_salt
SetIdentityFeedbackForwardingEnabled' {Bool
Text
$sel:identity:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Text
$sel:forwardingEnabled:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Bool
identity :: Text
forwardingEnabled :: Bool
..} =
Int
_salt
Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identity
Int -> Bool -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
forwardingEnabled
instance
Prelude.NFData
SetIdentityFeedbackForwardingEnabled
where
rnf :: SetIdentityFeedbackForwardingEnabled -> ()
rnf SetIdentityFeedbackForwardingEnabled' {Bool
Text
$sel:identity:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Text
$sel:forwardingEnabled:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Bool
identity :: Text
forwardingEnabled :: Bool
..} =
Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
identity
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Bool -> ()
forall a. NFData a => a -> ()
Prelude.rnf Bool
forwardingEnabled
instance
Data.ToHeaders
SetIdentityFeedbackForwardingEnabled
where
toHeaders :: SetIdentityFeedbackForwardingEnabled -> ResponseHeaders
toHeaders = ResponseHeaders
-> SetIdentityFeedbackForwardingEnabled -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
SetIdentityFeedbackForwardingEnabled
where
toPath :: SetIdentityFeedbackForwardingEnabled -> ByteString
toPath = ByteString -> SetIdentityFeedbackForwardingEnabled -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
SetIdentityFeedbackForwardingEnabled
where
toQuery :: SetIdentityFeedbackForwardingEnabled -> QueryString
toQuery SetIdentityFeedbackForwardingEnabled' {Bool
Text
$sel:identity:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Text
$sel:forwardingEnabled:SetIdentityFeedbackForwardingEnabled' :: SetIdentityFeedbackForwardingEnabled -> Bool
identity :: Text
forwardingEnabled :: Bool
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"SetIdentityFeedbackForwardingEnabled" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"Identity" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
identity,
ByteString
"ForwardingEnabled" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Bool
forwardingEnabled
]
data SetIdentityFeedbackForwardingEnabledResponse = SetIdentityFeedbackForwardingEnabledResponse'
{
SetIdentityFeedbackForwardingEnabledResponse -> Int
httpStatus :: Prelude.Int
}
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
Prelude.Eq, ReadPrec [SetIdentityFeedbackForwardingEnabledResponse]
ReadPrec SetIdentityFeedbackForwardingEnabledResponse
Int -> ReadS SetIdentityFeedbackForwardingEnabledResponse
ReadS [SetIdentityFeedbackForwardingEnabledResponse]
(Int -> ReadS SetIdentityFeedbackForwardingEnabledResponse)
-> ReadS [SetIdentityFeedbackForwardingEnabledResponse]
-> ReadPrec SetIdentityFeedbackForwardingEnabledResponse
-> ReadPrec [SetIdentityFeedbackForwardingEnabledResponse]
-> Read SetIdentityFeedbackForwardingEnabledResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SetIdentityFeedbackForwardingEnabledResponse
readsPrec :: Int -> ReadS SetIdentityFeedbackForwardingEnabledResponse
$creadList :: ReadS [SetIdentityFeedbackForwardingEnabledResponse]
readList :: ReadS [SetIdentityFeedbackForwardingEnabledResponse]
$creadPrec :: ReadPrec SetIdentityFeedbackForwardingEnabledResponse
readPrec :: ReadPrec SetIdentityFeedbackForwardingEnabledResponse
$creadListPrec :: ReadPrec [SetIdentityFeedbackForwardingEnabledResponse]
readListPrec :: ReadPrec [SetIdentityFeedbackForwardingEnabledResponse]
Prelude.Read, 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
Prelude.Show, (forall x.
SetIdentityFeedbackForwardingEnabledResponse
-> Rep SetIdentityFeedbackForwardingEnabledResponse x)
-> (forall x.
Rep SetIdentityFeedbackForwardingEnabledResponse x
-> SetIdentityFeedbackForwardingEnabledResponse)
-> Generic SetIdentityFeedbackForwardingEnabledResponse
forall x.
Rep SetIdentityFeedbackForwardingEnabledResponse x
-> SetIdentityFeedbackForwardingEnabledResponse
forall x.
SetIdentityFeedbackForwardingEnabledResponse
-> Rep SetIdentityFeedbackForwardingEnabledResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetIdentityFeedbackForwardingEnabledResponse
-> Rep SetIdentityFeedbackForwardingEnabledResponse x
from :: forall x.
SetIdentityFeedbackForwardingEnabledResponse
-> Rep SetIdentityFeedbackForwardingEnabledResponse x
$cto :: forall x.
Rep SetIdentityFeedbackForwardingEnabledResponse x
-> SetIdentityFeedbackForwardingEnabledResponse
to :: forall x.
Rep SetIdentityFeedbackForwardingEnabledResponse x
-> SetIdentityFeedbackForwardingEnabledResponse
Prelude.Generic)
newSetIdentityFeedbackForwardingEnabledResponse ::
Prelude.Int ->
SetIdentityFeedbackForwardingEnabledResponse
newSetIdentityFeedbackForwardingEnabledResponse :: Int -> SetIdentityFeedbackForwardingEnabledResponse
newSetIdentityFeedbackForwardingEnabledResponse
Int
pHttpStatus_ =
SetIdentityFeedbackForwardingEnabledResponse'
{ $sel:httpStatus:SetIdentityFeedbackForwardingEnabledResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
setIdentityFeedbackForwardingEnabledResponse_httpStatus :: Lens.Lens' SetIdentityFeedbackForwardingEnabledResponse Prelude.Int
setIdentityFeedbackForwardingEnabledResponse_httpStatus :: Lens' SetIdentityFeedbackForwardingEnabledResponse Int
setIdentityFeedbackForwardingEnabledResponse_httpStatus = (SetIdentityFeedbackForwardingEnabledResponse -> Int)
-> (SetIdentityFeedbackForwardingEnabledResponse
-> Int -> SetIdentityFeedbackForwardingEnabledResponse)
-> Lens' SetIdentityFeedbackForwardingEnabledResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityFeedbackForwardingEnabledResponse' {Int
$sel:httpStatus:SetIdentityFeedbackForwardingEnabledResponse' :: SetIdentityFeedbackForwardingEnabledResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SetIdentityFeedbackForwardingEnabledResponse
s@SetIdentityFeedbackForwardingEnabledResponse' {} Int
a -> SetIdentityFeedbackForwardingEnabledResponse
s {httpStatus = a} :: SetIdentityFeedbackForwardingEnabledResponse)
instance
Prelude.NFData
SetIdentityFeedbackForwardingEnabledResponse
where
rnf :: SetIdentityFeedbackForwardingEnabledResponse -> ()
rnf SetIdentityFeedbackForwardingEnabledResponse' {Int
$sel:httpStatus:SetIdentityFeedbackForwardingEnabledResponse' :: SetIdentityFeedbackForwardingEnabledResponse -> Int
httpStatus :: Int
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus