{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SES.Types.IdentityNotificationAttributes
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SES.Types.IdentityNotificationAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the notification attributes of an identity, including whether
-- an identity has Amazon Simple Notification Service (Amazon SNS) topics
-- set for bounce, complaint, and\/or delivery notifications, and whether
-- feedback forwarding is enabled for bounce and complaint notifications.
--
-- /See:/ 'newIdentityNotificationAttributes' smart constructor.
data IdentityNotificationAttributes = IdentityNotificationAttributes'
  { -- | Describes whether Amazon SES includes the original email headers in
    -- Amazon SNS notifications of type @Delivery@. A value of @true@ specifies
    -- that Amazon SES will include headers in delivery notifications, and a
    -- value of @false@ specifies that Amazon SES will not include headers in
    -- delivery notifications.
    IdentityNotificationAttributes -> Maybe Bool
headersInDeliveryNotificationsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Describes whether Amazon SES includes the original email headers in
    -- Amazon SNS notifications of type @Complaint@. A value of @true@
    -- specifies that Amazon SES will include headers in complaint
    -- notifications, and a value of @false@ specifies that Amazon SES will not
    -- include headers in complaint notifications.
    IdentityNotificationAttributes -> Maybe Bool
headersInComplaintNotificationsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Describes whether Amazon SES includes the original email headers in
    -- Amazon SNS notifications of type @Bounce@. A value of @true@ specifies
    -- that Amazon SES will include headers in bounce notifications, and a
    -- value of @false@ specifies that Amazon SES will not include headers in
    -- bounce notifications.
    IdentityNotificationAttributes -> Maybe Bool
headersInBounceNotificationsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
    -- will publish bounce notifications.
    IdentityNotificationAttributes -> Text
bounceTopic :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
    -- will publish complaint notifications.
    IdentityNotificationAttributes -> Text
complaintTopic :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
    -- will publish delivery notifications.
    IdentityNotificationAttributes -> Text
deliveryTopic :: Prelude.Text,
    -- | Describes whether Amazon SES will forward bounce and complaint
    -- notifications as email. @true@ indicates that Amazon SES will forward
    -- bounce and complaint notifications as email, while @false@ indicates
    -- that bounce and complaint notifications will be published only to the
    -- specified bounce and complaint Amazon SNS topics.
    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)

-- |
-- Create a value of 'IdentityNotificationAttributes' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'headersInDeliveryNotificationsEnabled', 'identityNotificationAttributes_headersInDeliveryNotificationsEnabled' - Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Delivery@. A value of @true@ specifies
-- that Amazon SES will include headers in delivery notifications, and a
-- value of @false@ specifies that Amazon SES will not include headers in
-- delivery notifications.
--
-- 'headersInComplaintNotificationsEnabled', 'identityNotificationAttributes_headersInComplaintNotificationsEnabled' - Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Complaint@. A value of @true@
-- specifies that Amazon SES will include headers in complaint
-- notifications, and a value of @false@ specifies that Amazon SES will not
-- include headers in complaint notifications.
--
-- 'headersInBounceNotificationsEnabled', 'identityNotificationAttributes_headersInBounceNotificationsEnabled' - Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Bounce@. A value of @true@ specifies
-- that Amazon SES will include headers in bounce notifications, and a
-- value of @false@ specifies that Amazon SES will not include headers in
-- bounce notifications.
--
-- 'bounceTopic', 'identityNotificationAttributes_bounceTopic' - The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish bounce notifications.
--
-- 'complaintTopic', 'identityNotificationAttributes_complaintTopic' - The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish complaint notifications.
--
-- 'deliveryTopic', 'identityNotificationAttributes_deliveryTopic' - The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish delivery notifications.
--
-- 'forwardingEnabled', 'identityNotificationAttributes_forwardingEnabled' - Describes whether Amazon SES will forward bounce and complaint
-- notifications as email. @true@ indicates that Amazon SES will forward
-- bounce and complaint notifications as email, while @false@ indicates
-- that bounce and complaint notifications will be published only to the
-- specified bounce and complaint Amazon SNS topics.
newIdentityNotificationAttributes ::
  -- | 'bounceTopic'
  Prelude.Text ->
  -- | 'complaintTopic'
  Prelude.Text ->
  -- | 'deliveryTopic'
  Prelude.Text ->
  -- | 'forwardingEnabled'
  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_
      }

-- | Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Delivery@. A value of @true@ specifies
-- that Amazon SES will include headers in delivery notifications, and a
-- value of @false@ specifies that Amazon SES will not include headers in
-- delivery notifications.
identityNotificationAttributes_headersInDeliveryNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
identityNotificationAttributes_headersInDeliveryNotificationsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_headersInDeliveryNotificationsEnabled = (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)

-- | Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Complaint@. A value of @true@
-- specifies that Amazon SES will include headers in complaint
-- notifications, and a value of @false@ specifies that Amazon SES will not
-- include headers in complaint notifications.
identityNotificationAttributes_headersInComplaintNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
identityNotificationAttributes_headersInComplaintNotificationsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_headersInComplaintNotificationsEnabled = (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)

-- | Describes whether Amazon SES includes the original email headers in
-- Amazon SNS notifications of type @Bounce@. A value of @true@ specifies
-- that Amazon SES will include headers in bounce notifications, and a
-- value of @false@ specifies that Amazon SES will not include headers in
-- bounce notifications.
identityNotificationAttributes_headersInBounceNotificationsEnabled :: Lens.Lens' IdentityNotificationAttributes (Prelude.Maybe Prelude.Bool)
identityNotificationAttributes_headersInBounceNotificationsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> IdentityNotificationAttributes
-> f IdentityNotificationAttributes
identityNotificationAttributes_headersInBounceNotificationsEnabled = (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)

-- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish bounce notifications.
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)

-- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish complaint notifications.
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)

-- | The Amazon Resource Name (ARN) of the Amazon SNS topic where Amazon SES
-- will publish delivery notifications.
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)

-- | Describes whether Amazon SES will forward bounce and complaint
-- notifications as email. @true@ indicates that Amazon SES will forward
-- bounce and complaint notifications as email, while @false@ indicates
-- that bounce and complaint notifications will be published only to the
-- specified bounce and complaint Amazon SNS topics.
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