{-# 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.HlsSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types.HlsAudioOnlyContainer
import Amazonka.MediaConvert.Types.HlsAudioTrackType
import Amazonka.MediaConvert.Types.HlsDescriptiveVideoServiceFlag
import Amazonka.MediaConvert.Types.HlsIFrameOnlyManifest
import qualified Amazonka.Prelude as Prelude
data HlsSettings = HlsSettings'
{
HlsSettings -> Maybe Text
audioGroupId :: Prelude.Maybe Prelude.Text,
HlsSettings -> Maybe HlsAudioOnlyContainer
audioOnlyContainer :: Prelude.Maybe HlsAudioOnlyContainer,
HlsSettings -> Maybe Text
audioRenditionSets :: Prelude.Maybe Prelude.Text,
HlsSettings -> Maybe HlsAudioTrackType
audioTrackType :: Prelude.Maybe HlsAudioTrackType,
HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag :: Prelude.Maybe HlsDescriptiveVideoServiceFlag,
HlsSettings -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest :: Prelude.Maybe HlsIFrameOnlyManifest,
HlsSettings -> Maybe Text
segmentModifier :: Prelude.Maybe Prelude.Text
}
deriving (HlsSettings -> HlsSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsSettings -> HlsSettings -> Bool
$c/= :: HlsSettings -> HlsSettings -> Bool
== :: HlsSettings -> HlsSettings -> Bool
$c== :: HlsSettings -> HlsSettings -> Bool
Prelude.Eq, ReadPrec [HlsSettings]
ReadPrec HlsSettings
Int -> ReadS HlsSettings
ReadS [HlsSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsSettings]
$creadListPrec :: ReadPrec [HlsSettings]
readPrec :: ReadPrec HlsSettings
$creadPrec :: ReadPrec HlsSettings
readList :: ReadS [HlsSettings]
$creadList :: ReadS [HlsSettings]
readsPrec :: Int -> ReadS HlsSettings
$creadsPrec :: Int -> ReadS HlsSettings
Prelude.Read, Int -> HlsSettings -> ShowS
[HlsSettings] -> ShowS
HlsSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsSettings] -> ShowS
$cshowList :: [HlsSettings] -> ShowS
show :: HlsSettings -> String
$cshow :: HlsSettings -> String
showsPrec :: Int -> HlsSettings -> ShowS
$cshowsPrec :: Int -> HlsSettings -> ShowS
Prelude.Show, forall x. Rep HlsSettings x -> HlsSettings
forall x. HlsSettings -> Rep HlsSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsSettings x -> HlsSettings
$cfrom :: forall x. HlsSettings -> Rep HlsSettings x
Prelude.Generic)
newHlsSettings ::
HlsSettings
newHlsSettings :: HlsSettings
newHlsSettings =
HlsSettings'
{ $sel:audioGroupId:HlsSettings' :: Maybe Text
audioGroupId = forall a. Maybe a
Prelude.Nothing,
$sel:audioOnlyContainer:HlsSettings' :: Maybe HlsAudioOnlyContainer
audioOnlyContainer = forall a. Maybe a
Prelude.Nothing,
$sel:audioRenditionSets:HlsSettings' :: Maybe Text
audioRenditionSets = forall a. Maybe a
Prelude.Nothing,
$sel:audioTrackType:HlsSettings' :: Maybe HlsAudioTrackType
audioTrackType = forall a. Maybe a
Prelude.Nothing,
$sel:descriptiveVideoServiceFlag:HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag = forall a. Maybe a
Prelude.Nothing,
$sel:iFrameOnlyManifest:HlsSettings' :: Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest = forall a. Maybe a
Prelude.Nothing,
$sel:segmentModifier:HlsSettings' :: Maybe Text
segmentModifier = forall a. Maybe a
Prelude.Nothing
}
hlsSettings_audioGroupId :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_audioGroupId :: Lens' HlsSettings (Maybe Text)
hlsSettings_audioGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
audioGroupId :: Maybe Text
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
audioGroupId} -> Maybe Text
audioGroupId) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:audioGroupId:HlsSettings' :: Maybe Text
audioGroupId = Maybe Text
a} :: HlsSettings)
hlsSettings_audioOnlyContainer :: Lens.Lens' HlsSettings (Prelude.Maybe HlsAudioOnlyContainer)
hlsSettings_audioOnlyContainer :: Lens' HlsSettings (Maybe HlsAudioOnlyContainer)
hlsSettings_audioOnlyContainer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsAudioOnlyContainer
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
audioOnlyContainer} -> Maybe HlsAudioOnlyContainer
audioOnlyContainer) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsAudioOnlyContainer
a -> HlsSettings
s {$sel:audioOnlyContainer:HlsSettings' :: Maybe HlsAudioOnlyContainer
audioOnlyContainer = Maybe HlsAudioOnlyContainer
a} :: HlsSettings)
hlsSettings_audioRenditionSets :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_audioRenditionSets :: Lens' HlsSettings (Maybe Text)
hlsSettings_audioRenditionSets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
audioRenditionSets :: Maybe Text
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
audioRenditionSets} -> Maybe Text
audioRenditionSets) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:audioRenditionSets:HlsSettings' :: Maybe Text
audioRenditionSets = Maybe Text
a} :: HlsSettings)
hlsSettings_audioTrackType :: Lens.Lens' HlsSettings (Prelude.Maybe HlsAudioTrackType)
hlsSettings_audioTrackType :: Lens' HlsSettings (Maybe HlsAudioTrackType)
hlsSettings_audioTrackType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsAudioTrackType
audioTrackType :: Maybe HlsAudioTrackType
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
audioTrackType} -> Maybe HlsAudioTrackType
audioTrackType) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsAudioTrackType
a -> HlsSettings
s {$sel:audioTrackType:HlsSettings' :: Maybe HlsAudioTrackType
audioTrackType = Maybe HlsAudioTrackType
a} :: HlsSettings)
hlsSettings_descriptiveVideoServiceFlag :: Lens.Lens' HlsSettings (Prelude.Maybe HlsDescriptiveVideoServiceFlag)
hlsSettings_descriptiveVideoServiceFlag :: Lens' HlsSettings (Maybe HlsDescriptiveVideoServiceFlag)
hlsSettings_descriptiveVideoServiceFlag = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag} -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsDescriptiveVideoServiceFlag
a -> HlsSettings
s {$sel:descriptiveVideoServiceFlag:HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag = Maybe HlsDescriptiveVideoServiceFlag
a} :: HlsSettings)
hlsSettings_iFrameOnlyManifest :: Lens.Lens' HlsSettings (Prelude.Maybe HlsIFrameOnlyManifest)
hlsSettings_iFrameOnlyManifest :: Lens' HlsSettings (Maybe HlsIFrameOnlyManifest)
hlsSettings_iFrameOnlyManifest = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest} -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsIFrameOnlyManifest
a -> HlsSettings
s {$sel:iFrameOnlyManifest:HlsSettings' :: Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest = Maybe HlsIFrameOnlyManifest
a} :: HlsSettings)
hlsSettings_segmentModifier :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_segmentModifier :: Lens' HlsSettings (Maybe Text)
hlsSettings_segmentModifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
segmentModifier :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
segmentModifier} -> Maybe Text
segmentModifier) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:segmentModifier:HlsSettings' :: Maybe Text
segmentModifier = Maybe Text
a} :: HlsSettings)
instance Data.FromJSON HlsSettings where
parseJSON :: Value -> Parser HlsSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"HlsSettings"
( \Object
x ->
Maybe Text
-> Maybe HlsAudioOnlyContainer
-> Maybe Text
-> Maybe HlsAudioTrackType
-> Maybe HlsDescriptiveVideoServiceFlag
-> Maybe HlsIFrameOnlyManifest
-> Maybe Text
-> HlsSettings
HlsSettings'
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
"audioGroupId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"audioOnlyContainer")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"audioRenditionSets")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"audioTrackType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"descriptiveVideoServiceFlag")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iFrameOnlyManifest")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"segmentModifier")
)
instance Prelude.Hashable HlsSettings where
hashWithSalt :: Int -> HlsSettings -> Int
hashWithSalt Int
_salt HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
segmentModifier :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
audioTrackType :: Maybe HlsAudioTrackType
audioRenditionSets :: Maybe Text
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
audioGroupId :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioGroupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAudioOnlyContainer
audioOnlyContainer
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioRenditionSets
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAudioTrackType
audioTrackType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentModifier
instance Prelude.NFData HlsSettings where
rnf :: HlsSettings -> ()
rnf HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
segmentModifier :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
audioTrackType :: Maybe HlsAudioTrackType
audioRenditionSets :: Maybe Text
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
audioGroupId :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioGroupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAudioOnlyContainer
audioOnlyContainer
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioRenditionSets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAudioTrackType
audioTrackType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentModifier
instance Data.ToJSON HlsSettings where
toJSON :: HlsSettings -> Value
toJSON HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
segmentModifier :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
audioTrackType :: Maybe HlsAudioTrackType
audioRenditionSets :: Maybe Text
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
audioGroupId :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"audioGroupId" 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
audioGroupId,
(Key
"audioOnlyContainer" 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 HlsAudioOnlyContainer
audioOnlyContainer,
(Key
"audioRenditionSets" 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
audioRenditionSets,
(Key
"audioTrackType" 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 HlsAudioTrackType
audioTrackType,
(Key
"descriptiveVideoServiceFlag" 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 HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag,
(Key
"iFrameOnlyManifest" 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 HlsIFrameOnlyManifest
iFrameOnlyManifest,
(Key
"segmentModifier" 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
segmentModifier
]
)