{-# 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.HlsManifest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaPackage.Types.AdMarkers
import Amazonka.MediaPackage.Types.PlaylistType
import qualified Amazonka.Prelude as Prelude
data HlsManifest = HlsManifest'
{
HlsManifest -> Maybe Text
manifestName :: Prelude.Maybe Prelude.Text,
HlsManifest -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
HlsManifest -> Maybe PlaylistType
playlistType :: Prelude.Maybe PlaylistType,
HlsManifest -> Maybe Int
programDateTimeIntervalSeconds :: Prelude.Maybe Prelude.Int,
HlsManifest -> Maybe AdMarkers
adMarkers :: Prelude.Maybe AdMarkers,
HlsManifest -> Maybe Bool
includeIframeOnlyStream :: Prelude.Maybe Prelude.Bool,
HlsManifest -> Maybe Int
playlistWindowSeconds :: Prelude.Maybe Prelude.Int,
HlsManifest -> Text
id :: Prelude.Text
}
deriving (HlsManifest -> HlsManifest -> Bool
(HlsManifest -> HlsManifest -> Bool)
-> (HlsManifest -> HlsManifest -> Bool) -> Eq HlsManifest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsManifest -> HlsManifest -> Bool
$c/= :: HlsManifest -> HlsManifest -> Bool
== :: HlsManifest -> HlsManifest -> Bool
$c== :: HlsManifest -> HlsManifest -> Bool
Prelude.Eq, ReadPrec [HlsManifest]
ReadPrec HlsManifest
Int -> ReadS HlsManifest
ReadS [HlsManifest]
(Int -> ReadS HlsManifest)
-> ReadS [HlsManifest]
-> ReadPrec HlsManifest
-> ReadPrec [HlsManifest]
-> Read HlsManifest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsManifest]
$creadListPrec :: ReadPrec [HlsManifest]
readPrec :: ReadPrec HlsManifest
$creadPrec :: ReadPrec HlsManifest
readList :: ReadS [HlsManifest]
$creadList :: ReadS [HlsManifest]
readsPrec :: Int -> ReadS HlsManifest
$creadsPrec :: Int -> ReadS HlsManifest
Prelude.Read, Int -> HlsManifest -> ShowS
[HlsManifest] -> ShowS
HlsManifest -> String
(Int -> HlsManifest -> ShowS)
-> (HlsManifest -> String)
-> ([HlsManifest] -> ShowS)
-> Show HlsManifest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsManifest] -> ShowS
$cshowList :: [HlsManifest] -> ShowS
show :: HlsManifest -> String
$cshow :: HlsManifest -> String
showsPrec :: Int -> HlsManifest -> ShowS
$cshowsPrec :: Int -> HlsManifest -> ShowS
Prelude.Show, (forall x. HlsManifest -> Rep HlsManifest x)
-> (forall x. Rep HlsManifest x -> HlsManifest)
-> Generic HlsManifest
forall x. Rep HlsManifest x -> HlsManifest
forall x. HlsManifest -> Rep HlsManifest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsManifest x -> HlsManifest
$cfrom :: forall x. HlsManifest -> Rep HlsManifest x
Prelude.Generic)
newHlsManifest ::
Prelude.Text ->
HlsManifest
newHlsManifest :: Text -> HlsManifest
newHlsManifest Text
pId_ =
HlsManifest' :: Maybe Text
-> Maybe Text
-> Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest
HlsManifest'
{ $sel:manifestName:HlsManifest' :: Maybe Text
manifestName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:url:HlsManifest' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:playlistType:HlsManifest' :: Maybe PlaylistType
playlistType = Maybe PlaylistType
forall a. Maybe a
Prelude.Nothing,
$sel:programDateTimeIntervalSeconds:HlsManifest' :: Maybe Int
programDateTimeIntervalSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:adMarkers:HlsManifest' :: Maybe AdMarkers
adMarkers = Maybe AdMarkers
forall a. Maybe a
Prelude.Nothing,
$sel:includeIframeOnlyStream:HlsManifest' :: Maybe Bool
includeIframeOnlyStream = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:playlistWindowSeconds:HlsManifest' :: Maybe Int
playlistWindowSeconds = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:id:HlsManifest' :: Text
id = Text
pId_
}
hlsManifest_manifestName :: Lens.Lens' HlsManifest (Prelude.Maybe Prelude.Text)
hlsManifest_manifestName :: (Maybe Text -> f (Maybe Text)) -> HlsManifest -> f HlsManifest
hlsManifest_manifestName = (HlsManifest -> Maybe Text)
-> (HlsManifest -> Maybe Text -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe Text
manifestName :: Maybe Text
$sel:manifestName:HlsManifest' :: HlsManifest -> Maybe Text
manifestName} -> Maybe Text
manifestName) (\s :: HlsManifest
s@HlsManifest' {} Maybe Text
a -> HlsManifest
s {$sel:manifestName:HlsManifest' :: Maybe Text
manifestName = Maybe Text
a} :: HlsManifest)
hlsManifest_url :: Lens.Lens' HlsManifest (Prelude.Maybe Prelude.Text)
hlsManifest_url :: (Maybe Text -> f (Maybe Text)) -> HlsManifest -> f HlsManifest
hlsManifest_url = (HlsManifest -> Maybe Text)
-> (HlsManifest -> Maybe Text -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe Text
url :: Maybe Text
$sel:url:HlsManifest' :: HlsManifest -> Maybe Text
url} -> Maybe Text
url) (\s :: HlsManifest
s@HlsManifest' {} Maybe Text
a -> HlsManifest
s {$sel:url:HlsManifest' :: Maybe Text
url = Maybe Text
a} :: HlsManifest)
hlsManifest_playlistType :: Lens.Lens' HlsManifest (Prelude.Maybe PlaylistType)
hlsManifest_playlistType :: (Maybe PlaylistType -> f (Maybe PlaylistType))
-> HlsManifest -> f HlsManifest
hlsManifest_playlistType = (HlsManifest -> Maybe PlaylistType)
-> (HlsManifest -> Maybe PlaylistType -> HlsManifest)
-> Lens
HlsManifest HlsManifest (Maybe PlaylistType) (Maybe PlaylistType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe PlaylistType
playlistType :: Maybe PlaylistType
$sel:playlistType:HlsManifest' :: HlsManifest -> Maybe PlaylistType
playlistType} -> Maybe PlaylistType
playlistType) (\s :: HlsManifest
s@HlsManifest' {} Maybe PlaylistType
a -> HlsManifest
s {$sel:playlistType:HlsManifest' :: Maybe PlaylistType
playlistType = Maybe PlaylistType
a} :: HlsManifest)
hlsManifest_programDateTimeIntervalSeconds :: Lens.Lens' HlsManifest (Prelude.Maybe Prelude.Int)
hlsManifest_programDateTimeIntervalSeconds :: (Maybe Int -> f (Maybe Int)) -> HlsManifest -> f HlsManifest
hlsManifest_programDateTimeIntervalSeconds = (HlsManifest -> Maybe Int)
-> (HlsManifest -> Maybe Int -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe Int
programDateTimeIntervalSeconds :: Maybe Int
$sel:programDateTimeIntervalSeconds:HlsManifest' :: HlsManifest -> Maybe Int
programDateTimeIntervalSeconds} -> Maybe Int
programDateTimeIntervalSeconds) (\s :: HlsManifest
s@HlsManifest' {} Maybe Int
a -> HlsManifest
s {$sel:programDateTimeIntervalSeconds:HlsManifest' :: Maybe Int
programDateTimeIntervalSeconds = Maybe Int
a} :: HlsManifest)
hlsManifest_adMarkers :: Lens.Lens' HlsManifest (Prelude.Maybe AdMarkers)
hlsManifest_adMarkers :: (Maybe AdMarkers -> f (Maybe AdMarkers))
-> HlsManifest -> f HlsManifest
hlsManifest_adMarkers = (HlsManifest -> Maybe AdMarkers)
-> (HlsManifest -> Maybe AdMarkers -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe AdMarkers) (Maybe AdMarkers)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe AdMarkers
adMarkers :: Maybe AdMarkers
$sel:adMarkers:HlsManifest' :: HlsManifest -> Maybe AdMarkers
adMarkers} -> Maybe AdMarkers
adMarkers) (\s :: HlsManifest
s@HlsManifest' {} Maybe AdMarkers
a -> HlsManifest
s {$sel:adMarkers:HlsManifest' :: Maybe AdMarkers
adMarkers = Maybe AdMarkers
a} :: HlsManifest)
hlsManifest_includeIframeOnlyStream :: Lens.Lens' HlsManifest (Prelude.Maybe Prelude.Bool)
hlsManifest_includeIframeOnlyStream :: (Maybe Bool -> f (Maybe Bool)) -> HlsManifest -> f HlsManifest
hlsManifest_includeIframeOnlyStream = (HlsManifest -> Maybe Bool)
-> (HlsManifest -> Maybe Bool -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe Bool
includeIframeOnlyStream :: Maybe Bool
$sel:includeIframeOnlyStream:HlsManifest' :: HlsManifest -> Maybe Bool
includeIframeOnlyStream} -> Maybe Bool
includeIframeOnlyStream) (\s :: HlsManifest
s@HlsManifest' {} Maybe Bool
a -> HlsManifest
s {$sel:includeIframeOnlyStream:HlsManifest' :: Maybe Bool
includeIframeOnlyStream = Maybe Bool
a} :: HlsManifest)
hlsManifest_playlistWindowSeconds :: Lens.Lens' HlsManifest (Prelude.Maybe Prelude.Int)
hlsManifest_playlistWindowSeconds :: (Maybe Int -> f (Maybe Int)) -> HlsManifest -> f HlsManifest
hlsManifest_playlistWindowSeconds = (HlsManifest -> Maybe Int)
-> (HlsManifest -> Maybe Int -> HlsManifest)
-> Lens HlsManifest HlsManifest (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Maybe Int
playlistWindowSeconds :: Maybe Int
$sel:playlistWindowSeconds:HlsManifest' :: HlsManifest -> Maybe Int
playlistWindowSeconds} -> Maybe Int
playlistWindowSeconds) (\s :: HlsManifest
s@HlsManifest' {} Maybe Int
a -> HlsManifest
s {$sel:playlistWindowSeconds:HlsManifest' :: Maybe Int
playlistWindowSeconds = Maybe Int
a} :: HlsManifest)
hlsManifest_id :: Lens.Lens' HlsManifest Prelude.Text
hlsManifest_id :: (Text -> f Text) -> HlsManifest -> f HlsManifest
hlsManifest_id = (HlsManifest -> Text)
-> (HlsManifest -> Text -> HlsManifest)
-> Lens HlsManifest HlsManifest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsManifest' {Text
id :: Text
$sel:id:HlsManifest' :: HlsManifest -> Text
id} -> Text
id) (\s :: HlsManifest
s@HlsManifest' {} Text
a -> HlsManifest
s {$sel:id:HlsManifest' :: Text
id = Text
a} :: HlsManifest)
instance Core.FromJSON HlsManifest where
parseJSON :: Value -> Parser HlsManifest
parseJSON =
String
-> (Object -> Parser HlsManifest) -> Value -> Parser HlsManifest
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HlsManifest"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest
HlsManifest'
(Maybe Text
-> Maybe Text
-> Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"manifestName")
Parser
(Maybe Text
-> Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
-> Parser (Maybe Text)
-> Parser
(Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"url")
Parser
(Maybe PlaylistType
-> Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
-> Parser (Maybe PlaylistType)
-> Parser
(Maybe Int
-> Maybe AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
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 AdMarkers
-> Maybe Bool
-> Maybe Int
-> Text
-> HlsManifest)
-> Parser (Maybe Int)
-> Parser
(Maybe AdMarkers -> Maybe Bool -> Maybe Int -> Text -> HlsManifest)
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 AdMarkers -> Maybe Bool -> Maybe Int -> Text -> HlsManifest)
-> Parser (Maybe AdMarkers)
-> Parser (Maybe Bool -> Maybe Int -> Text -> HlsManifest)
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 Bool -> Maybe Int -> Text -> HlsManifest)
-> Parser (Maybe Bool) -> Parser (Maybe Int -> Text -> HlsManifest)
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 Int -> Text -> HlsManifest)
-> Parser (Maybe Int) -> Parser (Text -> HlsManifest)
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")
Parser (Text -> HlsManifest) -> Parser Text -> Parser HlsManifest
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"id")
)
instance Prelude.Hashable HlsManifest
instance Prelude.NFData HlsManifest