{-# 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.MultiplexProgramChannelDestinationSettings 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 MultiplexProgramChannelDestinationSettings = MultiplexProgramChannelDestinationSettings'
{
MultiplexProgramChannelDestinationSettings -> Maybe Text
multiplexId :: Prelude.Maybe Prelude.Text,
MultiplexProgramChannelDestinationSettings -> Maybe Text
programName :: Prelude.Maybe Prelude.Text
}
deriving (MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool
$c/= :: MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool
== :: MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool
$c== :: MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool
Prelude.Eq, ReadPrec [MultiplexProgramChannelDestinationSettings]
ReadPrec MultiplexProgramChannelDestinationSettings
Int -> ReadS MultiplexProgramChannelDestinationSettings
ReadS [MultiplexProgramChannelDestinationSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MultiplexProgramChannelDestinationSettings]
$creadListPrec :: ReadPrec [MultiplexProgramChannelDestinationSettings]
readPrec :: ReadPrec MultiplexProgramChannelDestinationSettings
$creadPrec :: ReadPrec MultiplexProgramChannelDestinationSettings
readList :: ReadS [MultiplexProgramChannelDestinationSettings]
$creadList :: ReadS [MultiplexProgramChannelDestinationSettings]
readsPrec :: Int -> ReadS MultiplexProgramChannelDestinationSettings
$creadsPrec :: Int -> ReadS MultiplexProgramChannelDestinationSettings
Prelude.Read, Int -> MultiplexProgramChannelDestinationSettings -> ShowS
[MultiplexProgramChannelDestinationSettings] -> ShowS
MultiplexProgramChannelDestinationSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MultiplexProgramChannelDestinationSettings] -> ShowS
$cshowList :: [MultiplexProgramChannelDestinationSettings] -> ShowS
show :: MultiplexProgramChannelDestinationSettings -> String
$cshow :: MultiplexProgramChannelDestinationSettings -> String
showsPrec :: Int -> MultiplexProgramChannelDestinationSettings -> ShowS
$cshowsPrec :: Int -> MultiplexProgramChannelDestinationSettings -> ShowS
Prelude.Show, forall x.
Rep MultiplexProgramChannelDestinationSettings x
-> MultiplexProgramChannelDestinationSettings
forall x.
MultiplexProgramChannelDestinationSettings
-> Rep MultiplexProgramChannelDestinationSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MultiplexProgramChannelDestinationSettings x
-> MultiplexProgramChannelDestinationSettings
$cfrom :: forall x.
MultiplexProgramChannelDestinationSettings
-> Rep MultiplexProgramChannelDestinationSettings x
Prelude.Generic)
newMultiplexProgramChannelDestinationSettings ::
MultiplexProgramChannelDestinationSettings
newMultiplexProgramChannelDestinationSettings :: MultiplexProgramChannelDestinationSettings
newMultiplexProgramChannelDestinationSettings =
MultiplexProgramChannelDestinationSettings'
{ $sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: Maybe Text
multiplexId =
forall a. Maybe a
Prelude.Nothing,
$sel:programName:MultiplexProgramChannelDestinationSettings' :: Maybe Text
programName = forall a. Maybe a
Prelude.Nothing
}
multiplexProgramChannelDestinationSettings_multiplexId :: Lens.Lens' MultiplexProgramChannelDestinationSettings (Prelude.Maybe Prelude.Text)
multiplexProgramChannelDestinationSettings_multiplexId :: Lens' MultiplexProgramChannelDestinationSettings (Maybe Text)
multiplexProgramChannelDestinationSettings_multiplexId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgramChannelDestinationSettings' {Maybe Text
multiplexId :: Maybe Text
$sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
multiplexId} -> Maybe Text
multiplexId) (\s :: MultiplexProgramChannelDestinationSettings
s@MultiplexProgramChannelDestinationSettings' {} Maybe Text
a -> MultiplexProgramChannelDestinationSettings
s {$sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: Maybe Text
multiplexId = Maybe Text
a} :: MultiplexProgramChannelDestinationSettings)
multiplexProgramChannelDestinationSettings_programName :: Lens.Lens' MultiplexProgramChannelDestinationSettings (Prelude.Maybe Prelude.Text)
multiplexProgramChannelDestinationSettings_programName :: Lens' MultiplexProgramChannelDestinationSettings (Maybe Text)
multiplexProgramChannelDestinationSettings_programName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MultiplexProgramChannelDestinationSettings' {Maybe Text
programName :: Maybe Text
$sel:programName:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
programName} -> Maybe Text
programName) (\s :: MultiplexProgramChannelDestinationSettings
s@MultiplexProgramChannelDestinationSettings' {} Maybe Text
a -> MultiplexProgramChannelDestinationSettings
s {$sel:programName:MultiplexProgramChannelDestinationSettings' :: Maybe Text
programName = Maybe Text
a} :: MultiplexProgramChannelDestinationSettings)
instance
Data.FromJSON
MultiplexProgramChannelDestinationSettings
where
parseJSON :: Value -> Parser MultiplexProgramChannelDestinationSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MultiplexProgramChannelDestinationSettings"
( \Object
x ->
Maybe Text
-> Maybe Text -> MultiplexProgramChannelDestinationSettings
MultiplexProgramChannelDestinationSettings'
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
"multiplexId")
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
MultiplexProgramChannelDestinationSettings
where
hashWithSalt :: Int -> MultiplexProgramChannelDestinationSettings -> Int
hashWithSalt
Int
_salt
MultiplexProgramChannelDestinationSettings' {Maybe Text
programName :: Maybe Text
multiplexId :: Maybe Text
$sel:programName:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
$sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
multiplexId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
programName
instance
Prelude.NFData
MultiplexProgramChannelDestinationSettings
where
rnf :: MultiplexProgramChannelDestinationSettings -> ()
rnf MultiplexProgramChannelDestinationSettings' {Maybe Text
programName :: Maybe Text
multiplexId :: Maybe Text
$sel:programName:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
$sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
multiplexId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
programName
instance
Data.ToJSON
MultiplexProgramChannelDestinationSettings
where
toJSON :: MultiplexProgramChannelDestinationSettings -> Value
toJSON
MultiplexProgramChannelDestinationSettings' {Maybe Text
programName :: Maybe Text
multiplexId :: Maybe Text
$sel:programName:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
$sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: MultiplexProgramChannelDestinationSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"multiplexId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
multiplexId,
(Key
"programName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
programName
]
)