{-# 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.DescribeMultiplex
-- 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)
--
-- Gets details about a multiplex.
module Amazonka.MediaLive.DescribeMultiplex
  ( -- * Creating a Request
    DescribeMultiplex (..),
    newDescribeMultiplex,

    -- * Request Lenses
    describeMultiplex_multiplexId,

    -- * Destructuring the Response
    DescribeMultiplexResponse (..),
    newDescribeMultiplexResponse,

    -- * Response Lenses
    describeMultiplexResponse_state,
    describeMultiplexResponse_arn,
    describeMultiplexResponse_pipelinesRunningCount,
    describeMultiplexResponse_availabilityZones,
    describeMultiplexResponse_programCount,
    describeMultiplexResponse_destinations,
    describeMultiplexResponse_name,
    describeMultiplexResponse_id,
    describeMultiplexResponse_multiplexSettings,
    describeMultiplexResponse_tags,
    describeMultiplexResponse_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 DescribeMultiplexRequest
--
-- /See:/ 'newDescribeMultiplex' smart constructor.
data DescribeMultiplex = DescribeMultiplex'
  { -- | The ID of the multiplex.
    DescribeMultiplex -> Text
multiplexId :: Prelude.Text
  }
  deriving (DescribeMultiplex -> DescribeMultiplex -> Bool
(DescribeMultiplex -> DescribeMultiplex -> Bool)
-> (DescribeMultiplex -> DescribeMultiplex -> Bool)
-> Eq DescribeMultiplex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMultiplex -> DescribeMultiplex -> Bool
$c/= :: DescribeMultiplex -> DescribeMultiplex -> Bool
== :: DescribeMultiplex -> DescribeMultiplex -> Bool
$c== :: DescribeMultiplex -> DescribeMultiplex -> Bool
Prelude.Eq, ReadPrec [DescribeMultiplex]
ReadPrec DescribeMultiplex
Int -> ReadS DescribeMultiplex
ReadS [DescribeMultiplex]
(Int -> ReadS DescribeMultiplex)
-> ReadS [DescribeMultiplex]
-> ReadPrec DescribeMultiplex
-> ReadPrec [DescribeMultiplex]
-> Read DescribeMultiplex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMultiplex]
$creadListPrec :: ReadPrec [DescribeMultiplex]
readPrec :: ReadPrec DescribeMultiplex
$creadPrec :: ReadPrec DescribeMultiplex
readList :: ReadS [DescribeMultiplex]
$creadList :: ReadS [DescribeMultiplex]
readsPrec :: Int -> ReadS DescribeMultiplex
$creadsPrec :: Int -> ReadS DescribeMultiplex
Prelude.Read, Int -> DescribeMultiplex -> ShowS
[DescribeMultiplex] -> ShowS
DescribeMultiplex -> String
(Int -> DescribeMultiplex -> ShowS)
-> (DescribeMultiplex -> String)
-> ([DescribeMultiplex] -> ShowS)
-> Show DescribeMultiplex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMultiplex] -> ShowS
$cshowList :: [DescribeMultiplex] -> ShowS
show :: DescribeMultiplex -> String
$cshow :: DescribeMultiplex -> String
showsPrec :: Int -> DescribeMultiplex -> ShowS
$cshowsPrec :: Int -> DescribeMultiplex -> ShowS
Prelude.Show, (forall x. DescribeMultiplex -> Rep DescribeMultiplex x)
-> (forall x. Rep DescribeMultiplex x -> DescribeMultiplex)
-> Generic DescribeMultiplex
forall x. Rep DescribeMultiplex x -> DescribeMultiplex
forall x. DescribeMultiplex -> Rep DescribeMultiplex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeMultiplex x -> DescribeMultiplex
$cfrom :: forall x. DescribeMultiplex -> Rep DescribeMultiplex x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMultiplex' 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:
--
-- 'multiplexId', 'describeMultiplex_multiplexId' - The ID of the multiplex.
newDescribeMultiplex ::
  -- | 'multiplexId'
  Prelude.Text ->
  DescribeMultiplex
newDescribeMultiplex :: Text -> DescribeMultiplex
newDescribeMultiplex Text
pMultiplexId_ =
  DescribeMultiplex' :: Text -> DescribeMultiplex
DescribeMultiplex' {$sel:multiplexId:DescribeMultiplex' :: Text
multiplexId = Text
pMultiplexId_}

-- | The ID of the multiplex.
describeMultiplex_multiplexId :: Lens.Lens' DescribeMultiplex Prelude.Text
describeMultiplex_multiplexId :: (Text -> f Text) -> DescribeMultiplex -> f DescribeMultiplex
describeMultiplex_multiplexId = (DescribeMultiplex -> Text)
-> (DescribeMultiplex -> Text -> DescribeMultiplex)
-> Lens DescribeMultiplex DescribeMultiplex Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplex' {Text
multiplexId :: Text
$sel:multiplexId:DescribeMultiplex' :: DescribeMultiplex -> Text
multiplexId} -> Text
multiplexId) (\s :: DescribeMultiplex
s@DescribeMultiplex' {} Text
a -> DescribeMultiplex
s {$sel:multiplexId:DescribeMultiplex' :: Text
multiplexId = Text
a} :: DescribeMultiplex)

instance Core.AWSRequest DescribeMultiplex where
  type
    AWSResponse DescribeMultiplex =
      DescribeMultiplexResponse
  request :: DescribeMultiplex -> Request DescribeMultiplex
request = Service -> DescribeMultiplex -> Request DescribeMultiplex
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeMultiplex
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMultiplex)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeMultiplex))
-> Logger
-> Service
-> Proxy DescribeMultiplex
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeMultiplex)))
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 MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Int
-> DescribeMultiplexResponse
DescribeMultiplexResponse'
            (Maybe MultiplexState
 -> Maybe Text
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe [MultiplexOutputDestination]
 -> Maybe Text
 -> Maybe Text
 -> Maybe MultiplexSettings
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeMultiplexResponse)
-> Either String (Maybe MultiplexState)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MultiplexState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"state")
            Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
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
"arn")
            Either
  String
  (Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"pipelinesRunningCount")
            Either
  String
  (Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"availabilityZones"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"programCount")
            Either
  String
  (Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe [MultiplexOutputDestination])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [MultiplexOutputDestination]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"destinations" Either String (Maybe (Maybe [MultiplexOutputDestination]))
-> Maybe [MultiplexOutputDestination]
-> Either String (Maybe [MultiplexOutputDestination])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [MultiplexOutputDestination]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeMultiplexResponse)
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
"name")
            Either
  String
  (Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeMultiplexResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MultiplexSettings
      -> Maybe (HashMap Text Text) -> Int -> DescribeMultiplexResponse)
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
"id")
            Either
  String
  (Maybe MultiplexSettings
   -> Maybe (HashMap Text Text) -> Int -> DescribeMultiplexResponse)
-> Either String (Maybe MultiplexSettings)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MultiplexSettings)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"multiplexSettings")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeMultiplexResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeMultiplexResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeMultiplexResponse)
-> Either String Int -> Either String DescribeMultiplexResponse
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 DescribeMultiplex

instance Prelude.NFData DescribeMultiplex

instance Core.ToHeaders DescribeMultiplex where
  toHeaders :: DescribeMultiplex -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeMultiplex -> 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 DescribeMultiplex where
  toPath :: DescribeMultiplex -> ByteString
toPath DescribeMultiplex' {Text
multiplexId :: Text
$sel:multiplexId:DescribeMultiplex' :: DescribeMultiplex -> 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]

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

-- | Placeholder documentation for DescribeMultiplexResponse
--
-- /See:/ 'newDescribeMultiplexResponse' smart constructor.
data DescribeMultiplexResponse = DescribeMultiplexResponse'
  { -- | The current state of the multiplex.
    DescribeMultiplexResponse -> Maybe MultiplexState
state :: Prelude.Maybe MultiplexState,
    -- | The unique arn of the multiplex.
    DescribeMultiplexResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The number of currently healthy pipelines.
    DescribeMultiplexResponse -> Maybe Int
pipelinesRunningCount :: Prelude.Maybe Prelude.Int,
    -- | A list of availability zones for the multiplex.
    DescribeMultiplexResponse -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | The number of programs in the multiplex.
    DescribeMultiplexResponse -> Maybe Int
programCount :: Prelude.Maybe Prelude.Int,
    -- | A list of the multiplex output destinations.
    DescribeMultiplexResponse -> Maybe [MultiplexOutputDestination]
destinations :: Prelude.Maybe [MultiplexOutputDestination],
    -- | The name of the multiplex.
    DescribeMultiplexResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique id of the multiplex.
    DescribeMultiplexResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Configuration for a multiplex event.
    DescribeMultiplexResponse -> Maybe MultiplexSettings
multiplexSettings :: Prelude.Maybe MultiplexSettings,
    -- | A collection of key-value pairs.
    DescribeMultiplexResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeMultiplexResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool
(DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool)
-> (DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool)
-> Eq DescribeMultiplexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool
$c/= :: DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool
== :: DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool
$c== :: DescribeMultiplexResponse -> DescribeMultiplexResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMultiplexResponse]
ReadPrec DescribeMultiplexResponse
Int -> ReadS DescribeMultiplexResponse
ReadS [DescribeMultiplexResponse]
(Int -> ReadS DescribeMultiplexResponse)
-> ReadS [DescribeMultiplexResponse]
-> ReadPrec DescribeMultiplexResponse
-> ReadPrec [DescribeMultiplexResponse]
-> Read DescribeMultiplexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMultiplexResponse]
$creadListPrec :: ReadPrec [DescribeMultiplexResponse]
readPrec :: ReadPrec DescribeMultiplexResponse
$creadPrec :: ReadPrec DescribeMultiplexResponse
readList :: ReadS [DescribeMultiplexResponse]
$creadList :: ReadS [DescribeMultiplexResponse]
readsPrec :: Int -> ReadS DescribeMultiplexResponse
$creadsPrec :: Int -> ReadS DescribeMultiplexResponse
Prelude.Read, Int -> DescribeMultiplexResponse -> ShowS
[DescribeMultiplexResponse] -> ShowS
DescribeMultiplexResponse -> String
(Int -> DescribeMultiplexResponse -> ShowS)
-> (DescribeMultiplexResponse -> String)
-> ([DescribeMultiplexResponse] -> ShowS)
-> Show DescribeMultiplexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMultiplexResponse] -> ShowS
$cshowList :: [DescribeMultiplexResponse] -> ShowS
show :: DescribeMultiplexResponse -> String
$cshow :: DescribeMultiplexResponse -> String
showsPrec :: Int -> DescribeMultiplexResponse -> ShowS
$cshowsPrec :: Int -> DescribeMultiplexResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMultiplexResponse -> Rep DescribeMultiplexResponse x)
-> (forall x.
    Rep DescribeMultiplexResponse x -> DescribeMultiplexResponse)
-> Generic DescribeMultiplexResponse
forall x.
Rep DescribeMultiplexResponse x -> DescribeMultiplexResponse
forall x.
DescribeMultiplexResponse -> Rep DescribeMultiplexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMultiplexResponse x -> DescribeMultiplexResponse
$cfrom :: forall x.
DescribeMultiplexResponse -> Rep DescribeMultiplexResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMultiplexResponse' 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:
--
-- 'state', 'describeMultiplexResponse_state' - The current state of the multiplex.
--
-- 'arn', 'describeMultiplexResponse_arn' - The unique arn of the multiplex.
--
-- 'pipelinesRunningCount', 'describeMultiplexResponse_pipelinesRunningCount' - The number of currently healthy pipelines.
--
-- 'availabilityZones', 'describeMultiplexResponse_availabilityZones' - A list of availability zones for the multiplex.
--
-- 'programCount', 'describeMultiplexResponse_programCount' - The number of programs in the multiplex.
--
-- 'destinations', 'describeMultiplexResponse_destinations' - A list of the multiplex output destinations.
--
-- 'name', 'describeMultiplexResponse_name' - The name of the multiplex.
--
-- 'id', 'describeMultiplexResponse_id' - The unique id of the multiplex.
--
-- 'multiplexSettings', 'describeMultiplexResponse_multiplexSettings' - Configuration for a multiplex event.
--
-- 'tags', 'describeMultiplexResponse_tags' - A collection of key-value pairs.
--
-- 'httpStatus', 'describeMultiplexResponse_httpStatus' - The response's http status code.
newDescribeMultiplexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMultiplexResponse
newDescribeMultiplexResponse :: Int -> DescribeMultiplexResponse
newDescribeMultiplexResponse Int
pHttpStatus_ =
  DescribeMultiplexResponse' :: Maybe MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Int
-> DescribeMultiplexResponse
DescribeMultiplexResponse'
    { $sel:state:DescribeMultiplexResponse' :: Maybe MultiplexState
state = Maybe MultiplexState
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeMultiplexResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelinesRunningCount:DescribeMultiplexResponse' :: Maybe Int
pipelinesRunningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:DescribeMultiplexResponse' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:programCount:DescribeMultiplexResponse' :: Maybe Int
programCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:DescribeMultiplexResponse' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeMultiplexResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:DescribeMultiplexResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexSettings:DescribeMultiplexResponse' :: Maybe MultiplexSettings
multiplexSettings = Maybe MultiplexSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeMultiplexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeMultiplexResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current state of the multiplex.
describeMultiplexResponse_state :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe MultiplexState)
describeMultiplexResponse_state :: (Maybe MultiplexState -> f (Maybe MultiplexState))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_state = (DescribeMultiplexResponse -> Maybe MultiplexState)
-> (DescribeMultiplexResponse
    -> Maybe MultiplexState -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe MultiplexState)
     (Maybe MultiplexState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe MultiplexState
state :: Maybe MultiplexState
$sel:state:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe MultiplexState
state} -> Maybe MultiplexState
state) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe MultiplexState
a -> DescribeMultiplexResponse
s {$sel:state:DescribeMultiplexResponse' :: Maybe MultiplexState
state = Maybe MultiplexState
a} :: DescribeMultiplexResponse)

-- | The unique arn of the multiplex.
describeMultiplexResponse_arn :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe Prelude.Text)
describeMultiplexResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_arn = (DescribeMultiplexResponse -> Maybe Text)
-> (DescribeMultiplexResponse
    -> Maybe Text -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe Text
a -> DescribeMultiplexResponse
s {$sel:arn:DescribeMultiplexResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeMultiplexResponse)

-- | The number of currently healthy pipelines.
describeMultiplexResponse_pipelinesRunningCount :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe Prelude.Int)
describeMultiplexResponse_pipelinesRunningCount :: (Maybe Int -> f (Maybe Int))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_pipelinesRunningCount = (DescribeMultiplexResponse -> Maybe Int)
-> (DescribeMultiplexResponse
    -> Maybe Int -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe Int
pipelinesRunningCount :: Maybe Int
$sel:pipelinesRunningCount:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe Int
pipelinesRunningCount} -> Maybe Int
pipelinesRunningCount) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe Int
a -> DescribeMultiplexResponse
s {$sel:pipelinesRunningCount:DescribeMultiplexResponse' :: Maybe Int
pipelinesRunningCount = Maybe Int
a} :: DescribeMultiplexResponse)

-- | A list of availability zones for the multiplex.
describeMultiplexResponse_availabilityZones :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe [Prelude.Text])
describeMultiplexResponse_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_availabilityZones = (DescribeMultiplexResponse -> Maybe [Text])
-> (DescribeMultiplexResponse
    -> Maybe [Text] -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe [Text]
a -> DescribeMultiplexResponse
s {$sel:availabilityZones:DescribeMultiplexResponse' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: DescribeMultiplexResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of programs in the multiplex.
describeMultiplexResponse_programCount :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe Prelude.Int)
describeMultiplexResponse_programCount :: (Maybe Int -> f (Maybe Int))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_programCount = (DescribeMultiplexResponse -> Maybe Int)
-> (DescribeMultiplexResponse
    -> Maybe Int -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe Int
programCount :: Maybe Int
$sel:programCount:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe Int
programCount} -> Maybe Int
programCount) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe Int
a -> DescribeMultiplexResponse
s {$sel:programCount:DescribeMultiplexResponse' :: Maybe Int
programCount = Maybe Int
a} :: DescribeMultiplexResponse)

-- | A list of the multiplex output destinations.
describeMultiplexResponse_destinations :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe [MultiplexOutputDestination])
describeMultiplexResponse_destinations :: (Maybe [MultiplexOutputDestination]
 -> f (Maybe [MultiplexOutputDestination]))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_destinations = (DescribeMultiplexResponse -> Maybe [MultiplexOutputDestination])
-> (DescribeMultiplexResponse
    -> Maybe [MultiplexOutputDestination] -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe [MultiplexOutputDestination]
destinations :: Maybe [MultiplexOutputDestination]
$sel:destinations:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe [MultiplexOutputDestination]
destinations} -> Maybe [MultiplexOutputDestination]
destinations) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe [MultiplexOutputDestination]
a -> DescribeMultiplexResponse
s {$sel:destinations:DescribeMultiplexResponse' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
a} :: DescribeMultiplexResponse) ((Maybe [MultiplexOutputDestination]
  -> f (Maybe [MultiplexOutputDestination]))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((Maybe [MultiplexOutputDestination]
     -> f (Maybe [MultiplexOutputDestination]))
    -> Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> (Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
-> Iso
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
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
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
  [MultiplexOutputDestination]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the multiplex.
describeMultiplexResponse_name :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe Prelude.Text)
describeMultiplexResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_name = (DescribeMultiplexResponse -> Maybe Text)
-> (DescribeMultiplexResponse
    -> Maybe Text -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe Text
a -> DescribeMultiplexResponse
s {$sel:name:DescribeMultiplexResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeMultiplexResponse)

-- | The unique id of the multiplex.
describeMultiplexResponse_id :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe Prelude.Text)
describeMultiplexResponse_id :: (Maybe Text -> f (Maybe Text))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_id = (DescribeMultiplexResponse -> Maybe Text)
-> (DescribeMultiplexResponse
    -> Maybe Text -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe Text
id :: Maybe Text
$sel:id:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe Text
a -> DescribeMultiplexResponse
s {$sel:id:DescribeMultiplexResponse' :: Maybe Text
id = Maybe Text
a} :: DescribeMultiplexResponse)

-- | Configuration for a multiplex event.
describeMultiplexResponse_multiplexSettings :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe MultiplexSettings)
describeMultiplexResponse_multiplexSettings :: (Maybe MultiplexSettings -> f (Maybe MultiplexSettings))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_multiplexSettings = (DescribeMultiplexResponse -> Maybe MultiplexSettings)
-> (DescribeMultiplexResponse
    -> Maybe MultiplexSettings -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe MultiplexSettings)
     (Maybe MultiplexSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe MultiplexSettings
multiplexSettings :: Maybe MultiplexSettings
$sel:multiplexSettings:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe MultiplexSettings
multiplexSettings} -> Maybe MultiplexSettings
multiplexSettings) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe MultiplexSettings
a -> DescribeMultiplexResponse
s {$sel:multiplexSettings:DescribeMultiplexResponse' :: Maybe MultiplexSettings
multiplexSettings = Maybe MultiplexSettings
a} :: DescribeMultiplexResponse)

-- | A collection of key-value pairs.
describeMultiplexResponse_tags :: Lens.Lens' DescribeMultiplexResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeMultiplexResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeMultiplexResponse -> f DescribeMultiplexResponse
describeMultiplexResponse_tags = (DescribeMultiplexResponse -> Maybe (HashMap Text Text))
-> (DescribeMultiplexResponse
    -> Maybe (HashMap Text Text) -> DescribeMultiplexResponse)
-> Lens
     DescribeMultiplexResponse
     DescribeMultiplexResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMultiplexResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeMultiplexResponse' :: DescribeMultiplexResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeMultiplexResponse
s@DescribeMultiplexResponse' {} Maybe (HashMap Text Text)
a -> DescribeMultiplexResponse
s {$sel:tags:DescribeMultiplexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeMultiplexResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeMultiplexResponse -> f DescribeMultiplexResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeMultiplexResponse
-> f DescribeMultiplexResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeMultiplexResponse