{-# 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.Chime.ListChannelModerators
-- 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 the moderators for a channel.
--
-- 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.Chime.ListChannelModerators
  ( -- * Creating a Request
    ListChannelModerators (..),
    newListChannelModerators,

    -- * Request Lenses
    listChannelModerators_chimeBearer,
    listChannelModerators_maxResults,
    listChannelModerators_nextToken,
    listChannelModerators_channelArn,

    -- * Destructuring the Response
    ListChannelModeratorsResponse (..),
    newListChannelModeratorsResponse,

    -- * Response Lenses
    listChannelModeratorsResponse_channelArn,
    listChannelModeratorsResponse_channelModerators,
    listChannelModeratorsResponse_nextToken,
    listChannelModeratorsResponse_httpStatus,
  )
where

import Amazonka.Chime.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:/ 'newListChannelModerators' smart constructor.
data ListChannelModerators = ListChannelModerators'
  { -- | The @AppInstanceUserArn@ of the user that makes the API call.
    ListChannelModerators -> Maybe Text
chimeBearer :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of moderators that you want returned.
    ListChannelModerators -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token passed by previous API calls until all requested moderators
    -- are returned.
    ListChannelModerators -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The ARN of the channel.
    ListChannelModerators -> Text
channelArn :: Prelude.Text
  }
  deriving (ListChannelModerators -> ListChannelModerators -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListChannelModerators -> ListChannelModerators -> Bool
$c/= :: ListChannelModerators -> ListChannelModerators -> Bool
== :: ListChannelModerators -> ListChannelModerators -> Bool
$c== :: ListChannelModerators -> ListChannelModerators -> Bool
Prelude.Eq, Int -> ListChannelModerators -> ShowS
[ListChannelModerators] -> ShowS
ListChannelModerators -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListChannelModerators] -> ShowS
$cshowList :: [ListChannelModerators] -> ShowS
show :: ListChannelModerators -> String
$cshow :: ListChannelModerators -> String
showsPrec :: Int -> ListChannelModerators -> ShowS
$cshowsPrec :: Int -> ListChannelModerators -> ShowS
Prelude.Show, forall x. Rep ListChannelModerators x -> ListChannelModerators
forall x. ListChannelModerators -> Rep ListChannelModerators x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListChannelModerators x -> ListChannelModerators
$cfrom :: forall x. ListChannelModerators -> Rep ListChannelModerators x
Prelude.Generic)

-- |
-- Create a value of 'ListChannelModerators' 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:
--
-- 'chimeBearer', 'listChannelModerators_chimeBearer' - The @AppInstanceUserArn@ of the user that makes the API call.
--
-- 'maxResults', 'listChannelModerators_maxResults' - The maximum number of moderators that you want returned.
--
-- 'nextToken', 'listChannelModerators_nextToken' - The token passed by previous API calls until all requested moderators
-- are returned.
--
-- 'channelArn', 'listChannelModerators_channelArn' - The ARN of the channel.
newListChannelModerators ::
  -- | 'channelArn'
  Prelude.Text ->
  ListChannelModerators
newListChannelModerators :: Text -> ListChannelModerators
newListChannelModerators Text
pChannelArn_ =
  ListChannelModerators'
    { $sel:chimeBearer:ListChannelModerators' :: Maybe Text
chimeBearer =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListChannelModerators' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelModerators' :: Maybe (Sensitive Text)
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:channelArn:ListChannelModerators' :: Text
channelArn = Text
pChannelArn_
    }

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

-- | The maximum number of moderators that you want returned.
listChannelModerators_maxResults :: Lens.Lens' ListChannelModerators (Prelude.Maybe Prelude.Natural)
listChannelModerators_maxResults :: Lens' ListChannelModerators (Maybe Natural)
listChannelModerators_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModerators' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListChannelModerators
s@ListChannelModerators' {} Maybe Natural
a -> ListChannelModerators
s {$sel:maxResults:ListChannelModerators' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListChannelModerators)

-- | The token passed by previous API calls until all requested moderators
-- are returned.
listChannelModerators_nextToken :: Lens.Lens' ListChannelModerators (Prelude.Maybe Prelude.Text)
listChannelModerators_nextToken :: Lens' ListChannelModerators (Maybe Text)
listChannelModerators_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModerators' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannelModerators
s@ListChannelModerators' {} Maybe (Sensitive Text)
a -> ListChannelModerators
s {$sel:nextToken:ListChannelModerators' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannelModerators) 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 ARN of the channel.
listChannelModerators_channelArn :: Lens.Lens' ListChannelModerators Prelude.Text
listChannelModerators_channelArn :: Lens' ListChannelModerators Text
listChannelModerators_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModerators' {Text
channelArn :: Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
channelArn} -> Text
channelArn) (\s :: ListChannelModerators
s@ListChannelModerators' {} Text
a -> ListChannelModerators
s {$sel:channelArn:ListChannelModerators' :: Text
channelArn = Text
a} :: ListChannelModerators)

instance Core.AWSRequest ListChannelModerators where
  type
    AWSResponse ListChannelModerators =
      ListChannelModeratorsResponse
  request :: (Service -> Service)
-> ListChannelModerators -> Request ListChannelModerators
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 ListChannelModerators
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListChannelModerators)))
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 Text
-> Maybe [ChannelModeratorSummary]
-> Maybe (Sensitive Text)
-> Int
-> ListChannelModeratorsResponse
ListChannelModeratorsResponse'
            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
"ChannelArn")
            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
"ChannelModerators"
                            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 ListChannelModerators where
  hashWithSalt :: Int -> ListChannelModerators -> Int
hashWithSalt Int
_salt ListChannelModerators' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
$sel:chimeBearer:ListChannelModerators' :: ListChannelModerators -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
chimeBearer
      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` Text
channelArn

instance Prelude.NFData ListChannelModerators where
  rnf :: ListChannelModerators -> ()
rnf ListChannelModerators' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
$sel:chimeBearer:ListChannelModerators' :: ListChannelModerators -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
chimeBearer
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
channelArn

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

instance Data.ToPath ListChannelModerators where
  toPath :: ListChannelModerators -> ByteString
toPath ListChannelModerators' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
$sel:chimeBearer:ListChannelModerators' :: ListChannelModerators -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/channels/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
channelArn, ByteString
"/moderators"]

instance Data.ToQuery ListChannelModerators where
  toQuery :: ListChannelModerators -> QueryString
toQuery ListChannelModerators' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
nextToken :: Maybe (Sensitive Text)
maxResults :: Maybe Natural
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
$sel:chimeBearer:ListChannelModerators' :: ListChannelModerators -> Maybe Text
..} =
    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
      ]

-- | /See:/ 'newListChannelModeratorsResponse' smart constructor.
data ListChannelModeratorsResponse = ListChannelModeratorsResponse'
  { -- | The ARN of the channel.
    ListChannelModeratorsResponse -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
    -- | The information about and names of each moderator.
    ListChannelModeratorsResponse -> Maybe [ChannelModeratorSummary]
channelModerators :: Prelude.Maybe [ChannelModeratorSummary],
    -- | The token passed by previous API calls until all requested moderators
    -- are returned.
    ListChannelModeratorsResponse -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The response's http status code.
    ListChannelModeratorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
$c/= :: ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
== :: ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
$c== :: ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
Prelude.Eq, Int -> ListChannelModeratorsResponse -> ShowS
[ListChannelModeratorsResponse] -> ShowS
ListChannelModeratorsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListChannelModeratorsResponse] -> ShowS
$cshowList :: [ListChannelModeratorsResponse] -> ShowS
show :: ListChannelModeratorsResponse -> String
$cshow :: ListChannelModeratorsResponse -> String
showsPrec :: Int -> ListChannelModeratorsResponse -> ShowS
$cshowsPrec :: Int -> ListChannelModeratorsResponse -> ShowS
Prelude.Show, forall x.
Rep ListChannelModeratorsResponse x
-> ListChannelModeratorsResponse
forall x.
ListChannelModeratorsResponse
-> Rep ListChannelModeratorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListChannelModeratorsResponse x
-> ListChannelModeratorsResponse
$cfrom :: forall x.
ListChannelModeratorsResponse
-> Rep ListChannelModeratorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListChannelModeratorsResponse' 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:
--
-- 'channelArn', 'listChannelModeratorsResponse_channelArn' - The ARN of the channel.
--
-- 'channelModerators', 'listChannelModeratorsResponse_channelModerators' - The information about and names of each moderator.
--
-- 'nextToken', 'listChannelModeratorsResponse_nextToken' - The token passed by previous API calls until all requested moderators
-- are returned.
--
-- 'httpStatus', 'listChannelModeratorsResponse_httpStatus' - The response's http status code.
newListChannelModeratorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListChannelModeratorsResponse
newListChannelModeratorsResponse :: Int -> ListChannelModeratorsResponse
newListChannelModeratorsResponse Int
pHttpStatus_ =
  ListChannelModeratorsResponse'
    { $sel:channelArn:ListChannelModeratorsResponse' :: Maybe Text
channelArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:channelModerators:ListChannelModeratorsResponse' :: Maybe [ChannelModeratorSummary]
channelModerators = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelModeratorsResponse' :: Maybe (Sensitive Text)
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListChannelModeratorsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the channel.
listChannelModeratorsResponse_channelArn :: Lens.Lens' ListChannelModeratorsResponse (Prelude.Maybe Prelude.Text)
listChannelModeratorsResponse_channelArn :: Lens' ListChannelModeratorsResponse (Maybe Text)
listChannelModeratorsResponse_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModeratorsResponse' {Maybe Text
channelArn :: Maybe Text
$sel:channelArn:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe Text
channelArn} -> Maybe Text
channelArn) (\s :: ListChannelModeratorsResponse
s@ListChannelModeratorsResponse' {} Maybe Text
a -> ListChannelModeratorsResponse
s {$sel:channelArn:ListChannelModeratorsResponse' :: Maybe Text
channelArn = Maybe Text
a} :: ListChannelModeratorsResponse)

-- | The information about and names of each moderator.
listChannelModeratorsResponse_channelModerators :: Lens.Lens' ListChannelModeratorsResponse (Prelude.Maybe [ChannelModeratorSummary])
listChannelModeratorsResponse_channelModerators :: Lens'
  ListChannelModeratorsResponse (Maybe [ChannelModeratorSummary])
listChannelModeratorsResponse_channelModerators = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModeratorsResponse' {Maybe [ChannelModeratorSummary]
channelModerators :: Maybe [ChannelModeratorSummary]
$sel:channelModerators:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe [ChannelModeratorSummary]
channelModerators} -> Maybe [ChannelModeratorSummary]
channelModerators) (\s :: ListChannelModeratorsResponse
s@ListChannelModeratorsResponse' {} Maybe [ChannelModeratorSummary]
a -> ListChannelModeratorsResponse
s {$sel:channelModerators:ListChannelModeratorsResponse' :: Maybe [ChannelModeratorSummary]
channelModerators = Maybe [ChannelModeratorSummary]
a} :: ListChannelModeratorsResponse) 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 passed by previous API calls until all requested moderators
-- are returned.
listChannelModeratorsResponse_nextToken :: Lens.Lens' ListChannelModeratorsResponse (Prelude.Maybe Prelude.Text)
listChannelModeratorsResponse_nextToken :: Lens' ListChannelModeratorsResponse (Maybe Text)
listChannelModeratorsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModeratorsResponse' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannelModeratorsResponse
s@ListChannelModeratorsResponse' {} Maybe (Sensitive Text)
a -> ListChannelModeratorsResponse
s {$sel:nextToken:ListChannelModeratorsResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannelModeratorsResponse) 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.
listChannelModeratorsResponse_httpStatus :: Lens.Lens' ListChannelModeratorsResponse Prelude.Int
listChannelModeratorsResponse_httpStatus :: Lens' ListChannelModeratorsResponse Int
listChannelModeratorsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelModeratorsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListChannelModeratorsResponse
s@ListChannelModeratorsResponse' {} Int
a -> ListChannelModeratorsResponse
s {$sel:httpStatus:ListChannelModeratorsResponse' :: Int
httpStatus = Int
a} :: ListChannelModeratorsResponse)

instance Prelude.NFData ListChannelModeratorsResponse where
  rnf :: ListChannelModeratorsResponse -> ()
rnf ListChannelModeratorsResponse' {Int
Maybe [ChannelModeratorSummary]
Maybe Text
Maybe (Sensitive Text)
httpStatus :: Int
nextToken :: Maybe (Sensitive Text)
channelModerators :: Maybe [ChannelModeratorSummary]
channelArn :: Maybe Text
$sel:httpStatus:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Int
$sel:nextToken:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe (Sensitive Text)
$sel:channelModerators:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe [ChannelModeratorSummary]
$sel:channelArn:ListChannelModeratorsResponse' :: ListChannelModeratorsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ChannelModeratorSummary]
channelModerators
      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