{-# 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.MediaPackage.ListChannels
-- 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)
--
-- Returns a collection of Channels.
--
-- This operation returns paginated results.
module Amazonka.MediaPackage.ListChannels
  ( -- * Creating a Request
    ListChannels (..),
    newListChannels,

    -- * Request Lenses
    listChannels_nextToken,
    listChannels_maxResults,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types
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'
  { -- | A token used to resume pagination from the end of a previous request.
    ListChannels -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Upper bound on number of records to return.
    ListChannels -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListChannels -> ListChannels -> Bool
(ListChannels -> ListChannels -> Bool)
-> (ListChannels -> ListChannels -> Bool) -> Eq ListChannels
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, ReadPrec [ListChannels]
ReadPrec ListChannels
Int -> ReadS ListChannels
ReadS [ListChannels]
(Int -> ReadS ListChannels)
-> ReadS [ListChannels]
-> ReadPrec ListChannels
-> ReadPrec [ListChannels]
-> Read ListChannels
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListChannels]
$creadListPrec :: ReadPrec [ListChannels]
readPrec :: ReadPrec ListChannels
$creadPrec :: ReadPrec ListChannels
readList :: ReadS [ListChannels]
$creadList :: ReadS [ListChannels]
readsPrec :: Int -> ReadS ListChannels
$creadsPrec :: Int -> ReadS ListChannels
Prelude.Read, Int -> ListChannels -> ShowS
[ListChannels] -> ShowS
ListChannels -> String
(Int -> ListChannels -> ShowS)
-> (ListChannels -> String)
-> ([ListChannels] -> ShowS)
-> Show ListChannels
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. ListChannels -> Rep ListChannels x)
-> (forall x. Rep ListChannels x -> ListChannels)
-> Generic ListChannels
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:
--
-- 'nextToken', 'listChannels_nextToken' - A token used to resume pagination from the end of a previous request.
--
-- 'maxResults', 'listChannels_maxResults' - Upper bound on number of records to return.
newListChannels ::
  ListChannels
newListChannels :: ListChannels
newListChannels =
  ListChannels' :: Maybe Text -> Maybe Natural -> ListChannels
ListChannels'
    { $sel:nextToken:ListChannels' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListChannels' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A token used to resume pagination from the end of a previous request.
listChannels_nextToken :: Lens.Lens' ListChannels (Prelude.Maybe Prelude.Text)
listChannels_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListChannels -> f ListChannels
listChannels_nextToken = (ListChannels -> Maybe Text)
-> (ListChannels -> Maybe Text -> ListChannels)
-> Lens ListChannels ListChannels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannels' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListChannels' :: ListChannels -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListChannels
s@ListChannels' {} Maybe Text
a -> ListChannels
s {$sel:nextToken:ListChannels' :: Maybe Text
nextToken = Maybe Text
a} :: ListChannels)

-- | Upper bound on number of records to return.
listChannels_maxResults :: Lens.Lens' ListChannels (Prelude.Maybe Prelude.Natural)
listChannels_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListChannels -> f ListChannels
listChannels_maxResults = (ListChannels -> Maybe Natural)
-> (ListChannels -> Maybe Natural -> ListChannels)
-> Lens ListChannels ListChannels (Maybe Natural) (Maybe Natural)
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)

instance Core.AWSPager ListChannels where
  page :: ListChannels -> AWSResponse ListChannels -> Maybe ListChannels
page ListChannels
rq AWSResponse ListChannels
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListChannels
ListChannelsResponse
rs
            ListChannelsResponse
-> Getting (First Text) ListChannelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListChannelsResponse -> Const (First Text) ListChannelsResponse
Lens' ListChannelsResponse (Maybe Text)
listChannelsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListChannelsResponse -> Const (First Text) ListChannelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListChannelsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListChannels
forall a. Maybe a
Prelude.Nothing
    | Maybe [Channel] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListChannels
ListChannelsResponse
rs
            ListChannelsResponse
-> Getting (First [Channel]) ListChannelsResponse [Channel]
-> Maybe [Channel]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Channel] -> Const (First [Channel]) (Maybe [Channel]))
-> ListChannelsResponse
-> Const (First [Channel]) ListChannelsResponse
Lens' ListChannelsResponse (Maybe [Channel])
listChannelsResponse_channels ((Maybe [Channel] -> Const (First [Channel]) (Maybe [Channel]))
 -> ListChannelsResponse
 -> Const (First [Channel]) ListChannelsResponse)
-> (([Channel] -> Const (First [Channel]) [Channel])
    -> Maybe [Channel] -> Const (First [Channel]) (Maybe [Channel]))
-> Getting (First [Channel]) ListChannelsResponse [Channel]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Channel] -> Const (First [Channel]) [Channel])
-> Maybe [Channel] -> Const (First [Channel]) (Maybe [Channel])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListChannels
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListChannels -> Maybe ListChannels
forall a. a -> Maybe a
Prelude.Just (ListChannels -> Maybe ListChannels)
-> ListChannels -> Maybe ListChannels
forall a b. (a -> b) -> a -> b
Prelude.$
        ListChannels
rq
          ListChannels -> (ListChannels -> ListChannels) -> ListChannels
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListChannels -> Identity ListChannels
Lens ListChannels ListChannels (Maybe Text) (Maybe Text)
listChannels_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListChannels -> Identity ListChannels)
-> Maybe Text -> ListChannels -> ListChannels
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListChannels
ListChannelsResponse
rs
          ListChannelsResponse
-> Getting (First Text) ListChannelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListChannelsResponse -> Const (First Text) ListChannelsResponse
Lens' ListChannelsResponse (Maybe Text)
listChannelsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListChannelsResponse -> Const (First Text) ListChannelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListChannelsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData ListChannels

instance Core.ToHeaders ListChannels where
  toHeaders :: ListChannels -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListChannels -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

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

instance Core.ToQuery ListChannels where
  toQuery :: ListChannels -> QueryString
toQuery ListChannels' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListChannels' :: ListChannels -> Maybe Natural
$sel:nextToken:ListChannels' :: ListChannels -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListChannelsResponse' smart constructor.
data ListChannelsResponse = ListChannelsResponse'
  { -- | A list of Channel records.
    ListChannelsResponse -> Maybe [Channel]
channels :: Prelude.Maybe [Channel],
    -- | A token that can be used to resume pagination from the end of the
    -- collection.
    ListChannelsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListChannelsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListChannelsResponse -> ListChannelsResponse -> Bool
(ListChannelsResponse -> ListChannelsResponse -> Bool)
-> (ListChannelsResponse -> ListChannelsResponse -> Bool)
-> Eq ListChannelsResponse
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, ReadPrec [ListChannelsResponse]
ReadPrec ListChannelsResponse
Int -> ReadS ListChannelsResponse
ReadS [ListChannelsResponse]
(Int -> ReadS ListChannelsResponse)
-> ReadS [ListChannelsResponse]
-> ReadPrec ListChannelsResponse
-> ReadPrec [ListChannelsResponse]
-> Read ListChannelsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListChannelsResponse]
$creadListPrec :: ReadPrec [ListChannelsResponse]
readPrec :: ReadPrec ListChannelsResponse
$creadPrec :: ReadPrec ListChannelsResponse
readList :: ReadS [ListChannelsResponse]
$creadList :: ReadS [ListChannelsResponse]
readsPrec :: Int -> ReadS ListChannelsResponse
$creadsPrec :: Int -> ReadS ListChannelsResponse
Prelude.Read, Int -> ListChannelsResponse -> ShowS
[ListChannelsResponse] -> ShowS
ListChannelsResponse -> String
(Int -> ListChannelsResponse -> ShowS)
-> (ListChannelsResponse -> String)
-> ([ListChannelsResponse] -> ShowS)
-> Show ListChannelsResponse
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. ListChannelsResponse -> Rep ListChannelsResponse x)
-> (forall x. Rep ListChannelsResponse x -> ListChannelsResponse)
-> Generic ListChannelsResponse
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' - A list of Channel records.
--
-- 'nextToken', 'listChannelsResponse_nextToken' - A token that can be used to resume pagination from the end of the
-- collection.
--
-- 'httpStatus', 'listChannelsResponse_httpStatus' - The response's http status code.
newListChannelsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListChannelsResponse
newListChannelsResponse :: Int -> ListChannelsResponse
newListChannelsResponse Int
pHttpStatus_ =
  ListChannelsResponse' :: Maybe [Channel] -> Maybe Text -> Int -> ListChannelsResponse
ListChannelsResponse'
    { $sel:channels:ListChannelsResponse' :: Maybe [Channel]
channels = Maybe [Channel]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListChannelsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListChannelsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of Channel records.
listChannelsResponse_channels :: Lens.Lens' ListChannelsResponse (Prelude.Maybe [Channel])
listChannelsResponse_channels :: (Maybe [Channel] -> f (Maybe [Channel]))
-> ListChannelsResponse -> f ListChannelsResponse
listChannelsResponse_channels = (ListChannelsResponse -> Maybe [Channel])
-> (ListChannelsResponse
    -> Maybe [Channel] -> ListChannelsResponse)
-> Lens' ListChannelsResponse (Maybe [Channel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelsResponse' {Maybe [Channel]
channels :: Maybe [Channel]
$sel:channels:ListChannelsResponse' :: ListChannelsResponse -> Maybe [Channel]
channels} -> Maybe [Channel]
channels) (\s :: ListChannelsResponse
s@ListChannelsResponse' {} Maybe [Channel]
a -> ListChannelsResponse
s {$sel:channels:ListChannelsResponse' :: Maybe [Channel]
channels = Maybe [Channel]
a} :: ListChannelsResponse) ((Maybe [Channel] -> f (Maybe [Channel]))
 -> ListChannelsResponse -> f ListChannelsResponse)
-> ((Maybe [Channel] -> f (Maybe [Channel]))
    -> Maybe [Channel] -> f (Maybe [Channel]))
-> (Maybe [Channel] -> f (Maybe [Channel]))
-> ListChannelsResponse
-> f ListChannelsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Channel] [Channel] [Channel] [Channel]
-> Iso
     (Maybe [Channel])
     (Maybe [Channel])
     (Maybe [Channel])
     (Maybe [Channel])
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 [Channel] [Channel] [Channel] [Channel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token that can be used to resume pagination from the end of the
-- collection.
listChannelsResponse_nextToken :: Lens.Lens' ListChannelsResponse (Prelude.Maybe Prelude.Text)
listChannelsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListChannelsResponse -> f ListChannelsResponse
listChannelsResponse_nextToken = (ListChannelsResponse -> Maybe Text)
-> (ListChannelsResponse -> Maybe Text -> ListChannelsResponse)
-> Lens' ListChannelsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListChannelsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListChannelsResponse' :: ListChannelsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListChannelsResponse
s@ListChannelsResponse' {} Maybe Text
a -> ListChannelsResponse
s {$sel:nextToken:ListChannelsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListChannelsResponse)

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