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

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

-- |
-- Module      : Amazonka.SES.SetIdentityNotificationTopic
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Sets an Amazon Simple Notification Service (Amazon SNS) topic to use
-- when delivering notifications. When you use this operation, you specify
-- a verified identity, such as an email address or domain. When you send
-- an email that uses the chosen identity in the Source field, Amazon SES
-- sends notifications to the topic you specified. You can send bounce,
-- complaint, or delivery notifications (or any combination of the three)
-- to the Amazon SNS topic that you specify.
--
-- You can execute this operation no more than once per second.
--
-- For more information about feedback notification, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html Amazon SES Developer Guide>.
module Amazonka.SES.SetIdentityNotificationTopic
  ( -- * Creating a Request
    SetIdentityNotificationTopic (..),
    newSetIdentityNotificationTopic,

    -- * Request Lenses
    setIdentityNotificationTopic_snsTopic,
    setIdentityNotificationTopic_identity,
    setIdentityNotificationTopic_notificationType,

    -- * Destructuring the Response
    SetIdentityNotificationTopicResponse (..),
    newSetIdentityNotificationTopicResponse,

    -- * Response Lenses
    setIdentityNotificationTopicResponse_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

-- | Represents a request to specify the Amazon SNS topic to which Amazon SES
-- will publish bounce, complaint, or delivery notifications for emails
-- sent with that identity as the Source. For information about Amazon SES
-- notifications, see the
-- <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html Amazon SES Developer Guide>.
--
-- /See:/ 'newSetIdentityNotificationTopic' smart constructor.
data SetIdentityNotificationTopic = SetIdentityNotificationTopic'
  { -- | The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter
    -- is omitted from the request or a null value is passed, @SnsTopic@ is
    -- cleared and publishing is disabled.
    SetIdentityNotificationTopic -> Maybe Text
snsTopic :: Prelude.Maybe Prelude.Text,
    -- | The identity (email address or domain) that you want to set the Amazon
    -- SNS topic for.
    --
    -- You can only specify a verified identity for this parameter.
    --
    -- You can specify an identity by using its name or by using its Amazon
    -- Resource Name (ARN). The following examples are all valid identities:
    -- @sender\@example.com@, @example.com@,
    -- @arn:aws:ses:us-east-1:123456789012:identity\/example.com@.
    SetIdentityNotificationTopic -> Text
identity :: Prelude.Text,
    -- | The type of notifications that will be published to the specified Amazon
    -- SNS topic.
    SetIdentityNotificationTopic -> NotificationType
notificationType :: NotificationType
  }
  deriving (SetIdentityNotificationTopic
-> SetIdentityNotificationTopic -> Bool
(SetIdentityNotificationTopic
 -> SetIdentityNotificationTopic -> Bool)
-> (SetIdentityNotificationTopic
    -> SetIdentityNotificationTopic -> Bool)
-> Eq SetIdentityNotificationTopic
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetIdentityNotificationTopic
-> SetIdentityNotificationTopic -> Bool
== :: SetIdentityNotificationTopic
-> SetIdentityNotificationTopic -> Bool
$c/= :: SetIdentityNotificationTopic
-> SetIdentityNotificationTopic -> Bool
/= :: SetIdentityNotificationTopic
-> SetIdentityNotificationTopic -> Bool
Prelude.Eq, ReadPrec [SetIdentityNotificationTopic]
ReadPrec SetIdentityNotificationTopic
Int -> ReadS SetIdentityNotificationTopic
ReadS [SetIdentityNotificationTopic]
(Int -> ReadS SetIdentityNotificationTopic)
-> ReadS [SetIdentityNotificationTopic]
-> ReadPrec SetIdentityNotificationTopic
-> ReadPrec [SetIdentityNotificationTopic]
-> Read SetIdentityNotificationTopic
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SetIdentityNotificationTopic
readsPrec :: Int -> ReadS SetIdentityNotificationTopic
$creadList :: ReadS [SetIdentityNotificationTopic]
readList :: ReadS [SetIdentityNotificationTopic]
$creadPrec :: ReadPrec SetIdentityNotificationTopic
readPrec :: ReadPrec SetIdentityNotificationTopic
$creadListPrec :: ReadPrec [SetIdentityNotificationTopic]
readListPrec :: ReadPrec [SetIdentityNotificationTopic]
Prelude.Read, Int -> SetIdentityNotificationTopic -> ShowS
[SetIdentityNotificationTopic] -> ShowS
SetIdentityNotificationTopic -> String
(Int -> SetIdentityNotificationTopic -> ShowS)
-> (SetIdentityNotificationTopic -> String)
-> ([SetIdentityNotificationTopic] -> ShowS)
-> Show SetIdentityNotificationTopic
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetIdentityNotificationTopic -> ShowS
showsPrec :: Int -> SetIdentityNotificationTopic -> ShowS
$cshow :: SetIdentityNotificationTopic -> String
show :: SetIdentityNotificationTopic -> String
$cshowList :: [SetIdentityNotificationTopic] -> ShowS
showList :: [SetIdentityNotificationTopic] -> ShowS
Prelude.Show, (forall x.
 SetIdentityNotificationTopic -> Rep SetIdentityNotificationTopic x)
-> (forall x.
    Rep SetIdentityNotificationTopic x -> SetIdentityNotificationTopic)
-> Generic SetIdentityNotificationTopic
forall x.
Rep SetIdentityNotificationTopic x -> SetIdentityNotificationTopic
forall x.
SetIdentityNotificationTopic -> Rep SetIdentityNotificationTopic x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetIdentityNotificationTopic -> Rep SetIdentityNotificationTopic x
from :: forall x.
SetIdentityNotificationTopic -> Rep SetIdentityNotificationTopic x
$cto :: forall x.
Rep SetIdentityNotificationTopic x -> SetIdentityNotificationTopic
to :: forall x.
Rep SetIdentityNotificationTopic x -> SetIdentityNotificationTopic
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityNotificationTopic' 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:
--
-- 'snsTopic', 'setIdentityNotificationTopic_snsTopic' - The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter
-- is omitted from the request or a null value is passed, @SnsTopic@ is
-- cleared and publishing is disabled.
--
-- 'identity', 'setIdentityNotificationTopic_identity' - The identity (email address or domain) that you want to set the Amazon
-- SNS topic for.
--
-- You can only specify a verified identity for this parameter.
--
-- You can specify an identity by using its name or by using its Amazon
-- Resource Name (ARN). The following examples are all valid identities:
-- @sender\@example.com@, @example.com@,
-- @arn:aws:ses:us-east-1:123456789012:identity\/example.com@.
--
-- 'notificationType', 'setIdentityNotificationTopic_notificationType' - The type of notifications that will be published to the specified Amazon
-- SNS topic.
newSetIdentityNotificationTopic ::
  -- | 'identity'
  Prelude.Text ->
  -- | 'notificationType'
  NotificationType ->
  SetIdentityNotificationTopic
newSetIdentityNotificationTopic :: Text -> NotificationType -> SetIdentityNotificationTopic
newSetIdentityNotificationTopic
  Text
pIdentity_
  NotificationType
pNotificationType_ =
    SetIdentityNotificationTopic'
      { $sel:snsTopic:SetIdentityNotificationTopic' :: Maybe Text
snsTopic =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:identity:SetIdentityNotificationTopic' :: Text
identity = Text
pIdentity_,
        $sel:notificationType:SetIdentityNotificationTopic' :: NotificationType
notificationType = NotificationType
pNotificationType_
      }

-- | The Amazon Resource Name (ARN) of the Amazon SNS topic. If the parameter
-- is omitted from the request or a null value is passed, @SnsTopic@ is
-- cleared and publishing is disabled.
setIdentityNotificationTopic_snsTopic :: Lens.Lens' SetIdentityNotificationTopic (Prelude.Maybe Prelude.Text)
setIdentityNotificationTopic_snsTopic :: Lens' SetIdentityNotificationTopic (Maybe Text)
setIdentityNotificationTopic_snsTopic = (SetIdentityNotificationTopic -> Maybe Text)
-> (SetIdentityNotificationTopic
    -> Maybe Text -> SetIdentityNotificationTopic)
-> Lens' SetIdentityNotificationTopic (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityNotificationTopic' {Maybe Text
$sel:snsTopic:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Maybe Text
snsTopic :: Maybe Text
snsTopic} -> Maybe Text
snsTopic) (\s :: SetIdentityNotificationTopic
s@SetIdentityNotificationTopic' {} Maybe Text
a -> SetIdentityNotificationTopic
s {snsTopic = a} :: SetIdentityNotificationTopic)

-- | The identity (email address or domain) that you want to set the Amazon
-- SNS topic for.
--
-- You can only specify a verified identity for this parameter.
--
-- You can specify an identity by using its name or by using its Amazon
-- Resource Name (ARN). The following examples are all valid identities:
-- @sender\@example.com@, @example.com@,
-- @arn:aws:ses:us-east-1:123456789012:identity\/example.com@.
setIdentityNotificationTopic_identity :: Lens.Lens' SetIdentityNotificationTopic Prelude.Text
setIdentityNotificationTopic_identity :: Lens' SetIdentityNotificationTopic Text
setIdentityNotificationTopic_identity = (SetIdentityNotificationTopic -> Text)
-> (SetIdentityNotificationTopic
    -> Text -> SetIdentityNotificationTopic)
-> Lens' SetIdentityNotificationTopic Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityNotificationTopic' {Text
$sel:identity:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Text
identity :: Text
identity} -> Text
identity) (\s :: SetIdentityNotificationTopic
s@SetIdentityNotificationTopic' {} Text
a -> SetIdentityNotificationTopic
s {identity = a} :: SetIdentityNotificationTopic)

-- | The type of notifications that will be published to the specified Amazon
-- SNS topic.
setIdentityNotificationTopic_notificationType :: Lens.Lens' SetIdentityNotificationTopic NotificationType
setIdentityNotificationTopic_notificationType :: Lens' SetIdentityNotificationTopic NotificationType
setIdentityNotificationTopic_notificationType = (SetIdentityNotificationTopic -> NotificationType)
-> (SetIdentityNotificationTopic
    -> NotificationType -> SetIdentityNotificationTopic)
-> Lens' SetIdentityNotificationTopic NotificationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityNotificationTopic' {NotificationType
$sel:notificationType:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> NotificationType
notificationType :: NotificationType
notificationType} -> NotificationType
notificationType) (\s :: SetIdentityNotificationTopic
s@SetIdentityNotificationTopic' {} NotificationType
a -> SetIdentityNotificationTopic
s {notificationType = a} :: SetIdentityNotificationTopic)

instance Core.AWSRequest SetIdentityNotificationTopic where
  type
    AWSResponse SetIdentityNotificationTopic =
      SetIdentityNotificationTopicResponse
  request :: (Service -> Service)
-> SetIdentityNotificationTopic
-> Request SetIdentityNotificationTopic
request Service -> Service
overrides =
    Service
-> SetIdentityNotificationTopic
-> Request SetIdentityNotificationTopic
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 SetIdentityNotificationTopic
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityNotificationTopic)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse SetIdentityNotificationTopic))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetIdentityNotificationTopic
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityNotificationTopic)))
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
"SetIdentityNotificationTopicResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> SetIdentityNotificationTopicResponse
SetIdentityNotificationTopicResponse'
            (Int -> SetIdentityNotificationTopicResponse)
-> Either String Int
-> Either String SetIdentityNotificationTopicResponse
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
    SetIdentityNotificationTopic
  where
  hashWithSalt :: Int -> SetIdentityNotificationTopic -> Int
hashWithSalt Int
_salt SetIdentityNotificationTopic' {Maybe Text
Text
NotificationType
$sel:snsTopic:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Maybe Text
$sel:identity:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Text
$sel:notificationType:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> NotificationType
snsTopic :: Maybe Text
identity :: Text
notificationType :: NotificationType
..} =
    Int
_salt
      Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snsTopic
      Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
identity
      Int -> NotificationType -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NotificationType
notificationType

instance Prelude.NFData SetIdentityNotificationTopic where
  rnf :: SetIdentityNotificationTopic -> ()
rnf SetIdentityNotificationTopic' {Maybe Text
Text
NotificationType
$sel:snsTopic:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Maybe Text
$sel:identity:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Text
$sel:notificationType:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> NotificationType
snsTopic :: Maybe Text
identity :: Text
notificationType :: NotificationType
..} =
    Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopic
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
identity
      () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` NotificationType -> ()
forall a. NFData a => a -> ()
Prelude.rnf NotificationType
notificationType

instance Data.ToHeaders SetIdentityNotificationTopic where
  toHeaders :: SetIdentityNotificationTopic -> ResponseHeaders
toHeaders = ResponseHeaders -> SetIdentityNotificationTopic -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath SetIdentityNotificationTopic where
  toPath :: SetIdentityNotificationTopic -> ByteString
toPath = ByteString -> SetIdentityNotificationTopic -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery SetIdentityNotificationTopic where
  toQuery :: SetIdentityNotificationTopic -> QueryString
toQuery SetIdentityNotificationTopic' {Maybe Text
Text
NotificationType
$sel:snsTopic:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Maybe Text
$sel:identity:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> Text
$sel:notificationType:SetIdentityNotificationTopic' :: SetIdentityNotificationTopic -> NotificationType
snsTopic :: Maybe Text
identity :: Text
notificationType :: NotificationType
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"SetIdentityNotificationTopic" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
        ByteString
"SnsTopic" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
snsTopic,
        ByteString
"Identity" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
identity,
        ByteString
"NotificationType" ByteString -> NotificationType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: NotificationType
notificationType
      ]

-- | An empty element returned on a successful request.
--
-- /See:/ 'newSetIdentityNotificationTopicResponse' smart constructor.
data SetIdentityNotificationTopicResponse = SetIdentityNotificationTopicResponse'
  { -- | The response's http status code.
    SetIdentityNotificationTopicResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SetIdentityNotificationTopicResponse
-> SetIdentityNotificationTopicResponse -> Bool
(SetIdentityNotificationTopicResponse
 -> SetIdentityNotificationTopicResponse -> Bool)
-> (SetIdentityNotificationTopicResponse
    -> SetIdentityNotificationTopicResponse -> Bool)
-> Eq SetIdentityNotificationTopicResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SetIdentityNotificationTopicResponse
-> SetIdentityNotificationTopicResponse -> Bool
== :: SetIdentityNotificationTopicResponse
-> SetIdentityNotificationTopicResponse -> Bool
$c/= :: SetIdentityNotificationTopicResponse
-> SetIdentityNotificationTopicResponse -> Bool
/= :: SetIdentityNotificationTopicResponse
-> SetIdentityNotificationTopicResponse -> Bool
Prelude.Eq, ReadPrec [SetIdentityNotificationTopicResponse]
ReadPrec SetIdentityNotificationTopicResponse
Int -> ReadS SetIdentityNotificationTopicResponse
ReadS [SetIdentityNotificationTopicResponse]
(Int -> ReadS SetIdentityNotificationTopicResponse)
-> ReadS [SetIdentityNotificationTopicResponse]
-> ReadPrec SetIdentityNotificationTopicResponse
-> ReadPrec [SetIdentityNotificationTopicResponse]
-> Read SetIdentityNotificationTopicResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS SetIdentityNotificationTopicResponse
readsPrec :: Int -> ReadS SetIdentityNotificationTopicResponse
$creadList :: ReadS [SetIdentityNotificationTopicResponse]
readList :: ReadS [SetIdentityNotificationTopicResponse]
$creadPrec :: ReadPrec SetIdentityNotificationTopicResponse
readPrec :: ReadPrec SetIdentityNotificationTopicResponse
$creadListPrec :: ReadPrec [SetIdentityNotificationTopicResponse]
readListPrec :: ReadPrec [SetIdentityNotificationTopicResponse]
Prelude.Read, Int -> SetIdentityNotificationTopicResponse -> ShowS
[SetIdentityNotificationTopicResponse] -> ShowS
SetIdentityNotificationTopicResponse -> String
(Int -> SetIdentityNotificationTopicResponse -> ShowS)
-> (SetIdentityNotificationTopicResponse -> String)
-> ([SetIdentityNotificationTopicResponse] -> ShowS)
-> Show SetIdentityNotificationTopicResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SetIdentityNotificationTopicResponse -> ShowS
showsPrec :: Int -> SetIdentityNotificationTopicResponse -> ShowS
$cshow :: SetIdentityNotificationTopicResponse -> String
show :: SetIdentityNotificationTopicResponse -> String
$cshowList :: [SetIdentityNotificationTopicResponse] -> ShowS
showList :: [SetIdentityNotificationTopicResponse] -> ShowS
Prelude.Show, (forall x.
 SetIdentityNotificationTopicResponse
 -> Rep SetIdentityNotificationTopicResponse x)
-> (forall x.
    Rep SetIdentityNotificationTopicResponse x
    -> SetIdentityNotificationTopicResponse)
-> Generic SetIdentityNotificationTopicResponse
forall x.
Rep SetIdentityNotificationTopicResponse x
-> SetIdentityNotificationTopicResponse
forall x.
SetIdentityNotificationTopicResponse
-> Rep SetIdentityNotificationTopicResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
SetIdentityNotificationTopicResponse
-> Rep SetIdentityNotificationTopicResponse x
from :: forall x.
SetIdentityNotificationTopicResponse
-> Rep SetIdentityNotificationTopicResponse x
$cto :: forall x.
Rep SetIdentityNotificationTopicResponse x
-> SetIdentityNotificationTopicResponse
to :: forall x.
Rep SetIdentityNotificationTopicResponse x
-> SetIdentityNotificationTopicResponse
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityNotificationTopicResponse' 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:
--
-- 'httpStatus', 'setIdentityNotificationTopicResponse_httpStatus' - The response's http status code.
newSetIdentityNotificationTopicResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SetIdentityNotificationTopicResponse
newSetIdentityNotificationTopicResponse :: Int -> SetIdentityNotificationTopicResponse
newSetIdentityNotificationTopicResponse Int
pHttpStatus_ =
  SetIdentityNotificationTopicResponse'
    { $sel:httpStatus:SetIdentityNotificationTopicResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
setIdentityNotificationTopicResponse_httpStatus :: Lens.Lens' SetIdentityNotificationTopicResponse Prelude.Int
setIdentityNotificationTopicResponse_httpStatus :: Lens' SetIdentityNotificationTopicResponse Int
setIdentityNotificationTopicResponse_httpStatus = (SetIdentityNotificationTopicResponse -> Int)
-> (SetIdentityNotificationTopicResponse
    -> Int -> SetIdentityNotificationTopicResponse)
-> Lens' SetIdentityNotificationTopicResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityNotificationTopicResponse' {Int
$sel:httpStatus:SetIdentityNotificationTopicResponse' :: SetIdentityNotificationTopicResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: SetIdentityNotificationTopicResponse
s@SetIdentityNotificationTopicResponse' {} Int
a -> SetIdentityNotificationTopicResponse
s {httpStatus = a} :: SetIdentityNotificationTopicResponse)

instance
  Prelude.NFData
    SetIdentityNotificationTopicResponse
  where
  rnf :: SetIdentityNotificationTopicResponse -> ()
rnf SetIdentityNotificationTopicResponse' {Int
$sel:httpStatus:SetIdentityNotificationTopicResponse' :: SetIdentityNotificationTopicResponse -> Int
httpStatus :: Int
..} =
    Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus