{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.OutputLocationRef
import qualified Amazonka.Prelude as Prelude
data MediaPackageGroupSettings = MediaPackageGroupSettings'
{
MediaPackageGroupSettings -> OutputLocationRef
destination :: OutputLocationRef
}
deriving (MediaPackageGroupSettings -> MediaPackageGroupSettings -> Bool
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]
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
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.
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'
{ $sel:destination:MediaPackageGroupSettings' :: OutputLocationRef
destination =
OutputLocationRef
pDestination_
}
mediaPackageGroupSettings_destination :: Lens.Lens' MediaPackageGroupSettings OutputLocationRef
mediaPackageGroupSettings_destination :: Lens' MediaPackageGroupSettings OutputLocationRef
mediaPackageGroupSettings_destination = 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 Data.FromJSON MediaPackageGroupSettings where
parseJSON :: Value -> Parser MediaPackageGroupSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MediaPackageGroupSettings"
( \Object
x ->
OutputLocationRef -> MediaPackageGroupSettings
MediaPackageGroupSettings'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"destination")
)
instance Prelude.Hashable MediaPackageGroupSettings where
hashWithSalt :: Int -> MediaPackageGroupSettings -> Int
hashWithSalt Int
_salt MediaPackageGroupSettings' {OutputLocationRef
destination :: OutputLocationRef
$sel:destination:MediaPackageGroupSettings' :: MediaPackageGroupSettings -> OutputLocationRef
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputLocationRef
destination
instance Prelude.NFData MediaPackageGroupSettings where
rnf :: MediaPackageGroupSettings -> ()
rnf MediaPackageGroupSettings' {OutputLocationRef
destination :: OutputLocationRef
$sel:destination:MediaPackageGroupSettings' :: MediaPackageGroupSettings -> OutputLocationRef
..} =
forall a. NFData a => a -> ()
Prelude.rnf OutputLocationRef
destination
instance Data.ToJSON MediaPackageGroupSettings where
toJSON :: MediaPackageGroupSettings -> Value
toJSON MediaPackageGroupSettings' {OutputLocationRef
destination :: OutputLocationRef
$sel:destination:MediaPackageGroupSettings' :: MediaPackageGroupSettings -> OutputLocationRef
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"destination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputLocationRef
destination)]
)