{-# 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.ListChannelBans
-- 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 users banned from a particular 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.ListChannelBans
  ( -- * Creating a Request
    ListChannelBans (..),
    newListChannelBans,

    -- * Request Lenses
    listChannelBans_chimeBearer,
    listChannelBans_nextToken,
    listChannelBans_maxResults,
    listChannelBans_channelArn,

    -- * Destructuring the Response
    ListChannelBansResponse (..),
    newListChannelBansResponse,

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

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

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

-- | The token passed by previous API calls until all requested bans are
-- returned.
listChannelBans_nextToken :: Lens.Lens' ListChannelBans (Prelude.Maybe Prelude.Text)
listChannelBans_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListChannelBans -> f ListChannelBans
listChannelBans_nextToken = (ListChannelBans -> Maybe (Sensitive Text))
-> (ListChannelBans -> Maybe (Sensitive Text) -> ListChannelBans)
-> Lens
     ListChannelBans
     ListChannelBans
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelBans' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannelBans' :: ListChannelBans -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannelBans
s@ListChannelBans' {} Maybe (Sensitive Text)
a -> ListChannelBans
s {$sel:nextToken:ListChannelBans' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannelBans) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ListChannelBans -> f ListChannelBans)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ListChannelBans
-> f ListChannelBans
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 bans that you want returned.
listChannelBans_maxResults :: Lens.Lens' ListChannelBans (Prelude.Maybe Prelude.Natural)
listChannelBans_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListChannelBans -> f ListChannelBans
listChannelBans_maxResults = (ListChannelBans -> Maybe Natural)
-> (ListChannelBans -> Maybe Natural -> ListChannelBans)
-> Lens
     ListChannelBans ListChannelBans (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelBans' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListChannelBans' :: ListChannelBans -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListChannelBans
s@ListChannelBans' {} Maybe Natural
a -> ListChannelBans
s {$sel:maxResults:ListChannelBans' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListChannelBans)

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

instance Core.AWSRequest ListChannelBans where
  type
    AWSResponse ListChannelBans =
      ListChannelBansResponse
  request :: ListChannelBans -> Request ListChannelBans
request = Service -> ListChannelBans -> Request ListChannelBans
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListChannelBans
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListChannelBans)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListChannelBans))
-> Logger
-> Service
-> Proxy ListChannelBans
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListChannelBans)))
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 [ChannelBanSummary]
-> Int
-> ListChannelBansResponse
ListChannelBansResponse'
            (Maybe Text
 -> Maybe (Sensitive Text)
 -> Maybe [ChannelBanSummary]
 -> Int
 -> ListChannelBansResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe [ChannelBanSummary] -> Int -> ListChannelBansResponse)
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 [ChannelBanSummary] -> Int -> ListChannelBansResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe [ChannelBanSummary] -> Int -> ListChannelBansResponse)
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 [ChannelBanSummary] -> Int -> ListChannelBansResponse)
-> Either String (Maybe [ChannelBanSummary])
-> Either String (Int -> ListChannelBansResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [ChannelBanSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelBans" Either String (Maybe (Maybe [ChannelBanSummary]))
-> Maybe [ChannelBanSummary]
-> Either String (Maybe [ChannelBanSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ChannelBanSummary]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ListChannelBansResponse)
-> Either String Int -> Either String ListChannelBansResponse
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 ListChannelBans

instance Prelude.NFData ListChannelBans

instance Core.ToHeaders ListChannelBans where
  toHeaders :: ListChannelBans -> ResponseHeaders
toHeaders ListChannelBans' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe (Sensitive Text)
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelBans' :: ListChannelBans -> Text
$sel:maxResults:ListChannelBans' :: ListChannelBans -> Maybe Natural
$sel:nextToken:ListChannelBans' :: ListChannelBans -> Maybe (Sensitive Text)
$sel:chimeBearer:ListChannelBans' :: ListChannelBans -> 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 ListChannelBans where
  toPath :: ListChannelBans -> ByteString
toPath ListChannelBans' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe (Sensitive Text)
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelBans' :: ListChannelBans -> Text
$sel:maxResults:ListChannelBans' :: ListChannelBans -> Maybe Natural
$sel:nextToken:ListChannelBans' :: ListChannelBans -> Maybe (Sensitive Text)
$sel:chimeBearer:ListChannelBans' :: ListChannelBans -> 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
"/bans"]

instance Core.ToQuery ListChannelBans where
  toQuery :: ListChannelBans -> QueryString
toQuery ListChannelBans' {Maybe Natural
Maybe Text
Maybe (Sensitive Text)
Text
channelArn :: Text
maxResults :: Maybe Natural
nextToken :: Maybe (Sensitive Text)
chimeBearer :: Maybe Text
$sel:channelArn:ListChannelBans' :: ListChannelBans -> Text
$sel:maxResults:ListChannelBans' :: ListChannelBans -> Maybe Natural
$sel:nextToken:ListChannelBans' :: ListChannelBans -> Maybe (Sensitive Text)
$sel:chimeBearer:ListChannelBans' :: ListChannelBans -> 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:/ 'newListChannelBansResponse' smart constructor.
data ListChannelBansResponse = ListChannelBansResponse'
  { -- | The ARN of the channel.
    ListChannelBansResponse -> Maybe Text
channelArn :: Prelude.Maybe Prelude.Text,
    -- | The token passed by previous API calls until all requested bans are
    -- returned.
    ListChannelBansResponse -> Maybe (Sensitive Text)
nextToken :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The information for each requested ban.
    ListChannelBansResponse -> Maybe [ChannelBanSummary]
channelBans :: Prelude.Maybe [ChannelBanSummary],
    -- | The response's http status code.
    ListChannelBansResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListChannelBansResponse -> ListChannelBansResponse -> Bool
(ListChannelBansResponse -> ListChannelBansResponse -> Bool)
-> (ListChannelBansResponse -> ListChannelBansResponse -> Bool)
-> Eq ListChannelBansResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListChannelBansResponse -> ListChannelBansResponse -> Bool
$c/= :: ListChannelBansResponse -> ListChannelBansResponse -> Bool
== :: ListChannelBansResponse -> ListChannelBansResponse -> Bool
$c== :: ListChannelBansResponse -> ListChannelBansResponse -> Bool
Prelude.Eq, Int -> ListChannelBansResponse -> ShowS
[ListChannelBansResponse] -> ShowS
ListChannelBansResponse -> String
(Int -> ListChannelBansResponse -> ShowS)
-> (ListChannelBansResponse -> String)
-> ([ListChannelBansResponse] -> ShowS)
-> Show ListChannelBansResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListChannelBansResponse] -> ShowS
$cshowList :: [ListChannelBansResponse] -> ShowS
show :: ListChannelBansResponse -> String
$cshow :: ListChannelBansResponse -> String
showsPrec :: Int -> ListChannelBansResponse -> ShowS
$cshowsPrec :: Int -> ListChannelBansResponse -> ShowS
Prelude.Show, (forall x.
 ListChannelBansResponse -> Rep ListChannelBansResponse x)
-> (forall x.
    Rep ListChannelBansResponse x -> ListChannelBansResponse)
-> Generic ListChannelBansResponse
forall x. Rep ListChannelBansResponse x -> ListChannelBansResponse
forall x. ListChannelBansResponse -> Rep ListChannelBansResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListChannelBansResponse x -> ListChannelBansResponse
$cfrom :: forall x. ListChannelBansResponse -> Rep ListChannelBansResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListChannelBansResponse' 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', 'listChannelBansResponse_channelArn' - The ARN of the channel.
--
-- 'nextToken', 'listChannelBansResponse_nextToken' - The token passed by previous API calls until all requested bans are
-- returned.
--
-- 'channelBans', 'listChannelBansResponse_channelBans' - The information for each requested ban.
--
-- 'httpStatus', 'listChannelBansResponse_httpStatus' - The response's http status code.
newListChannelBansResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListChannelBansResponse
newListChannelBansResponse :: Int -> ListChannelBansResponse
newListChannelBansResponse Int
pHttpStatus_ =
  ListChannelBansResponse' :: Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [ChannelBanSummary]
-> Int
-> ListChannelBansResponse
ListChannelBansResponse'
    { $sel:channelArn:ListChannelBansResponse' :: Maybe Text
channelArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelBansResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:channelBans:ListChannelBansResponse' :: Maybe [ChannelBanSummary]
channelBans = Maybe [ChannelBanSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListChannelBansResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The token passed by previous API calls until all requested bans are
-- returned.
listChannelBansResponse_nextToken :: Lens.Lens' ListChannelBansResponse (Prelude.Maybe Prelude.Text)
listChannelBansResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListChannelBansResponse -> f ListChannelBansResponse
listChannelBansResponse_nextToken = (ListChannelBansResponse -> Maybe (Sensitive Text))
-> (ListChannelBansResponse
    -> Maybe (Sensitive Text) -> ListChannelBansResponse)
-> Lens
     ListChannelBansResponse
     ListChannelBansResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelBansResponse' {Maybe (Sensitive Text)
nextToken :: Maybe (Sensitive Text)
$sel:nextToken:ListChannelBansResponse' :: ListChannelBansResponse -> Maybe (Sensitive Text)
nextToken} -> Maybe (Sensitive Text)
nextToken) (\s :: ListChannelBansResponse
s@ListChannelBansResponse' {} Maybe (Sensitive Text)
a -> ListChannelBansResponse
s {$sel:nextToken:ListChannelBansResponse' :: Maybe (Sensitive Text)
nextToken = Maybe (Sensitive Text)
a} :: ListChannelBansResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> ListChannelBansResponse -> f ListChannelBansResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> ListChannelBansResponse
-> f ListChannelBansResponse
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 for each requested ban.
listChannelBansResponse_channelBans :: Lens.Lens' ListChannelBansResponse (Prelude.Maybe [ChannelBanSummary])
listChannelBansResponse_channelBans :: (Maybe [ChannelBanSummary] -> f (Maybe [ChannelBanSummary]))
-> ListChannelBansResponse -> f ListChannelBansResponse
listChannelBansResponse_channelBans = (ListChannelBansResponse -> Maybe [ChannelBanSummary])
-> (ListChannelBansResponse
    -> Maybe [ChannelBanSummary] -> ListChannelBansResponse)
-> Lens
     ListChannelBansResponse
     ListChannelBansResponse
     (Maybe [ChannelBanSummary])
     (Maybe [ChannelBanSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelBansResponse' {Maybe [ChannelBanSummary]
channelBans :: Maybe [ChannelBanSummary]
$sel:channelBans:ListChannelBansResponse' :: ListChannelBansResponse -> Maybe [ChannelBanSummary]
channelBans} -> Maybe [ChannelBanSummary]
channelBans) (\s :: ListChannelBansResponse
s@ListChannelBansResponse' {} Maybe [ChannelBanSummary]
a -> ListChannelBansResponse
s {$sel:channelBans:ListChannelBansResponse' :: Maybe [ChannelBanSummary]
channelBans = Maybe [ChannelBanSummary]
a} :: ListChannelBansResponse) ((Maybe [ChannelBanSummary] -> f (Maybe [ChannelBanSummary]))
 -> ListChannelBansResponse -> f ListChannelBansResponse)
-> ((Maybe [ChannelBanSummary] -> f (Maybe [ChannelBanSummary]))
    -> Maybe [ChannelBanSummary] -> f (Maybe [ChannelBanSummary]))
-> (Maybe [ChannelBanSummary] -> f (Maybe [ChannelBanSummary]))
-> ListChannelBansResponse
-> f ListChannelBansResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ChannelBanSummary]
  [ChannelBanSummary]
  [ChannelBanSummary]
  [ChannelBanSummary]
-> Iso
     (Maybe [ChannelBanSummary])
     (Maybe [ChannelBanSummary])
     (Maybe [ChannelBanSummary])
     (Maybe [ChannelBanSummary])
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
  [ChannelBanSummary]
  [ChannelBanSummary]
  [ChannelBanSummary]
  [ChannelBanSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListChannelBansResponse