{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaPackage.Types.HlsManifest
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | A HTTP Live Streaming (HLS) manifest configuration.
--
-- /See:/ 'newHlsManifest' smart constructor.
data HlsManifest = HlsManifest'
  { -- | An optional short string appended to the end of the OriginEndpoint URL.
    -- If not specified, defaults to the manifestName for the OriginEndpoint.
    HlsManifest -> Maybe Text
manifestName :: Prelude.Maybe Prelude.Text,
    -- | The URL of the packaged OriginEndpoint for consumption.
    HlsManifest -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | The HTTP Live Streaming (HLS) playlist type. When either \"EVENT\" or
    -- \"VOD\" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be
    -- included in the media playlist.
    HlsManifest -> Maybe PlaylistType
playlistType :: Prelude.Maybe PlaylistType,
    -- | The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
    -- inserted into manifests. Additionally, when an interval is specified
    -- ID3Timed Metadata messages will be generated every 5 seconds using the
    -- ingest time of the content. If the interval is not specified, or set to
    -- 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests
    -- and no ID3Timed Metadata messages will be generated. Note that
    -- irrespective of this parameter, if any ID3 Timed Metadata is found in
    -- HTTP Live Streaming (HLS) input, it will be passed through to HLS
    -- output.
    HlsManifest -> Maybe Int
programDateTimeIntervalSeconds :: Prelude.Maybe Prelude.Int,
    -- | This setting controls how ad markers are included in the packaged
    -- OriginEndpoint. \"NONE\" will omit all SCTE-35 ad markers from the
    -- output. \"PASSTHROUGH\" causes the manifest to contain a copy of the
    -- SCTE-35 ad markers (comments) taken directly from the input HTTP Live
    -- Streaming (HLS) manifest. \"SCTE35_ENHANCED\" generates ad markers and
    -- blackout tags based on SCTE-35 messages in the input source.
    -- \"DATERANGE\" inserts EXT-X-DATERANGE tags to signal ad and program
    -- transition events in HLS and CMAF manifests. For this option, you must
    -- set a programDateTimeIntervalSeconds value that is greater than 0.
    HlsManifest -> Maybe AdMarkers
adMarkers :: Prelude.Maybe AdMarkers,
    -- | When enabled, an I-Frame only stream will be included in the output.
    HlsManifest -> Maybe Bool
includeIframeOnlyStream :: Prelude.Maybe Prelude.Bool,
    -- | Time window (in seconds) contained in each parent manifest.
    HlsManifest -> Maybe Int
playlistWindowSeconds :: Prelude.Maybe Prelude.Int,
    -- | The ID of the manifest. The ID must be unique within the OriginEndpoint
    -- and it cannot be changed after it is created.
    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)

-- |
-- Create a value of 'HlsManifest' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'manifestName', 'hlsManifest_manifestName' - An optional short string appended to the end of the OriginEndpoint URL.
-- If not specified, defaults to the manifestName for the OriginEndpoint.
--
-- 'url', 'hlsManifest_url' - The URL of the packaged OriginEndpoint for consumption.
--
-- 'playlistType', 'hlsManifest_playlistType' - The HTTP Live Streaming (HLS) playlist type. When either \"EVENT\" or
-- \"VOD\" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be
-- included in the media playlist.
--
-- 'programDateTimeIntervalSeconds', 'hlsManifest_programDateTimeIntervalSeconds' - The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
-- inserted into manifests. Additionally, when an interval is specified
-- ID3Timed Metadata messages will be generated every 5 seconds using the
-- ingest time of the content. If the interval is not specified, or set to
-- 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests
-- and no ID3Timed Metadata messages will be generated. Note that
-- irrespective of this parameter, if any ID3 Timed Metadata is found in
-- HTTP Live Streaming (HLS) input, it will be passed through to HLS
-- output.
--
-- 'adMarkers', 'hlsManifest_adMarkers' - This setting controls how ad markers are included in the packaged
-- OriginEndpoint. \"NONE\" will omit all SCTE-35 ad markers from the
-- output. \"PASSTHROUGH\" causes the manifest to contain a copy of the
-- SCTE-35 ad markers (comments) taken directly from the input HTTP Live
-- Streaming (HLS) manifest. \"SCTE35_ENHANCED\" generates ad markers and
-- blackout tags based on SCTE-35 messages in the input source.
-- \"DATERANGE\" inserts EXT-X-DATERANGE tags to signal ad and program
-- transition events in HLS and CMAF manifests. For this option, you must
-- set a programDateTimeIntervalSeconds value that is greater than 0.
--
-- 'includeIframeOnlyStream', 'hlsManifest_includeIframeOnlyStream' - When enabled, an I-Frame only stream will be included in the output.
--
-- 'playlistWindowSeconds', 'hlsManifest_playlistWindowSeconds' - Time window (in seconds) contained in each parent manifest.
--
-- 'id', 'hlsManifest_id' - The ID of the manifest. The ID must be unique within the OriginEndpoint
-- and it cannot be changed after it is created.
newHlsManifest ::
  -- | 'id'
  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_
    }

-- | An optional short string appended to the end of the OriginEndpoint URL.
-- If not specified, defaults to the manifestName for the OriginEndpoint.
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)

-- | The URL of the packaged OriginEndpoint for consumption.
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)

-- | The HTTP Live Streaming (HLS) playlist type. When either \"EVENT\" or
-- \"VOD\" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be
-- included in the media playlist.
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)

-- | The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
-- inserted into manifests. Additionally, when an interval is specified
-- ID3Timed Metadata messages will be generated every 5 seconds using the
-- ingest time of the content. If the interval is not specified, or set to
-- 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests
-- and no ID3Timed Metadata messages will be generated. Note that
-- irrespective of this parameter, if any ID3 Timed Metadata is found in
-- HTTP Live Streaming (HLS) input, it will be passed through to HLS
-- output.
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)

-- | This setting controls how ad markers are included in the packaged
-- OriginEndpoint. \"NONE\" will omit all SCTE-35 ad markers from the
-- output. \"PASSTHROUGH\" causes the manifest to contain a copy of the
-- SCTE-35 ad markers (comments) taken directly from the input HTTP Live
-- Streaming (HLS) manifest. \"SCTE35_ENHANCED\" generates ad markers and
-- blackout tags based on SCTE-35 messages in the input source.
-- \"DATERANGE\" inserts EXT-X-DATERANGE tags to signal ad and program
-- transition events in HLS and CMAF manifests. For this option, you must
-- set a programDateTimeIntervalSeconds value that is greater than 0.
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)

-- | When enabled, an I-Frame only stream will be included in the output.
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)

-- | Time window (in seconds) contained in each parent manifest.
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)

-- | The ID of the manifest. The ID must be unique within the OriginEndpoint
-- and it cannot be changed after it is created.
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