{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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_nextToken,
    listChannelModerators_maxResults,
    listChannelModerators_channelArn,

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

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

import Amazonka.Chime.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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 token passed by previous API calls until all requested moderators
    -- are returned.
    ListChannelModerators -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The maximum number of moderators that you want returned.
    ListChannelModerators -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ARN of the channel.
    ListChannelModerators -> Text
channelArn :: Prelude.Text
  }
  deriving (ListChannelModerators -> ListChannelModerators -> Bool
(ListChannelModerators -> ListChannelModerators -> Bool)
-> (ListChannelModerators -> ListChannelModerators -> Bool)
-> Eq ListChannelModerators
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
(Int -> ListChannelModerators -> ShowS)
-> (ListChannelModerators -> String)
-> ([ListChannelModerators] -> ShowS)
-> Show ListChannelModerators
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. ListChannelModerators -> Rep ListChannelModerators x)
-> (forall x. Rep ListChannelModerators x -> ListChannelModerators)
-> Generic ListChannelModerators
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.
--
-- 'nextToken', 'listChannelModerators_nextToken' - The token passed by previous API calls until all requested moderators
-- are returned.
--
-- 'maxResults', 'listChannelModerators_maxResults' - The maximum number of moderators that you want returned.
--
-- 'channelArn', 'listChannelModerators_channelArn' - The ARN of the channel.
newListChannelModerators ::
  -- | 'channelArn'
  Prelude.Text ->
  ListChannelModerators
newListChannelModerators :: Text -> ListChannelModerators
newListChannelModerators Text
pChannelArn_ =
  ListChannelModerators' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe Natural
-> Text
-> ListChannelModerators
ListChannelModerators'
    { $sel:chimeBearer:ListChannelModerators' :: Maybe Text
chimeBearer =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelModerators' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListChannelModerators' :: Maybe Natural
maxResults = Maybe Natural
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 :: (Maybe Text -> f (Maybe Text))
-> ListChannelModerators -> f ListChannelModerators
listChannelModerators_chimeBearer = (ListChannelModerators -> Maybe Text)
-> (ListChannelModerators -> Maybe Text -> ListChannelModerators)
-> Lens
     ListChannelModerators
     ListChannelModerators
     (Maybe Text)
     (Maybe Text)
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 token passed by previous API calls until all requested moderators
-- are returned.
listChannelModerators_nextToken :: Lens.Lens' ListChannelModerators (Prelude.Maybe Prelude.Text)
listChannelModerators_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListChannelModerators -> f ListChannelModerators
listChannelModerators_nextToken = (ListChannelModerators -> Maybe (Sensitive Text))
-> (ListChannelModerators
    -> Maybe (Sensitive Text) -> ListChannelModerators)
-> Lens
     ListChannelModerators
     ListChannelModerators
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ListChannelModerators -> f ListChannelModerators)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ListChannelModerators
-> f ListChannelModerators
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The maximum number of moderators that you want returned.
listChannelModerators_maxResults :: Lens.Lens' ListChannelModerators (Prelude.Maybe Prelude.Natural)
listChannelModerators_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListChannelModerators -> f ListChannelModerators
listChannelModerators_maxResults = (ListChannelModerators -> Maybe Natural)
-> (ListChannelModerators
    -> Maybe Natural -> ListChannelModerators)
-> Lens
     ListChannelModerators
     ListChannelModerators
     (Maybe Natural)
     (Maybe Natural)
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 ARN of the channel.
listChannelModerators_channelArn :: Lens.Lens' ListChannelModerators Prelude.Text
listChannelModerators_channelArn :: (Text -> f Text)
-> ListChannelModerators -> f ListChannelModerators
listChannelModerators_channelArn = (ListChannelModerators -> Text)
-> (ListChannelModerators -> Text -> ListChannelModerators)
-> Lens ListChannelModerators ListChannelModerators Text Text
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 :: ListChannelModerators -> Request ListChannelModerators
request = Service -> ListChannelModerators -> Request ListChannelModerators
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListChannelModerators
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListChannelModerators)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListChannelModerators))
-> Logger
-> Service
-> Proxy ListChannelModerators
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListChannelModerators)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [ChannelModeratorSummary]
-> Int
-> ListChannelModeratorsResponse
ListChannelModeratorsResponse'
            (Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe [ChannelModeratorSummary]
 -> Int
 -> ListChannelModeratorsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe [ChannelModeratorSummary]
      -> Int
      -> ListChannelModeratorsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelArn")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe [ChannelModeratorSummary]
   -> Int
   -> ListChannelModeratorsResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe [ChannelModeratorSummary]
      -> Int -> ListChannelModeratorsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [ChannelModeratorSummary]
   -> Int -> ListChannelModeratorsResponse)
-> Either String (Maybe [ChannelModeratorSummary])
-> Either String (Int -> ListChannelModeratorsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ChannelModeratorSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelModerators"
                            Either String (Maybe (Maybe [ChannelModeratorSummary]))
-> Maybe [ChannelModeratorSummary]
-> Either String (Maybe [ChannelModeratorSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ChannelModeratorSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListChannelModeratorsResponse)
-> Either String Int -> Either String ListChannelModeratorsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
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 ListChannelModerators

instance Prelude.NFData ListChannelModerators

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

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

instance Core.ToQuery ListChannelModerators where
  toQuery :: ListChannelModerators -> QueryString
toQuery ListChannelModerators' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe (Sensitive Text)
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelModerators' :: ListChannelModerators -> Text
$sel:maxResults:ListChannelModerators' :: ListChannelModerators -> Maybe Natural
$sel:nextToken:ListChannelModerators' :: ListChannelModerators -> Maybe (Sensitive Text)
$sel:chimeBearer:ListChannelModerators' :: ListChannelModerators -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"next-token" ByteString -> Maybe (Sensitive Text) -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe (Sensitive Text)
nextToken,
        ByteString
"max-results" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListChannelModeratorsResponse' smart constructor.
data ListChannelModeratorsResponse = ListChannelModeratorsResponse'
  { -- | The ARN of the channel.
    ListChannelModeratorsResponse -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
    -- | The token passed by previous API calls until all requested moderators
    -- are returned.
    ListChannelModeratorsResponse -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The information about and names of each moderator.
    ListChannelModeratorsResponse -> Maybe [ChannelModeratorSummary]
channelModerators :: Prelude.Maybe [ChannelModeratorSummary],
    -- | The response's http status code.
    ListChannelModeratorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListChannelModeratorsResponse
-> ListChannelModeratorsResponse -> Bool
(ListChannelModeratorsResponse
 -> ListChannelModeratorsResponse -> Bool)
-> (ListChannelModeratorsResponse
    -> ListChannelModeratorsResponse -> Bool)
-> Eq ListChannelModeratorsResponse
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
(Int -> ListChannelModeratorsResponse -> ShowS)
-> (ListChannelModeratorsResponse -> String)
-> ([ListChannelModeratorsResponse] -> ShowS)
-> Show ListChannelModeratorsResponse
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.
 ListChannelModeratorsResponse
 -> Rep ListChannelModeratorsResponse x)
-> (forall x.
    Rep ListChannelModeratorsResponse x
    -> ListChannelModeratorsResponse)
-> Generic ListChannelModeratorsResponse
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.
--
-- 'nextToken', 'listChannelModeratorsResponse_nextToken' - The token passed by previous API calls until all requested moderators
-- are returned.
--
-- 'channelModerators', 'listChannelModeratorsResponse_channelModerators' - The information about and names of each moderator.
--
-- 'httpStatus', 'listChannelModeratorsResponse_httpStatus' - The response's http status code.
newListChannelModeratorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListChannelModeratorsResponse
newListChannelModeratorsResponse :: Int -> ListChannelModeratorsResponse
newListChannelModeratorsResponse Int
pHttpStatus_ =
  ListChannelModeratorsResponse' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [ChannelModeratorSummary]
-> Int
-> ListChannelModeratorsResponse
ListChannelModeratorsResponse'
    { $sel:channelArn:ListChannelModeratorsResponse' :: Maybe Text
channelArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelModeratorsResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:channelModerators:ListChannelModeratorsResponse' :: Maybe [ChannelModeratorSummary]
channelModerators = Maybe [ChannelModeratorSummary]
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 :: (Maybe Text -> f (Maybe Text))
-> ListChannelModeratorsResponse -> f ListChannelModeratorsResponse
listChannelModeratorsResponse_channelArn = (ListChannelModeratorsResponse -> Maybe Text)
-> (ListChannelModeratorsResponse
    -> Maybe Text -> ListChannelModeratorsResponse)
-> Lens
     ListChannelModeratorsResponse
     ListChannelModeratorsResponse
     (Maybe Text)
     (Maybe Text)
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 token passed by previous API calls until all requested moderators
-- are returned.
listChannelModeratorsResponse_nextToken :: Lens.Lens' ListChannelModeratorsResponse (Prelude.Maybe Prelude.Text)
listChannelModeratorsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListChannelModeratorsResponse -> f ListChannelModeratorsResponse
listChannelModeratorsResponse_nextToken = (ListChannelModeratorsResponse -> Maybe (Sensitive Text))
-> (ListChannelModeratorsResponse
    -> Maybe (Sensitive Text) -> ListChannelModeratorsResponse)
-> Lens
     ListChannelModeratorsResponse
     ListChannelModeratorsResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ListChannelModeratorsResponse
 -> f ListChannelModeratorsResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ListChannelModeratorsResponse
-> f ListChannelModeratorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The information about and names of each moderator.
listChannelModeratorsResponse_channelModerators :: Lens.Lens' ListChannelModeratorsResponse (Prelude.Maybe [ChannelModeratorSummary])
listChannelModeratorsResponse_channelModerators :: (Maybe [ChannelModeratorSummary]
 -> f (Maybe [ChannelModeratorSummary]))
-> ListChannelModeratorsResponse -> f ListChannelModeratorsResponse
listChannelModeratorsResponse_channelModerators = (ListChannelModeratorsResponse -> Maybe [ChannelModeratorSummary])
-> (ListChannelModeratorsResponse
    -> Maybe [ChannelModeratorSummary]
    -> ListChannelModeratorsResponse)
-> Lens
     ListChannelModeratorsResponse
     ListChannelModeratorsResponse
     (Maybe [ChannelModeratorSummary])
     (Maybe [ChannelModeratorSummary])
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) ((Maybe [ChannelModeratorSummary]
  -> f (Maybe [ChannelModeratorSummary]))
 -> ListChannelModeratorsResponse
 -> f ListChannelModeratorsResponse)
-> ((Maybe [ChannelModeratorSummary]
     -> f (Maybe [ChannelModeratorSummary]))
    -> Maybe [ChannelModeratorSummary]
    -> f (Maybe [ChannelModeratorSummary]))
-> (Maybe [ChannelModeratorSummary]
    -> f (Maybe [ChannelModeratorSummary]))
-> ListChannelModeratorsResponse
-> f ListChannelModeratorsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
-> Iso
     (Maybe [ChannelModeratorSummary])
     (Maybe [ChannelModeratorSummary])
     (Maybe [ChannelModeratorSummary])
     (Maybe [ChannelModeratorSummary])
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 AnIso
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
  [ChannelModeratorSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listChannelModeratorsResponse_httpStatus :: Lens.Lens' ListChannelModeratorsResponse Prelude.Int
listChannelModeratorsResponse_httpStatus :: (Int -> f Int)
-> ListChannelModeratorsResponse -> f ListChannelModeratorsResponse
listChannelModeratorsResponse_httpStatus = (ListChannelModeratorsResponse -> Int)
-> (ListChannelModeratorsResponse
    -> Int -> ListChannelModeratorsResponse)
-> Lens
     ListChannelModeratorsResponse ListChannelModeratorsResponse Int Int
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