{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.Multiplex
-- 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)
module Amazonka.MediaLive.Types.Multiplex where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.MultiplexOutputDestination
import Amazonka.MediaLive.Types.MultiplexSettings
import Amazonka.MediaLive.Types.MultiplexState
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'Multiplex' 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', 'multiplex_state' - The current state of the multiplex.
--
-- 'arn', 'multiplex_arn' - The unique arn of the multiplex.
--
-- 'pipelinesRunningCount', 'multiplex_pipelinesRunningCount' - The number of currently healthy pipelines.
--
-- 'availabilityZones', 'multiplex_availabilityZones' - A list of availability zones for the multiplex.
--
-- 'programCount', 'multiplex_programCount' - The number of programs in the multiplex.
--
-- 'destinations', 'multiplex_destinations' - A list of the multiplex output destinations.
--
-- 'name', 'multiplex_name' - The name of the multiplex.
--
-- 'id', 'multiplex_id' - The unique id of the multiplex.
--
-- 'multiplexSettings', 'multiplex_multiplexSettings' - Configuration for a multiplex event.
--
-- 'tags', 'multiplex_tags' - A collection of key-value pairs.
newMultiplex ::
  Multiplex
newMultiplex :: Multiplex
newMultiplex =
  Multiplex' :: Maybe MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Multiplex
Multiplex'
    { $sel:state:Multiplex' :: Maybe MultiplexState
state = Maybe MultiplexState
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Multiplex' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pipelinesRunningCount:Multiplex' :: Maybe Int
pipelinesRunningCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:Multiplex' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:programCount:Multiplex' :: Maybe Int
programCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:destinations:Multiplex' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Multiplex' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Multiplex' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiplexSettings:Multiplex' :: Maybe MultiplexSettings
multiplexSettings = Maybe MultiplexSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Multiplex' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

-- | A list of availability zones for the multiplex.
multiplex_availabilityZones :: Lens.Lens' Multiplex (Prelude.Maybe [Prelude.Text])
multiplex_availabilityZones :: (Maybe [Text] -> f (Maybe [Text])) -> Multiplex -> f Multiplex
multiplex_availabilityZones = (Multiplex -> Maybe [Text])
-> (Multiplex -> Maybe [Text] -> Multiplex)
-> Lens Multiplex Multiplex (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Multiplex' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:Multiplex' :: Multiplex -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: Multiplex
s@Multiplex' {} Maybe [Text]
a -> Multiplex
s {$sel:availabilityZones:Multiplex' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: Multiplex) ((Maybe [Text] -> f (Maybe [Text])) -> Multiplex -> f Multiplex)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Multiplex
-> f Multiplex
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.
multiplex_programCount :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Int)
multiplex_programCount :: (Maybe Int -> f (Maybe Int)) -> Multiplex -> f Multiplex
multiplex_programCount = (Multiplex -> Maybe Int)
-> (Multiplex -> Maybe Int -> Multiplex)
-> Lens Multiplex Multiplex (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Multiplex' {Maybe Int
programCount :: Maybe Int
$sel:programCount:Multiplex' :: Multiplex -> Maybe Int
programCount} -> Maybe Int
programCount) (\s :: Multiplex
s@Multiplex' {} Maybe Int
a -> Multiplex
s {$sel:programCount:Multiplex' :: Maybe Int
programCount = Maybe Int
a} :: Multiplex)

-- | A list of the multiplex output destinations.
multiplex_destinations :: Lens.Lens' Multiplex (Prelude.Maybe [MultiplexOutputDestination])
multiplex_destinations :: (Maybe [MultiplexOutputDestination]
 -> f (Maybe [MultiplexOutputDestination]))
-> Multiplex -> f Multiplex
multiplex_destinations = (Multiplex -> Maybe [MultiplexOutputDestination])
-> (Multiplex -> Maybe [MultiplexOutputDestination] -> Multiplex)
-> Lens
     Multiplex
     Multiplex
     (Maybe [MultiplexOutputDestination])
     (Maybe [MultiplexOutputDestination])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Multiplex' {Maybe [MultiplexOutputDestination]
destinations :: Maybe [MultiplexOutputDestination]
$sel:destinations:Multiplex' :: Multiplex -> Maybe [MultiplexOutputDestination]
destinations} -> Maybe [MultiplexOutputDestination]
destinations) (\s :: Multiplex
s@Multiplex' {} Maybe [MultiplexOutputDestination]
a -> Multiplex
s {$sel:destinations:Multiplex' :: Maybe [MultiplexOutputDestination]
destinations = Maybe [MultiplexOutputDestination]
a} :: Multiplex) ((Maybe [MultiplexOutputDestination]
  -> f (Maybe [MultiplexOutputDestination]))
 -> Multiplex -> f Multiplex)
-> ((Maybe [MultiplexOutputDestination]
     -> f (Maybe [MultiplexOutputDestination]))
    -> Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> (Maybe [MultiplexOutputDestination]
    -> f (Maybe [MultiplexOutputDestination]))
-> Multiplex
-> f Multiplex
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.
multiplex_name :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Text)
multiplex_name :: (Maybe Text -> f (Maybe Text)) -> Multiplex -> f Multiplex
multiplex_name = (Multiplex -> Maybe Text)
-> (Multiplex -> Maybe Text -> Multiplex)
-> Lens Multiplex Multiplex (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Multiplex' {Maybe Text
name :: Maybe Text
$sel:name:Multiplex' :: Multiplex -> Maybe Text
name} -> Maybe Text
name) (\s :: Multiplex
s@Multiplex' {} Maybe Text
a -> Multiplex
s {$sel:name:Multiplex' :: Maybe Text
name = Maybe Text
a} :: Multiplex)

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

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

-- | A collection of key-value pairs.
multiplex_tags :: Lens.Lens' Multiplex (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
multiplex_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Multiplex -> f Multiplex
multiplex_tags = (Multiplex -> Maybe (HashMap Text Text))
-> (Multiplex -> Maybe (HashMap Text Text) -> Multiplex)
-> Lens
     Multiplex
     Multiplex
     (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 (\Multiplex' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Multiplex' :: Multiplex -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Multiplex
s@Multiplex' {} Maybe (HashMap Text Text)
a -> Multiplex
s {$sel:tags:Multiplex' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Multiplex) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Multiplex -> f Multiplex)
-> ((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)))
-> Multiplex
-> f Multiplex
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

instance Core.FromJSON Multiplex where
  parseJSON :: Value -> Parser Multiplex
parseJSON =
    String -> (Object -> Parser Multiplex) -> Value -> Parser Multiplex
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Multiplex"
      ( \Object
x ->
          Maybe MultiplexState
-> Maybe Text
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe (HashMap Text Text)
-> Multiplex
Multiplex'
            (Maybe MultiplexState
 -> Maybe Text
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe Int
 -> Maybe [MultiplexOutputDestination]
 -> Maybe Text
 -> Maybe Text
 -> Maybe MultiplexSettings
 -> Maybe (HashMap Text Text)
 -> Multiplex)
-> Parser (Maybe MultiplexState)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MultiplexState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe Int
   -> Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Text]
      -> Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pipelinesRunningCount")
            Parser
  (Maybe [Text]
   -> Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Int
      -> Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"availabilityZones"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Int
   -> Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe Int)
-> Parser
     (Maybe [MultiplexOutputDestination]
      -> Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"programCount")
            Parser
  (Maybe [MultiplexOutputDestination]
   -> Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe [MultiplexOutputDestination])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe (Maybe [MultiplexOutputDestination]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinations" Parser (Maybe (Maybe [MultiplexOutputDestination]))
-> Maybe [MultiplexOutputDestination]
-> Parser (Maybe [MultiplexOutputDestination])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MultiplexOutputDestination]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe MultiplexSettings
      -> Maybe (HashMap Text Text)
      -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe MultiplexSettings
   -> Maybe (HashMap Text Text)
   -> Multiplex)
-> Parser (Maybe Text)
-> Parser
     (Maybe MultiplexSettings -> Maybe (HashMap Text Text) -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"id")
            Parser
  (Maybe MultiplexSettings -> Maybe (HashMap Text Text) -> Multiplex)
-> Parser (Maybe MultiplexSettings)
-> Parser (Maybe (HashMap Text Text) -> Multiplex)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MultiplexSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"multiplexSettings")
            Parser (Maybe (HashMap Text Text) -> Multiplex)
-> Parser (Maybe (HashMap Text Text)) -> Parser Multiplex
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable Multiplex

instance Prelude.NFData Multiplex