{-# 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.KinesisVideo.ListSignalingChannels
-- 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 an array of @ChannelInfo@ objects. Each object describes a
-- signaling channel. To retrieve only those channels that satisfy a
-- specific condition, you can specify a @ChannelNameCondition@.
--
-- This operation returns paginated results.
module Amazonka.KinesisVideo.ListSignalingChannels
  ( -- * Creating a Request
    ListSignalingChannels (..),
    newListSignalingChannels,

    -- * Request Lenses
    listSignalingChannels_channelNameCondition,
    listSignalingChannels_nextToken,
    listSignalingChannels_maxResults,

    -- * Destructuring the Response
    ListSignalingChannelsResponse (..),
    newListSignalingChannelsResponse,

    -- * Response Lenses
    listSignalingChannelsResponse_channelInfoList,
    listSignalingChannelsResponse_nextToken,
    listSignalingChannelsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisVideo.Types
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:/ 'newListSignalingChannels' smart constructor.
data ListSignalingChannels = ListSignalingChannels'
  { -- | Optional: Returns only the channels that satisfy a specific condition.
    ListSignalingChannels -> Maybe ChannelNameCondition
channelNameCondition :: Prelude.Maybe ChannelNameCondition,
    -- | If you specify this parameter, when the result of a
    -- @ListSignalingChannels@ operation is truncated, the call returns the
    -- @NextToken@ in the response. To get another batch of channels, provide
    -- this token in your next request.
    ListSignalingChannels -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of channels to return in the response. The default is
    -- 500.
    ListSignalingChannels -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListSignalingChannels -> ListSignalingChannels -> Bool
(ListSignalingChannels -> ListSignalingChannels -> Bool)
-> (ListSignalingChannels -> ListSignalingChannels -> Bool)
-> Eq ListSignalingChannels
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSignalingChannels -> ListSignalingChannels -> Bool
$c/= :: ListSignalingChannels -> ListSignalingChannels -> Bool
== :: ListSignalingChannels -> ListSignalingChannels -> Bool
$c== :: ListSignalingChannels -> ListSignalingChannels -> Bool
Prelude.Eq, ReadPrec [ListSignalingChannels]
ReadPrec ListSignalingChannels
Int -> ReadS ListSignalingChannels
ReadS [ListSignalingChannels]
(Int -> ReadS ListSignalingChannels)
-> ReadS [ListSignalingChannels]
-> ReadPrec ListSignalingChannels
-> ReadPrec [ListSignalingChannels]
-> Read ListSignalingChannels
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSignalingChannels]
$creadListPrec :: ReadPrec [ListSignalingChannels]
readPrec :: ReadPrec ListSignalingChannels
$creadPrec :: ReadPrec ListSignalingChannels
readList :: ReadS [ListSignalingChannels]
$creadList :: ReadS [ListSignalingChannels]
readsPrec :: Int -> ReadS ListSignalingChannels
$creadsPrec :: Int -> ReadS ListSignalingChannels
Prelude.Read, Int -> ListSignalingChannels -> ShowS
[ListSignalingChannels] -> ShowS
ListSignalingChannels -> String
(Int -> ListSignalingChannels -> ShowS)
-> (ListSignalingChannels -> String)
-> ([ListSignalingChannels] -> ShowS)
-> Show ListSignalingChannels
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSignalingChannels] -> ShowS
$cshowList :: [ListSignalingChannels] -> ShowS
show :: ListSignalingChannels -> String
$cshow :: ListSignalingChannels -> String
showsPrec :: Int -> ListSignalingChannels -> ShowS
$cshowsPrec :: Int -> ListSignalingChannels -> ShowS
Prelude.Show, (forall x. ListSignalingChannels -> Rep ListSignalingChannels x)
-> (forall x. Rep ListSignalingChannels x -> ListSignalingChannels)
-> Generic ListSignalingChannels
forall x. Rep ListSignalingChannels x -> ListSignalingChannels
forall x. ListSignalingChannels -> Rep ListSignalingChannels x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSignalingChannels x -> ListSignalingChannels
$cfrom :: forall x. ListSignalingChannels -> Rep ListSignalingChannels x
Prelude.Generic)

-- |
-- Create a value of 'ListSignalingChannels' 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:
--
-- 'channelNameCondition', 'listSignalingChannels_channelNameCondition' - Optional: Returns only the channels that satisfy a specific condition.
--
-- 'nextToken', 'listSignalingChannels_nextToken' - If you specify this parameter, when the result of a
-- @ListSignalingChannels@ operation is truncated, the call returns the
-- @NextToken@ in the response. To get another batch of channels, provide
-- this token in your next request.
--
-- 'maxResults', 'listSignalingChannels_maxResults' - The maximum number of channels to return in the response. The default is
-- 500.
newListSignalingChannels ::
  ListSignalingChannels
newListSignalingChannels :: ListSignalingChannels
newListSignalingChannels =
  ListSignalingChannels' :: Maybe ChannelNameCondition
-> Maybe Text -> Maybe Natural -> ListSignalingChannels
ListSignalingChannels'
    { $sel:channelNameCondition:ListSignalingChannels' :: Maybe ChannelNameCondition
channelNameCondition =
        Maybe ChannelNameCondition
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSignalingChannels' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSignalingChannels' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | Optional: Returns only the channels that satisfy a specific condition.
listSignalingChannels_channelNameCondition :: Lens.Lens' ListSignalingChannels (Prelude.Maybe ChannelNameCondition)
listSignalingChannels_channelNameCondition :: (Maybe ChannelNameCondition -> f (Maybe ChannelNameCondition))
-> ListSignalingChannels -> f ListSignalingChannels
listSignalingChannels_channelNameCondition = (ListSignalingChannels -> Maybe ChannelNameCondition)
-> (ListSignalingChannels
    -> Maybe ChannelNameCondition -> ListSignalingChannels)
-> Lens
     ListSignalingChannels
     ListSignalingChannels
     (Maybe ChannelNameCondition)
     (Maybe ChannelNameCondition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSignalingChannels' {Maybe ChannelNameCondition
channelNameCondition :: Maybe ChannelNameCondition
$sel:channelNameCondition:ListSignalingChannels' :: ListSignalingChannels -> Maybe ChannelNameCondition
channelNameCondition} -> Maybe ChannelNameCondition
channelNameCondition) (\s :: ListSignalingChannels
s@ListSignalingChannels' {} Maybe ChannelNameCondition
a -> ListSignalingChannels
s {$sel:channelNameCondition:ListSignalingChannels' :: Maybe ChannelNameCondition
channelNameCondition = Maybe ChannelNameCondition
a} :: ListSignalingChannels)

-- | If you specify this parameter, when the result of a
-- @ListSignalingChannels@ operation is truncated, the call returns the
-- @NextToken@ in the response. To get another batch of channels, provide
-- this token in your next request.
listSignalingChannels_nextToken :: Lens.Lens' ListSignalingChannels (Prelude.Maybe Prelude.Text)
listSignalingChannels_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSignalingChannels -> f ListSignalingChannels
listSignalingChannels_nextToken = (ListSignalingChannels -> Maybe Text)
-> (ListSignalingChannels -> Maybe Text -> ListSignalingChannels)
-> Lens
     ListSignalingChannels
     ListSignalingChannels
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSignalingChannels' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSignalingChannels' :: ListSignalingChannels -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSignalingChannels
s@ListSignalingChannels' {} Maybe Text
a -> ListSignalingChannels
s {$sel:nextToken:ListSignalingChannels' :: Maybe Text
nextToken = Maybe Text
a} :: ListSignalingChannels)

-- | The maximum number of channels to return in the response. The default is
-- 500.
listSignalingChannels_maxResults :: Lens.Lens' ListSignalingChannels (Prelude.Maybe Prelude.Natural)
listSignalingChannels_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListSignalingChannels -> f ListSignalingChannels
listSignalingChannels_maxResults = (ListSignalingChannels -> Maybe Natural)
-> (ListSignalingChannels
    -> Maybe Natural -> ListSignalingChannels)
-> Lens
     ListSignalingChannels
     ListSignalingChannels
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSignalingChannels' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSignalingChannels' :: ListSignalingChannels -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSignalingChannels
s@ListSignalingChannels' {} Maybe Natural
a -> ListSignalingChannels
s {$sel:maxResults:ListSignalingChannels' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSignalingChannels)

instance Core.AWSPager ListSignalingChannels where
  page :: ListSignalingChannels
-> AWSResponse ListSignalingChannels -> Maybe ListSignalingChannels
page ListSignalingChannels
rq AWSResponse ListSignalingChannels
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSignalingChannels
ListSignalingChannelsResponse
rs
            ListSignalingChannelsResponse
-> Getting (First Text) ListSignalingChannelsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSignalingChannelsResponse
-> Const (First Text) ListSignalingChannelsResponse
Lens' ListSignalingChannelsResponse (Maybe Text)
listSignalingChannelsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSignalingChannelsResponse
 -> Const (First Text) ListSignalingChannelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSignalingChannelsResponse 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 ListSignalingChannels
forall a. Maybe a
Prelude.Nothing
    | Maybe [ChannelInfo] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSignalingChannels
ListSignalingChannelsResponse
rs
            ListSignalingChannelsResponse
-> Getting
     (First [ChannelInfo]) ListSignalingChannelsResponse [ChannelInfo]
-> Maybe [ChannelInfo]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ChannelInfo]
 -> Const (First [ChannelInfo]) (Maybe [ChannelInfo]))
-> ListSignalingChannelsResponse
-> Const (First [ChannelInfo]) ListSignalingChannelsResponse
Lens' ListSignalingChannelsResponse (Maybe [ChannelInfo])
listSignalingChannelsResponse_channelInfoList
              ((Maybe [ChannelInfo]
  -> Const (First [ChannelInfo]) (Maybe [ChannelInfo]))
 -> ListSignalingChannelsResponse
 -> Const (First [ChannelInfo]) ListSignalingChannelsResponse)
-> (([ChannelInfo] -> Const (First [ChannelInfo]) [ChannelInfo])
    -> Maybe [ChannelInfo]
    -> Const (First [ChannelInfo]) (Maybe [ChannelInfo]))
-> Getting
     (First [ChannelInfo]) ListSignalingChannelsResponse [ChannelInfo]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ChannelInfo] -> Const (First [ChannelInfo]) [ChannelInfo])
-> Maybe [ChannelInfo]
-> Const (First [ChannelInfo]) (Maybe [ChannelInfo])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSignalingChannels
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListSignalingChannels -> Maybe ListSignalingChannels
forall a. a -> Maybe a
Prelude.Just (ListSignalingChannels -> Maybe ListSignalingChannels)
-> ListSignalingChannels -> Maybe ListSignalingChannels
forall a b. (a -> b) -> a -> b
Prelude.$
        ListSignalingChannels
rq
          ListSignalingChannels
-> (ListSignalingChannels -> ListSignalingChannels)
-> ListSignalingChannels
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSignalingChannels -> Identity ListSignalingChannels
Lens
  ListSignalingChannels
  ListSignalingChannels
  (Maybe Text)
  (Maybe Text)
listSignalingChannels_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListSignalingChannels -> Identity ListSignalingChannels)
-> Maybe Text -> ListSignalingChannels -> ListSignalingChannels
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSignalingChannels
ListSignalingChannelsResponse
rs
          ListSignalingChannelsResponse
-> Getting (First Text) ListSignalingChannelsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSignalingChannelsResponse
-> Const (First Text) ListSignalingChannelsResponse
Lens' ListSignalingChannelsResponse (Maybe Text)
listSignalingChannelsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSignalingChannelsResponse
 -> Const (First Text) ListSignalingChannelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSignalingChannelsResponse 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 ListSignalingChannels where
  type
    AWSResponse ListSignalingChannels =
      ListSignalingChannelsResponse
  request :: ListSignalingChannels -> Request ListSignalingChannels
request = Service -> ListSignalingChannels -> Request ListSignalingChannels
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListSignalingChannels
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSignalingChannels)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListSignalingChannels))
-> Logger
-> Service
-> Proxy ListSignalingChannels
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSignalingChannels)))
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 [ChannelInfo]
-> Maybe Text -> Int -> ListSignalingChannelsResponse
ListSignalingChannelsResponse'
            (Maybe [ChannelInfo]
 -> Maybe Text -> Int -> ListSignalingChannelsResponse)
-> Either String (Maybe [ChannelInfo])
-> Either
     String (Maybe Text -> Int -> ListSignalingChannelsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ChannelInfo]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChannelInfoList"
                            Either String (Maybe (Maybe [ChannelInfo]))
-> Maybe [ChannelInfo] -> Either String (Maybe [ChannelInfo])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ChannelInfo]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListSignalingChannelsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListSignalingChannelsResponse)
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 -> ListSignalingChannelsResponse)
-> Either String Int -> Either String ListSignalingChannelsResponse
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 ListSignalingChannels

instance Prelude.NFData ListSignalingChannels

instance Core.ToHeaders ListSignalingChannels where
  toHeaders :: ListSignalingChannels -> ResponseHeaders
toHeaders = ResponseHeaders -> ListSignalingChannels -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON ListSignalingChannels where
  toJSON :: ListSignalingChannels -> Value
toJSON ListSignalingChannels' {Maybe Natural
Maybe Text
Maybe ChannelNameCondition
maxResults :: Maybe Natural
nextToken :: Maybe Text
channelNameCondition :: Maybe ChannelNameCondition
$sel:maxResults:ListSignalingChannels' :: ListSignalingChannels -> Maybe Natural
$sel:nextToken:ListSignalingChannels' :: ListSignalingChannels -> Maybe Text
$sel:channelNameCondition:ListSignalingChannels' :: ListSignalingChannels -> Maybe ChannelNameCondition
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ChannelNameCondition" Text -> ChannelNameCondition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ChannelNameCondition -> Pair)
-> Maybe ChannelNameCondition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChannelNameCondition
channelNameCondition,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

instance Core.ToQuery ListSignalingChannels where
  toQuery :: ListSignalingChannels -> QueryString
toQuery = QueryString -> ListSignalingChannels -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListSignalingChannelsResponse' smart constructor.
data ListSignalingChannelsResponse = ListSignalingChannelsResponse'
  { -- | An array of @ChannelInfo@ objects.
    ListSignalingChannelsResponse -> Maybe [ChannelInfo]
channelInfoList :: Prelude.Maybe [ChannelInfo],
    -- | If the response is truncated, the call returns this element with a
    -- token. To get the next batch of streams, use this token in your next
    -- request.
    ListSignalingChannelsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSignalingChannelsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSignalingChannelsResponse
-> ListSignalingChannelsResponse -> Bool
(ListSignalingChannelsResponse
 -> ListSignalingChannelsResponse -> Bool)
-> (ListSignalingChannelsResponse
    -> ListSignalingChannelsResponse -> Bool)
-> Eq ListSignalingChannelsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSignalingChannelsResponse
-> ListSignalingChannelsResponse -> Bool
$c/= :: ListSignalingChannelsResponse
-> ListSignalingChannelsResponse -> Bool
== :: ListSignalingChannelsResponse
-> ListSignalingChannelsResponse -> Bool
$c== :: ListSignalingChannelsResponse
-> ListSignalingChannelsResponse -> Bool
Prelude.Eq, ReadPrec [ListSignalingChannelsResponse]
ReadPrec ListSignalingChannelsResponse
Int -> ReadS ListSignalingChannelsResponse
ReadS [ListSignalingChannelsResponse]
(Int -> ReadS ListSignalingChannelsResponse)
-> ReadS [ListSignalingChannelsResponse]
-> ReadPrec ListSignalingChannelsResponse
-> ReadPrec [ListSignalingChannelsResponse]
-> Read ListSignalingChannelsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSignalingChannelsResponse]
$creadListPrec :: ReadPrec [ListSignalingChannelsResponse]
readPrec :: ReadPrec ListSignalingChannelsResponse
$creadPrec :: ReadPrec ListSignalingChannelsResponse
readList :: ReadS [ListSignalingChannelsResponse]
$creadList :: ReadS [ListSignalingChannelsResponse]
readsPrec :: Int -> ReadS ListSignalingChannelsResponse
$creadsPrec :: Int -> ReadS ListSignalingChannelsResponse
Prelude.Read, Int -> ListSignalingChannelsResponse -> ShowS
[ListSignalingChannelsResponse] -> ShowS
ListSignalingChannelsResponse -> String
(Int -> ListSignalingChannelsResponse -> ShowS)
-> (ListSignalingChannelsResponse -> String)
-> ([ListSignalingChannelsResponse] -> ShowS)
-> Show ListSignalingChannelsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSignalingChannelsResponse] -> ShowS
$cshowList :: [ListSignalingChannelsResponse] -> ShowS
show :: ListSignalingChannelsResponse -> String
$cshow :: ListSignalingChannelsResponse -> String
showsPrec :: Int -> ListSignalingChannelsResponse -> ShowS
$cshowsPrec :: Int -> ListSignalingChannelsResponse -> ShowS
Prelude.Show, (forall x.
 ListSignalingChannelsResponse
 -> Rep ListSignalingChannelsResponse x)
-> (forall x.
    Rep ListSignalingChannelsResponse x
    -> ListSignalingChannelsResponse)
-> Generic ListSignalingChannelsResponse
forall x.
Rep ListSignalingChannelsResponse x
-> ListSignalingChannelsResponse
forall x.
ListSignalingChannelsResponse
-> Rep ListSignalingChannelsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSignalingChannelsResponse x
-> ListSignalingChannelsResponse
$cfrom :: forall x.
ListSignalingChannelsResponse
-> Rep ListSignalingChannelsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSignalingChannelsResponse' 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:
--
-- 'channelInfoList', 'listSignalingChannelsResponse_channelInfoList' - An array of @ChannelInfo@ objects.
--
-- 'nextToken', 'listSignalingChannelsResponse_nextToken' - If the response is truncated, the call returns this element with a
-- token. To get the next batch of streams, use this token in your next
-- request.
--
-- 'httpStatus', 'listSignalingChannelsResponse_httpStatus' - The response's http status code.
newListSignalingChannelsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSignalingChannelsResponse
newListSignalingChannelsResponse :: Int -> ListSignalingChannelsResponse
newListSignalingChannelsResponse Int
pHttpStatus_ =
  ListSignalingChannelsResponse' :: Maybe [ChannelInfo]
-> Maybe Text -> Int -> ListSignalingChannelsResponse
ListSignalingChannelsResponse'
    { $sel:channelInfoList:ListSignalingChannelsResponse' :: Maybe [ChannelInfo]
channelInfoList =
        Maybe [ChannelInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSignalingChannelsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSignalingChannelsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @ChannelInfo@ objects.
listSignalingChannelsResponse_channelInfoList :: Lens.Lens' ListSignalingChannelsResponse (Prelude.Maybe [ChannelInfo])
listSignalingChannelsResponse_channelInfoList :: (Maybe [ChannelInfo] -> f (Maybe [ChannelInfo]))
-> ListSignalingChannelsResponse -> f ListSignalingChannelsResponse
listSignalingChannelsResponse_channelInfoList = (ListSignalingChannelsResponse -> Maybe [ChannelInfo])
-> (ListSignalingChannelsResponse
    -> Maybe [ChannelInfo] -> ListSignalingChannelsResponse)
-> Lens' ListSignalingChannelsResponse (Maybe [ChannelInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSignalingChannelsResponse' {Maybe [ChannelInfo]
channelInfoList :: Maybe [ChannelInfo]
$sel:channelInfoList:ListSignalingChannelsResponse' :: ListSignalingChannelsResponse -> Maybe [ChannelInfo]
channelInfoList} -> Maybe [ChannelInfo]
channelInfoList) (\s :: ListSignalingChannelsResponse
s@ListSignalingChannelsResponse' {} Maybe [ChannelInfo]
a -> ListSignalingChannelsResponse
s {$sel:channelInfoList:ListSignalingChannelsResponse' :: Maybe [ChannelInfo]
channelInfoList = Maybe [ChannelInfo]
a} :: ListSignalingChannelsResponse) ((Maybe [ChannelInfo] -> f (Maybe [ChannelInfo]))
 -> ListSignalingChannelsResponse
 -> f ListSignalingChannelsResponse)
-> ((Maybe [ChannelInfo] -> f (Maybe [ChannelInfo]))
    -> Maybe [ChannelInfo] -> f (Maybe [ChannelInfo]))
-> (Maybe [ChannelInfo] -> f (Maybe [ChannelInfo]))
-> ListSignalingChannelsResponse
-> f ListSignalingChannelsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ChannelInfo] [ChannelInfo] [ChannelInfo] [ChannelInfo]
-> Iso
     (Maybe [ChannelInfo])
     (Maybe [ChannelInfo])
     (Maybe [ChannelInfo])
     (Maybe [ChannelInfo])
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 [ChannelInfo] [ChannelInfo] [ChannelInfo] [ChannelInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the response is truncated, the call returns this element with a
-- token. To get the next batch of streams, use this token in your next
-- request.
listSignalingChannelsResponse_nextToken :: Lens.Lens' ListSignalingChannelsResponse (Prelude.Maybe Prelude.Text)
listSignalingChannelsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSignalingChannelsResponse -> f ListSignalingChannelsResponse
listSignalingChannelsResponse_nextToken = (ListSignalingChannelsResponse -> Maybe Text)
-> (ListSignalingChannelsResponse
    -> Maybe Text -> ListSignalingChannelsResponse)
-> Lens' ListSignalingChannelsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSignalingChannelsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSignalingChannelsResponse' :: ListSignalingChannelsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSignalingChannelsResponse
s@ListSignalingChannelsResponse' {} Maybe Text
a -> ListSignalingChannelsResponse
s {$sel:nextToken:ListSignalingChannelsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSignalingChannelsResponse)

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

instance Prelude.NFData ListSignalingChannelsResponse