{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInBounceNotificationsEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInComplaintNotificationsEnabled =
forall a. Maybe a
Prelude.Nothing,
$sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: Maybe Bool
headersInDeliveryNotificationsEnabled =
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_headersInBounceNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.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_headersInComplaintNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.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_headersInDeliveryNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.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_bounceTopic :: Lens.Lens' IdentityNotificationAttributes Prelude.Text
identityNotificationAttributes_bounceTopic :: Lens' IdentityNotificationAttributes Text
identityNotificationAttributes_bounceTopic = 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 :: Lens' IdentityNotificationAttributes Text
identityNotificationAttributes_complaintTopic = 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 :: Lens' IdentityNotificationAttributes Text
identityNotificationAttributes_deliveryTopic = 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 :: Lens' IdentityNotificationAttributes Bool
identityNotificationAttributes_forwardingEnabled = 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 Data.FromXML IdentityNotificationAttributes where
parseXML :: [Node] -> Either String IdentityNotificationAttributes
parseXML [Node]
x =
Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> Text
-> Text
-> Bool
-> IdentityNotificationAttributes
IdentityNotificationAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HeadersInBounceNotificationsEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HeadersInComplaintNotificationsEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HeadersInDeliveryNotificationsEnabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"BounceTopic")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"ComplaintTopic")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"DeliveryTopic")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"ForwardingEnabled")
instance
Prelude.Hashable
IdentityNotificationAttributes
where
hashWithSalt :: Int -> IdentityNotificationAttributes -> Int
hashWithSalt
Int
_salt
IdentityNotificationAttributes' {Bool
Maybe Bool
Text
forwardingEnabled :: Bool
deliveryTopic :: Text
complaintTopic :: Text
bounceTopic :: Text
headersInDeliveryNotificationsEnabled :: Maybe Bool
headersInComplaintNotificationsEnabled :: Maybe Bool
headersInBounceNotificationsEnabled :: Maybe Bool
$sel:forwardingEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Bool
$sel:deliveryTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:complaintTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:bounceTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
$sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
headersInBounceNotificationsEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
headersInComplaintNotificationsEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
headersInDeliveryNotificationsEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
bounceTopic
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
complaintTopic
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deliveryTopic
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
forwardingEnabled
instance
Prelude.NFData
IdentityNotificationAttributes
where
rnf :: IdentityNotificationAttributes -> ()
rnf IdentityNotificationAttributes' {Bool
Maybe Bool
Text
forwardingEnabled :: Bool
deliveryTopic :: Text
complaintTopic :: Text
bounceTopic :: Text
headersInDeliveryNotificationsEnabled :: Maybe Bool
headersInComplaintNotificationsEnabled :: Maybe Bool
headersInBounceNotificationsEnabled :: Maybe Bool
$sel:forwardingEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Bool
$sel:deliveryTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:complaintTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:bounceTopic:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Text
$sel:headersInDeliveryNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
$sel:headersInComplaintNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
$sel:headersInBounceNotificationsEnabled:IdentityNotificationAttributes' :: IdentityNotificationAttributes -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
headersInBounceNotificationsEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
headersInComplaintNotificationsEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
headersInDeliveryNotificationsEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
bounceTopic
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
complaintTopic
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deliveryTopic
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
forwardingEnabled