{-# 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.ListSubscriptionsByTopic
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of the subscriptions to a specific topic. Each call
-- returns a limited list of subscriptions, up to 100. If there are more
-- subscriptions, a @NextToken@ is also returned. Use the @NextToken@
-- parameter in a new @ListSubscriptionsByTopic@ call to get further
-- results.
--
-- This action is throttled at 30 transactions per second (TPS).
--
-- This operation returns paginated results.
module Amazonka.SNS.ListSubscriptionsByTopic
  ( -- * Creating a Request
    ListSubscriptionsByTopic (..),
    newListSubscriptionsByTopic,

    -- * Request Lenses
    listSubscriptionsByTopic_nextToken,
    listSubscriptionsByTopic_topicArn,

    -- * Destructuring the Response
    ListSubscriptionsByTopicResponse (..),
    newListSubscriptionsByTopicResponse,

    -- * Response Lenses
    listSubscriptionsByTopicResponse_nextToken,
    listSubscriptionsByTopicResponse_subscriptions,
    listSubscriptionsByTopicResponse_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 ListSubscriptionsByTopic action.
--
-- /See:/ 'newListSubscriptionsByTopic' smart constructor.
data ListSubscriptionsByTopic = ListSubscriptionsByTopic'
  { -- | Token returned by the previous @ListSubscriptionsByTopic@ request.
    ListSubscriptionsByTopic -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the topic for which you wish to find subscriptions.
    ListSubscriptionsByTopic -> Text
topicArn :: Prelude.Text
  }
  deriving (ListSubscriptionsByTopic -> ListSubscriptionsByTopic -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSubscriptionsByTopic -> ListSubscriptionsByTopic -> Bool
$c/= :: ListSubscriptionsByTopic -> ListSubscriptionsByTopic -> Bool
== :: ListSubscriptionsByTopic -> ListSubscriptionsByTopic -> Bool
$c== :: ListSubscriptionsByTopic -> ListSubscriptionsByTopic -> Bool
Prelude.Eq, ReadPrec [ListSubscriptionsByTopic]
ReadPrec ListSubscriptionsByTopic
Int -> ReadS ListSubscriptionsByTopic
ReadS [ListSubscriptionsByTopic]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSubscriptionsByTopic]
$creadListPrec :: ReadPrec [ListSubscriptionsByTopic]
readPrec :: ReadPrec ListSubscriptionsByTopic
$creadPrec :: ReadPrec ListSubscriptionsByTopic
readList :: ReadS [ListSubscriptionsByTopic]
$creadList :: ReadS [ListSubscriptionsByTopic]
readsPrec :: Int -> ReadS ListSubscriptionsByTopic
$creadsPrec :: Int -> ReadS ListSubscriptionsByTopic
Prelude.Read, Int -> ListSubscriptionsByTopic -> ShowS
[ListSubscriptionsByTopic] -> ShowS
ListSubscriptionsByTopic -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSubscriptionsByTopic] -> ShowS
$cshowList :: [ListSubscriptionsByTopic] -> ShowS
show :: ListSubscriptionsByTopic -> String
$cshow :: ListSubscriptionsByTopic -> String
showsPrec :: Int -> ListSubscriptionsByTopic -> ShowS
$cshowsPrec :: Int -> ListSubscriptionsByTopic -> ShowS
Prelude.Show, forall x.
Rep ListSubscriptionsByTopic x -> ListSubscriptionsByTopic
forall x.
ListSubscriptionsByTopic -> Rep ListSubscriptionsByTopic x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSubscriptionsByTopic x -> ListSubscriptionsByTopic
$cfrom :: forall x.
ListSubscriptionsByTopic -> Rep ListSubscriptionsByTopic x
Prelude.Generic)

-- |
-- Create a value of 'ListSubscriptionsByTopic' 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:
--
-- 'nextToken', 'listSubscriptionsByTopic_nextToken' - Token returned by the previous @ListSubscriptionsByTopic@ request.
--
-- 'topicArn', 'listSubscriptionsByTopic_topicArn' - The ARN of the topic for which you wish to find subscriptions.
newListSubscriptionsByTopic ::
  -- | 'topicArn'
  Prelude.Text ->
  ListSubscriptionsByTopic
newListSubscriptionsByTopic :: Text -> ListSubscriptionsByTopic
newListSubscriptionsByTopic Text
pTopicArn_ =
  ListSubscriptionsByTopic'
    { $sel:nextToken:ListSubscriptionsByTopic' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:topicArn:ListSubscriptionsByTopic' :: Text
topicArn = Text
pTopicArn_
    }

-- | Token returned by the previous @ListSubscriptionsByTopic@ request.
listSubscriptionsByTopic_nextToken :: Lens.Lens' ListSubscriptionsByTopic (Prelude.Maybe Prelude.Text)
listSubscriptionsByTopic_nextToken :: Lens' ListSubscriptionsByTopic (Maybe Text)
listSubscriptionsByTopic_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscriptionsByTopic' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSubscriptionsByTopic
s@ListSubscriptionsByTopic' {} Maybe Text
a -> ListSubscriptionsByTopic
s {$sel:nextToken:ListSubscriptionsByTopic' :: Maybe Text
nextToken = Maybe Text
a} :: ListSubscriptionsByTopic)

-- | The ARN of the topic for which you wish to find subscriptions.
listSubscriptionsByTopic_topicArn :: Lens.Lens' ListSubscriptionsByTopic Prelude.Text
listSubscriptionsByTopic_topicArn :: Lens' ListSubscriptionsByTopic Text
listSubscriptionsByTopic_topicArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscriptionsByTopic' {Text
topicArn :: Text
$sel:topicArn:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Text
topicArn} -> Text
topicArn) (\s :: ListSubscriptionsByTopic
s@ListSubscriptionsByTopic' {} Text
a -> ListSubscriptionsByTopic
s {$sel:topicArn:ListSubscriptionsByTopic' :: Text
topicArn = Text
a} :: ListSubscriptionsByTopic)

instance Core.AWSPager ListSubscriptionsByTopic where
  page :: ListSubscriptionsByTopic
-> AWSResponse ListSubscriptionsByTopic
-> Maybe ListSubscriptionsByTopic
page ListSubscriptionsByTopic
rq AWSResponse ListSubscriptionsByTopic
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSubscriptionsByTopic
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSubscriptionsByTopicResponse (Maybe Text)
listSubscriptionsByTopicResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSubscriptionsByTopic
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSubscriptionsByTopicResponse (Maybe [Subscription])
listSubscriptionsByTopicResponse_subscriptions
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListSubscriptionsByTopic
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSubscriptionsByTopic (Maybe Text)
listSubscriptionsByTopic_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSubscriptionsByTopic
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSubscriptionsByTopicResponse (Maybe Text)
listSubscriptionsByTopicResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSubscriptionsByTopic where
  type
    AWSResponse ListSubscriptionsByTopic =
      ListSubscriptionsByTopicResponse
  request :: (Service -> Service)
-> ListSubscriptionsByTopic -> Request ListSubscriptionsByTopic
request Service -> Service
overrides =
    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 ListSubscriptionsByTopic
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSubscriptionsByTopic)))
response =
    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
"ListSubscriptionsByTopicResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [Subscription] -> Int -> ListSubscriptionsByTopicResponse
ListSubscriptionsByTopicResponse'
            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
"NextToken")
            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
"Subscriptions"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"member")
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListSubscriptionsByTopic where
  hashWithSalt :: Int -> ListSubscriptionsByTopic -> Int
hashWithSalt Int
_salt ListSubscriptionsByTopic' {Maybe Text
Text
topicArn :: Text
nextToken :: Maybe Text
$sel:topicArn:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Text
$sel:nextToken:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
topicArn

instance Prelude.NFData ListSubscriptionsByTopic where
  rnf :: ListSubscriptionsByTopic -> ()
rnf ListSubscriptionsByTopic' {Maybe Text
Text
topicArn :: Text
nextToken :: Maybe Text
$sel:topicArn:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Text
$sel:nextToken:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
topicArn

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

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

instance Data.ToQuery ListSubscriptionsByTopic where
  toQuery :: ListSubscriptionsByTopic -> QueryString
toQuery ListSubscriptionsByTopic' {Maybe Text
Text
topicArn :: Text
nextToken :: Maybe Text
$sel:topicArn:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Text
$sel:nextToken:ListSubscriptionsByTopic' :: ListSubscriptionsByTopic -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ListSubscriptionsByTopic" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"TopicArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
topicArn
      ]

-- | Response for ListSubscriptionsByTopic action.
--
-- /See:/ 'newListSubscriptionsByTopicResponse' smart constructor.
data ListSubscriptionsByTopicResponse = ListSubscriptionsByTopicResponse'
  { -- | Token to pass along to the next @ListSubscriptionsByTopic@ request. This
    -- element is returned if there are more subscriptions to retrieve.
    ListSubscriptionsByTopicResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of subscriptions.
    ListSubscriptionsByTopicResponse -> Maybe [Subscription]
subscriptions :: Prelude.Maybe [Subscription],
    -- | The response's http status code.
    ListSubscriptionsByTopicResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSubscriptionsByTopicResponse
-> ListSubscriptionsByTopicResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSubscriptionsByTopicResponse
-> ListSubscriptionsByTopicResponse -> Bool
$c/= :: ListSubscriptionsByTopicResponse
-> ListSubscriptionsByTopicResponse -> Bool
== :: ListSubscriptionsByTopicResponse
-> ListSubscriptionsByTopicResponse -> Bool
$c== :: ListSubscriptionsByTopicResponse
-> ListSubscriptionsByTopicResponse -> Bool
Prelude.Eq, ReadPrec [ListSubscriptionsByTopicResponse]
ReadPrec ListSubscriptionsByTopicResponse
Int -> ReadS ListSubscriptionsByTopicResponse
ReadS [ListSubscriptionsByTopicResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSubscriptionsByTopicResponse]
$creadListPrec :: ReadPrec [ListSubscriptionsByTopicResponse]
readPrec :: ReadPrec ListSubscriptionsByTopicResponse
$creadPrec :: ReadPrec ListSubscriptionsByTopicResponse
readList :: ReadS [ListSubscriptionsByTopicResponse]
$creadList :: ReadS [ListSubscriptionsByTopicResponse]
readsPrec :: Int -> ReadS ListSubscriptionsByTopicResponse
$creadsPrec :: Int -> ReadS ListSubscriptionsByTopicResponse
Prelude.Read, Int -> ListSubscriptionsByTopicResponse -> ShowS
[ListSubscriptionsByTopicResponse] -> ShowS
ListSubscriptionsByTopicResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSubscriptionsByTopicResponse] -> ShowS
$cshowList :: [ListSubscriptionsByTopicResponse] -> ShowS
show :: ListSubscriptionsByTopicResponse -> String
$cshow :: ListSubscriptionsByTopicResponse -> String
showsPrec :: Int -> ListSubscriptionsByTopicResponse -> ShowS
$cshowsPrec :: Int -> ListSubscriptionsByTopicResponse -> ShowS
Prelude.Show, forall x.
Rep ListSubscriptionsByTopicResponse x
-> ListSubscriptionsByTopicResponse
forall x.
ListSubscriptionsByTopicResponse
-> Rep ListSubscriptionsByTopicResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSubscriptionsByTopicResponse x
-> ListSubscriptionsByTopicResponse
$cfrom :: forall x.
ListSubscriptionsByTopicResponse
-> Rep ListSubscriptionsByTopicResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSubscriptionsByTopicResponse' 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:
--
-- 'nextToken', 'listSubscriptionsByTopicResponse_nextToken' - Token to pass along to the next @ListSubscriptionsByTopic@ request. This
-- element is returned if there are more subscriptions to retrieve.
--
-- 'subscriptions', 'listSubscriptionsByTopicResponse_subscriptions' - A list of subscriptions.
--
-- 'httpStatus', 'listSubscriptionsByTopicResponse_httpStatus' - The response's http status code.
newListSubscriptionsByTopicResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSubscriptionsByTopicResponse
newListSubscriptionsByTopicResponse :: Int -> ListSubscriptionsByTopicResponse
newListSubscriptionsByTopicResponse Int
pHttpStatus_ =
  ListSubscriptionsByTopicResponse'
    { $sel:nextToken:ListSubscriptionsByTopicResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:subscriptions:ListSubscriptionsByTopicResponse' :: Maybe [Subscription]
subscriptions = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSubscriptionsByTopicResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Token to pass along to the next @ListSubscriptionsByTopic@ request. This
-- element is returned if there are more subscriptions to retrieve.
listSubscriptionsByTopicResponse_nextToken :: Lens.Lens' ListSubscriptionsByTopicResponse (Prelude.Maybe Prelude.Text)
listSubscriptionsByTopicResponse_nextToken :: Lens' ListSubscriptionsByTopicResponse (Maybe Text)
listSubscriptionsByTopicResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscriptionsByTopicResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSubscriptionsByTopicResponse' :: ListSubscriptionsByTopicResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSubscriptionsByTopicResponse
s@ListSubscriptionsByTopicResponse' {} Maybe Text
a -> ListSubscriptionsByTopicResponse
s {$sel:nextToken:ListSubscriptionsByTopicResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSubscriptionsByTopicResponse)

-- | A list of subscriptions.
listSubscriptionsByTopicResponse_subscriptions :: Lens.Lens' ListSubscriptionsByTopicResponse (Prelude.Maybe [Subscription])
listSubscriptionsByTopicResponse_subscriptions :: Lens' ListSubscriptionsByTopicResponse (Maybe [Subscription])
listSubscriptionsByTopicResponse_subscriptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSubscriptionsByTopicResponse' {Maybe [Subscription]
subscriptions :: Maybe [Subscription]
$sel:subscriptions:ListSubscriptionsByTopicResponse' :: ListSubscriptionsByTopicResponse -> Maybe [Subscription]
subscriptions} -> Maybe [Subscription]
subscriptions) (\s :: ListSubscriptionsByTopicResponse
s@ListSubscriptionsByTopicResponse' {} Maybe [Subscription]
a -> ListSubscriptionsByTopicResponse
s {$sel:subscriptions:ListSubscriptionsByTopicResponse' :: Maybe [Subscription]
subscriptions = Maybe [Subscription]
a} :: ListSubscriptionsByTopicResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListSubscriptionsByTopicResponse
  where
  rnf :: ListSubscriptionsByTopicResponse -> ()
rnf ListSubscriptionsByTopicResponse' {Int
Maybe [Subscription]
Maybe Text
httpStatus :: Int
subscriptions :: Maybe [Subscription]
nextToken :: Maybe Text
$sel:httpStatus:ListSubscriptionsByTopicResponse' :: ListSubscriptionsByTopicResponse -> Int
$sel:subscriptions:ListSubscriptionsByTopicResponse' :: ListSubscriptionsByTopicResponse -> Maybe [Subscription]
$sel:nextToken:ListSubscriptionsByTopicResponse' :: ListSubscriptionsByTopicResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Subscription]
subscriptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus