{-# 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.MediaLive.ListMultiplexPrograms
-- 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)
--
-- List the programs that currently exist for a specific multiplex.
--
-- This operation returns paginated results.
module Amazonka.MediaLive.ListMultiplexPrograms
  ( -- * Creating a Request
    ListMultiplexPrograms (..),
    newListMultiplexPrograms,

    -- * Request Lenses
    listMultiplexPrograms_nextToken,
    listMultiplexPrograms_maxResults,
    listMultiplexPrograms_multiplexId,

    -- * Destructuring the Response
    ListMultiplexProgramsResponse (..),
    newListMultiplexProgramsResponse,

    -- * Response Lenses
    listMultiplexProgramsResponse_nextToken,
    listMultiplexProgramsResponse_multiplexPrograms,
    listMultiplexProgramsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Placeholder documentation for ListMultiplexProgramsRequest
--
-- /See:/ 'newListMultiplexPrograms' smart constructor.
data ListMultiplexPrograms = ListMultiplexPrograms'
  { -- | The token to retrieve the next page of results.
    ListMultiplexPrograms -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return.
    ListMultiplexPrograms -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the multiplex that the programs belong to.
    ListMultiplexPrograms -> Text
multiplexId :: Prelude.Text
  }
  deriving (ListMultiplexPrograms -> ListMultiplexPrograms -> Bool
(ListMultiplexPrograms -> ListMultiplexPrograms -> Bool)
-> (ListMultiplexPrograms -> ListMultiplexPrograms -> Bool)
-> Eq ListMultiplexPrograms
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMultiplexPrograms -> ListMultiplexPrograms -> Bool
$c/= :: ListMultiplexPrograms -> ListMultiplexPrograms -> Bool
== :: ListMultiplexPrograms -> ListMultiplexPrograms -> Bool
$c== :: ListMultiplexPrograms -> ListMultiplexPrograms -> Bool
Prelude.Eq, ReadPrec [ListMultiplexPrograms]
ReadPrec ListMultiplexPrograms
Int -> ReadS ListMultiplexPrograms
ReadS [ListMultiplexPrograms]
(Int -> ReadS ListMultiplexPrograms)
-> ReadS [ListMultiplexPrograms]
-> ReadPrec ListMultiplexPrograms
-> ReadPrec [ListMultiplexPrograms]
-> Read ListMultiplexPrograms
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMultiplexPrograms]
$creadListPrec :: ReadPrec [ListMultiplexPrograms]
readPrec :: ReadPrec ListMultiplexPrograms
$creadPrec :: ReadPrec ListMultiplexPrograms
readList :: ReadS [ListMultiplexPrograms]
$creadList :: ReadS [ListMultiplexPrograms]
readsPrec :: Int -> ReadS ListMultiplexPrograms
$creadsPrec :: Int -> ReadS ListMultiplexPrograms
Prelude.Read, Int -> ListMultiplexPrograms -> ShowS
[ListMultiplexPrograms] -> ShowS
ListMultiplexPrograms -> String
(Int -> ListMultiplexPrograms -> ShowS)
-> (ListMultiplexPrograms -> String)
-> ([ListMultiplexPrograms] -> ShowS)
-> Show ListMultiplexPrograms
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMultiplexPrograms] -> ShowS
$cshowList :: [ListMultiplexPrograms] -> ShowS
show :: ListMultiplexPrograms -> String
$cshow :: ListMultiplexPrograms -> String
showsPrec :: Int -> ListMultiplexPrograms -> ShowS
$cshowsPrec :: Int -> ListMultiplexPrograms -> ShowS
Prelude.Show, (forall x. ListMultiplexPrograms -> Rep ListMultiplexPrograms x)
-> (forall x. Rep ListMultiplexPrograms x -> ListMultiplexPrograms)
-> Generic ListMultiplexPrograms
forall x. Rep ListMultiplexPrograms x -> ListMultiplexPrograms
forall x. ListMultiplexPrograms -> Rep ListMultiplexPrograms x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMultiplexPrograms x -> ListMultiplexPrograms
$cfrom :: forall x. ListMultiplexPrograms -> Rep ListMultiplexPrograms x
Prelude.Generic)

-- |
-- Create a value of 'ListMultiplexPrograms' 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', 'listMultiplexPrograms_nextToken' - The token to retrieve the next page of results.
--
-- 'maxResults', 'listMultiplexPrograms_maxResults' - The maximum number of items to return.
--
-- 'multiplexId', 'listMultiplexPrograms_multiplexId' - The ID of the multiplex that the programs belong to.
newListMultiplexPrograms ::
  -- | 'multiplexId'
  Prelude.Text ->
  ListMultiplexPrograms
newListMultiplexPrograms :: Text -> ListMultiplexPrograms
newListMultiplexPrograms Text
pMultiplexId_ =
  ListMultiplexPrograms' :: Maybe Text -> Maybe Natural -> Text -> ListMultiplexPrograms
ListMultiplexPrograms'
    { $sel:nextToken:ListMultiplexPrograms' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMultiplexPrograms' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexId:ListMultiplexPrograms' :: Text
multiplexId = Text
pMultiplexId_
    }

-- | The token to retrieve the next page of results.
listMultiplexPrograms_nextToken :: Lens.Lens' ListMultiplexPrograms (Prelude.Maybe Prelude.Text)
listMultiplexPrograms_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMultiplexPrograms -> f ListMultiplexPrograms
listMultiplexPrograms_nextToken = (ListMultiplexPrograms -> Maybe Text)
-> (ListMultiplexPrograms -> Maybe Text -> ListMultiplexPrograms)
-> Lens
     ListMultiplexPrograms
     ListMultiplexPrograms
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMultiplexPrograms' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMultiplexPrograms' :: ListMultiplexPrograms -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMultiplexPrograms
s@ListMultiplexPrograms' {} Maybe Text
a -> ListMultiplexPrograms
s {$sel:nextToken:ListMultiplexPrograms' :: Maybe Text
nextToken = Maybe Text
a} :: ListMultiplexPrograms)

-- | The maximum number of items to return.
listMultiplexPrograms_maxResults :: Lens.Lens' ListMultiplexPrograms (Prelude.Maybe Prelude.Natural)
listMultiplexPrograms_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMultiplexPrograms -> f ListMultiplexPrograms
listMultiplexPrograms_maxResults = (ListMultiplexPrograms -> Maybe Natural)
-> (ListMultiplexPrograms
    -> Maybe Natural -> ListMultiplexPrograms)
-> Lens
     ListMultiplexPrograms
     ListMultiplexPrograms
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMultiplexPrograms' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMultiplexPrograms' :: ListMultiplexPrograms -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMultiplexPrograms
s@ListMultiplexPrograms' {} Maybe Natural
a -> ListMultiplexPrograms
s {$sel:maxResults:ListMultiplexPrograms' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMultiplexPrograms)

-- | The ID of the multiplex that the programs belong to.
listMultiplexPrograms_multiplexId :: Lens.Lens' ListMultiplexPrograms Prelude.Text
listMultiplexPrograms_multiplexId :: (Text -> f Text)
-> ListMultiplexPrograms -> f ListMultiplexPrograms
listMultiplexPrograms_multiplexId = (ListMultiplexPrograms -> Text)
-> (ListMultiplexPrograms -> Text -> ListMultiplexPrograms)
-> Lens ListMultiplexPrograms ListMultiplexPrograms Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMultiplexPrograms' {Text
multiplexId :: Text
$sel:multiplexId:ListMultiplexPrograms' :: ListMultiplexPrograms -> Text
multiplexId} -> Text
multiplexId) (\s :: ListMultiplexPrograms
s@ListMultiplexPrograms' {} Text
a -> ListMultiplexPrograms
s {$sel:multiplexId:ListMultiplexPrograms' :: Text
multiplexId = Text
a} :: ListMultiplexPrograms)

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

instance Prelude.NFData ListMultiplexPrograms

instance Core.ToHeaders ListMultiplexPrograms where
  toHeaders :: ListMultiplexPrograms -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMultiplexPrograms -> 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 ListMultiplexPrograms where
  toPath :: ListMultiplexPrograms -> ByteString
toPath ListMultiplexPrograms' {Maybe Natural
Maybe Text
Text
multiplexId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:multiplexId:ListMultiplexPrograms' :: ListMultiplexPrograms -> Text
$sel:maxResults:ListMultiplexPrograms' :: ListMultiplexPrograms -> Maybe Natural
$sel:nextToken:ListMultiplexPrograms' :: ListMultiplexPrograms -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/prod/multiplexes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
multiplexId,
        ByteString
"/programs"
      ]

instance Core.ToQuery ListMultiplexPrograms where
  toQuery :: ListMultiplexPrograms -> QueryString
toQuery ListMultiplexPrograms' {Maybe Natural
Maybe Text
Text
multiplexId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:multiplexId:ListMultiplexPrograms' :: ListMultiplexPrograms -> Text
$sel:maxResults:ListMultiplexPrograms' :: ListMultiplexPrograms -> Maybe Natural
$sel:nextToken:ListMultiplexPrograms' :: ListMultiplexPrograms -> 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
      ]

-- | Placeholder documentation for ListMultiplexProgramsResponse
--
-- /See:/ 'newListMultiplexProgramsResponse' smart constructor.
data ListMultiplexProgramsResponse = ListMultiplexProgramsResponse'
  { -- | Token for the next ListMultiplexProgram request.
    ListMultiplexProgramsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | List of multiplex programs.
    ListMultiplexProgramsResponse -> Maybe [MultiplexProgramSummary]
multiplexPrograms :: Prelude.Maybe [MultiplexProgramSummary],
    -- | The response's http status code.
    ListMultiplexProgramsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMultiplexProgramsResponse
-> ListMultiplexProgramsResponse -> Bool
(ListMultiplexProgramsResponse
 -> ListMultiplexProgramsResponse -> Bool)
-> (ListMultiplexProgramsResponse
    -> ListMultiplexProgramsResponse -> Bool)
-> Eq ListMultiplexProgramsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMultiplexProgramsResponse
-> ListMultiplexProgramsResponse -> Bool
$c/= :: ListMultiplexProgramsResponse
-> ListMultiplexProgramsResponse -> Bool
== :: ListMultiplexProgramsResponse
-> ListMultiplexProgramsResponse -> Bool
$c== :: ListMultiplexProgramsResponse
-> ListMultiplexProgramsResponse -> Bool
Prelude.Eq, ReadPrec [ListMultiplexProgramsResponse]
ReadPrec ListMultiplexProgramsResponse
Int -> ReadS ListMultiplexProgramsResponse
ReadS [ListMultiplexProgramsResponse]
(Int -> ReadS ListMultiplexProgramsResponse)
-> ReadS [ListMultiplexProgramsResponse]
-> ReadPrec ListMultiplexProgramsResponse
-> ReadPrec [ListMultiplexProgramsResponse]
-> Read ListMultiplexProgramsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMultiplexProgramsResponse]
$creadListPrec :: ReadPrec [ListMultiplexProgramsResponse]
readPrec :: ReadPrec ListMultiplexProgramsResponse
$creadPrec :: ReadPrec ListMultiplexProgramsResponse
readList :: ReadS [ListMultiplexProgramsResponse]
$creadList :: ReadS [ListMultiplexProgramsResponse]
readsPrec :: Int -> ReadS ListMultiplexProgramsResponse
$creadsPrec :: Int -> ReadS ListMultiplexProgramsResponse
Prelude.Read, Int -> ListMultiplexProgramsResponse -> ShowS
[ListMultiplexProgramsResponse] -> ShowS
ListMultiplexProgramsResponse -> String
(Int -> ListMultiplexProgramsResponse -> ShowS)
-> (ListMultiplexProgramsResponse -> String)
-> ([ListMultiplexProgramsResponse] -> ShowS)
-> Show ListMultiplexProgramsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMultiplexProgramsResponse] -> ShowS
$cshowList :: [ListMultiplexProgramsResponse] -> ShowS
show :: ListMultiplexProgramsResponse -> String
$cshow :: ListMultiplexProgramsResponse -> String
showsPrec :: Int -> ListMultiplexProgramsResponse -> ShowS
$cshowsPrec :: Int -> ListMultiplexProgramsResponse -> ShowS
Prelude.Show, (forall x.
 ListMultiplexProgramsResponse
 -> Rep ListMultiplexProgramsResponse x)
-> (forall x.
    Rep ListMultiplexProgramsResponse x
    -> ListMultiplexProgramsResponse)
-> Generic ListMultiplexProgramsResponse
forall x.
Rep ListMultiplexProgramsResponse x
-> ListMultiplexProgramsResponse
forall x.
ListMultiplexProgramsResponse
-> Rep ListMultiplexProgramsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMultiplexProgramsResponse x
-> ListMultiplexProgramsResponse
$cfrom :: forall x.
ListMultiplexProgramsResponse
-> Rep ListMultiplexProgramsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMultiplexProgramsResponse' 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', 'listMultiplexProgramsResponse_nextToken' - Token for the next ListMultiplexProgram request.
--
-- 'multiplexPrograms', 'listMultiplexProgramsResponse_multiplexPrograms' - List of multiplex programs.
--
-- 'httpStatus', 'listMultiplexProgramsResponse_httpStatus' - The response's http status code.
newListMultiplexProgramsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMultiplexProgramsResponse
newListMultiplexProgramsResponse :: Int -> ListMultiplexProgramsResponse
newListMultiplexProgramsResponse Int
pHttpStatus_ =
  ListMultiplexProgramsResponse' :: Maybe Text
-> Maybe [MultiplexProgramSummary]
-> Int
-> ListMultiplexProgramsResponse
ListMultiplexProgramsResponse'
    { $sel:nextToken:ListMultiplexProgramsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexPrograms:ListMultiplexProgramsResponse' :: Maybe [MultiplexProgramSummary]
multiplexPrograms = Maybe [MultiplexProgramSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMultiplexProgramsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Token for the next ListMultiplexProgram request.
listMultiplexProgramsResponse_nextToken :: Lens.Lens' ListMultiplexProgramsResponse (Prelude.Maybe Prelude.Text)
listMultiplexProgramsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMultiplexProgramsResponse -> f ListMultiplexProgramsResponse
listMultiplexProgramsResponse_nextToken = (ListMultiplexProgramsResponse -> Maybe Text)
-> (ListMultiplexProgramsResponse
    -> Maybe Text -> ListMultiplexProgramsResponse)
-> Lens' ListMultiplexProgramsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMultiplexProgramsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMultiplexProgramsResponse' :: ListMultiplexProgramsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMultiplexProgramsResponse
s@ListMultiplexProgramsResponse' {} Maybe Text
a -> ListMultiplexProgramsResponse
s {$sel:nextToken:ListMultiplexProgramsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMultiplexProgramsResponse)

-- | List of multiplex programs.
listMultiplexProgramsResponse_multiplexPrograms :: Lens.Lens' ListMultiplexProgramsResponse (Prelude.Maybe [MultiplexProgramSummary])
listMultiplexProgramsResponse_multiplexPrograms :: (Maybe [MultiplexProgramSummary]
 -> f (Maybe [MultiplexProgramSummary]))
-> ListMultiplexProgramsResponse -> f ListMultiplexProgramsResponse
listMultiplexProgramsResponse_multiplexPrograms = (ListMultiplexProgramsResponse -> Maybe [MultiplexProgramSummary])
-> (ListMultiplexProgramsResponse
    -> Maybe [MultiplexProgramSummary]
    -> ListMultiplexProgramsResponse)
-> Lens'
     ListMultiplexProgramsResponse (Maybe [MultiplexProgramSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMultiplexProgramsResponse' {Maybe [MultiplexProgramSummary]
multiplexPrograms :: Maybe [MultiplexProgramSummary]
$sel:multiplexPrograms:ListMultiplexProgramsResponse' :: ListMultiplexProgramsResponse -> Maybe [MultiplexProgramSummary]
multiplexPrograms} -> Maybe [MultiplexProgramSummary]
multiplexPrograms) (\s :: ListMultiplexProgramsResponse
s@ListMultiplexProgramsResponse' {} Maybe [MultiplexProgramSummary]
a -> ListMultiplexProgramsResponse
s {$sel:multiplexPrograms:ListMultiplexProgramsResponse' :: Maybe [MultiplexProgramSummary]
multiplexPrograms = Maybe [MultiplexProgramSummary]
a} :: ListMultiplexProgramsResponse) ((Maybe [MultiplexProgramSummary]
  -> f (Maybe [MultiplexProgramSummary]))
 -> ListMultiplexProgramsResponse
 -> f ListMultiplexProgramsResponse)
-> ((Maybe [MultiplexProgramSummary]
     -> f (Maybe [MultiplexProgramSummary]))
    -> Maybe [MultiplexProgramSummary]
    -> f (Maybe [MultiplexProgramSummary]))
-> (Maybe [MultiplexProgramSummary]
    -> f (Maybe [MultiplexProgramSummary]))
-> ListMultiplexProgramsResponse
-> f ListMultiplexProgramsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
-> Iso
     (Maybe [MultiplexProgramSummary])
     (Maybe [MultiplexProgramSummary])
     (Maybe [MultiplexProgramSummary])
     (Maybe [MultiplexProgramSummary])
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
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
  [MultiplexProgramSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListMultiplexProgramsResponse