{-# 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.MediaPackage.Types.HlsPackage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types.AdMarkers
import Amazonka.MediaPackage.Types.AdTriggersElement
import Amazonka.MediaPackage.Types.AdsOnDeliveryRestrictions
import Amazonka.MediaPackage.Types.HlsEncryption
import Amazonka.MediaPackage.Types.PlaylistType
import Amazonka.MediaPackage.Types.StreamSelection
import qualified Amazonka.Prelude as Prelude
data HlsPackage = HlsPackage'
{ HlsPackage -> Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions :: Prelude.Maybe AdsOnDeliveryRestrictions,
HlsPackage -> Maybe Bool
useAudioRenditionGroup :: Prelude.Maybe Prelude.Bool,
HlsPackage -> Maybe Bool
includeDvbSubtitles :: Prelude.Maybe Prelude.Bool,
HlsPackage -> Maybe PlaylistType
playlistType :: Prelude.Maybe PlaylistType,
HlsPackage -> Maybe Int
segmentDurationSeconds :: Prelude.Maybe Prelude.Int,
HlsPackage -> Maybe Int
programDateTimeIntervalSeconds :: Prelude.Maybe Prelude.Int,
HlsPackage -> Maybe StreamSelection
streamSelection :: Prelude.Maybe StreamSelection,
HlsPackage -> Maybe AdMarkers
adMarkers :: Prelude.Maybe AdMarkers,
HlsPackage -> Maybe HlsEncryption
encryption :: Prelude.Maybe HlsEncryption,
HlsPackage -> Maybe Bool
includeIframeOnlyStream :: Prelude.Maybe Prelude.Bool,
HlsPackage -> Maybe [AdTriggersElement]
adTriggers :: Prelude.Maybe [AdTriggersElement],
HlsPackage -> Maybe Int
playlistWindowSeconds :: Prelude.Maybe Prelude.Int
}
deriving (HlsPackage -> HlsPackage -> Bool
(HlsPackage -> HlsPackage -> Bool)
-> (HlsPackage -> HlsPackage -> Bool) -> Eq HlsPackage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsPackage -> HlsPackage -> Bool
$c/= :: HlsPackage -> HlsPackage -> Bool
== :: HlsPackage -> HlsPackage -> Bool
$c== :: HlsPackage -> HlsPackage -> Bool
Prelude.Eq, ReadPrec [HlsPackage]
ReadPrec HlsPackage
Int -> ReadS HlsPackage
ReadS [HlsPackage]
(Int -> ReadS HlsPackage)
-> ReadS [HlsPackage]
-> ReadPrec HlsPackage
-> ReadPrec [HlsPackage]
-> Read HlsPackage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsPackage]
$creadListPrec :: ReadPrec [HlsPackage]
readPrec :: ReadPrec HlsPackage
$creadPrec :: ReadPrec HlsPackage
readList :: ReadS [HlsPackage]
$creadList :: ReadS [HlsPackage]
readsPrec :: Int -> ReadS HlsPackage
$creadsPrec :: Int -> ReadS HlsPackage
Prelude.Read, Int -> HlsPackage -> ShowS
[HlsPackage] -> ShowS
HlsPackage -> String
(Int -> HlsPackage -> ShowS)
-> (HlsPackage -> String)
-> ([HlsPackage] -> ShowS)
-> Show HlsPackage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsPackage] -> ShowS
$cshowList :: [HlsPackage] -> ShowS
show :: HlsPackage -> String
$cshow :: HlsPackage -> String
showsPrec :: Int -> HlsPackage -> ShowS
$cshowsPrec :: Int -> HlsPackage -> ShowS
Prelude.Show, (forall x. HlsPackage -> Rep HlsPackage x)
-> (forall x. Rep HlsPackage x -> HlsPackage) -> Generic HlsPackage
forall x. Rep HlsPackage x -> HlsPackage
forall x. HlsPackage -> Rep HlsPackage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsPackage x -> HlsPackage
$cfrom :: forall x. HlsPackage -> Rep HlsPackage x
Prelude.Generic)
newHlsPackage ::
HlsPackage
newHlsPackage :: HlsPackage
newHlsPackage =
HlsPackage' :: Maybe AdsOnDeliveryRestrictions
-> Maybe Bool
-> Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage
HlsPackage'
{ $sel:adsOnDeliveryRestrictions:HlsPackage' :: Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions =
Maybe AdsOnDeliveryRestrictions
forall a. Maybe a
Prelude.Nothing,
$sel:useAudioRenditionGroup:HlsPackage' :: Maybe Bool
useAudioRenditionGroup = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:includeDvbSubtitles:HlsPackage' :: Maybe Bool
includeDvbSubtitles = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:playlistType:HlsPackage' :: Maybe PlaylistType
playlistType = Maybe PlaylistType
forall a. Maybe a
Prelude.Nothing,
$sel:segmentDurationSeconds:HlsPackage' :: Maybe Int
segmentDurationSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:programDateTimeIntervalSeconds:HlsPackage' :: Maybe Int
programDateTimeIntervalSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:streamSelection:HlsPackage' :: Maybe StreamSelection
streamSelection = Maybe StreamSelection
forall a. Maybe a
Prelude.Nothing,
$sel:adMarkers:HlsPackage' :: Maybe AdMarkers
adMarkers = Maybe AdMarkers
forall a. Maybe a
Prelude.Nothing,
$sel:encryption:HlsPackage' :: Maybe HlsEncryption
encryption = Maybe HlsEncryption
forall a. Maybe a
Prelude.Nothing,
$sel:includeIframeOnlyStream:HlsPackage' :: Maybe Bool
includeIframeOnlyStream = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:adTriggers:HlsPackage' :: Maybe [AdTriggersElement]
adTriggers = Maybe [AdTriggersElement]
forall a. Maybe a
Prelude.Nothing,
$sel:playlistWindowSeconds:HlsPackage' :: Maybe Int
playlistWindowSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
hlsPackage_adsOnDeliveryRestrictions :: Lens.Lens' HlsPackage (Prelude.Maybe AdsOnDeliveryRestrictions)
hlsPackage_adsOnDeliveryRestrictions :: (Maybe AdsOnDeliveryRestrictions
-> f (Maybe AdsOnDeliveryRestrictions))
-> HlsPackage -> f HlsPackage
hlsPackage_adsOnDeliveryRestrictions = (HlsPackage -> Maybe AdsOnDeliveryRestrictions)
-> (HlsPackage -> Maybe AdsOnDeliveryRestrictions -> HlsPackage)
-> Lens
HlsPackage
HlsPackage
(Maybe AdsOnDeliveryRestrictions)
(Maybe AdsOnDeliveryRestrictions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions :: Maybe AdsOnDeliveryRestrictions
$sel:adsOnDeliveryRestrictions:HlsPackage' :: HlsPackage -> Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions} -> Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions) (\s :: HlsPackage
s@HlsPackage' {} Maybe AdsOnDeliveryRestrictions
a -> HlsPackage
s {$sel:adsOnDeliveryRestrictions:HlsPackage' :: Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions = Maybe AdsOnDeliveryRestrictions
a} :: HlsPackage)
hlsPackage_useAudioRenditionGroup :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Bool)
hlsPackage_useAudioRenditionGroup :: (Maybe Bool -> f (Maybe Bool)) -> HlsPackage -> f HlsPackage
hlsPackage_useAudioRenditionGroup = (HlsPackage -> Maybe Bool)
-> (HlsPackage -> Maybe Bool -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Bool
useAudioRenditionGroup :: Maybe Bool
$sel:useAudioRenditionGroup:HlsPackage' :: HlsPackage -> Maybe Bool
useAudioRenditionGroup} -> Maybe Bool
useAudioRenditionGroup) (\s :: HlsPackage
s@HlsPackage' {} Maybe Bool
a -> HlsPackage
s {$sel:useAudioRenditionGroup:HlsPackage' :: Maybe Bool
useAudioRenditionGroup = Maybe Bool
a} :: HlsPackage)
hlsPackage_includeDvbSubtitles :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Bool)
hlsPackage_includeDvbSubtitles :: (Maybe Bool -> f (Maybe Bool)) -> HlsPackage -> f HlsPackage
hlsPackage_includeDvbSubtitles = (HlsPackage -> Maybe Bool)
-> (HlsPackage -> Maybe Bool -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Bool
includeDvbSubtitles :: Maybe Bool
$sel:includeDvbSubtitles:HlsPackage' :: HlsPackage -> Maybe Bool
includeDvbSubtitles} -> Maybe Bool
includeDvbSubtitles) (\s :: HlsPackage
s@HlsPackage' {} Maybe Bool
a -> HlsPackage
s {$sel:includeDvbSubtitles:HlsPackage' :: Maybe Bool
includeDvbSubtitles = Maybe Bool
a} :: HlsPackage)
hlsPackage_playlistType :: Lens.Lens' HlsPackage (Prelude.Maybe PlaylistType)
hlsPackage_playlistType :: (Maybe PlaylistType -> f (Maybe PlaylistType))
-> HlsPackage -> f HlsPackage
hlsPackage_playlistType = (HlsPackage -> Maybe PlaylistType)
-> (HlsPackage -> Maybe PlaylistType -> HlsPackage)
-> Lens
HlsPackage HlsPackage (Maybe PlaylistType) (Maybe PlaylistType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe PlaylistType
playlistType :: Maybe PlaylistType
$sel:playlistType:HlsPackage' :: HlsPackage -> Maybe PlaylistType
playlistType} -> Maybe PlaylistType
playlistType) (\s :: HlsPackage
s@HlsPackage' {} Maybe PlaylistType
a -> HlsPackage
s {$sel:playlistType:HlsPackage' :: Maybe PlaylistType
playlistType = Maybe PlaylistType
a} :: HlsPackage)
hlsPackage_segmentDurationSeconds :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Int)
hlsPackage_segmentDurationSeconds :: (Maybe Int -> f (Maybe Int)) -> HlsPackage -> f HlsPackage
hlsPackage_segmentDurationSeconds = (HlsPackage -> Maybe Int)
-> (HlsPackage -> Maybe Int -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Int
segmentDurationSeconds :: Maybe Int
$sel:segmentDurationSeconds:HlsPackage' :: HlsPackage -> Maybe Int
segmentDurationSeconds} -> Maybe Int
segmentDurationSeconds) (\s :: HlsPackage
s@HlsPackage' {} Maybe Int
a -> HlsPackage
s {$sel:segmentDurationSeconds:HlsPackage' :: Maybe Int
segmentDurationSeconds = Maybe Int
a} :: HlsPackage)
hlsPackage_programDateTimeIntervalSeconds :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Int)
hlsPackage_programDateTimeIntervalSeconds :: (Maybe Int -> f (Maybe Int)) -> HlsPackage -> f HlsPackage
hlsPackage_programDateTimeIntervalSeconds = (HlsPackage -> Maybe Int)
-> (HlsPackage -> Maybe Int -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Int
programDateTimeIntervalSeconds :: Maybe Int
$sel:programDateTimeIntervalSeconds:HlsPackage' :: HlsPackage -> Maybe Int
programDateTimeIntervalSeconds} -> Maybe Int
programDateTimeIntervalSeconds) (\s :: HlsPackage
s@HlsPackage' {} Maybe Int
a -> HlsPackage
s {$sel:programDateTimeIntervalSeconds:HlsPackage' :: Maybe Int
programDateTimeIntervalSeconds = Maybe Int
a} :: HlsPackage)
hlsPackage_streamSelection :: Lens.Lens' HlsPackage (Prelude.Maybe StreamSelection)
hlsPackage_streamSelection :: (Maybe StreamSelection -> f (Maybe StreamSelection))
-> HlsPackage -> f HlsPackage
hlsPackage_streamSelection = (HlsPackage -> Maybe StreamSelection)
-> (HlsPackage -> Maybe StreamSelection -> HlsPackage)
-> Lens
HlsPackage
HlsPackage
(Maybe StreamSelection)
(Maybe StreamSelection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe StreamSelection
streamSelection :: Maybe StreamSelection
$sel:streamSelection:HlsPackage' :: HlsPackage -> Maybe StreamSelection
streamSelection} -> Maybe StreamSelection
streamSelection) (\s :: HlsPackage
s@HlsPackage' {} Maybe StreamSelection
a -> HlsPackage
s {$sel:streamSelection:HlsPackage' :: Maybe StreamSelection
streamSelection = Maybe StreamSelection
a} :: HlsPackage)
hlsPackage_adMarkers :: Lens.Lens' HlsPackage (Prelude.Maybe AdMarkers)
hlsPackage_adMarkers :: (Maybe AdMarkers -> f (Maybe AdMarkers))
-> HlsPackage -> f HlsPackage
hlsPackage_adMarkers = (HlsPackage -> Maybe AdMarkers)
-> (HlsPackage -> Maybe AdMarkers -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe AdMarkers) (Maybe AdMarkers)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe AdMarkers
adMarkers :: Maybe AdMarkers
$sel:adMarkers:HlsPackage' :: HlsPackage -> Maybe AdMarkers
adMarkers} -> Maybe AdMarkers
adMarkers) (\s :: HlsPackage
s@HlsPackage' {} Maybe AdMarkers
a -> HlsPackage
s {$sel:adMarkers:HlsPackage' :: Maybe AdMarkers
adMarkers = Maybe AdMarkers
a} :: HlsPackage)
hlsPackage_encryption :: Lens.Lens' HlsPackage (Prelude.Maybe HlsEncryption)
hlsPackage_encryption :: (Maybe HlsEncryption -> f (Maybe HlsEncryption))
-> HlsPackage -> f HlsPackage
hlsPackage_encryption = (HlsPackage -> Maybe HlsEncryption)
-> (HlsPackage -> Maybe HlsEncryption -> HlsPackage)
-> Lens
HlsPackage HlsPackage (Maybe HlsEncryption) (Maybe HlsEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe HlsEncryption
encryption :: Maybe HlsEncryption
$sel:encryption:HlsPackage' :: HlsPackage -> Maybe HlsEncryption
encryption} -> Maybe HlsEncryption
encryption) (\s :: HlsPackage
s@HlsPackage' {} Maybe HlsEncryption
a -> HlsPackage
s {$sel:encryption:HlsPackage' :: Maybe HlsEncryption
encryption = Maybe HlsEncryption
a} :: HlsPackage)
hlsPackage_includeIframeOnlyStream :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Bool)
hlsPackage_includeIframeOnlyStream :: (Maybe Bool -> f (Maybe Bool)) -> HlsPackage -> f HlsPackage
hlsPackage_includeIframeOnlyStream = (HlsPackage -> Maybe Bool)
-> (HlsPackage -> Maybe Bool -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Bool
includeIframeOnlyStream :: Maybe Bool
$sel:includeIframeOnlyStream:HlsPackage' :: HlsPackage -> Maybe Bool
includeIframeOnlyStream} -> Maybe Bool
includeIframeOnlyStream) (\s :: HlsPackage
s@HlsPackage' {} Maybe Bool
a -> HlsPackage
s {$sel:includeIframeOnlyStream:HlsPackage' :: Maybe Bool
includeIframeOnlyStream = Maybe Bool
a} :: HlsPackage)
hlsPackage_adTriggers :: Lens.Lens' HlsPackage (Prelude.Maybe [AdTriggersElement])
hlsPackage_adTriggers :: (Maybe [AdTriggersElement] -> f (Maybe [AdTriggersElement]))
-> HlsPackage -> f HlsPackage
hlsPackage_adTriggers = (HlsPackage -> Maybe [AdTriggersElement])
-> (HlsPackage -> Maybe [AdTriggersElement] -> HlsPackage)
-> Lens
HlsPackage
HlsPackage
(Maybe [AdTriggersElement])
(Maybe [AdTriggersElement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe [AdTriggersElement]
adTriggers :: Maybe [AdTriggersElement]
$sel:adTriggers:HlsPackage' :: HlsPackage -> Maybe [AdTriggersElement]
adTriggers} -> Maybe [AdTriggersElement]
adTriggers) (\s :: HlsPackage
s@HlsPackage' {} Maybe [AdTriggersElement]
a -> HlsPackage
s {$sel:adTriggers:HlsPackage' :: Maybe [AdTriggersElement]
adTriggers = Maybe [AdTriggersElement]
a} :: HlsPackage) ((Maybe [AdTriggersElement] -> f (Maybe [AdTriggersElement]))
-> HlsPackage -> f HlsPackage)
-> ((Maybe [AdTriggersElement] -> f (Maybe [AdTriggersElement]))
-> Maybe [AdTriggersElement] -> f (Maybe [AdTriggersElement]))
-> (Maybe [AdTriggersElement] -> f (Maybe [AdTriggersElement]))
-> HlsPackage
-> f HlsPackage
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AdTriggersElement]
[AdTriggersElement]
[AdTriggersElement]
[AdTriggersElement]
-> Iso
(Maybe [AdTriggersElement])
(Maybe [AdTriggersElement])
(Maybe [AdTriggersElement])
(Maybe [AdTriggersElement])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[AdTriggersElement]
[AdTriggersElement]
[AdTriggersElement]
[AdTriggersElement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
hlsPackage_playlistWindowSeconds :: Lens.Lens' HlsPackage (Prelude.Maybe Prelude.Int)
hlsPackage_playlistWindowSeconds :: (Maybe Int -> f (Maybe Int)) -> HlsPackage -> f HlsPackage
hlsPackage_playlistWindowSeconds = (HlsPackage -> Maybe Int)
-> (HlsPackage -> Maybe Int -> HlsPackage)
-> Lens HlsPackage HlsPackage (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsPackage' {Maybe Int
playlistWindowSeconds :: Maybe Int
$sel:playlistWindowSeconds:HlsPackage' :: HlsPackage -> Maybe Int
playlistWindowSeconds} -> Maybe Int
playlistWindowSeconds) (\s :: HlsPackage
s@HlsPackage' {} Maybe Int
a -> HlsPackage
s {$sel:playlistWindowSeconds:HlsPackage' :: Maybe Int
playlistWindowSeconds = Maybe Int
a} :: HlsPackage)
instance Core.FromJSON HlsPackage where
parseJSON :: Value -> Parser HlsPackage
parseJSON =
String
-> (Object -> Parser HlsPackage) -> Value -> Parser HlsPackage
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsPackage"
( \Object
x ->
Maybe AdsOnDeliveryRestrictions
-> Maybe Bool
-> Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage
HlsPackage'
(Maybe AdsOnDeliveryRestrictions
-> Maybe Bool
-> Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe AdsOnDeliveryRestrictions)
-> Parser
(Maybe Bool
-> Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AdsOnDeliveryRestrictions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"adsOnDeliveryRestrictions")
Parser
(Maybe Bool
-> Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"useAudioRenditionGroup")
Parser
(Maybe Bool
-> Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe Bool)
-> Parser
(Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"includeDvbSubtitles")
Parser
(Maybe PlaylistType
-> Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe PlaylistType)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PlaylistType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"playlistType")
Parser
(Maybe Int
-> Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"segmentDurationSeconds")
Parser
(Maybe Int
-> Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe Int)
-> Parser
(Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"programDateTimeIntervalSeconds")
Parser
(Maybe StreamSelection
-> Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe StreamSelection)
-> Parser
(Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StreamSelection)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"streamSelection")
Parser
(Maybe AdMarkers
-> Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe AdMarkers)
-> Parser
(Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AdMarkers)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"adMarkers")
Parser
(Maybe HlsEncryption
-> Maybe Bool
-> Maybe [AdTriggersElement]
-> Maybe Int
-> HlsPackage)
-> Parser (Maybe HlsEncryption)
-> Parser
(Maybe Bool
-> Maybe [AdTriggersElement] -> Maybe Int -> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsEncryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"encryption")
Parser
(Maybe Bool
-> Maybe [AdTriggersElement] -> Maybe Int -> HlsPackage)
-> Parser (Maybe Bool)
-> Parser (Maybe [AdTriggersElement] -> Maybe Int -> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"includeIframeOnlyStream")
Parser (Maybe [AdTriggersElement] -> Maybe Int -> HlsPackage)
-> Parser (Maybe [AdTriggersElement])
-> Parser (Maybe Int -> HlsPackage)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [AdTriggersElement]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"adTriggers" Parser (Maybe (Maybe [AdTriggersElement]))
-> Maybe [AdTriggersElement] -> Parser (Maybe [AdTriggersElement])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AdTriggersElement]
forall a. Monoid a => a
Prelude.mempty)
Parser (Maybe Int -> HlsPackage)
-> Parser (Maybe Int) -> Parser HlsPackage
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"playlistWindowSeconds")
)
instance Prelude.Hashable HlsPackage
instance Prelude.NFData HlsPackage
instance Core.ToJSON HlsPackage where
toJSON :: HlsPackage -> Value
toJSON HlsPackage' {Maybe Bool
Maybe Int
Maybe [AdTriggersElement]
Maybe AdMarkers
Maybe AdsOnDeliveryRestrictions
Maybe PlaylistType
Maybe HlsEncryption
Maybe StreamSelection
playlistWindowSeconds :: Maybe Int
adTriggers :: Maybe [AdTriggersElement]
includeIframeOnlyStream :: Maybe Bool
encryption :: Maybe HlsEncryption
adMarkers :: Maybe AdMarkers
streamSelection :: Maybe StreamSelection
programDateTimeIntervalSeconds :: Maybe Int
segmentDurationSeconds :: Maybe Int
playlistType :: Maybe PlaylistType
includeDvbSubtitles :: Maybe Bool
useAudioRenditionGroup :: Maybe Bool
adsOnDeliveryRestrictions :: Maybe AdsOnDeliveryRestrictions
$sel:playlistWindowSeconds:HlsPackage' :: HlsPackage -> Maybe Int
$sel:adTriggers:HlsPackage' :: HlsPackage -> Maybe [AdTriggersElement]
$sel:includeIframeOnlyStream:HlsPackage' :: HlsPackage -> Maybe Bool
$sel:encryption:HlsPackage' :: HlsPackage -> Maybe HlsEncryption
$sel:adMarkers:HlsPackage' :: HlsPackage -> Maybe AdMarkers
$sel:streamSelection:HlsPackage' :: HlsPackage -> Maybe StreamSelection
$sel:programDateTimeIntervalSeconds:HlsPackage' :: HlsPackage -> Maybe Int
$sel:segmentDurationSeconds:HlsPackage' :: HlsPackage -> Maybe Int
$sel:playlistType:HlsPackage' :: HlsPackage -> Maybe PlaylistType
$sel:includeDvbSubtitles:HlsPackage' :: HlsPackage -> Maybe Bool
$sel:useAudioRenditionGroup:HlsPackage' :: HlsPackage -> Maybe Bool
$sel:adsOnDeliveryRestrictions:HlsPackage' :: HlsPackage -> Maybe AdsOnDeliveryRestrictions
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"adsOnDeliveryRestrictions" Text -> AdsOnDeliveryRestrictions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AdsOnDeliveryRestrictions -> Pair)
-> Maybe AdsOnDeliveryRestrictions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions,
(Text
"useAudioRenditionGroup" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
useAudioRenditionGroup,
(Text
"includeDvbSubtitles" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeDvbSubtitles,
(Text
"playlistType" Text -> PlaylistType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PlaylistType -> Pair) -> Maybe PlaylistType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PlaylistType
playlistType,
(Text
"segmentDurationSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
segmentDurationSeconds,
(Text
"programDateTimeIntervalSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
programDateTimeIntervalSeconds,
(Text
"streamSelection" Text -> StreamSelection -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(StreamSelection -> Pair) -> Maybe StreamSelection -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StreamSelection
streamSelection,
(Text
"adMarkers" Text -> AdMarkers -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AdMarkers -> Pair) -> Maybe AdMarkers -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AdMarkers
adMarkers,
(Text
"encryption" Text -> HlsEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HlsEncryption -> Pair) -> Maybe HlsEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsEncryption
encryption,
(Text
"includeIframeOnlyStream" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeIframeOnlyStream,
(Text
"adTriggers" Text -> [AdTriggersElement] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AdTriggersElement] -> Pair)
-> Maybe [AdTriggersElement] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AdTriggersElement]
adTriggers,
(Text
"playlistWindowSeconds" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
playlistWindowSeconds
]
)