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