{-# 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.HlsPackage
-- 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.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

-- | An HTTP Live Streaming (HLS) packaging configuration.
--
-- /See:/ 'newHlsPackage' smart constructor.
data HlsPackage = HlsPackage'
  { HlsPackage -> Maybe AdsOnDeliveryRestrictions
adsOnDeliveryRestrictions :: Prelude.Maybe AdsOnDeliveryRestrictions,
    -- | When enabled, audio streams will be placed in rendition groups in the
    -- output.
    HlsPackage -> Maybe Bool
useAudioRenditionGroup :: Prelude.Maybe Prelude.Bool,
    -- | When enabled, MediaPackage passes through digital video broadcasting
    -- (DVB) subtitles into the output.
    HlsPackage -> Maybe Bool
includeDvbSubtitles :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    HlsPackage -> Maybe PlaylistType
playlistType :: Prelude.Maybe PlaylistType,
    -- | Duration (in seconds) of each fragment. Actual fragments will be rounded
    -- to the nearest multiple of the source fragment duration.
    HlsPackage -> Maybe Int
segmentDurationSeconds :: Prelude.Maybe Prelude.Int,
    -- | 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.
    HlsPackage -> Maybe Int
programDateTimeIntervalSeconds :: Prelude.Maybe Prelude.Int,
    HlsPackage -> Maybe StreamSelection
streamSelection :: Prelude.Maybe StreamSelection,
    -- | 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.
    HlsPackage -> Maybe AdMarkers
adMarkers :: Prelude.Maybe AdMarkers,
    HlsPackage -> Maybe HlsEncryption
encryption :: Prelude.Maybe HlsEncryption,
    -- | When enabled, an I-Frame only stream will be included in the output.
    HlsPackage -> Maybe Bool
includeIframeOnlyStream :: Prelude.Maybe Prelude.Bool,
    HlsPackage -> Maybe [AdTriggersElement]
adTriggers :: Prelude.Maybe [AdTriggersElement],
    -- | Time window (in seconds) contained in each parent manifest.
    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)

-- |
-- Create a value of 'HlsPackage' 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:
--
-- 'adsOnDeliveryRestrictions', 'hlsPackage_adsOnDeliveryRestrictions' - Undocumented member.
--
-- 'useAudioRenditionGroup', 'hlsPackage_useAudioRenditionGroup' - When enabled, audio streams will be placed in rendition groups in the
-- output.
--
-- 'includeDvbSubtitles', 'hlsPackage_includeDvbSubtitles' - When enabled, MediaPackage passes through digital video broadcasting
-- (DVB) subtitles into the output.
--
-- 'playlistType', 'hlsPackage_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.
--
-- 'segmentDurationSeconds', 'hlsPackage_segmentDurationSeconds' - Duration (in seconds) of each fragment. Actual fragments will be rounded
-- to the nearest multiple of the source fragment duration.
--
-- 'programDateTimeIntervalSeconds', 'hlsPackage_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.
--
-- 'streamSelection', 'hlsPackage_streamSelection' - Undocumented member.
--
-- 'adMarkers', 'hlsPackage_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.
--
-- 'encryption', 'hlsPackage_encryption' - Undocumented member.
--
-- 'includeIframeOnlyStream', 'hlsPackage_includeIframeOnlyStream' - When enabled, an I-Frame only stream will be included in the output.
--
-- 'adTriggers', 'hlsPackage_adTriggers' - Undocumented member.
--
-- 'playlistWindowSeconds', 'hlsPackage_playlistWindowSeconds' - Time window (in seconds) contained in each parent manifest.
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
    }

-- | Undocumented member.
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)

-- | When enabled, audio streams will be placed in rendition groups in the
-- output.
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)

-- | When enabled, MediaPackage passes through digital video broadcasting
-- (DVB) subtitles into the output.
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)

-- | 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.
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)

-- | Duration (in seconds) of each fragment. Actual fragments will be rounded
-- to the nearest multiple of the source fragment duration.
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)

-- | 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.
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)

-- | Undocumented member.
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)

-- | 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.
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)

-- | Undocumented member.
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)

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

-- | Undocumented member.
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

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