{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data MediaPackageOutputDestinationSettings = MediaPackageOutputDestinationSettings'
{
MediaPackageOutputDestinationSettings -> Maybe Text
channelId :: Prelude.Maybe Prelude.Text
}
deriving (MediaPackageOutputDestinationSettings
-> MediaPackageOutputDestinationSettings -> Bool
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]
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
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.
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'
{ $sel:channelId:MediaPackageOutputDestinationSettings' :: Maybe Text
channelId =
forall a. Maybe a
Prelude.Nothing
}
mediaPackageOutputDestinationSettings_channelId :: Lens.Lens' MediaPackageOutputDestinationSettings (Prelude.Maybe Prelude.Text)
mediaPackageOutputDestinationSettings_channelId :: Lens' MediaPackageOutputDestinationSettings (Maybe Text)
mediaPackageOutputDestinationSettings_channelId = 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
Data.FromJSON
MediaPackageOutputDestinationSettings
where
parseJSON :: Value -> Parser MediaPackageOutputDestinationSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MediaPackageOutputDestinationSettings"
( \Object
x ->
Maybe Text -> MediaPackageOutputDestinationSettings
MediaPackageOutputDestinationSettings'
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")
)
instance
Prelude.Hashable
MediaPackageOutputDestinationSettings
where
hashWithSalt :: Int -> MediaPackageOutputDestinationSettings -> Int
hashWithSalt
Int
_salt
MediaPackageOutputDestinationSettings' {Maybe Text
channelId :: Maybe Text
$sel:channelId:MediaPackageOutputDestinationSettings' :: MediaPackageOutputDestinationSettings -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
channelId
instance
Prelude.NFData
MediaPackageOutputDestinationSettings
where
rnf :: MediaPackageOutputDestinationSettings -> ()
rnf MediaPackageOutputDestinationSettings' {Maybe Text
channelId :: Maybe Text
$sel:channelId:MediaPackageOutputDestinationSettings' :: MediaPackageOutputDestinationSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
channelId
instance
Data.ToJSON
MediaPackageOutputDestinationSettings
where
toJSON :: MediaPackageOutputDestinationSettings -> Value
toJSON MediaPackageOutputDestinationSettings' {Maybe Text
channelId :: Maybe Text
$sel:channelId:MediaPackageOutputDestinationSettings' :: MediaPackageOutputDestinationSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"channelId" 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
channelId]
)