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