{-# 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.SNS.ConfirmSubscription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Verifies an endpoint owner\'s intent to receive messages by validating
-- the token sent to the endpoint by an earlier @Subscribe@ action. If the
-- token is valid, the action creates a new subscription and returns its
-- Amazon Resource Name (ARN). This call requires an AWS signature only
-- when the @AuthenticateOnUnsubscribe@ flag is set to \"true\".
module Amazonka.SNS.ConfirmSubscription
  ( -- * Creating a Request
    ConfirmSubscription (..),
    newConfirmSubscription,

    -- * Request Lenses
    confirmSubscription_authenticateOnUnsubscribe,
    confirmSubscription_topicArn,
    confirmSubscription_token,

    -- * Destructuring the Response
    ConfirmSubscriptionResponse (..),
    newConfirmSubscriptionResponse,

    -- * Response Lenses
    confirmSubscriptionResponse_subscriptionArn,
    confirmSubscriptionResponse_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.SNS.Types

-- | Input for ConfirmSubscription action.
--
-- /See:/ 'newConfirmSubscription' smart constructor.
data ConfirmSubscription = ConfirmSubscription'
  { -- | Disallows unauthenticated unsubscribes of the subscription. If the value
    -- of this parameter is @true@ and the request has an Amazon Web Services
    -- signature, then only the topic owner and the subscription owner can
    -- unsubscribe the endpoint. The unsubscribe action requires Amazon Web
    -- Services authentication.
    ConfirmSubscription -> Maybe Text
authenticateOnUnsubscribe :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the topic for which you wish to confirm a subscription.
    ConfirmSubscription -> Text
topicArn :: Prelude.Text,
    -- | Short-lived token sent to an endpoint during the @Subscribe@ action.
    ConfirmSubscription -> Text
token :: Prelude.Text
  }
  deriving (ConfirmSubscription -> ConfirmSubscription -> Bool
(ConfirmSubscription -> ConfirmSubscription -> Bool)
-> (ConfirmSubscription -> ConfirmSubscription -> Bool)
-> Eq ConfirmSubscription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfirmSubscription -> ConfirmSubscription -> Bool
== :: ConfirmSubscription -> ConfirmSubscription -> Bool
$c/= :: ConfirmSubscription -> ConfirmSubscription -> Bool
/= :: ConfirmSubscription -> ConfirmSubscription -> Bool
Prelude.Eq, ReadPrec [ConfirmSubscription]
ReadPrec ConfirmSubscription
Int -> ReadS ConfirmSubscription
ReadS [ConfirmSubscription]
(Int -> ReadS ConfirmSubscription)
-> ReadS [ConfirmSubscription]
-> ReadPrec ConfirmSubscription
-> ReadPrec [ConfirmSubscription]
-> Read ConfirmSubscription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ConfirmSubscription
readsPrec :: Int -> ReadS ConfirmSubscription
$creadList :: ReadS [ConfirmSubscription]
readList :: ReadS [ConfirmSubscription]
$creadPrec :: ReadPrec ConfirmSubscription
readPrec :: ReadPrec ConfirmSubscription
$creadListPrec :: ReadPrec [ConfirmSubscription]
readListPrec :: ReadPrec [ConfirmSubscription]
Prelude.Read, Int -> ConfirmSubscription -> ShowS
[ConfirmSubscription] -> ShowS
ConfirmSubscription -> String
(Int -> ConfirmSubscription -> ShowS)
-> (ConfirmSubscription -> String)
-> ([ConfirmSubscription] -> ShowS)
-> Show ConfirmSubscription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfirmSubscription -> ShowS
showsPrec :: Int -> ConfirmSubscription -> ShowS
$cshow :: ConfirmSubscription -> String
show :: ConfirmSubscription -> String
$cshowList :: [ConfirmSubscription] -> ShowS
showList :: [ConfirmSubscription] -> ShowS
Prelude.Show, (forall x. ConfirmSubscription -> Rep ConfirmSubscription x)
-> (forall x. Rep ConfirmSubscription x -> ConfirmSubscription)
-> Generic ConfirmSubscription
forall x. Rep ConfirmSubscription x -> ConfirmSubscription
forall x. ConfirmSubscription -> Rep ConfirmSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. ConfirmSubscription -> Rep ConfirmSubscription x
from :: forall x. ConfirmSubscription -> Rep ConfirmSubscription x
$cto :: forall x. Rep ConfirmSubscription x -> ConfirmSubscription
to :: forall x. Rep ConfirmSubscription x -> ConfirmSubscription
Prelude.Generic)

-- |
-- Create a value of 'ConfirmSubscription' 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:
--
-- 'authenticateOnUnsubscribe', 'confirmSubscription_authenticateOnUnsubscribe' - Disallows unauthenticated unsubscribes of the subscription. If the value
-- of this parameter is @true@ and the request has an Amazon Web Services
-- signature, then only the topic owner and the subscription owner can
-- unsubscribe the endpoint. The unsubscribe action requires Amazon Web
-- Services authentication.
--
-- 'topicArn', 'confirmSubscription_topicArn' - The ARN of the topic for which you wish to confirm a subscription.
--
-- 'token', 'confirmSubscription_token' - Short-lived token sent to an endpoint during the @Subscribe@ action.
newConfirmSubscription ::
  -- | 'topicArn'
  Prelude.Text ->
  -- | 'token'
  Prelude.Text ->
  ConfirmSubscription
newConfirmSubscription :: Text -> Text -> ConfirmSubscription
newConfirmSubscription Text
pTopicArn_ Text
pToken_ =
  ConfirmSubscription'
    { authenticateOnUnsubscribe :: Maybe Text
authenticateOnUnsubscribe =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      topicArn :: Text
topicArn = Text
pTopicArn_,
      token :: Text
token = Text
pToken_
    }

-- | Disallows unauthenticated unsubscribes of the subscription. If the value
-- of this parameter is @true@ and the request has an Amazon Web Services
-- signature, then only the topic owner and the subscription owner can
-- unsubscribe the endpoint. The unsubscribe action requires Amazon Web
-- Services authentication.
confirmSubscription_authenticateOnUnsubscribe :: Lens.Lens' ConfirmSubscription (Prelude.Maybe Prelude.Text)
confirmSubscription_authenticateOnUnsubscribe :: Lens' ConfirmSubscription (Maybe Text)
confirmSubscription_authenticateOnUnsubscribe = (ConfirmSubscription -> Maybe Text)
-> (ConfirmSubscription -> Maybe Text -> ConfirmSubscription)
-> Lens' ConfirmSubscription (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmSubscription' {Maybe Text
authenticateOnUnsubscribe :: ConfirmSubscription -> Maybe Text
authenticateOnUnsubscribe :: Maybe Text
authenticateOnUnsubscribe} -> Maybe Text
authenticateOnUnsubscribe) (\s :: ConfirmSubscription
s@ConfirmSubscription' {} Maybe Text
a -> ConfirmSubscription
s {authenticateOnUnsubscribe = a} :: ConfirmSubscription)

-- | The ARN of the topic for which you wish to confirm a subscription.
confirmSubscription_topicArn :: Lens.Lens' ConfirmSubscription Prelude.Text
confirmSubscription_topicArn :: Lens' ConfirmSubscription Text
confirmSubscription_topicArn = (ConfirmSubscription -> Text)
-> (ConfirmSubscription -> Text -> ConfirmSubscription)
-> Lens' ConfirmSubscription Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmSubscription' {Text
topicArn :: ConfirmSubscription -> Text
topicArn :: Text
topicArn} -> Text
topicArn) (\s :: ConfirmSubscription
s@ConfirmSubscription' {} Text
a -> ConfirmSubscription
s {topicArn = a} :: ConfirmSubscription)

-- | Short-lived token sent to an endpoint during the @Subscribe@ action.
confirmSubscription_token :: Lens.Lens' ConfirmSubscription Prelude.Text
confirmSubscription_token :: Lens' ConfirmSubscription Text
confirmSubscription_token = (ConfirmSubscription -> Text)
-> (ConfirmSubscription -> Text -> ConfirmSubscription)
-> Lens' ConfirmSubscription Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmSubscription' {Text
token :: ConfirmSubscription -> Text
token :: Text
token} -> Text
token) (\s :: ConfirmSubscription
s@ConfirmSubscription' {} Text
a -> ConfirmSubscription
s {token = a} :: ConfirmSubscription)

instance Core.AWSRequest ConfirmSubscription where
  type
    AWSResponse ConfirmSubscription =
      ConfirmSubscriptionResponse
  request :: (Service -> Service)
-> ConfirmSubscription -> Request ConfirmSubscription
request Service -> Service
overrides =
    Service -> ConfirmSubscription -> Request ConfirmSubscription
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 ConfirmSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ConfirmSubscription)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ConfirmSubscription))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ConfirmSubscription
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ConfirmSubscription)))
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
"ConfirmSubscriptionResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text -> Int -> ConfirmSubscriptionResponse
ConfirmSubscriptionResponse'
            (Maybe Text -> Int -> ConfirmSubscriptionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ConfirmSubscriptionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SubscriptionArn")
            Either String (Int -> ConfirmSubscriptionResponse)
-> Either String Int -> Either String ConfirmSubscriptionResponse
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => 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 ConfirmSubscription where
  hashWithSalt :: Int -> ConfirmSubscription -> Int
hashWithSalt Int
_salt ConfirmSubscription' {Maybe Text
Text
authenticateOnUnsubscribe :: ConfirmSubscription -> Maybe Text
topicArn :: ConfirmSubscription -> Text
token :: ConfirmSubscription -> Text
authenticateOnUnsubscribe :: Maybe Text
topicArn :: Text
token :: Text
..} =
    Int
_salt
      Int -> Maybe Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
authenticateOnUnsubscribe
      Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
topicArn
      Int -> Text -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
token

instance Prelude.NFData ConfirmSubscription where
  rnf :: ConfirmSubscription -> ()
rnf ConfirmSubscription' {Maybe Text
Text
authenticateOnUnsubscribe :: ConfirmSubscription -> Maybe Text
topicArn :: ConfirmSubscription -> Text
token :: ConfirmSubscription -> Text
authenticateOnUnsubscribe :: Maybe Text
topicArn :: Text
token :: Text
..} =
    Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
authenticateOnUnsubscribe () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq`
      Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
topicArn () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq`
        Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Text
token

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

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

instance Data.ToQuery ConfirmSubscription where
  toQuery :: ConfirmSubscription -> QueryString
toQuery ConfirmSubscription' {Maybe Text
Text
authenticateOnUnsubscribe :: ConfirmSubscription -> Maybe Text
topicArn :: ConfirmSubscription -> Text
token :: ConfirmSubscription -> Text
authenticateOnUnsubscribe :: Maybe Text
topicArn :: Text
token :: Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ConfirmSubscription" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
        ByteString
"AuthenticateOnUnsubscribe"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
authenticateOnUnsubscribe,
        ByteString
"TopicArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
topicArn,
        ByteString
"Token" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
token
      ]

-- | Response for ConfirmSubscriptions action.
--
-- /See:/ 'newConfirmSubscriptionResponse' smart constructor.
data ConfirmSubscriptionResponse = ConfirmSubscriptionResponse'
  { -- | The ARN of the created subscription.
    ConfirmSubscriptionResponse -> Maybe Text
subscriptionArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ConfirmSubscriptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ConfirmSubscriptionResponse -> ConfirmSubscriptionResponse -> Bool
(ConfirmSubscriptionResponse
 -> ConfirmSubscriptionResponse -> Bool)
-> (ConfirmSubscriptionResponse
    -> ConfirmSubscriptionResponse -> Bool)
-> Eq ConfirmSubscriptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfirmSubscriptionResponse -> ConfirmSubscriptionResponse -> Bool
== :: ConfirmSubscriptionResponse -> ConfirmSubscriptionResponse -> Bool
$c/= :: ConfirmSubscriptionResponse -> ConfirmSubscriptionResponse -> Bool
/= :: ConfirmSubscriptionResponse -> ConfirmSubscriptionResponse -> Bool
Prelude.Eq, ReadPrec [ConfirmSubscriptionResponse]
ReadPrec ConfirmSubscriptionResponse
Int -> ReadS ConfirmSubscriptionResponse
ReadS [ConfirmSubscriptionResponse]
(Int -> ReadS ConfirmSubscriptionResponse)
-> ReadS [ConfirmSubscriptionResponse]
-> ReadPrec ConfirmSubscriptionResponse
-> ReadPrec [ConfirmSubscriptionResponse]
-> Read ConfirmSubscriptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS ConfirmSubscriptionResponse
readsPrec :: Int -> ReadS ConfirmSubscriptionResponse
$creadList :: ReadS [ConfirmSubscriptionResponse]
readList :: ReadS [ConfirmSubscriptionResponse]
$creadPrec :: ReadPrec ConfirmSubscriptionResponse
readPrec :: ReadPrec ConfirmSubscriptionResponse
$creadListPrec :: ReadPrec [ConfirmSubscriptionResponse]
readListPrec :: ReadPrec [ConfirmSubscriptionResponse]
Prelude.Read, Int -> ConfirmSubscriptionResponse -> ShowS
[ConfirmSubscriptionResponse] -> ShowS
ConfirmSubscriptionResponse -> String
(Int -> ConfirmSubscriptionResponse -> ShowS)
-> (ConfirmSubscriptionResponse -> String)
-> ([ConfirmSubscriptionResponse] -> ShowS)
-> Show ConfirmSubscriptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfirmSubscriptionResponse -> ShowS
showsPrec :: Int -> ConfirmSubscriptionResponse -> ShowS
$cshow :: ConfirmSubscriptionResponse -> String
show :: ConfirmSubscriptionResponse -> String
$cshowList :: [ConfirmSubscriptionResponse] -> ShowS
showList :: [ConfirmSubscriptionResponse] -> ShowS
Prelude.Show, (forall x.
 ConfirmSubscriptionResponse -> Rep ConfirmSubscriptionResponse x)
-> (forall x.
    Rep ConfirmSubscriptionResponse x -> ConfirmSubscriptionResponse)
-> Generic ConfirmSubscriptionResponse
forall x.
Rep ConfirmSubscriptionResponse x -> ConfirmSubscriptionResponse
forall x.
ConfirmSubscriptionResponse -> Rep ConfirmSubscriptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
ConfirmSubscriptionResponse -> Rep ConfirmSubscriptionResponse x
from :: forall x.
ConfirmSubscriptionResponse -> Rep ConfirmSubscriptionResponse x
$cto :: forall x.
Rep ConfirmSubscriptionResponse x -> ConfirmSubscriptionResponse
to :: forall x.
Rep ConfirmSubscriptionResponse x -> ConfirmSubscriptionResponse
Prelude.Generic)

-- |
-- Create a value of 'ConfirmSubscriptionResponse' 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:
--
-- 'subscriptionArn', 'confirmSubscriptionResponse_subscriptionArn' - The ARN of the created subscription.
--
-- 'httpStatus', 'confirmSubscriptionResponse_httpStatus' - The response's http status code.
newConfirmSubscriptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ConfirmSubscriptionResponse
newConfirmSubscriptionResponse :: Int -> ConfirmSubscriptionResponse
newConfirmSubscriptionResponse Int
pHttpStatus_ =
  ConfirmSubscriptionResponse'
    { subscriptionArn :: Maybe Text
subscriptionArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      httpStatus :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the created subscription.
confirmSubscriptionResponse_subscriptionArn :: Lens.Lens' ConfirmSubscriptionResponse (Prelude.Maybe Prelude.Text)
confirmSubscriptionResponse_subscriptionArn :: Lens' ConfirmSubscriptionResponse (Maybe Text)
confirmSubscriptionResponse_subscriptionArn = (ConfirmSubscriptionResponse -> Maybe Text)
-> (ConfirmSubscriptionResponse
    -> Maybe Text -> ConfirmSubscriptionResponse)
-> Lens' ConfirmSubscriptionResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmSubscriptionResponse' {Maybe Text
subscriptionArn :: ConfirmSubscriptionResponse -> Maybe Text
subscriptionArn :: Maybe Text
subscriptionArn} -> Maybe Text
subscriptionArn) (\s :: ConfirmSubscriptionResponse
s@ConfirmSubscriptionResponse' {} Maybe Text
a -> ConfirmSubscriptionResponse
s {subscriptionArn = a} :: ConfirmSubscriptionResponse)

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

instance Prelude.NFData ConfirmSubscriptionResponse where
  rnf :: ConfirmSubscriptionResponse -> ()
rnf ConfirmSubscriptionResponse' {Int
Maybe Text
subscriptionArn :: ConfirmSubscriptionResponse -> Maybe Text
httpStatus :: ConfirmSubscriptionResponse -> Int
subscriptionArn :: Maybe Text
httpStatus :: Int
..} =
    Maybe Text -> ()
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subscriptionArn () -> () -> ()
forall a b. a -> b -> b
`Prelude.seq`
      Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus