{-# 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.SetIdentityHeadersInNotificationsEnabled
(
SetIdentityHeadersInNotificationsEnabled (..),
newSetIdentityHeadersInNotificationsEnabled,
setIdentityHeadersInNotificationsEnabled_identity,
setIdentityHeadersInNotificationsEnabled_notificationType,
setIdentityHeadersInNotificationsEnabled_enabled,
SetIdentityHeadersInNotificationsEnabledResponse (..),
newSetIdentityHeadersInNotificationsEnabledResponse,
setIdentityHeadersInNotificationsEnabledResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data =
{
:: Prelude.Text,
:: NotificationType,
:: Prelude.Bool
}
deriving (SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool
(SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool)
-> (SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool)
-> Eq SetIdentityHeadersInNotificationsEnabled
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool
$c/= :: SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool
== :: SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool
$c== :: SetIdentityHeadersInNotificationsEnabled
-> SetIdentityHeadersInNotificationsEnabled -> Bool
Prelude.Eq, ReadPrec [SetIdentityHeadersInNotificationsEnabled]
ReadPrec SetIdentityHeadersInNotificationsEnabled
Int -> ReadS SetIdentityHeadersInNotificationsEnabled
ReadS [SetIdentityHeadersInNotificationsEnabled]
(Int -> ReadS SetIdentityHeadersInNotificationsEnabled)
-> ReadS [SetIdentityHeadersInNotificationsEnabled]
-> ReadPrec SetIdentityHeadersInNotificationsEnabled
-> ReadPrec [SetIdentityHeadersInNotificationsEnabled]
-> Read SetIdentityHeadersInNotificationsEnabled
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityHeadersInNotificationsEnabled]
$creadListPrec :: ReadPrec [SetIdentityHeadersInNotificationsEnabled]
readPrec :: ReadPrec SetIdentityHeadersInNotificationsEnabled
$creadPrec :: ReadPrec SetIdentityHeadersInNotificationsEnabled
readList :: ReadS [SetIdentityHeadersInNotificationsEnabled]
$creadList :: ReadS [SetIdentityHeadersInNotificationsEnabled]
readsPrec :: Int -> ReadS SetIdentityHeadersInNotificationsEnabled
$creadsPrec :: Int -> ReadS SetIdentityHeadersInNotificationsEnabled
Prelude.Read, Int -> SetIdentityHeadersInNotificationsEnabled -> ShowS
[SetIdentityHeadersInNotificationsEnabled] -> ShowS
SetIdentityHeadersInNotificationsEnabled -> String
(Int -> SetIdentityHeadersInNotificationsEnabled -> ShowS)
-> (SetIdentityHeadersInNotificationsEnabled -> String)
-> ([SetIdentityHeadersInNotificationsEnabled] -> ShowS)
-> Show SetIdentityHeadersInNotificationsEnabled
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityHeadersInNotificationsEnabled] -> ShowS
$cshowList :: [SetIdentityHeadersInNotificationsEnabled] -> ShowS
show :: SetIdentityHeadersInNotificationsEnabled -> String
$cshow :: SetIdentityHeadersInNotificationsEnabled -> String
showsPrec :: Int -> SetIdentityHeadersInNotificationsEnabled -> ShowS
$cshowsPrec :: Int -> SetIdentityHeadersInNotificationsEnabled -> ShowS
Prelude.Show, (forall x.
SetIdentityHeadersInNotificationsEnabled
-> Rep SetIdentityHeadersInNotificationsEnabled x)
-> (forall x.
Rep SetIdentityHeadersInNotificationsEnabled x
-> SetIdentityHeadersInNotificationsEnabled)
-> Generic SetIdentityHeadersInNotificationsEnabled
forall x.
Rep SetIdentityHeadersInNotificationsEnabled x
-> SetIdentityHeadersInNotificationsEnabled
forall x.
SetIdentityHeadersInNotificationsEnabled
-> Rep SetIdentityHeadersInNotificationsEnabled x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityHeadersInNotificationsEnabled x
-> SetIdentityHeadersInNotificationsEnabled
$cfrom :: forall x.
SetIdentityHeadersInNotificationsEnabled
-> Rep SetIdentityHeadersInNotificationsEnabled x
Prelude.Generic)
newSetIdentityHeadersInNotificationsEnabled ::
Prelude.Text ->
NotificationType ->
Prelude.Bool ->
SetIdentityHeadersInNotificationsEnabled
Text
pIdentity_
NotificationType
pNotificationType_
Bool
pEnabled_ =
SetIdentityHeadersInNotificationsEnabled' :: Text
-> NotificationType
-> Bool
-> SetIdentityHeadersInNotificationsEnabled
SetIdentityHeadersInNotificationsEnabled'
{ $sel:identity:SetIdentityHeadersInNotificationsEnabled' :: Text
identity =
Text
pIdentity_,
$sel:notificationType:SetIdentityHeadersInNotificationsEnabled' :: NotificationType
notificationType =
NotificationType
pNotificationType_,
$sel:enabled:SetIdentityHeadersInNotificationsEnabled' :: Bool
enabled = Bool
pEnabled_
}
setIdentityHeadersInNotificationsEnabled_identity :: Lens.Lens' SetIdentityHeadersInNotificationsEnabled Prelude.Text
= (SetIdentityHeadersInNotificationsEnabled -> Text)
-> (SetIdentityHeadersInNotificationsEnabled
-> Text -> SetIdentityHeadersInNotificationsEnabled)
-> Lens
SetIdentityHeadersInNotificationsEnabled
SetIdentityHeadersInNotificationsEnabled
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityHeadersInNotificationsEnabled' {Text
identity :: Text
$sel:identity:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> Text
identity} -> Text
identity) (\s :: SetIdentityHeadersInNotificationsEnabled
s@SetIdentityHeadersInNotificationsEnabled' {} Text
a -> SetIdentityHeadersInNotificationsEnabled
s {$sel:identity:SetIdentityHeadersInNotificationsEnabled' :: Text
identity = Text
a} :: SetIdentityHeadersInNotificationsEnabled)
setIdentityHeadersInNotificationsEnabled_notificationType :: Lens.Lens' SetIdentityHeadersInNotificationsEnabled NotificationType
= (SetIdentityHeadersInNotificationsEnabled -> NotificationType)
-> (SetIdentityHeadersInNotificationsEnabled
-> NotificationType -> SetIdentityHeadersInNotificationsEnabled)
-> Lens
SetIdentityHeadersInNotificationsEnabled
SetIdentityHeadersInNotificationsEnabled
NotificationType
NotificationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityHeadersInNotificationsEnabled' {NotificationType
notificationType :: NotificationType
$sel:notificationType:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> NotificationType
notificationType} -> NotificationType
notificationType) (\s :: SetIdentityHeadersInNotificationsEnabled
s@SetIdentityHeadersInNotificationsEnabled' {} NotificationType
a -> SetIdentityHeadersInNotificationsEnabled
s {$sel:notificationType:SetIdentityHeadersInNotificationsEnabled' :: NotificationType
notificationType = NotificationType
a} :: SetIdentityHeadersInNotificationsEnabled)
setIdentityHeadersInNotificationsEnabled_enabled :: Lens.Lens' SetIdentityHeadersInNotificationsEnabled Prelude.Bool
= (SetIdentityHeadersInNotificationsEnabled -> Bool)
-> (SetIdentityHeadersInNotificationsEnabled
-> Bool -> SetIdentityHeadersInNotificationsEnabled)
-> Lens
SetIdentityHeadersInNotificationsEnabled
SetIdentityHeadersInNotificationsEnabled
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityHeadersInNotificationsEnabled' {Bool
enabled :: Bool
$sel:enabled:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> Bool
enabled} -> Bool
enabled) (\s :: SetIdentityHeadersInNotificationsEnabled
s@SetIdentityHeadersInNotificationsEnabled' {} Bool
a -> SetIdentityHeadersInNotificationsEnabled
s {$sel:enabled:SetIdentityHeadersInNotificationsEnabled' :: Bool
enabled = Bool
a} :: SetIdentityHeadersInNotificationsEnabled)
instance
Core.AWSRequest
SetIdentityHeadersInNotificationsEnabled
where
type
AWSResponse
SetIdentityHeadersInNotificationsEnabled =
SetIdentityHeadersInNotificationsEnabledResponse
request :: SetIdentityHeadersInNotificationsEnabled
-> Request SetIdentityHeadersInNotificationsEnabled
request = Service
-> SetIdentityHeadersInNotificationsEnabled
-> Request SetIdentityHeadersInNotificationsEnabled
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SetIdentityHeadersInNotificationsEnabled
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse SetIdentityHeadersInNotificationsEnabled)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse SetIdentityHeadersInNotificationsEnabled))
-> Logger
-> Service
-> Proxy SetIdentityHeadersInNotificationsEnabled
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse SetIdentityHeadersInNotificationsEnabled)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"SetIdentityHeadersInNotificationsEnabledResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> SetIdentityHeadersInNotificationsEnabledResponse
SetIdentityHeadersInNotificationsEnabledResponse'
(Int -> SetIdentityHeadersInNotificationsEnabledResponse)
-> Either String Int
-> Either String SetIdentityHeadersInNotificationsEnabledResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
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
SetIdentityHeadersInNotificationsEnabled
instance
Prelude.NFData
SetIdentityHeadersInNotificationsEnabled
instance
Core.ToHeaders
SetIdentityHeadersInNotificationsEnabled
where
toHeaders :: SetIdentityHeadersInNotificationsEnabled -> ResponseHeaders
toHeaders = ResponseHeaders
-> SetIdentityHeadersInNotificationsEnabled -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
SetIdentityHeadersInNotificationsEnabled
where
toPath :: SetIdentityHeadersInNotificationsEnabled -> ByteString
toPath = ByteString
-> SetIdentityHeadersInNotificationsEnabled -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
SetIdentityHeadersInNotificationsEnabled
where
toQuery :: SetIdentityHeadersInNotificationsEnabled -> QueryString
toQuery SetIdentityHeadersInNotificationsEnabled' {Bool
Text
NotificationType
enabled :: Bool
notificationType :: NotificationType
identity :: Text
$sel:enabled:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> Bool
$sel:notificationType:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> NotificationType
$sel:identity:SetIdentityHeadersInNotificationsEnabled' :: SetIdentityHeadersInNotificationsEnabled -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"SetIdentityHeadersInNotificationsEnabled" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"Identity" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
identity,
ByteString
"NotificationType" ByteString -> NotificationType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: NotificationType
notificationType,
ByteString
"Enabled" ByteString -> Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Bool
enabled
]
data =
{
:: Prelude.Int
}
deriving (SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool
(SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool)
-> (SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool)
-> Eq SetIdentityHeadersInNotificationsEnabledResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool
$c/= :: SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool
== :: SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool
$c== :: SetIdentityHeadersInNotificationsEnabledResponse
-> SetIdentityHeadersInNotificationsEnabledResponse -> Bool
Prelude.Eq, ReadPrec [SetIdentityHeadersInNotificationsEnabledResponse]
ReadPrec SetIdentityHeadersInNotificationsEnabledResponse
Int -> ReadS SetIdentityHeadersInNotificationsEnabledResponse
ReadS [SetIdentityHeadersInNotificationsEnabledResponse]
(Int -> ReadS SetIdentityHeadersInNotificationsEnabledResponse)
-> ReadS [SetIdentityHeadersInNotificationsEnabledResponse]
-> ReadPrec SetIdentityHeadersInNotificationsEnabledResponse
-> ReadPrec [SetIdentityHeadersInNotificationsEnabledResponse]
-> Read SetIdentityHeadersInNotificationsEnabledResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityHeadersInNotificationsEnabledResponse]
$creadListPrec :: ReadPrec [SetIdentityHeadersInNotificationsEnabledResponse]
readPrec :: ReadPrec SetIdentityHeadersInNotificationsEnabledResponse
$creadPrec :: ReadPrec SetIdentityHeadersInNotificationsEnabledResponse
readList :: ReadS [SetIdentityHeadersInNotificationsEnabledResponse]
$creadList :: ReadS [SetIdentityHeadersInNotificationsEnabledResponse]
readsPrec :: Int -> ReadS SetIdentityHeadersInNotificationsEnabledResponse
$creadsPrec :: Int -> ReadS SetIdentityHeadersInNotificationsEnabledResponse
Prelude.Read, Int -> SetIdentityHeadersInNotificationsEnabledResponse -> ShowS
[SetIdentityHeadersInNotificationsEnabledResponse] -> ShowS
SetIdentityHeadersInNotificationsEnabledResponse -> String
(Int -> SetIdentityHeadersInNotificationsEnabledResponse -> ShowS)
-> (SetIdentityHeadersInNotificationsEnabledResponse -> String)
-> ([SetIdentityHeadersInNotificationsEnabledResponse] -> ShowS)
-> Show SetIdentityHeadersInNotificationsEnabledResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityHeadersInNotificationsEnabledResponse] -> ShowS
$cshowList :: [SetIdentityHeadersInNotificationsEnabledResponse] -> ShowS
show :: SetIdentityHeadersInNotificationsEnabledResponse -> String
$cshow :: SetIdentityHeadersInNotificationsEnabledResponse -> String
showsPrec :: Int -> SetIdentityHeadersInNotificationsEnabledResponse -> ShowS
$cshowsPrec :: Int -> SetIdentityHeadersInNotificationsEnabledResponse -> ShowS
Prelude.Show, (forall x.
SetIdentityHeadersInNotificationsEnabledResponse
-> Rep SetIdentityHeadersInNotificationsEnabledResponse x)
-> (forall x.
Rep SetIdentityHeadersInNotificationsEnabledResponse x
-> SetIdentityHeadersInNotificationsEnabledResponse)
-> Generic SetIdentityHeadersInNotificationsEnabledResponse
forall x.
Rep SetIdentityHeadersInNotificationsEnabledResponse x
-> SetIdentityHeadersInNotificationsEnabledResponse
forall x.
SetIdentityHeadersInNotificationsEnabledResponse
-> Rep SetIdentityHeadersInNotificationsEnabledResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityHeadersInNotificationsEnabledResponse x
-> SetIdentityHeadersInNotificationsEnabledResponse
$cfrom :: forall x.
SetIdentityHeadersInNotificationsEnabledResponse
-> Rep SetIdentityHeadersInNotificationsEnabledResponse x
Prelude.Generic)
newSetIdentityHeadersInNotificationsEnabledResponse ::
Prelude.Int ->
SetIdentityHeadersInNotificationsEnabledResponse
Int
pHttpStatus_ =
SetIdentityHeadersInNotificationsEnabledResponse' :: Int -> SetIdentityHeadersInNotificationsEnabledResponse
SetIdentityHeadersInNotificationsEnabledResponse'
{ $sel:httpStatus:SetIdentityHeadersInNotificationsEnabledResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
setIdentityHeadersInNotificationsEnabledResponse_httpStatus :: Lens.Lens' SetIdentityHeadersInNotificationsEnabledResponse Prelude.Int
= (SetIdentityHeadersInNotificationsEnabledResponse -> Int)
-> (SetIdentityHeadersInNotificationsEnabledResponse
-> Int -> SetIdentityHeadersInNotificationsEnabledResponse)
-> Lens
SetIdentityHeadersInNotificationsEnabledResponse
SetIdentityHeadersInNotificationsEnabledResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityHeadersInNotificationsEnabledResponse' {Int
httpStatus :: Int
$sel:httpStatus:SetIdentityHeadersInNotificationsEnabledResponse' :: SetIdentityHeadersInNotificationsEnabledResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SetIdentityHeadersInNotificationsEnabledResponse
s@SetIdentityHeadersInNotificationsEnabledResponse' {} Int
a -> SetIdentityHeadersInNotificationsEnabledResponse
s {$sel:httpStatus:SetIdentityHeadersInNotificationsEnabledResponse' :: Int
httpStatus = Int
a} :: SetIdentityHeadersInNotificationsEnabledResponse)
instance
Prelude.NFData
SetIdentityHeadersInNotificationsEnabledResponse