{-# 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.MediaConvert.Types.OutputGroupSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.CmafGroupSettings
import Amazonka.MediaConvert.Types.DashIsoGroupSettings
import Amazonka.MediaConvert.Types.FileGroupSettings
import Amazonka.MediaConvert.Types.HlsGroupSettings
import Amazonka.MediaConvert.Types.MsSmoothGroupSettings
import Amazonka.MediaConvert.Types.OutputGroupType
import qualified Amazonka.Prelude as Prelude
data OutputGroupSettings = OutputGroupSettings'
{
OutputGroupSettings -> Maybe FileGroupSettings
fileGroupSettings :: Prelude.Maybe FileGroupSettings,
OutputGroupSettings -> Maybe CmafGroupSettings
cmafGroupSettings :: Prelude.Maybe CmafGroupSettings,
OutputGroupSettings -> Maybe MsSmoothGroupSettings
msSmoothGroupSettings :: Prelude.Maybe MsSmoothGroupSettings,
OutputGroupSettings -> Maybe HlsGroupSettings
hlsGroupSettings :: Prelude.Maybe HlsGroupSettings,
OutputGroupSettings -> Maybe OutputGroupType
type' :: Prelude.Maybe OutputGroupType,
OutputGroupSettings -> Maybe DashIsoGroupSettings
dashIsoGroupSettings :: Prelude.Maybe DashIsoGroupSettings
}
deriving (OutputGroupSettings -> OutputGroupSettings -> Bool
(OutputGroupSettings -> OutputGroupSettings -> Bool)
-> (OutputGroupSettings -> OutputGroupSettings -> Bool)
-> Eq OutputGroupSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputGroupSettings -> OutputGroupSettings -> Bool
$c/= :: OutputGroupSettings -> OutputGroupSettings -> Bool
== :: OutputGroupSettings -> OutputGroupSettings -> Bool
$c== :: OutputGroupSettings -> OutputGroupSettings -> Bool
Prelude.Eq, ReadPrec [OutputGroupSettings]
ReadPrec OutputGroupSettings
Int -> ReadS OutputGroupSettings
ReadS [OutputGroupSettings]
(Int -> ReadS OutputGroupSettings)
-> ReadS [OutputGroupSettings]
-> ReadPrec OutputGroupSettings
-> ReadPrec [OutputGroupSettings]
-> Read OutputGroupSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputGroupSettings]
$creadListPrec :: ReadPrec [OutputGroupSettings]
readPrec :: ReadPrec OutputGroupSettings
$creadPrec :: ReadPrec OutputGroupSettings
readList :: ReadS [OutputGroupSettings]
$creadList :: ReadS [OutputGroupSettings]
readsPrec :: Int -> ReadS OutputGroupSettings
$creadsPrec :: Int -> ReadS OutputGroupSettings
Prelude.Read, Int -> OutputGroupSettings -> ShowS
[OutputGroupSettings] -> ShowS
OutputGroupSettings -> String
(Int -> OutputGroupSettings -> ShowS)
-> (OutputGroupSettings -> String)
-> ([OutputGroupSettings] -> ShowS)
-> Show OutputGroupSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputGroupSettings] -> ShowS
$cshowList :: [OutputGroupSettings] -> ShowS
show :: OutputGroupSettings -> String
$cshow :: OutputGroupSettings -> String
showsPrec :: Int -> OutputGroupSettings -> ShowS
$cshowsPrec :: Int -> OutputGroupSettings -> ShowS
Prelude.Show, (forall x. OutputGroupSettings -> Rep OutputGroupSettings x)
-> (forall x. Rep OutputGroupSettings x -> OutputGroupSettings)
-> Generic OutputGroupSettings
forall x. Rep OutputGroupSettings x -> OutputGroupSettings
forall x. OutputGroupSettings -> Rep OutputGroupSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputGroupSettings x -> OutputGroupSettings
$cfrom :: forall x. OutputGroupSettings -> Rep OutputGroupSettings x
Prelude.Generic)
newOutputGroupSettings ::
OutputGroupSettings
newOutputGroupSettings :: OutputGroupSettings
newOutputGroupSettings =
OutputGroupSettings' :: Maybe FileGroupSettings
-> Maybe CmafGroupSettings
-> Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings
OutputGroupSettings'
{ $sel:fileGroupSettings:OutputGroupSettings' :: Maybe FileGroupSettings
fileGroupSettings =
Maybe FileGroupSettings
forall a. Maybe a
Prelude.Nothing,
$sel:cmafGroupSettings:OutputGroupSettings' :: Maybe CmafGroupSettings
cmafGroupSettings = Maybe CmafGroupSettings
forall a. Maybe a
Prelude.Nothing,
$sel:msSmoothGroupSettings:OutputGroupSettings' :: Maybe MsSmoothGroupSettings
msSmoothGroupSettings = Maybe MsSmoothGroupSettings
forall a. Maybe a
Prelude.Nothing,
$sel:hlsGroupSettings:OutputGroupSettings' :: Maybe HlsGroupSettings
hlsGroupSettings = Maybe HlsGroupSettings
forall a. Maybe a
Prelude.Nothing,
$sel:type':OutputGroupSettings' :: Maybe OutputGroupType
type' = Maybe OutputGroupType
forall a. Maybe a
Prelude.Nothing,
$sel:dashIsoGroupSettings:OutputGroupSettings' :: Maybe DashIsoGroupSettings
dashIsoGroupSettings = Maybe DashIsoGroupSettings
forall a. Maybe a
Prelude.Nothing
}
outputGroupSettings_fileGroupSettings :: Lens.Lens' OutputGroupSettings (Prelude.Maybe FileGroupSettings)
outputGroupSettings_fileGroupSettings :: (Maybe FileGroupSettings -> f (Maybe FileGroupSettings))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_fileGroupSettings = (OutputGroupSettings -> Maybe FileGroupSettings)
-> (OutputGroupSettings
-> Maybe FileGroupSettings -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe FileGroupSettings)
(Maybe FileGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe FileGroupSettings
fileGroupSettings :: Maybe FileGroupSettings
$sel:fileGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe FileGroupSettings
fileGroupSettings} -> Maybe FileGroupSettings
fileGroupSettings) (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe FileGroupSettings
a -> OutputGroupSettings
s {$sel:fileGroupSettings:OutputGroupSettings' :: Maybe FileGroupSettings
fileGroupSettings = Maybe FileGroupSettings
a} :: OutputGroupSettings)
outputGroupSettings_cmafGroupSettings :: Lens.Lens' OutputGroupSettings (Prelude.Maybe CmafGroupSettings)
outputGroupSettings_cmafGroupSettings :: (Maybe CmafGroupSettings -> f (Maybe CmafGroupSettings))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_cmafGroupSettings = (OutputGroupSettings -> Maybe CmafGroupSettings)
-> (OutputGroupSettings
-> Maybe CmafGroupSettings -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe CmafGroupSettings)
(Maybe CmafGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe CmafGroupSettings
cmafGroupSettings :: Maybe CmafGroupSettings
$sel:cmafGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe CmafGroupSettings
cmafGroupSettings} -> Maybe CmafGroupSettings
cmafGroupSettings) (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe CmafGroupSettings
a -> OutputGroupSettings
s {$sel:cmafGroupSettings:OutputGroupSettings' :: Maybe CmafGroupSettings
cmafGroupSettings = Maybe CmafGroupSettings
a} :: OutputGroupSettings)
outputGroupSettings_msSmoothGroupSettings :: Lens.Lens' OutputGroupSettings (Prelude.Maybe MsSmoothGroupSettings)
outputGroupSettings_msSmoothGroupSettings :: (Maybe MsSmoothGroupSettings -> f (Maybe MsSmoothGroupSettings))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_msSmoothGroupSettings = (OutputGroupSettings -> Maybe MsSmoothGroupSettings)
-> (OutputGroupSettings
-> Maybe MsSmoothGroupSettings -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe MsSmoothGroupSettings)
(Maybe MsSmoothGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe MsSmoothGroupSettings
msSmoothGroupSettings :: Maybe MsSmoothGroupSettings
$sel:msSmoothGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe MsSmoothGroupSettings
msSmoothGroupSettings} -> Maybe MsSmoothGroupSettings
msSmoothGroupSettings) (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe MsSmoothGroupSettings
a -> OutputGroupSettings
s {$sel:msSmoothGroupSettings:OutputGroupSettings' :: Maybe MsSmoothGroupSettings
msSmoothGroupSettings = Maybe MsSmoothGroupSettings
a} :: OutputGroupSettings)
outputGroupSettings_hlsGroupSettings :: Lens.Lens' OutputGroupSettings (Prelude.Maybe HlsGroupSettings)
outputGroupSettings_hlsGroupSettings :: (Maybe HlsGroupSettings -> f (Maybe HlsGroupSettings))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_hlsGroupSettings = (OutputGroupSettings -> Maybe HlsGroupSettings)
-> (OutputGroupSettings
-> Maybe HlsGroupSettings -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe HlsGroupSettings)
(Maybe HlsGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe HlsGroupSettings
hlsGroupSettings :: Maybe HlsGroupSettings
$sel:hlsGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe HlsGroupSettings
hlsGroupSettings} -> Maybe HlsGroupSettings
hlsGroupSettings) (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe HlsGroupSettings
a -> OutputGroupSettings
s {$sel:hlsGroupSettings:OutputGroupSettings' :: Maybe HlsGroupSettings
hlsGroupSettings = Maybe HlsGroupSettings
a} :: OutputGroupSettings)
outputGroupSettings_type :: Lens.Lens' OutputGroupSettings (Prelude.Maybe OutputGroupType)
outputGroupSettings_type :: (Maybe OutputGroupType -> f (Maybe OutputGroupType))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_type = (OutputGroupSettings -> Maybe OutputGroupType)
-> (OutputGroupSettings
-> Maybe OutputGroupType -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe OutputGroupType)
(Maybe OutputGroupType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe OutputGroupType
type' :: Maybe OutputGroupType
$sel:type':OutputGroupSettings' :: OutputGroupSettings -> Maybe OutputGroupType
type'} -> Maybe OutputGroupType
type') (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe OutputGroupType
a -> OutputGroupSettings
s {$sel:type':OutputGroupSettings' :: Maybe OutputGroupType
type' = Maybe OutputGroupType
a} :: OutputGroupSettings)
outputGroupSettings_dashIsoGroupSettings :: Lens.Lens' OutputGroupSettings (Prelude.Maybe DashIsoGroupSettings)
outputGroupSettings_dashIsoGroupSettings :: (Maybe DashIsoGroupSettings -> f (Maybe DashIsoGroupSettings))
-> OutputGroupSettings -> f OutputGroupSettings
outputGroupSettings_dashIsoGroupSettings = (OutputGroupSettings -> Maybe DashIsoGroupSettings)
-> (OutputGroupSettings
-> Maybe DashIsoGroupSettings -> OutputGroupSettings)
-> Lens
OutputGroupSettings
OutputGroupSettings
(Maybe DashIsoGroupSettings)
(Maybe DashIsoGroupSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputGroupSettings' {Maybe DashIsoGroupSettings
dashIsoGroupSettings :: Maybe DashIsoGroupSettings
$sel:dashIsoGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe DashIsoGroupSettings
dashIsoGroupSettings} -> Maybe DashIsoGroupSettings
dashIsoGroupSettings) (\s :: OutputGroupSettings
s@OutputGroupSettings' {} Maybe DashIsoGroupSettings
a -> OutputGroupSettings
s {$sel:dashIsoGroupSettings:OutputGroupSettings' :: Maybe DashIsoGroupSettings
dashIsoGroupSettings = Maybe DashIsoGroupSettings
a} :: OutputGroupSettings)
instance Core.FromJSON OutputGroupSettings where
parseJSON :: Value -> Parser OutputGroupSettings
parseJSON =
String
-> (Object -> Parser OutputGroupSettings)
-> Value
-> Parser OutputGroupSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OutputGroupSettings"
( \Object
x ->
Maybe FileGroupSettings
-> Maybe CmafGroupSettings
-> Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings
OutputGroupSettings'
(Maybe FileGroupSettings
-> Maybe CmafGroupSettings
-> Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
-> Parser (Maybe FileGroupSettings)
-> Parser
(Maybe CmafGroupSettings
-> Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe FileGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fileGroupSettings")
Parser
(Maybe CmafGroupSettings
-> Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
-> Parser (Maybe CmafGroupSettings)
-> Parser
(Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CmafGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cmafGroupSettings")
Parser
(Maybe MsSmoothGroupSettings
-> Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
-> Parser (Maybe MsSmoothGroupSettings)
-> Parser
(Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MsSmoothGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"msSmoothGroupSettings")
Parser
(Maybe HlsGroupSettings
-> Maybe OutputGroupType
-> Maybe DashIsoGroupSettings
-> OutputGroupSettings)
-> Parser (Maybe HlsGroupSettings)
-> Parser
(Maybe OutputGroupType
-> Maybe DashIsoGroupSettings -> OutputGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hlsGroupSettings")
Parser
(Maybe OutputGroupType
-> Maybe DashIsoGroupSettings -> OutputGroupSettings)
-> Parser (Maybe OutputGroupType)
-> Parser (Maybe DashIsoGroupSettings -> OutputGroupSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OutputGroupType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe DashIsoGroupSettings -> OutputGroupSettings)
-> Parser (Maybe DashIsoGroupSettings)
-> Parser OutputGroupSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DashIsoGroupSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dashIsoGroupSettings")
)
instance Prelude.Hashable OutputGroupSettings
instance Prelude.NFData OutputGroupSettings
instance Core.ToJSON OutputGroupSettings where
toJSON :: OutputGroupSettings -> Value
toJSON OutputGroupSettings' {Maybe OutputGroupType
Maybe FileGroupSettings
Maybe MsSmoothGroupSettings
Maybe DashIsoGroupSettings
Maybe HlsGroupSettings
Maybe CmafGroupSettings
dashIsoGroupSettings :: Maybe DashIsoGroupSettings
type' :: Maybe OutputGroupType
hlsGroupSettings :: Maybe HlsGroupSettings
msSmoothGroupSettings :: Maybe MsSmoothGroupSettings
cmafGroupSettings :: Maybe CmafGroupSettings
fileGroupSettings :: Maybe FileGroupSettings
$sel:dashIsoGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe DashIsoGroupSettings
$sel:type':OutputGroupSettings' :: OutputGroupSettings -> Maybe OutputGroupType
$sel:hlsGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe HlsGroupSettings
$sel:msSmoothGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe MsSmoothGroupSettings
$sel:cmafGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe CmafGroupSettings
$sel:fileGroupSettings:OutputGroupSettings' :: OutputGroupSettings -> Maybe FileGroupSettings
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"fileGroupSettings" Text -> FileGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(FileGroupSettings -> Pair)
-> Maybe FileGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileGroupSettings
fileGroupSettings,
(Text
"cmafGroupSettings" Text -> CmafGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CmafGroupSettings -> Pair)
-> Maybe CmafGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CmafGroupSettings
cmafGroupSettings,
(Text
"msSmoothGroupSettings" Text -> MsSmoothGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MsSmoothGroupSettings -> Pair)
-> Maybe MsSmoothGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MsSmoothGroupSettings
msSmoothGroupSettings,
(Text
"hlsGroupSettings" Text -> HlsGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HlsGroupSettings -> Pair) -> Maybe HlsGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsGroupSettings
hlsGroupSettings,
(Text
"type" Text -> OutputGroupType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OutputGroupType -> Pair) -> Maybe OutputGroupType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OutputGroupType
type',
(Text
"dashIsoGroupSettings" Text -> DashIsoGroupSettings -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DashIsoGroupSettings -> Pair)
-> Maybe DashIsoGroupSettings -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashIsoGroupSettings
dashIsoGroupSettings
]
)