{-# 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.MediaLive.Types.M3u8Settings
-- 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.MediaLive.Types.M3u8Settings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.M3u8NielsenId3Behavior
import Amazonka.MediaLive.Types.M3u8PcrControl
import Amazonka.MediaLive.Types.M3u8Scte35Behavior
import Amazonka.MediaLive.Types.M3u8TimedMetadataBehavior
import qualified Amazonka.Prelude as Prelude

-- | Settings information for the .m3u8 container
--
-- /See:/ 'newM3u8Settings' smart constructor.
data M3u8Settings = M3u8Settings'
  { -- | Packet Identifier (PID) for the Program Map Table (PMT) in the transport
    -- stream. Can be entered as a decimal or hexadecimal value.
    M3u8Settings -> Maybe Text
pmtPid :: Prelude.Maybe Prelude.Text,
    -- | Packet Identifier (PID) of the elementary video stream in the transport
    -- stream. Can be entered as a decimal or hexadecimal value.
    M3u8Settings -> Maybe Text
videoPid :: Prelude.Maybe Prelude.Text,
    -- | If set to passthrough, Nielsen inaudible tones for media tracking will
    -- be detected in the input audio and an equivalent ID3 tag will be
    -- inserted in the output.
    M3u8Settings -> Maybe M3u8NielsenId3Behavior
nielsenId3Behavior :: Prelude.Maybe M3u8NielsenId3Behavior,
    -- | Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
    -- Can be entered as a decimal or hexadecimal value.
    M3u8Settings -> Maybe Text
scte35Pid :: Prelude.Maybe Prelude.Text,
    -- | The value of the transport stream ID field in the Program Map Table.
    M3u8Settings -> Maybe Natural
transportStreamId :: Prelude.Maybe Prelude.Natural,
    -- | The value of the program number field in the Program Map Table.
    M3u8Settings -> Maybe Natural
programNum :: Prelude.Maybe Prelude.Natural,
    -- | When set to passthrough, timed metadata is passed through from input to
    -- output.
    M3u8Settings -> Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior :: Prelude.Maybe M3u8TimedMetadataBehavior,
    -- | The number of milliseconds between instances of this table in the output
    -- transport stream. A value of \\\"0\\\" writes out the PMT once per
    -- segment file.
    M3u8Settings -> Maybe Natural
pmtInterval :: Prelude.Maybe Prelude.Natural,
    -- | This parameter is unused and deprecated.
    M3u8Settings -> Maybe Text
ecmPid :: Prelude.Maybe Prelude.Text,
    -- | Packet Identifier (PID) of the timed metadata stream in the transport
    -- stream. Can be entered as a decimal or hexadecimal value. Valid values
    -- are 32 (or 0x20)..8182 (or 0x1ff6).
    M3u8Settings -> Maybe Text
timedMetadataPid :: Prelude.Maybe Prelude.Text,
    -- | The number of audio frames to insert for each PES packet.
    M3u8Settings -> Maybe Natural
audioFramesPerPes :: Prelude.Maybe Prelude.Natural,
    -- | Maximum time in milliseconds between Program Clock References (PCRs)
    -- inserted into the transport stream.
    M3u8Settings -> Maybe Natural
pcrPeriod :: Prelude.Maybe Prelude.Natural,
    -- | Packet Identifier (PID) of the Program Clock Reference (PCR) in the
    -- transport stream. When no value is given, the encoder will assign the
    -- same value as the Video PID. Can be entered as a decimal or hexadecimal
    -- value.
    M3u8Settings -> Maybe Text
pcrPid :: Prelude.Maybe Prelude.Text,
    -- | The number of milliseconds between instances of this table in the output
    -- transport stream. A value of \\\"0\\\" writes out the PMT once per
    -- segment file.
    M3u8Settings -> Maybe Natural
patInterval :: Prelude.Maybe Prelude.Natural,
    -- | Packet Identifier (PID) of the elementary audio stream(s) in the
    -- transport stream. Multiple values are accepted, and can be entered in
    -- ranges and\/or by comma separation. Can be entered as decimal or
    -- hexadecimal values.
    M3u8Settings -> Maybe Text
audioPids :: Prelude.Maybe Prelude.Text,
    -- | If set to passthrough, passes any SCTE-35 signals from the input source
    -- to this output.
    M3u8Settings -> Maybe M3u8Scte35Behavior
scte35Behavior :: Prelude.Maybe M3u8Scte35Behavior,
    -- | When set to pcrEveryPesPacket, a Program Clock Reference value is
    -- inserted for every Packetized Elementary Stream (PES) header. This
    -- parameter is effective only when the PCR PID is the same as the video or
    -- audio elementary stream.
    M3u8Settings -> Maybe M3u8PcrControl
pcrControl :: Prelude.Maybe M3u8PcrControl
  }
  deriving (M3u8Settings -> M3u8Settings -> Bool
(M3u8Settings -> M3u8Settings -> Bool)
-> (M3u8Settings -> M3u8Settings -> Bool) -> Eq M3u8Settings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: M3u8Settings -> M3u8Settings -> Bool
$c/= :: M3u8Settings -> M3u8Settings -> Bool
== :: M3u8Settings -> M3u8Settings -> Bool
$c== :: M3u8Settings -> M3u8Settings -> Bool
Prelude.Eq, ReadPrec [M3u8Settings]
ReadPrec M3u8Settings
Int -> ReadS M3u8Settings
ReadS [M3u8Settings]
(Int -> ReadS M3u8Settings)
-> ReadS [M3u8Settings]
-> ReadPrec M3u8Settings
-> ReadPrec [M3u8Settings]
-> Read M3u8Settings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [M3u8Settings]
$creadListPrec :: ReadPrec [M3u8Settings]
readPrec :: ReadPrec M3u8Settings
$creadPrec :: ReadPrec M3u8Settings
readList :: ReadS [M3u8Settings]
$creadList :: ReadS [M3u8Settings]
readsPrec :: Int -> ReadS M3u8Settings
$creadsPrec :: Int -> ReadS M3u8Settings
Prelude.Read, Int -> M3u8Settings -> ShowS
[M3u8Settings] -> ShowS
M3u8Settings -> String
(Int -> M3u8Settings -> ShowS)
-> (M3u8Settings -> String)
-> ([M3u8Settings] -> ShowS)
-> Show M3u8Settings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [M3u8Settings] -> ShowS
$cshowList :: [M3u8Settings] -> ShowS
show :: M3u8Settings -> String
$cshow :: M3u8Settings -> String
showsPrec :: Int -> M3u8Settings -> ShowS
$cshowsPrec :: Int -> M3u8Settings -> ShowS
Prelude.Show, (forall x. M3u8Settings -> Rep M3u8Settings x)
-> (forall x. Rep M3u8Settings x -> M3u8Settings)
-> Generic M3u8Settings
forall x. Rep M3u8Settings x -> M3u8Settings
forall x. M3u8Settings -> Rep M3u8Settings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep M3u8Settings x -> M3u8Settings
$cfrom :: forall x. M3u8Settings -> Rep M3u8Settings x
Prelude.Generic)

-- |
-- Create a value of 'M3u8Settings' 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:
--
-- 'pmtPid', 'm3u8Settings_pmtPid' - Packet Identifier (PID) for the Program Map Table (PMT) in the transport
-- stream. Can be entered as a decimal or hexadecimal value.
--
-- 'videoPid', 'm3u8Settings_videoPid' - Packet Identifier (PID) of the elementary video stream in the transport
-- stream. Can be entered as a decimal or hexadecimal value.
--
-- 'nielsenId3Behavior', 'm3u8Settings_nielsenId3Behavior' - If set to passthrough, Nielsen inaudible tones for media tracking will
-- be detected in the input audio and an equivalent ID3 tag will be
-- inserted in the output.
--
-- 'scte35Pid', 'm3u8Settings_scte35Pid' - Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
-- Can be entered as a decimal or hexadecimal value.
--
-- 'transportStreamId', 'm3u8Settings_transportStreamId' - The value of the transport stream ID field in the Program Map Table.
--
-- 'programNum', 'm3u8Settings_programNum' - The value of the program number field in the Program Map Table.
--
-- 'timedMetadataBehavior', 'm3u8Settings_timedMetadataBehavior' - When set to passthrough, timed metadata is passed through from input to
-- output.
--
-- 'pmtInterval', 'm3u8Settings_pmtInterval' - The number of milliseconds between instances of this table in the output
-- transport stream. A value of \\\"0\\\" writes out the PMT once per
-- segment file.
--
-- 'ecmPid', 'm3u8Settings_ecmPid' - This parameter is unused and deprecated.
--
-- 'timedMetadataPid', 'm3u8Settings_timedMetadataPid' - Packet Identifier (PID) of the timed metadata stream in the transport
-- stream. Can be entered as a decimal or hexadecimal value. Valid values
-- are 32 (or 0x20)..8182 (or 0x1ff6).
--
-- 'audioFramesPerPes', 'm3u8Settings_audioFramesPerPes' - The number of audio frames to insert for each PES packet.
--
-- 'pcrPeriod', 'm3u8Settings_pcrPeriod' - Maximum time in milliseconds between Program Clock References (PCRs)
-- inserted into the transport stream.
--
-- 'pcrPid', 'm3u8Settings_pcrPid' - Packet Identifier (PID) of the Program Clock Reference (PCR) in the
-- transport stream. When no value is given, the encoder will assign the
-- same value as the Video PID. Can be entered as a decimal or hexadecimal
-- value.
--
-- 'patInterval', 'm3u8Settings_patInterval' - The number of milliseconds between instances of this table in the output
-- transport stream. A value of \\\"0\\\" writes out the PMT once per
-- segment file.
--
-- 'audioPids', 'm3u8Settings_audioPids' - Packet Identifier (PID) of the elementary audio stream(s) in the
-- transport stream. Multiple values are accepted, and can be entered in
-- ranges and\/or by comma separation. Can be entered as decimal or
-- hexadecimal values.
--
-- 'scte35Behavior', 'm3u8Settings_scte35Behavior' - If set to passthrough, passes any SCTE-35 signals from the input source
-- to this output.
--
-- 'pcrControl', 'm3u8Settings_pcrControl' - When set to pcrEveryPesPacket, a Program Clock Reference value is
-- inserted for every Packetized Elementary Stream (PES) header. This
-- parameter is effective only when the PCR PID is the same as the video or
-- audio elementary stream.
newM3u8Settings ::
  M3u8Settings
newM3u8Settings :: M3u8Settings
newM3u8Settings =
  M3u8Settings' :: Maybe Text
-> Maybe Text
-> Maybe M3u8NielsenId3Behavior
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe M3u8TimedMetadataBehavior
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe M3u8Scte35Behavior
-> Maybe M3u8PcrControl
-> M3u8Settings
M3u8Settings'
    { $sel:pmtPid:M3u8Settings' :: Maybe Text
pmtPid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:videoPid:M3u8Settings' :: Maybe Text
videoPid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nielsenId3Behavior:M3u8Settings' :: Maybe M3u8NielsenId3Behavior
nielsenId3Behavior = Maybe M3u8NielsenId3Behavior
forall a. Maybe a
Prelude.Nothing,
      $sel:scte35Pid:M3u8Settings' :: Maybe Text
scte35Pid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transportStreamId:M3u8Settings' :: Maybe Natural
transportStreamId = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:programNum:M3u8Settings' :: Maybe Natural
programNum = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:timedMetadataBehavior:M3u8Settings' :: Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior = Maybe M3u8TimedMetadataBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:pmtInterval:M3u8Settings' :: Maybe Natural
pmtInterval = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:ecmPid:M3u8Settings' :: Maybe Text
ecmPid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timedMetadataPid:M3u8Settings' :: Maybe Text
timedMetadataPid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:audioFramesPerPes:M3u8Settings' :: Maybe Natural
audioFramesPerPes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:pcrPeriod:M3u8Settings' :: Maybe Natural
pcrPeriod = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:pcrPid:M3u8Settings' :: Maybe Text
pcrPid = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:patInterval:M3u8Settings' :: Maybe Natural
patInterval = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:audioPids:M3u8Settings' :: Maybe Text
audioPids = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scte35Behavior:M3u8Settings' :: Maybe M3u8Scte35Behavior
scte35Behavior = Maybe M3u8Scte35Behavior
forall a. Maybe a
Prelude.Nothing,
      $sel:pcrControl:M3u8Settings' :: Maybe M3u8PcrControl
pcrControl = Maybe M3u8PcrControl
forall a. Maybe a
Prelude.Nothing
    }

-- | Packet Identifier (PID) for the Program Map Table (PMT) in the transport
-- stream. Can be entered as a decimal or hexadecimal value.
m3u8Settings_pmtPid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_pmtPid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_pmtPid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
pmtPid :: Maybe Text
$sel:pmtPid:M3u8Settings' :: M3u8Settings -> Maybe Text
pmtPid} -> Maybe Text
pmtPid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:pmtPid:M3u8Settings' :: Maybe Text
pmtPid = Maybe Text
a} :: M3u8Settings)

-- | Packet Identifier (PID) of the elementary video stream in the transport
-- stream. Can be entered as a decimal or hexadecimal value.
m3u8Settings_videoPid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_videoPid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_videoPid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
videoPid :: Maybe Text
$sel:videoPid:M3u8Settings' :: M3u8Settings -> Maybe Text
videoPid} -> Maybe Text
videoPid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:videoPid:M3u8Settings' :: Maybe Text
videoPid = Maybe Text
a} :: M3u8Settings)

-- | If set to passthrough, Nielsen inaudible tones for media tracking will
-- be detected in the input audio and an equivalent ID3 tag will be
-- inserted in the output.
m3u8Settings_nielsenId3Behavior :: Lens.Lens' M3u8Settings (Prelude.Maybe M3u8NielsenId3Behavior)
m3u8Settings_nielsenId3Behavior :: (Maybe M3u8NielsenId3Behavior -> f (Maybe M3u8NielsenId3Behavior))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_nielsenId3Behavior = (M3u8Settings -> Maybe M3u8NielsenId3Behavior)
-> (M3u8Settings -> Maybe M3u8NielsenId3Behavior -> M3u8Settings)
-> Lens
     M3u8Settings
     M3u8Settings
     (Maybe M3u8NielsenId3Behavior)
     (Maybe M3u8NielsenId3Behavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe M3u8NielsenId3Behavior
nielsenId3Behavior :: Maybe M3u8NielsenId3Behavior
$sel:nielsenId3Behavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8NielsenId3Behavior
nielsenId3Behavior} -> Maybe M3u8NielsenId3Behavior
nielsenId3Behavior) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe M3u8NielsenId3Behavior
a -> M3u8Settings
s {$sel:nielsenId3Behavior:M3u8Settings' :: Maybe M3u8NielsenId3Behavior
nielsenId3Behavior = Maybe M3u8NielsenId3Behavior
a} :: M3u8Settings)

-- | Packet Identifier (PID) of the SCTE-35 stream in the transport stream.
-- Can be entered as a decimal or hexadecimal value.
m3u8Settings_scte35Pid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_scte35Pid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_scte35Pid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
scte35Pid :: Maybe Text
$sel:scte35Pid:M3u8Settings' :: M3u8Settings -> Maybe Text
scte35Pid} -> Maybe Text
scte35Pid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:scte35Pid:M3u8Settings' :: Maybe Text
scte35Pid = Maybe Text
a} :: M3u8Settings)

-- | The value of the transport stream ID field in the Program Map Table.
m3u8Settings_transportStreamId :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_transportStreamId :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_transportStreamId = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
transportStreamId :: Maybe Natural
$sel:transportStreamId:M3u8Settings' :: M3u8Settings -> Maybe Natural
transportStreamId} -> Maybe Natural
transportStreamId) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:transportStreamId:M3u8Settings' :: Maybe Natural
transportStreamId = Maybe Natural
a} :: M3u8Settings)

-- | The value of the program number field in the Program Map Table.
m3u8Settings_programNum :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_programNum :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_programNum = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
programNum :: Maybe Natural
$sel:programNum:M3u8Settings' :: M3u8Settings -> Maybe Natural
programNum} -> Maybe Natural
programNum) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:programNum:M3u8Settings' :: Maybe Natural
programNum = Maybe Natural
a} :: M3u8Settings)

-- | When set to passthrough, timed metadata is passed through from input to
-- output.
m3u8Settings_timedMetadataBehavior :: Lens.Lens' M3u8Settings (Prelude.Maybe M3u8TimedMetadataBehavior)
m3u8Settings_timedMetadataBehavior :: (Maybe M3u8TimedMetadataBehavior
 -> f (Maybe M3u8TimedMetadataBehavior))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_timedMetadataBehavior = (M3u8Settings -> Maybe M3u8TimedMetadataBehavior)
-> (M3u8Settings
    -> Maybe M3u8TimedMetadataBehavior -> M3u8Settings)
-> Lens
     M3u8Settings
     M3u8Settings
     (Maybe M3u8TimedMetadataBehavior)
     (Maybe M3u8TimedMetadataBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior :: Maybe M3u8TimedMetadataBehavior
$sel:timedMetadataBehavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior} -> Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe M3u8TimedMetadataBehavior
a -> M3u8Settings
s {$sel:timedMetadataBehavior:M3u8Settings' :: Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior = Maybe M3u8TimedMetadataBehavior
a} :: M3u8Settings)

-- | The number of milliseconds between instances of this table in the output
-- transport stream. A value of \\\"0\\\" writes out the PMT once per
-- segment file.
m3u8Settings_pmtInterval :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_pmtInterval :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_pmtInterval = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
pmtInterval :: Maybe Natural
$sel:pmtInterval:M3u8Settings' :: M3u8Settings -> Maybe Natural
pmtInterval} -> Maybe Natural
pmtInterval) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:pmtInterval:M3u8Settings' :: Maybe Natural
pmtInterval = Maybe Natural
a} :: M3u8Settings)

-- | This parameter is unused and deprecated.
m3u8Settings_ecmPid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_ecmPid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_ecmPid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
ecmPid :: Maybe Text
$sel:ecmPid:M3u8Settings' :: M3u8Settings -> Maybe Text
ecmPid} -> Maybe Text
ecmPid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:ecmPid:M3u8Settings' :: Maybe Text
ecmPid = Maybe Text
a} :: M3u8Settings)

-- | Packet Identifier (PID) of the timed metadata stream in the transport
-- stream. Can be entered as a decimal or hexadecimal value. Valid values
-- are 32 (or 0x20)..8182 (or 0x1ff6).
m3u8Settings_timedMetadataPid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_timedMetadataPid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_timedMetadataPid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
timedMetadataPid :: Maybe Text
$sel:timedMetadataPid:M3u8Settings' :: M3u8Settings -> Maybe Text
timedMetadataPid} -> Maybe Text
timedMetadataPid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:timedMetadataPid:M3u8Settings' :: Maybe Text
timedMetadataPid = Maybe Text
a} :: M3u8Settings)

-- | The number of audio frames to insert for each PES packet.
m3u8Settings_audioFramesPerPes :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_audioFramesPerPes :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_audioFramesPerPes = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
audioFramesPerPes :: Maybe Natural
$sel:audioFramesPerPes:M3u8Settings' :: M3u8Settings -> Maybe Natural
audioFramesPerPes} -> Maybe Natural
audioFramesPerPes) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:audioFramesPerPes:M3u8Settings' :: Maybe Natural
audioFramesPerPes = Maybe Natural
a} :: M3u8Settings)

-- | Maximum time in milliseconds between Program Clock References (PCRs)
-- inserted into the transport stream.
m3u8Settings_pcrPeriod :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_pcrPeriod :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_pcrPeriod = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
pcrPeriod :: Maybe Natural
$sel:pcrPeriod:M3u8Settings' :: M3u8Settings -> Maybe Natural
pcrPeriod} -> Maybe Natural
pcrPeriod) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:pcrPeriod:M3u8Settings' :: Maybe Natural
pcrPeriod = Maybe Natural
a} :: M3u8Settings)

-- | Packet Identifier (PID) of the Program Clock Reference (PCR) in the
-- transport stream. When no value is given, the encoder will assign the
-- same value as the Video PID. Can be entered as a decimal or hexadecimal
-- value.
m3u8Settings_pcrPid :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_pcrPid :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_pcrPid = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
pcrPid :: Maybe Text
$sel:pcrPid:M3u8Settings' :: M3u8Settings -> Maybe Text
pcrPid} -> Maybe Text
pcrPid) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:pcrPid:M3u8Settings' :: Maybe Text
pcrPid = Maybe Text
a} :: M3u8Settings)

-- | The number of milliseconds between instances of this table in the output
-- transport stream. A value of \\\"0\\\" writes out the PMT once per
-- segment file.
m3u8Settings_patInterval :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Natural)
m3u8Settings_patInterval :: (Maybe Natural -> f (Maybe Natural))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_patInterval = (M3u8Settings -> Maybe Natural)
-> (M3u8Settings -> Maybe Natural -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Natural
patInterval :: Maybe Natural
$sel:patInterval:M3u8Settings' :: M3u8Settings -> Maybe Natural
patInterval} -> Maybe Natural
patInterval) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Natural
a -> M3u8Settings
s {$sel:patInterval:M3u8Settings' :: Maybe Natural
patInterval = Maybe Natural
a} :: M3u8Settings)

-- | Packet Identifier (PID) of the elementary audio stream(s) in the
-- transport stream. Multiple values are accepted, and can be entered in
-- ranges and\/or by comma separation. Can be entered as decimal or
-- hexadecimal values.
m3u8Settings_audioPids :: Lens.Lens' M3u8Settings (Prelude.Maybe Prelude.Text)
m3u8Settings_audioPids :: (Maybe Text -> f (Maybe Text)) -> M3u8Settings -> f M3u8Settings
m3u8Settings_audioPids = (M3u8Settings -> Maybe Text)
-> (M3u8Settings -> Maybe Text -> M3u8Settings)
-> Lens M3u8Settings M3u8Settings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe Text
audioPids :: Maybe Text
$sel:audioPids:M3u8Settings' :: M3u8Settings -> Maybe Text
audioPids} -> Maybe Text
audioPids) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe Text
a -> M3u8Settings
s {$sel:audioPids:M3u8Settings' :: Maybe Text
audioPids = Maybe Text
a} :: M3u8Settings)

-- | If set to passthrough, passes any SCTE-35 signals from the input source
-- to this output.
m3u8Settings_scte35Behavior :: Lens.Lens' M3u8Settings (Prelude.Maybe M3u8Scte35Behavior)
m3u8Settings_scte35Behavior :: (Maybe M3u8Scte35Behavior -> f (Maybe M3u8Scte35Behavior))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_scte35Behavior = (M3u8Settings -> Maybe M3u8Scte35Behavior)
-> (M3u8Settings -> Maybe M3u8Scte35Behavior -> M3u8Settings)
-> Lens
     M3u8Settings
     M3u8Settings
     (Maybe M3u8Scte35Behavior)
     (Maybe M3u8Scte35Behavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe M3u8Scte35Behavior
scte35Behavior :: Maybe M3u8Scte35Behavior
$sel:scte35Behavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8Scte35Behavior
scte35Behavior} -> Maybe M3u8Scte35Behavior
scte35Behavior) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe M3u8Scte35Behavior
a -> M3u8Settings
s {$sel:scte35Behavior:M3u8Settings' :: Maybe M3u8Scte35Behavior
scte35Behavior = Maybe M3u8Scte35Behavior
a} :: M3u8Settings)

-- | When set to pcrEveryPesPacket, a Program Clock Reference value is
-- inserted for every Packetized Elementary Stream (PES) header. This
-- parameter is effective only when the PCR PID is the same as the video or
-- audio elementary stream.
m3u8Settings_pcrControl :: Lens.Lens' M3u8Settings (Prelude.Maybe M3u8PcrControl)
m3u8Settings_pcrControl :: (Maybe M3u8PcrControl -> f (Maybe M3u8PcrControl))
-> M3u8Settings -> f M3u8Settings
m3u8Settings_pcrControl = (M3u8Settings -> Maybe M3u8PcrControl)
-> (M3u8Settings -> Maybe M3u8PcrControl -> M3u8Settings)
-> Lens
     M3u8Settings
     M3u8Settings
     (Maybe M3u8PcrControl)
     (Maybe M3u8PcrControl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\M3u8Settings' {Maybe M3u8PcrControl
pcrControl :: Maybe M3u8PcrControl
$sel:pcrControl:M3u8Settings' :: M3u8Settings -> Maybe M3u8PcrControl
pcrControl} -> Maybe M3u8PcrControl
pcrControl) (\s :: M3u8Settings
s@M3u8Settings' {} Maybe M3u8PcrControl
a -> M3u8Settings
s {$sel:pcrControl:M3u8Settings' :: Maybe M3u8PcrControl
pcrControl = Maybe M3u8PcrControl
a} :: M3u8Settings)

instance Core.FromJSON M3u8Settings where
  parseJSON :: Value -> Parser M3u8Settings
parseJSON =
    String
-> (Object -> Parser M3u8Settings) -> Value -> Parser M3u8Settings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"M3u8Settings"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe M3u8NielsenId3Behavior
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe M3u8TimedMetadataBehavior
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe M3u8Scte35Behavior
-> Maybe M3u8PcrControl
-> M3u8Settings
M3u8Settings'
            (Maybe Text
 -> Maybe Text
 -> Maybe M3u8NielsenId3Behavior
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe M3u8TimedMetadataBehavior
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe M3u8Scte35Behavior
 -> Maybe M3u8PcrControl
 -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe M3u8NielsenId3Behavior
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"pmtPid")
            Parser
  (Maybe Text
   -> Maybe M3u8NielsenId3Behavior
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe M3u8NielsenId3Behavior
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"videoPid")
            Parser
  (Maybe M3u8NielsenId3Behavior
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe M3u8NielsenId3Behavior)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe M3u8NielsenId3Behavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nielsenId3Behavior")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"scte35Pid")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"transportStreamId")
            Parser
  (Maybe Natural
   -> Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe M3u8TimedMetadataBehavior
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"programNum")
            Parser
  (Maybe M3u8TimedMetadataBehavior
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe M3u8TimedMetadataBehavior)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe M3u8TimedMetadataBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timedMetadataBehavior")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pmtInterval")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"ecmPid")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"timedMetadataPid")
            Parser
  (Maybe Natural
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioFramesPerPes")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pcrPeriod")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
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
"pcrPid")
            Parser
  (Maybe Natural
   -> Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Natural)
-> Parser
     (Maybe Text
      -> Maybe M3u8Scte35Behavior
      -> Maybe M3u8PcrControl
      -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"patInterval")
            Parser
  (Maybe Text
   -> Maybe M3u8Scte35Behavior
   -> Maybe M3u8PcrControl
   -> M3u8Settings)
-> Parser (Maybe Text)
-> Parser
     (Maybe M3u8Scte35Behavior -> Maybe M3u8PcrControl -> M3u8Settings)
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
"audioPids")
            Parser
  (Maybe M3u8Scte35Behavior -> Maybe M3u8PcrControl -> M3u8Settings)
-> Parser (Maybe M3u8Scte35Behavior)
-> Parser (Maybe M3u8PcrControl -> M3u8Settings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe M3u8Scte35Behavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scte35Behavior")
            Parser (Maybe M3u8PcrControl -> M3u8Settings)
-> Parser (Maybe M3u8PcrControl) -> Parser M3u8Settings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe M3u8PcrControl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pcrControl")
      )

instance Prelude.Hashable M3u8Settings

instance Prelude.NFData M3u8Settings

instance Core.ToJSON M3u8Settings where
  toJSON :: M3u8Settings -> Value
toJSON M3u8Settings' {Maybe Natural
Maybe Text
Maybe M3u8NielsenId3Behavior
Maybe M3u8PcrControl
Maybe M3u8Scte35Behavior
Maybe M3u8TimedMetadataBehavior
pcrControl :: Maybe M3u8PcrControl
scte35Behavior :: Maybe M3u8Scte35Behavior
audioPids :: Maybe Text
patInterval :: Maybe Natural
pcrPid :: Maybe Text
pcrPeriod :: Maybe Natural
audioFramesPerPes :: Maybe Natural
timedMetadataPid :: Maybe Text
ecmPid :: Maybe Text
pmtInterval :: Maybe Natural
timedMetadataBehavior :: Maybe M3u8TimedMetadataBehavior
programNum :: Maybe Natural
transportStreamId :: Maybe Natural
scte35Pid :: Maybe Text
nielsenId3Behavior :: Maybe M3u8NielsenId3Behavior
videoPid :: Maybe Text
pmtPid :: Maybe Text
$sel:pcrControl:M3u8Settings' :: M3u8Settings -> Maybe M3u8PcrControl
$sel:scte35Behavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8Scte35Behavior
$sel:audioPids:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:patInterval:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:pcrPid:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:pcrPeriod:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:audioFramesPerPes:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:timedMetadataPid:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:ecmPid:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:pmtInterval:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:timedMetadataBehavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8TimedMetadataBehavior
$sel:programNum:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:transportStreamId:M3u8Settings' :: M3u8Settings -> Maybe Natural
$sel:scte35Pid:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:nielsenId3Behavior:M3u8Settings' :: M3u8Settings -> Maybe M3u8NielsenId3Behavior
$sel:videoPid:M3u8Settings' :: M3u8Settings -> Maybe Text
$sel:pmtPid:M3u8Settings' :: M3u8Settings -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"pmtPid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pmtPid,
            (Text
"videoPid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
videoPid,
            (Text
"nielsenId3Behavior" Text -> M3u8NielsenId3Behavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (M3u8NielsenId3Behavior -> Pair)
-> Maybe M3u8NielsenId3Behavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M3u8NielsenId3Behavior
nielsenId3Behavior,
            (Text
"scte35Pid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
scte35Pid,
            (Text
"transportStreamId" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
transportStreamId,
            (Text
"programNum" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
programNum,
            (Text
"timedMetadataBehavior" Text -> M3u8TimedMetadataBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (M3u8TimedMetadataBehavior -> Pair)
-> Maybe M3u8TimedMetadataBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M3u8TimedMetadataBehavior
timedMetadataBehavior,
            (Text
"pmtInterval" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pmtInterval,
            (Text
"ecmPid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ecmPid,
            (Text
"timedMetadataPid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
timedMetadataPid,
            (Text
"audioFramesPerPes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
audioFramesPerPes,
            (Text
"pcrPeriod" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
pcrPeriod,
            (Text
"pcrPid" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pcrPid,
            (Text
"patInterval" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
patInterval,
            (Text
"audioPids" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
audioPids,
            (Text
"scte35Behavior" Text -> M3u8Scte35Behavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (M3u8Scte35Behavior -> Pair)
-> Maybe M3u8Scte35Behavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M3u8Scte35Behavior
scte35Behavior,
            (Text
"pcrControl" Text -> M3u8PcrControl -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (M3u8PcrControl -> Pair) -> Maybe M3u8PcrControl -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M3u8PcrControl
pcrControl
          ]
      )