{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MultiplexProgramSummary = MultiplexProgramSummary'
{
MultiplexProgramSummary -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text,
MultiplexProgramSummary -> Maybe Text
programName :: Prelude.Maybe Prelude.Text
}
deriving (MultiplexProgramSummary -> MultiplexProgramSummary -> Bool
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]
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
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. 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'
{ $sel:channelId:MultiplexProgramSummary' :: Maybe Text
channelId =
forall a. Maybe a
Prelude.Nothing,
$sel:programName:MultiplexProgramSummary' :: Maybe Text
programName = forall a. Maybe a
Prelude.Nothing
}
multiplexProgramSummary_channelId :: Lens.Lens' MultiplexProgramSummary (Prelude.Maybe Prelude.Text)
multiplexProgramSummary_channelId :: Lens' MultiplexProgramSummary (Maybe Text)
multiplexProgramSummary_channelId = 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)
multiplexProgramSummary_programName :: Lens.Lens' MultiplexProgramSummary (Prelude.Maybe Prelude.Text)
multiplexProgramSummary_programName :: Lens' MultiplexProgramSummary (Maybe Text)
multiplexProgramSummary_programName = 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)
instance Data.FromJSON MultiplexProgramSummary where
parseJSON :: Value -> Parser MultiplexProgramSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MultiplexProgramSummary"
( \Object
x ->
Maybe Text -> Maybe Text -> MultiplexProgramSummary
MultiplexProgramSummary'
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
"channelId")
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
"programName")
)
instance Prelude.Hashable MultiplexProgramSummary where
hashWithSalt :: Int -> MultiplexProgramSummary -> Int
hashWithSalt Int
_salt MultiplexProgramSummary' {Maybe Text
programName :: Maybe Text
channelId :: Maybe Text
$sel:programName:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
$sel:channelId:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
channelId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
programName
instance Prelude.NFData MultiplexProgramSummary where
rnf :: MultiplexProgramSummary -> ()
rnf MultiplexProgramSummary' {Maybe Text
programName :: Maybe Text
channelId :: Maybe Text
$sel:programName:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
$sel:channelId:MultiplexProgramSummary' :: MultiplexProgramSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
programName