{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.Types.IdentityNotificationAttributes where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data IdentityNotificationAttributes = IdentityNotificationAttributes'
{
:: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe Prelude.Bool,
:: Prelude.Maybe Prelude.Bool,
IdentityNotificationAttributes -> Text
bounceTopic :: Prelude.Text,
IdentityNotificationAttributes -> Text
complaintTopic :: Prelude.Text,
IdentityNotificationAttributes -> Text
deliveryTopic :: Prelude.Text,
IdentityNotificationAttributes -> Bool
forwardingEnabled :: Prelude.Bool
}
deriving (IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool
(IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool)
-> (IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool)
-> Eq IdentityNotificationAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool
$c/= :: IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool
== :: IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool
$c== :: IdentityNotificationAttributes
-> IdentityNotificationAttributes -> Bool
Prelude.Eq, ReadPrec [IdentityNotificationAttributes]
ReadPrec IdentityNotificationAttributes
Int -> ReadS IdentityNotificationAttributes
ReadS [IdentityNotificationAttributes]
(Int -> ReadS IdentityNotificationAttributes)
-> ReadS [IdentityNotificationAttributes]
-> ReadPrec IdentityNotificationAttributes
-> ReadPrec [IdentityNotificationAttributes]
-> Read IdentityNotificationAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityNotificationAttributes]
$creadListPrec :: ReadPrec [IdentityNotificationAttributes]
readPrec :: ReadPrec IdentityNotificationAttributes
$creadPrec :: ReadPrec IdentityNotificationAttributes
readList :: ReadS [IdentityNotificationAttributes]
$creadList :: ReadS [IdentityNotificationAttributes]
readsPrec :: Int -> ReadS IdentityNotificationAttributes
$creadsPrec :: Int -> ReadS IdentityNotificationAttributes
Prelude.Read, Int -> IdentityNotificationAttributes -> ShowS
[IdentityNotificationAttributes] -> ShowS
IdentityNotificationAttributes -> String
(Int -> IdentityNotificationAttributes -> ShowS)
-> (IdentityNotificationAttributes -> String)
-> ([IdentityNotificationAttributes] -> ShowS)
-> Show IdentityNotificationAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityNotificationAttributes] -> ShowS
$cshowList :: [IdentityNotificationAttributes] -> ShowS
show :: IdentityNotificationAttributes -> String
$cshow :: IdentityNotificationAttributes -> String
showsPrec :: Int -> IdentityNotificationAttributes -> ShowS
$cshowsPrec :: Int -> IdentityNotificationAttributes -> ShowS
Prelude.Show, (forall x.
IdentityNotificationAttributes
-> Rep IdentityNotificationAttributes x)
-> (forall x.
Rep IdentityNotificationAttributes x
-> IdentityNotificationAttributes)
-> Generic IdentityNotificationAttributes
forall x.
Rep IdentityNotificationAttributes x
-> IdentityNotificationAttributes
forall x.
IdentityNotificationAttributes
-> Rep IdentityNotificationAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IdentityNotificationAttributes x
-> IdentityNotificationAttributes
$cfrom :: forall x.
IdentityNotificationAttributes
-> Rep IdentityNotificationAttributes x
Prelude.Generic)
newIdentityNotificationAttributes ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
IdentityNotificationAttributes
newIdentityNotificationAttributes :: Text -> Text -> Text -> Bool -> IdentityNotificationAttributes
newIdentityNotificationAttributes
Text
pBounceTopic_
Text
pComplaintTopic_
Text
pDeliveryTopic_
Bool
pForwardingEnabled_ =
IdentityNotificationAttributes' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes
IdentityNotificationAttributes'
{ $sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInDeliveryNotificationsEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInComplaintNotificationsEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInBounceNotificationsEnabled =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:bounceTopic:IdentityNotificationAttributes' :: Text
bounceTopic = Text
pBounceTopic_,
$sel:complaintTopic:IdentityNotificationAttributes' :: Text
complaintTopic = Text
pComplaintTopic_,
$sel:deliveryTopic:IdentityNotificationAttributes' :: Text
deliveryTopic = Text
pDeliveryTopic_,
$sel:forwardingEnabled:IdentityNotificationAttributes' :: Bool
forwardingEnabled = Bool
pForwardingEnabled_
}
identityNotificationAttributes_headersInDeliveryNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
= (IdentityNotificationAttributes -> Maybe Bool)
-> (IdentityNotificationAttributes
-> Maybe Bool -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Maybe Bool
headersInDeliveryNotificationsEnabled :: Maybe Bool
$sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
headersInDeliveryNotificationsEnabled} -> Maybe Bool
headersInDeliveryNotificationsEnabled) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Maybe Bool
a -> IdentityNotificationAttributes
s {$sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInDeliveryNotificationsEnabled = Maybe Bool
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_headersInComplaintNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
= (IdentityNotificationAttributes -> Maybe Bool)
-> (IdentityNotificationAttributes
-> Maybe Bool -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Maybe Bool
headersInComplaintNotificationsEnabled :: Maybe Bool
$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
headersInComplaintNotificationsEnabled} -> Maybe Bool
headersInComplaintNotificationsEnabled) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Maybe Bool
a -> IdentityNotificationAttributes
s {$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInComplaintNotificationsEnabled = Maybe Bool
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_headersInBounceNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
= (IdentityNotificationAttributes -> Maybe Bool)
-> (IdentityNotificationAttributes
-> Maybe Bool -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Maybe Bool
headersInBounceNotificationsEnabled :: Maybe Bool
$sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
headersInBounceNotificationsEnabled} -> Maybe Bool
headersInBounceNotificationsEnabled) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Maybe Bool
a -> IdentityNotificationAttributes
s {$sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInBounceNotificationsEnabled = Maybe Bool
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_bounceTopic :: Lens.Lens' IdentityNotificationAttributes Prelude.Text
identityNotificationAttributes_bounceTopic :: (Text -> f Text)
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_bounceTopic = (IdentityNotificationAttributes -> Text)
-> (IdentityNotificationAttributes
-> Text -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Text
bounceTopic :: Text
$sel:bounceTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
bounceTopic} -> Text
bounceTopic) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Text
a -> IdentityNotificationAttributes
s {$sel:bounceTopic:IdentityNotificationAttributes' :: Text
bounceTopic = Text
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_complaintTopic :: Lens.Lens' IdentityNotificationAttributes Prelude.Text
identityNotificationAttributes_complaintTopic :: (Text -> f Text)
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_complaintTopic = (IdentityNotificationAttributes -> Text)
-> (IdentityNotificationAttributes
-> Text -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Text
complaintTopic :: Text
$sel:complaintTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
complaintTopic} -> Text
complaintTopic) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Text
a -> IdentityNotificationAttributes
s {$sel:complaintTopic:IdentityNotificationAttributes' :: Text
complaintTopic = Text
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_deliveryTopic :: Lens.Lens' IdentityNotificationAttributes Prelude.Text
identityNotificationAttributes_deliveryTopic :: (Text -> f Text)
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_deliveryTopic = (IdentityNotificationAttributes -> Text)
-> (IdentityNotificationAttributes
-> Text -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Text
deliveryTopic :: Text
$sel:deliveryTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
deliveryTopic} -> Text
deliveryTopic) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Text
a -> IdentityNotificationAttributes
s {$sel:deliveryTopic:IdentityNotificationAttributes' :: Text
deliveryTopic = Text
a} :: IdentityNotificationAttributes)
identityNotificationAttributes_forwardingEnabled :: Lens.Lens' IdentityNotificationAttributes Prelude.Bool
identityNotificationAttributes_forwardingEnabled :: (Bool -> f Bool)
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_forwardingEnabled = (IdentityNotificationAttributes -> Bool)
-> (IdentityNotificationAttributes
-> Bool -> IdentityNotificationAttributes)
-> Lens
IdentityNotificationAttributes
IdentityNotificationAttributes
Bool
Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityNotificationAttributes' {Bool
forwardingEnabled :: Bool
$sel:forwardingEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Bool
forwardingEnabled} -> Bool
forwardingEnabled) (\s :: IdentityNotificationAttributes
s@IdentityNotificationAttributes' {} Bool
a -> IdentityNotificationAttributes
s {$sel:forwardingEnabled:IdentityNotificationAttributes' :: Bool
forwardingEnabled = Bool
a} :: IdentityNotificationAttributes)
instance Core.FromXML IdentityNotificationAttributes where
parseXML :: [Node] -> Either String IdentityNotificationAttributes
parseXML [Node]
x =
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes
IdentityNotificationAttributes'
(Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HeadersInDeliveryNotificationsEnabled")
Either
String
(Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes)
-> Either String (Maybe Bool)
-> Either
String
(Maybe Bool
-> Text -> Text -> Text -> Bool -> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HeadersInComplaintNotificationsEnabled")
Either
String
(Maybe Bool
-> Text -> Text -> Text -> Bool -> IdentityNotificationAttributes)
-> Either String (Maybe Bool)
-> Either
String
(Text -> Text -> Text -> Bool -> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HeadersInBounceNotificationsEnabled")
Either
String
(Text -> Text -> Text -> Bool -> IdentityNotificationAttributes)
-> Either String Text
-> Either
String (Text -> Text -> Bool -> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"BounceTopic")
Either
String (Text -> Text -> Bool -> IdentityNotificationAttributes)
-> Either String Text
-> Either String (Text -> Bool -> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ComplaintTopic")
Either String (Text -> Bool -> IdentityNotificationAttributes)
-> Either String Text
-> Either String (Bool -> IdentityNotificationAttributes)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DeliveryTopic")
Either String (Bool -> IdentityNotificationAttributes)
-> Either String Bool
-> Either String IdentityNotificationAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ForwardingEnabled")
instance
Prelude.Hashable
IdentityNotificationAttributes
instance
Prelude.NFData
IdentityNotificationAttributes