{-# 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.MultiplexProgram where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.MultiplexProgramPacketIdentifiersMap
import Amazonka.MediaLive.Types.MultiplexProgramPipelineDetail
import Amazonka.MediaLive.Types.MultiplexProgramSettings
import qualified Amazonka.Prelude as Prelude
data MultiplexProgram = MultiplexProgram'
{
MultiplexProgram -> Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap :: Prelude.Maybe MultiplexProgramPacketIdentifiersMap,
MultiplexProgram -> Maybe [MultiplexProgramPipelineDetail]
pipelineDetails :: Prelude.Maybe [MultiplexProgramPipelineDetail],
MultiplexProgram -> Maybe Text
programName :: Prelude.Maybe Prelude.Text,
MultiplexProgram -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
MultiplexProgram -> Maybe MultiplexProgramSettings
multiplexProgramSettings :: Prelude.Maybe MultiplexProgramSettings
}
deriving (MultiplexProgram -> MultiplexProgram -> Bool
(MultiplexProgram -> MultiplexProgram -> Bool)
-> (MultiplexProgram -> MultiplexProgram -> Bool)
-> Eq MultiplexProgram
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexProgram -> MultiplexProgram -> Bool
$c/= :: MultiplexProgram -> MultiplexProgram -> Bool
== :: MultiplexProgram -> MultiplexProgram -> Bool
$c== :: MultiplexProgram -> MultiplexProgram -> Bool
Prelude.Eq, ReadPrec [MultiplexProgram]
ReadPrec MultiplexProgram
Int -> ReadS MultiplexProgram
ReadS [MultiplexProgram]
(Int -> ReadS MultiplexProgram)
-> ReadS [MultiplexProgram]
-> ReadPrec MultiplexProgram
-> ReadPrec [MultiplexProgram]
-> Read MultiplexProgram
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexProgram]
$creadListPrec :: ReadPrec [MultiplexProgram]
readPrec :: ReadPrec MultiplexProgram
$creadPrec :: ReadPrec MultiplexProgram
readList :: ReadS [MultiplexProgram]
$creadList :: ReadS [MultiplexProgram]
readsPrec :: Int -> ReadS MultiplexProgram
$creadsPrec :: Int -> ReadS MultiplexProgram
Prelude.Read, Int -> MultiplexProgram -> ShowS
[MultiplexProgram] -> ShowS
MultiplexProgram -> String
(Int -> MultiplexProgram -> ShowS)
-> (MultiplexProgram -> String)
-> ([MultiplexProgram] -> ShowS)
-> Show MultiplexProgram
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexProgram] -> ShowS
$cshowList :: [MultiplexProgram] -> ShowS
show :: MultiplexProgram -> String
$cshow :: MultiplexProgram -> String
showsPrec :: Int -> MultiplexProgram -> ShowS
$cshowsPrec :: Int -> MultiplexProgram -> ShowS
Prelude.Show, (forall x. MultiplexProgram -> Rep MultiplexProgram x)
-> (forall x. Rep MultiplexProgram x -> MultiplexProgram)
-> Generic MultiplexProgram
forall x. Rep MultiplexProgram x -> MultiplexProgram
forall x. MultiplexProgram -> Rep MultiplexProgram x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MultiplexProgram x -> MultiplexProgram
$cfrom :: forall x. MultiplexProgram -> Rep MultiplexProgram x
Prelude.Generic)
newMultiplexProgram ::
MultiplexProgram
newMultiplexProgram :: MultiplexProgram
newMultiplexProgram =
MultiplexProgram' :: Maybe MultiplexProgramPacketIdentifiersMap
-> Maybe [MultiplexProgramPipelineDetail]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram
MultiplexProgram'
{ $sel:packetIdentifiersMap:MultiplexProgram' :: Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap =
Maybe MultiplexProgramPacketIdentifiersMap
forall a. Maybe a
Prelude.Nothing,
$sel:pipelineDetails:MultiplexProgram' :: Maybe [MultiplexProgramPipelineDetail]
pipelineDetails = Maybe [MultiplexProgramPipelineDetail]
forall a. Maybe a
Prelude.Nothing,
$sel:programName:MultiplexProgram' :: Maybe Text
programName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelId:MultiplexProgram' :: Maybe Text
channelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:multiplexProgramSettings:MultiplexProgram' :: Maybe MultiplexProgramSettings
multiplexProgramSettings = Maybe MultiplexProgramSettings
forall a. Maybe a
Prelude.Nothing
}
multiplexProgram_packetIdentifiersMap :: Lens.Lens' MultiplexProgram (Prelude.Maybe MultiplexProgramPacketIdentifiersMap)
multiplexProgram_packetIdentifiersMap :: (Maybe MultiplexProgramPacketIdentifiersMap
-> f (Maybe MultiplexProgramPacketIdentifiersMap))
-> MultiplexProgram -> f MultiplexProgram
multiplexProgram_packetIdentifiersMap = (MultiplexProgram -> Maybe MultiplexProgramPacketIdentifiersMap)
-> (MultiplexProgram
-> Maybe MultiplexProgramPacketIdentifiersMap -> MultiplexProgram)
-> Lens
MultiplexProgram
MultiplexProgram
(Maybe MultiplexProgramPacketIdentifiersMap)
(Maybe MultiplexProgramPacketIdentifiersMap)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgram' {Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap :: Maybe MultiplexProgramPacketIdentifiersMap
$sel:packetIdentifiersMap:MultiplexProgram' :: MultiplexProgram -> Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap} -> Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap) (\s :: MultiplexProgram
s@MultiplexProgram' {} Maybe MultiplexProgramPacketIdentifiersMap
a -> MultiplexProgram
s {$sel:packetIdentifiersMap:MultiplexProgram' :: Maybe MultiplexProgramPacketIdentifiersMap
packetIdentifiersMap = Maybe MultiplexProgramPacketIdentifiersMap
a} :: MultiplexProgram)
multiplexProgram_pipelineDetails :: Lens.Lens' MultiplexProgram (Prelude.Maybe [MultiplexProgramPipelineDetail])
multiplexProgram_pipelineDetails :: (Maybe [MultiplexProgramPipelineDetail]
-> f (Maybe [MultiplexProgramPipelineDetail]))
-> MultiplexProgram -> f MultiplexProgram
multiplexProgram_pipelineDetails = (MultiplexProgram -> Maybe [MultiplexProgramPipelineDetail])
-> (MultiplexProgram
-> Maybe [MultiplexProgramPipelineDetail] -> MultiplexProgram)
-> Lens
MultiplexProgram
MultiplexProgram
(Maybe [MultiplexProgramPipelineDetail])
(Maybe [MultiplexProgramPipelineDetail])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgram' {Maybe [MultiplexProgramPipelineDetail]
pipelineDetails :: Maybe [MultiplexProgramPipelineDetail]
$sel:pipelineDetails:MultiplexProgram' :: MultiplexProgram -> Maybe [MultiplexProgramPipelineDetail]
pipelineDetails} -> Maybe [MultiplexProgramPipelineDetail]
pipelineDetails) (\s :: MultiplexProgram
s@MultiplexProgram' {} Maybe [MultiplexProgramPipelineDetail]
a -> MultiplexProgram
s {$sel:pipelineDetails:MultiplexProgram' :: Maybe [MultiplexProgramPipelineDetail]
pipelineDetails = Maybe [MultiplexProgramPipelineDetail]
a} :: MultiplexProgram) ((Maybe [MultiplexProgramPipelineDetail]
-> f (Maybe [MultiplexProgramPipelineDetail]))
-> MultiplexProgram -> f MultiplexProgram)
-> ((Maybe [MultiplexProgramPipelineDetail]
-> f (Maybe [MultiplexProgramPipelineDetail]))
-> Maybe [MultiplexProgramPipelineDetail]
-> f (Maybe [MultiplexProgramPipelineDetail]))
-> (Maybe [MultiplexProgramPipelineDetail]
-> f (Maybe [MultiplexProgramPipelineDetail]))
-> MultiplexProgram
-> f MultiplexProgram
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
-> Iso
(Maybe [MultiplexProgramPipelineDetail])
(Maybe [MultiplexProgramPipelineDetail])
(Maybe [MultiplexProgramPipelineDetail])
(Maybe [MultiplexProgramPipelineDetail])
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
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
[MultiplexProgramPipelineDetail]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
multiplexProgram_programName :: Lens.Lens' MultiplexProgram (Prelude.Maybe Prelude.Text)
multiplexProgram_programName :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgram -> f MultiplexProgram
multiplexProgram_programName = (MultiplexProgram -> Maybe Text)
-> (MultiplexProgram -> Maybe Text -> MultiplexProgram)
-> Lens MultiplexProgram MultiplexProgram (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgram' {Maybe Text
programName :: Maybe Text
$sel:programName:MultiplexProgram' :: MultiplexProgram -> Maybe Text
programName} -> Maybe Text
programName) (\s :: MultiplexProgram
s@MultiplexProgram' {} Maybe Text
a -> MultiplexProgram
s {$sel:programName:MultiplexProgram' :: Maybe Text
programName = Maybe Text
a} :: MultiplexProgram)
multiplexProgram_channelId :: Lens.Lens' MultiplexProgram (Prelude.Maybe Prelude.Text)
multiplexProgram_channelId :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgram -> f MultiplexProgram
multiplexProgram_channelId = (MultiplexProgram -> Maybe Text)
-> (MultiplexProgram -> Maybe Text -> MultiplexProgram)
-> Lens MultiplexProgram MultiplexProgram (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgram' {Maybe Text
channelId :: Maybe Text
$sel:channelId:MultiplexProgram' :: MultiplexProgram -> Maybe Text
channelId} -> Maybe Text
channelId) (\s :: MultiplexProgram
s@MultiplexProgram' {} Maybe Text
a -> MultiplexProgram
s {$sel:channelId:MultiplexProgram' :: Maybe Text
channelId = Maybe Text
a} :: MultiplexProgram)
multiplexProgram_multiplexProgramSettings :: Lens.Lens' MultiplexProgram (Prelude.Maybe MultiplexProgramSettings)
multiplexProgram_multiplexProgramSettings :: (Maybe MultiplexProgramSettings
-> f (Maybe MultiplexProgramSettings))
-> MultiplexProgram -> f MultiplexProgram
multiplexProgram_multiplexProgramSettings = (MultiplexProgram -> Maybe MultiplexProgramSettings)
-> (MultiplexProgram
-> Maybe MultiplexProgramSettings -> MultiplexProgram)
-> Lens
MultiplexProgram
MultiplexProgram
(Maybe MultiplexProgramSettings)
(Maybe MultiplexProgramSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgram' {Maybe MultiplexProgramSettings
multiplexProgramSettings :: Maybe MultiplexProgramSettings
$sel:multiplexProgramSettings:MultiplexProgram' :: MultiplexProgram -> Maybe MultiplexProgramSettings
multiplexProgramSettings} -> Maybe MultiplexProgramSettings
multiplexProgramSettings) (\s :: MultiplexProgram
s@MultiplexProgram' {} Maybe MultiplexProgramSettings
a -> MultiplexProgram
s {$sel:multiplexProgramSettings:MultiplexProgram' :: Maybe MultiplexProgramSettings
multiplexProgramSettings = Maybe MultiplexProgramSettings
a} :: MultiplexProgram)
instance Core.FromJSON MultiplexProgram where
parseJSON :: Value -> Parser MultiplexProgram
parseJSON =
String
-> (Object -> Parser MultiplexProgram)
-> Value
-> Parser MultiplexProgram
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MultiplexProgram"
( \Object
x ->
Maybe MultiplexProgramPacketIdentifiersMap
-> Maybe [MultiplexProgramPipelineDetail]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram
MultiplexProgram'
(Maybe MultiplexProgramPacketIdentifiersMap
-> Maybe [MultiplexProgramPipelineDetail]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram)
-> Parser (Maybe MultiplexProgramPacketIdentifiersMap)
-> Parser
(Maybe [MultiplexProgramPipelineDetail]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe MultiplexProgramPacketIdentifiersMap)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"packetIdentifiersMap")
Parser
(Maybe [MultiplexProgramPipelineDetail]
-> Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram)
-> Parser (Maybe [MultiplexProgramPipelineDetail])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [MultiplexProgramPipelineDetail]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pipelineDetails"
Parser (Maybe (Maybe [MultiplexProgramPipelineDetail]))
-> Maybe [MultiplexProgramPipelineDetail]
-> Parser (Maybe [MultiplexProgramPipelineDetail])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MultiplexProgramPipelineDetail]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe MultiplexProgramSettings
-> MultiplexProgram)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe MultiplexProgramSettings -> MultiplexProgram)
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
"programName")
Parser
(Maybe Text -> Maybe MultiplexProgramSettings -> MultiplexProgram)
-> Parser (Maybe Text)
-> Parser (Maybe MultiplexProgramSettings -> MultiplexProgram)
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
"channelId")
Parser (Maybe MultiplexProgramSettings -> MultiplexProgram)
-> Parser (Maybe MultiplexProgramSettings)
-> Parser MultiplexProgram
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MultiplexProgramSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"multiplexProgramSettings")
)
instance Prelude.Hashable MultiplexProgram
instance Prelude.NFData MultiplexProgram