{-# 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 #-}
module Amazonka.MediaLive.Types.Multiplex where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.MultiplexOutputDestination
import Amazonka.MediaLive.Types.MultiplexSettings
import Amazonka.MediaLive.Types.MultiplexState
import qualified Amazonka.Prelude as Prelude
data Multiplex = Multiplex'
{
Multiplex -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Multiplex -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
Multiplex -> Maybe [MultiplexOutputDestination]
destinations :: Prelude.Maybe [MultiplexOutputDestination],
Multiplex -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Multiplex -> Maybe MultiplexSettings
multiplexSettings :: Prelude.Maybe MultiplexSettings,
Multiplex -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Multiplex -> Maybe Int
pipelinesRunningCount :: Prelude.Maybe Prelude.Int,
Multiplex -> Maybe Int
programCount :: Prelude.Maybe Prelude.Int,
Multiplex -> Maybe MultiplexState
state :: Prelude.Maybe MultiplexState,
Multiplex -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (Multiplex -> Multiplex -> Bool
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]
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
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. 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)
newMultiplex ::
Multiplex
newMultiplex :: Multiplex
newMultiplex =
Multiplex'
{ $sel:arn:Multiplex' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZones:Multiplex' :: Maybe [Text]
availabilityZones = forall a. Maybe a
Prelude.Nothing,
$sel:destinations:Multiplex' :: Maybe [MultiplexOutputDestination]
destinations = forall a. Maybe a
Prelude.Nothing,
$sel:id:Multiplex' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:multiplexSettings:Multiplex' :: Maybe MultiplexSettings
multiplexSettings = forall a. Maybe a
Prelude.Nothing,
$sel:name:Multiplex' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:pipelinesRunningCount:Multiplex' :: Maybe Int
pipelinesRunningCount = forall a. Maybe a
Prelude.Nothing,
$sel:programCount:Multiplex' :: Maybe Int
programCount = forall a. Maybe a
Prelude.Nothing,
$sel:state:Multiplex' :: Maybe MultiplexState
state = forall a. Maybe a
Prelude.Nothing,
$sel:tags:Multiplex' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
}
multiplex_arn :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Text)
multiplex_arn :: Lens' Multiplex (Maybe Text)
multiplex_arn = 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)
multiplex_availabilityZones :: Lens.Lens' Multiplex (Prelude.Maybe [Prelude.Text])
multiplex_availabilityZones :: Lens' Multiplex (Maybe [Text])
multiplex_availabilityZones = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
multiplex_destinations :: Lens.Lens' Multiplex (Prelude.Maybe [MultiplexOutputDestination])
multiplex_destinations :: Lens' Multiplex (Maybe [MultiplexOutputDestination])
multiplex_destinations = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
multiplex_id :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Text)
multiplex_id :: Lens' Multiplex (Maybe Text)
multiplex_id = 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)
multiplex_multiplexSettings :: Lens.Lens' Multiplex (Prelude.Maybe MultiplexSettings)
multiplex_multiplexSettings :: Lens' Multiplex (Maybe MultiplexSettings)
multiplex_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)
multiplex_name :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Text)
multiplex_name :: Lens' Multiplex (Maybe Text)
multiplex_name = 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)
multiplex_pipelinesRunningCount :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Int)
multiplex_pipelinesRunningCount :: Lens' Multiplex (Maybe Int)
multiplex_pipelinesRunningCount = 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)
multiplex_programCount :: Lens.Lens' Multiplex (Prelude.Maybe Prelude.Int)
multiplex_programCount :: Lens' Multiplex (Maybe Int)
multiplex_programCount = 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)
multiplex_state :: Lens.Lens' Multiplex (Prelude.Maybe MultiplexState)
multiplex_state :: Lens' Multiplex (Maybe MultiplexState)
multiplex_state = 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)
multiplex_tags :: Lens.Lens' Multiplex (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
multiplex_tags :: Lens' Multiplex (Maybe (HashMap Text Text))
multiplex_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON Multiplex where
parseJSON :: Value -> Parser Multiplex
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Multiplex"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe [MultiplexOutputDestination]
-> Maybe Text
-> Maybe MultiplexSettings
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe MultiplexState
-> Maybe (HashMap Text Text)
-> Multiplex
Multiplex'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"availabilityZones"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"destinations" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"multiplexSettings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pipelinesRunningCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"programCount")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Multiplex where
hashWithSalt :: Int -> Multiplex -> Int
hashWithSalt Int
_salt Multiplex' {Maybe Int
Maybe [Text]
Maybe [MultiplexOutputDestination]
Maybe Text
Maybe (HashMap Text Text)
Maybe MultiplexSettings
Maybe MultiplexState
tags :: Maybe (HashMap Text Text)
state :: Maybe MultiplexState
programCount :: Maybe Int
pipelinesRunningCount :: Maybe Int
name :: Maybe Text
multiplexSettings :: Maybe MultiplexSettings
id :: Maybe Text
destinations :: Maybe [MultiplexOutputDestination]
availabilityZones :: Maybe [Text]
arn :: Maybe Text
$sel:tags:Multiplex' :: Multiplex -> Maybe (HashMap Text Text)
$sel:state:Multiplex' :: Multiplex -> Maybe MultiplexState
$sel:programCount:Multiplex' :: Multiplex -> Maybe Int
$sel:pipelinesRunningCount:Multiplex' :: Multiplex -> Maybe Int
$sel:name:Multiplex' :: Multiplex -> Maybe Text
$sel:multiplexSettings:Multiplex' :: Multiplex -> Maybe MultiplexSettings
$sel:id:Multiplex' :: Multiplex -> Maybe Text
$sel:destinations:Multiplex' :: Multiplex -> Maybe [MultiplexOutputDestination]
$sel:availabilityZones:Multiplex' :: Multiplex -> Maybe [Text]
$sel:arn:Multiplex' :: Multiplex -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
availabilityZones
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MultiplexOutputDestination]
destinations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MultiplexSettings
multiplexSettings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pipelinesRunningCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
programCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MultiplexState
state
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
instance Prelude.NFData Multiplex where
rnf :: Multiplex -> ()
rnf Multiplex' {Maybe Int
Maybe [Text]
Maybe [MultiplexOutputDestination]
Maybe Text
Maybe (HashMap Text Text)
Maybe MultiplexSettings
Maybe MultiplexState
tags :: Maybe (HashMap Text Text)
state :: Maybe MultiplexState
programCount :: Maybe Int
pipelinesRunningCount :: Maybe Int
name :: Maybe Text
multiplexSettings :: Maybe MultiplexSettings
id :: Maybe Text
destinations :: Maybe [MultiplexOutputDestination]
availabilityZones :: Maybe [Text]
arn :: Maybe Text
$sel:tags:Multiplex' :: Multiplex -> Maybe (HashMap Text Text)
$sel:state:Multiplex' :: Multiplex -> Maybe MultiplexState
$sel:programCount:Multiplex' :: Multiplex -> Maybe Int
$sel:pipelinesRunningCount:Multiplex' :: Multiplex -> Maybe Int
$sel:name:Multiplex' :: Multiplex -> Maybe Text
$sel:multiplexSettings:Multiplex' :: Multiplex -> Maybe MultiplexSettings
$sel:id:Multiplex' :: Multiplex -> Maybe Text
$sel:destinations:Multiplex' :: Multiplex -> Maybe [MultiplexOutputDestination]
$sel:availabilityZones:Multiplex' :: Multiplex -> Maybe [Text]
$sel:arn:Multiplex' :: Multiplex -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
availabilityZones
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MultiplexOutputDestination]
destinations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MultiplexSettings
multiplexSettings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pipelinesRunningCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
programCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MultiplexState
state
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags