{-# 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.MultiplexProgramSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MultiplexProgramSummary = MultiplexProgramSummary'
{
MultiplexProgramSummary -> Maybe Text
programName :: Prelude.Maybe Prelude.Text,
MultiplexProgramSummary -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text
}
deriving (MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
(MultiplexProgramSummary -> MultiplexProgramSummary -> Bool)
-> (MultiplexProgramSummary -> MultiplexProgramSummary -> Bool)
-> Eq MultiplexProgramSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
$c/= :: MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
== :: MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
$c== :: MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
Prelude.Eq, ReadPrec [MultiplexProgramSummary]
ReadPrec MultiplexProgramSummary
Int -> ReadS MultiplexProgramSummary
ReadS [MultiplexProgramSummary]
(Int -> ReadS MultiplexProgramSummary)
-> ReadS [MultiplexProgramSummary]
-> ReadPrec MultiplexProgramSummary
-> ReadPrec [MultiplexProgramSummary]
-> Read MultiplexProgramSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexProgramSummary]
$creadListPrec :: ReadPrec [MultiplexProgramSummary]
readPrec :: ReadPrec MultiplexProgramSummary
$creadPrec :: ReadPrec MultiplexProgramSummary
readList :: ReadS [MultiplexProgramSummary]
$creadList :: ReadS [MultiplexProgramSummary]
readsPrec :: Int -> ReadS MultiplexProgramSummary
$creadsPrec :: Int -> ReadS MultiplexProgramSummary
Prelude.Read, Int -> MultiplexProgramSummary -> ShowS
[MultiplexProgramSummary] -> ShowS
MultiplexProgramSummary -> String
(Int -> MultiplexProgramSummary -> ShowS)
-> (MultiplexProgramSummary -> String)
-> ([MultiplexProgramSummary] -> ShowS)
-> Show MultiplexProgramSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexProgramSummary] -> ShowS
$cshowList :: [MultiplexProgramSummary] -> ShowS
show :: MultiplexProgramSummary -> String
$cshow :: MultiplexProgramSummary -> String
showsPrec :: Int -> MultiplexProgramSummary -> ShowS
$cshowsPrec :: Int -> MultiplexProgramSummary -> ShowS
Prelude.Show, (forall x.
MultiplexProgramSummary -> Rep MultiplexProgramSummary x)
-> (forall x.
Rep MultiplexProgramSummary x -> MultiplexProgramSummary)
-> Generic MultiplexProgramSummary
forall x. Rep MultiplexProgramSummary x -> MultiplexProgramSummary
forall x. MultiplexProgramSummary -> Rep MultiplexProgramSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MultiplexProgramSummary x -> MultiplexProgramSummary
$cfrom :: forall x. MultiplexProgramSummary -> Rep MultiplexProgramSummary x
Prelude.Generic)
newMultiplexProgramSummary ::
MultiplexProgramSummary
newMultiplexProgramSummary :: MultiplexProgramSummary
newMultiplexProgramSummary =
MultiplexProgramSummary' :: Maybe Text -> Maybe Text -> MultiplexProgramSummary
MultiplexProgramSummary'
{ $sel:programName:MultiplexProgramSummary' :: Maybe Text
programName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:channelId:MultiplexProgramSummary' :: Maybe Text
channelId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
multiplexProgramSummary_programName :: Lens.Lens' MultiplexProgramSummary (Prelude.Maybe Prelude.Text)
multiplexProgramSummary_programName :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgramSummary -> f MultiplexProgramSummary
multiplexProgramSummary_programName = (MultiplexProgramSummary -> Maybe Text)
-> (MultiplexProgramSummary
-> Maybe Text -> MultiplexProgramSummary)
-> Lens
MultiplexProgramSummary
MultiplexProgramSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgramSummary' {Maybe Text
programName :: Maybe Text
$sel:programName:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
programName} -> Maybe Text
programName) (\s :: MultiplexProgramSummary
s@MultiplexProgramSummary' {} Maybe Text
a -> MultiplexProgramSummary
s {$sel:programName:MultiplexProgramSummary' :: Maybe Text
programName = Maybe Text
a} :: MultiplexProgramSummary)
multiplexProgramSummary_channelId :: Lens.Lens' MultiplexProgramSummary (Prelude.Maybe Prelude.Text)
multiplexProgramSummary_channelId :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgramSummary -> f MultiplexProgramSummary
multiplexProgramSummary_channelId = (MultiplexProgramSummary -> Maybe Text)
-> (MultiplexProgramSummary
-> Maybe Text -> MultiplexProgramSummary)
-> Lens
MultiplexProgramSummary
MultiplexProgramSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgramSummary' {Maybe Text
channelId :: Maybe Text
$sel:channelId:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
channelId} -> Maybe Text
channelId) (\s :: MultiplexProgramSummary
s@MultiplexProgramSummary' {} Maybe Text
a -> MultiplexProgramSummary
s {$sel:channelId:MultiplexProgramSummary' :: Maybe Text
channelId = Maybe Text
a} :: MultiplexProgramSummary)
instance Core.FromJSON MultiplexProgramSummary where
parseJSON :: Value -> Parser MultiplexProgramSummary
parseJSON =
String
-> (Object -> Parser MultiplexProgramSummary)
-> Value
-> Parser MultiplexProgramSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MultiplexProgramSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> MultiplexProgramSummary
MultiplexProgramSummary'
(Maybe Text -> Maybe Text -> MultiplexProgramSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MultiplexProgramSummary)
forall (f :: * -> *) a b. Functor 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 -> MultiplexProgramSummary)
-> Parser (Maybe Text) -> Parser MultiplexProgramSummary
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")
)
instance Prelude.Hashable MultiplexProgramSummary
instance Prelude.NFData MultiplexProgramSummary