{-# 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.ChimeSDKMessaging.ListChannels
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all Channels created under a single Chime App as a paginated list.
-- You can specify filters to narrow results.
--
-- __Functionality & restrictions__
--
-- -   Use privacy = @PUBLIC@ to retrieve all public channels in the
--     account.
--
-- -   Only an @AppInstanceAdmin@ can set privacy = @PRIVATE@ to list the
--     private channels in an account.
--
-- The @x-amz-chime-bearer@ request header is mandatory. Use the
-- @AppInstanceUserArn@ of the user that makes the API call as the value in
-- the header.
module Amazonka.ChimeSDKMessaging.ListChannels
  ( -- * Creating a Request
    ListChannels (..),
    newListChannels,

    -- * Request Lenses
    listChannels_maxResults,
    listChannels_nextToken,
    listChannels_privacy,
    listChannels_appInstanceArn,
    listChannels_chimeBearer,

    -- * Destructuring the Response
    ListChannelsResponse (..),
    newListChannelsResponse,

    -- * Response Lenses
    listChannelsResponse_channels,
    listChannelsResponse_nextToken,
    listChannelsResponse_httpStatus,
  )
where

import Amazonka.ChimeSDKMessaging.Types
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

-- | /See:/ 'newListChannels' smart constructor.
data ListChannels = ListChannels'
  { -- | The maximum number of channels that you want to return.
    ListChannels -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token passed by previous API calls until all requested channels are
    -- returned.
    ListChannels -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The privacy setting. @PUBLIC@ retrieves all the public channels.
    -- @PRIVATE@ retrieves private channels. Only an @AppInstanceAdmin@ can
    -- retrieve private channels.
    ListChannels -> Maybe ChannelPrivacy
privacy :: Prelude.Maybe ChannelPrivacy,
    -- | The ARN of the @AppInstance@.
    ListChannels -> Text
appInstanceArn :: Prelude.Text,
    -- | The @AppInstanceUserArn@ of the user that makes the API call.
    ListChannels -> Text
chimeBearer :: Prelude.Text
  }
  deriving (ListChannels -> ListChannels -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListChannels -> ListChannels -> Bool
$c/= :: ListChannels -> ListChannels -> Bool
== :: ListChannels -> ListChannels -> Bool
$c== :: ListChannels -> ListChannels -> Bool
Prelude.Eq, Int -> ListChannels -> ShowS
[ListChannels] -> ShowS
ListChannels -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListChannels] -> ShowS
$cshowList :: [ListChannels] -> ShowS
show :: ListChannels -> String
$cshow :: ListChannels -> String
showsPrec :: Int -> ListChannels -> ShowS
$cshowsPrec :: Int -> ListChannels -> ShowS
Prelude.Show, forall x. Rep ListChannels x -> ListChannels
forall x. ListChannels -> Rep ListChannels x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListChannels x -> ListChannels
$cfrom :: forall x. ListChannels -> Rep ListChannels x
Prelude.Generic)

-- |
-- Create a value of 'ListChannels' 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:
--
-- 'maxResults', 'listChannels_maxResults' - The maximum number of channels that you want to return.
--
-- 'nextToken', 'listChannels_nextToken' - The token passed by previous API calls until all requested channels are
-- returned.
--
-- 'privacy', 'listChannels_privacy' - The privacy setting. @PUBLIC@ retrieves all the public channels.
-- @PRIVATE@ retrieves private channels. Only an @AppInstanceAdmin@ can
-- retrieve private channels.
--
-- 'appInstanceArn', 'listChannels_appInstanceArn' - The ARN of the @AppInstance@.
--
-- 'chimeBearer', 'listChannels_chimeBearer' - The @AppInstanceUserArn@ of the user that makes the API call.
newListChannels ::
  -- | 'appInstanceArn'
  Prelude.Text ->
  -- | 'chimeBearer'
  Prelude.Text ->
  ListChannels
newListChannels :: Text -> Text -> ListChannels
newListChannels Text
pAppInstanceArn_ Text
pChimeBearer_ =
  ListChannels'
    { $sel:maxResults:ListChannels' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannels' :: Maybe (Sensitive Text)
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:privacy:ListChannels' :: Maybe ChannelPrivacy
privacy = forall a. Maybe a
Prelude.Nothing,
      $sel:appInstanceArn:ListChannels' :: Text
appInstanceArn = Text
pAppInstanceArn_,
      $sel:chimeBearer:ListChannels' :: Text
chimeBearer = Text
pChimeBearer_
    }

-- | The maximum number of channels that you want to return.
listChannels_maxResults :: Lens.Lens' ListChannels (Prelude.Maybe Prelude.Natural)
listChannels_maxResults :: Lens' ListChannels (Maybe Natural)
listChannels_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListChannels
s@ListChannels' {} Maybe Natural
a -> ListChannels
s {$sel:maxResults:ListChannels' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListChannels)

-- | The token passed by previous API calls until all requested channels are
-- returned.
listChannels_nextToken :: Lens.Lens' ListChannels (Prelude.Maybe Prelude.Text)
listChannels_nextToken :: Lens' ListChannels (Maybe Text)
listChannels_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannels' :: ListChannels -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannels
s@ListChannels' {} Maybe (Sensitive Text)
a -> ListChannels
s {$sel:nextToken:ListChannels' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannels) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The privacy setting. @PUBLIC@ retrieves all the public channels.
-- @PRIVATE@ retrieves private channels. Only an @AppInstanceAdmin@ can
-- retrieve private channels.
listChannels_privacy :: Lens.Lens' ListChannels (Prelude.Maybe ChannelPrivacy)
listChannels_privacy :: Lens' ListChannels (Maybe ChannelPrivacy)
listChannels_privacy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Maybe ChannelPrivacy
privacy :: Maybe ChannelPrivacy
$sel:privacy:ListChannels' :: ListChannels -> Maybe ChannelPrivacy
privacy} -> Maybe ChannelPrivacy
privacy) (\s :: ListChannels
s@ListChannels' {} Maybe ChannelPrivacy
a -> ListChannels
s {$sel:privacy:ListChannels' :: Maybe ChannelPrivacy
privacy = Maybe ChannelPrivacy
a} :: ListChannels)

-- | The ARN of the @AppInstance@.
listChannels_appInstanceArn :: Lens.Lens' ListChannels Prelude.Text
listChannels_appInstanceArn :: Lens' ListChannels Text
listChannels_appInstanceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Text
appInstanceArn :: Text
$sel:appInstanceArn:ListChannels' :: ListChannels -> Text
appInstanceArn} -> Text
appInstanceArn) (\s :: ListChannels
s@ListChannels' {} Text
a -> ListChannels
s {$sel:appInstanceArn:ListChannels' :: Text
appInstanceArn = Text
a} :: ListChannels)

-- | The @AppInstanceUserArn@ of the user that makes the API call.
listChannels_chimeBearer :: Lens.Lens' ListChannels Prelude.Text
listChannels_chimeBearer :: Lens' ListChannels Text
listChannels_chimeBearer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Text
chimeBearer :: Text
$sel:chimeBearer:ListChannels' :: ListChannels -> Text
chimeBearer} -> Text
chimeBearer) (\s :: ListChannels
s@ListChannels' {} Text
a -> ListChannels
s {$sel:chimeBearer:ListChannels' :: Text
chimeBearer = Text
a} :: ListChannels)

instance Core.AWSRequest ListChannels where
  type AWSResponse ListChannels = ListChannelsResponse
  request :: (Service -> Service) -> ListChannels -> Request ListChannels
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListChannels
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListChannels)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ChannelSummary]
-> Maybe (Sensitive Text) -> Int -> ListChannelsResponse
ListChannelsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Channels" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            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 ListChannels where
  hashWithSalt :: Int -> ListChannels -> Int
hashWithSalt Int
_salt ListChannels' {Maybe Natural
Maybe (Sensitive Text)
Maybe ChannelPrivacy
Text
chimeBearer :: Text
appInstanceArn :: Text
privacy :: Maybe ChannelPrivacy
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:chimeBearer:ListChannels' :: ListChannels -> Text
$sel:appInstanceArn:ListChannels' :: ListChannels -> Text
$sel:privacy:ListChannels' :: ListChannels -> Maybe ChannelPrivacy
$sel:nextToken:ListChannels' :: ListChannels -> Maybe (Sensitive Text)
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ChannelPrivacy
privacy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
appInstanceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
chimeBearer

instance Prelude.NFData ListChannels where
  rnf :: ListChannels -> ()
rnf ListChannels' {Maybe Natural
Maybe (Sensitive Text)
Maybe ChannelPrivacy
Text
chimeBearer :: Text
appInstanceArn :: Text
privacy :: Maybe ChannelPrivacy
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:chimeBearer:ListChannels' :: ListChannels -> Text
$sel:appInstanceArn:ListChannels' :: ListChannels -> Text
$sel:privacy:ListChannels' :: ListChannels -> Maybe ChannelPrivacy
$sel:nextToken:ListChannels' :: ListChannels -> Maybe (Sensitive Text)
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ChannelPrivacy
privacy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
appInstanceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
chimeBearer

instance Data.ToHeaders ListChannels where
  toHeaders :: ListChannels -> ResponseHeaders
toHeaders ListChannels' {Maybe Natural
Maybe (Sensitive Text)
Maybe ChannelPrivacy
Text
chimeBearer :: Text
appInstanceArn :: Text
privacy :: Maybe ChannelPrivacy
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:chimeBearer:ListChannels' :: ListChannels -> Text
$sel:appInstanceArn:ListChannels' :: ListChannels -> Text
$sel:privacy:ListChannels' :: ListChannels -> Maybe ChannelPrivacy
$sel:nextToken:ListChannels' :: ListChannels -> Maybe (Sensitive Text)
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [HeaderName
"x-amz-chime-bearer" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Text
chimeBearer]

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

instance Data.ToQuery ListChannels where
  toQuery :: ListChannels -> QueryString
toQuery ListChannels' {Maybe Natural
Maybe (Sensitive Text)
Maybe ChannelPrivacy
Text
chimeBearer :: Text
appInstanceArn :: Text
privacy :: Maybe ChannelPrivacy
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
$sel:chimeBearer:ListChannels' :: ListChannels -> Text
$sel:appInstanceArn:ListChannels' :: ListChannels -> Text
$sel:privacy:ListChannels' :: ListChannels -> Maybe ChannelPrivacy
$sel:nextToken:ListChannels' :: ListChannels -> Maybe (Sensitive Text)
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"max-results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"next-token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe (Sensitive Text)
nextToken,
        ByteString
"privacy" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ChannelPrivacy
privacy,
        ByteString
"app-instance-arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
appInstanceArn
      ]

-- | /See:/ 'newListChannelsResponse' smart constructor.
data ListChannelsResponse = ListChannelsResponse'
  { -- | The information about each channel.
    ListChannelsResponse -> Maybe [ChannelSummary]
channels :: Prelude.Maybe [ChannelSummary],
    -- | The token returned from previous API requests until the number of
    -- channels is reached.
    ListChannelsResponse -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The response's http status code.
    ListChannelsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListChannelsResponse -> ListChannelsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListChannelsResponse -> ListChannelsResponse -> Bool
$c/= :: ListChannelsResponse -> ListChannelsResponse -> Bool
== :: ListChannelsResponse -> ListChannelsResponse -> Bool
$c== :: ListChannelsResponse -> ListChannelsResponse -> Bool
Prelude.Eq, Int -> ListChannelsResponse -> ShowS
[ListChannelsResponse] -> ShowS
ListChannelsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListChannelsResponse] -> ShowS
$cshowList :: [ListChannelsResponse] -> ShowS
show :: ListChannelsResponse -> String
$cshow :: ListChannelsResponse -> String
showsPrec :: Int -> ListChannelsResponse -> ShowS
$cshowsPrec :: Int -> ListChannelsResponse -> ShowS
Prelude.Show, forall x. Rep ListChannelsResponse x -> ListChannelsResponse
forall x. ListChannelsResponse -> Rep ListChannelsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListChannelsResponse x -> ListChannelsResponse
$cfrom :: forall x. ListChannelsResponse -> Rep ListChannelsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListChannelsResponse' 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:
--
-- 'channels', 'listChannelsResponse_channels' - The information about each channel.
--
-- 'nextToken', 'listChannelsResponse_nextToken' - The token returned from previous API requests until the number of
-- channels is reached.
--
-- 'httpStatus', 'listChannelsResponse_httpStatus' - The response's http status code.
newListChannelsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListChannelsResponse
newListChannelsResponse :: Int -> ListChannelsResponse
newListChannelsResponse Int
pHttpStatus_ =
  ListChannelsResponse'
    { $sel:channels:ListChannelsResponse' :: Maybe [ChannelSummary]
channels = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelsResponse' :: Maybe (Sensitive Text)
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListChannelsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The information about each channel.
listChannelsResponse_channels :: Lens.Lens' ListChannelsResponse (Prelude.Maybe [ChannelSummary])
listChannelsResponse_channels :: Lens' ListChannelsResponse (Maybe [ChannelSummary])
listChannelsResponse_channels = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelsResponse' {Maybe [ChannelSummary]
channels :: Maybe [ChannelSummary]
$sel:channels:ListChannelsResponse' :: ListChannelsResponse -> Maybe [ChannelSummary]
channels} -> Maybe [ChannelSummary]
channels) (\s :: ListChannelsResponse
s@ListChannelsResponse' {} Maybe [ChannelSummary]
a -> ListChannelsResponse
s {$sel:channels:ListChannelsResponse' :: Maybe [ChannelSummary]
channels = Maybe [ChannelSummary]
a} :: ListChannelsResponse) 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 token returned from previous API requests until the number of
-- channels is reached.
listChannelsResponse_nextToken :: Lens.Lens' ListChannelsResponse (Prelude.Maybe Prelude.Text)
listChannelsResponse_nextToken :: Lens' ListChannelsResponse (Maybe Text)
listChannelsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelsResponse' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannelsResponse' :: ListChannelsResponse -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannelsResponse
s@ListChannelsResponse' {} Maybe (Sensitive Text)
a -> ListChannelsResponse
s {$sel:nextToken:ListChannelsResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannelsResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive

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

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