{-# 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.Lens as Lens
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
(MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool)
-> (MultiplexProgramChannelDestinationSettings
-> MultiplexProgramChannelDestinationSettings -> Bool)
-> Eq MultiplexProgramChannelDestinationSettings
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]
(Int -> ReadS MultiplexProgramChannelDestinationSettings)
-> ReadS [MultiplexProgramChannelDestinationSettings]
-> ReadPrec MultiplexProgramChannelDestinationSettings
-> ReadPrec [MultiplexProgramChannelDestinationSettings]
-> Read 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
(Int -> MultiplexProgramChannelDestinationSettings -> ShowS)
-> (MultiplexProgramChannelDestinationSettings -> String)
-> ([MultiplexProgramChannelDestinationSettings] -> ShowS)
-> Show MultiplexProgramChannelDestinationSettings
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.
MultiplexProgramChannelDestinationSettings
-> Rep MultiplexProgramChannelDestinationSettings x)
-> (forall x.
Rep MultiplexProgramChannelDestinationSettings x
-> MultiplexProgramChannelDestinationSettings)
-> Generic MultiplexProgramChannelDestinationSettings
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' :: Maybe Text
-> Maybe Text -> MultiplexProgramChannelDestinationSettings
MultiplexProgramChannelDestinationSettings'
{ $sel:multiplexId:MultiplexProgramChannelDestinationSettings' :: Maybe Text
multiplexId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:programName:MultiplexProgramChannelDestinationSettings' :: Maybe Text
programName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
multiplexProgramChannelDestinationSettings_multiplexId :: Lens.Lens' MultiplexProgramChannelDestinationSettings (Prelude.Maybe Prelude.Text)
multiplexProgramChannelDestinationSettings_multiplexId :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgramChannelDestinationSettings
-> f MultiplexProgramChannelDestinationSettings
multiplexProgramChannelDestinationSettings_multiplexId = (MultiplexProgramChannelDestinationSettings -> Maybe Text)
-> (MultiplexProgramChannelDestinationSettings
-> Maybe Text -> MultiplexProgramChannelDestinationSettings)
-> Lens
MultiplexProgramChannelDestinationSettings
MultiplexProgramChannelDestinationSettings
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> MultiplexProgramChannelDestinationSettings
-> f MultiplexProgramChannelDestinationSettings
multiplexProgramChannelDestinationSettings_programName = (MultiplexProgramChannelDestinationSettings -> Maybe Text)
-> (MultiplexProgramChannelDestinationSettings
-> Maybe Text -> MultiplexProgramChannelDestinationSettings)
-> Lens
MultiplexProgramChannelDestinationSettings
MultiplexProgramChannelDestinationSettings
(Maybe Text)
(Maybe Text)
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
Core.FromJSON
MultiplexProgramChannelDestinationSettings
where
parseJSON :: Value -> Parser MultiplexProgramChannelDestinationSettings
parseJSON =
String
-> (Object -> Parser MultiplexProgramChannelDestinationSettings)
-> Value
-> Parser MultiplexProgramChannelDestinationSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MultiplexProgramChannelDestinationSettings"
( \Object
x ->
Maybe Text
-> Maybe Text -> MultiplexProgramChannelDestinationSettings
MultiplexProgramChannelDestinationSettings'
(Maybe Text
-> Maybe Text -> MultiplexProgramChannelDestinationSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> MultiplexProgramChannelDestinationSettings)
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
"multiplexId")
Parser (Maybe Text -> MultiplexProgramChannelDestinationSettings)
-> Parser (Maybe Text)
-> Parser MultiplexProgramChannelDestinationSettings
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")
)
instance
Prelude.Hashable
MultiplexProgramChannelDestinationSettings
instance
Prelude.NFData
MultiplexProgramChannelDestinationSettings
instance
Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"multiplexId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
multiplexId,
(Text
"programName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
programName
]
)