{-# 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.MediaConvert.Types.HlsSettings
-- 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.MediaConvert.Types.HlsSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types.HlsAudioOnlyContainer
import Amazonka.MediaConvert.Types.HlsAudioTrackType
import Amazonka.MediaConvert.Types.HlsDescriptiveVideoServiceFlag
import Amazonka.MediaConvert.Types.HlsIFrameOnlyManifest
import qualified Amazonka.Prelude as Prelude

-- | Settings for HLS output groups
--
-- /See:/ 'newHlsSettings' smart constructor.
data HlsSettings = HlsSettings'
  { -- | Specify whether to flag this audio track as descriptive video service
    -- (DVS) in your HLS parent manifest. When you choose Flag (FLAG),
    -- MediaConvert includes the parameter
    -- CHARACTERISTICS=\"public.accessibility.describes-video\" in the
    -- EXT-X-MEDIA entry for this track. When you keep the default choice,
    -- Don\'t flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS
    -- flag can help with accessibility on Apple devices. For more information,
    -- see the Apple documentation.
    HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag :: Prelude.Maybe HlsDescriptiveVideoServiceFlag,
    -- | List all the audio groups that are used with the video output stream.
    -- Input all the audio GROUP-IDs that are associated to the video, separate
    -- by \',\'.
    HlsSettings -> Maybe Text
audioRenditionSets :: Prelude.Maybe Prelude.Text,
    -- | Choose Include (INCLUDE) to have MediaConvert generate a child manifest
    -- that lists only the I-frames for this rendition, in addition to your
    -- regular manifest for this rendition. You might use this manifest as part
    -- of a workflow that creates preview functions for your video.
    -- MediaConvert adds both the I-frame only child manifest and the regular
    -- child manifest to the parent manifest. When you don\'t need the I-frame
    -- only child manifest, keep the default value Exclude (EXCLUDE).
    HlsSettings -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest :: Prelude.Maybe HlsIFrameOnlyManifest,
    -- | Specifies the group to which the audio rendition belongs.
    HlsSettings -> Maybe Text
audioGroupId :: Prelude.Maybe Prelude.Text,
    -- | Use this setting to add an identifying string to the filename of each
    -- segment. The service adds this string between the name modifier and
    -- segment index number. You can use format identifiers in the string. For
    -- more information, see
    -- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/using-variables-in-your-job-settings.html
    HlsSettings -> Maybe Text
segmentModifier :: Prelude.Maybe Prelude.Text,
    -- | Use this setting only in audio-only outputs. Choose MPEG-2 Transport
    -- Stream (M2TS) to create a file in an MPEG2-TS container. Keep the
    -- default value Automatic (AUTOMATIC) to create an audio-only file in a
    -- raw container. Regardless of the value that you specify here, if this
    -- output has video, the service will place the output into an MPEG2-TS
    -- container.
    HlsSettings -> Maybe HlsAudioOnlyContainer
audioOnlyContainer :: Prelude.Maybe HlsAudioOnlyContainer,
    -- | Four types of audio-only tracks are supported: Audio-Only Variant Stream
    -- The client can play back this audio-only stream instead of video in
    -- low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS
    -- manifest. Alternate Audio, Auto Select, Default Alternate rendition that
    -- the client should try to play back by default. Represented as an
    -- EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES
    -- Alternate Audio, Auto Select, Not Default Alternate rendition that the
    -- client may try to play back by default. Represented as an EXT-X-MEDIA in
    -- the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not
    -- Auto Select Alternate rendition that the client will not try to play
    -- back by default. Represented as an EXT-X-MEDIA in the HLS manifest with
    -- DEFAULT=NO, AUTOSELECT=NO
    HlsSettings -> Maybe HlsAudioTrackType
audioTrackType :: Prelude.Maybe HlsAudioTrackType
  }
  deriving (HlsSettings -> HlsSettings -> Bool
(HlsSettings -> HlsSettings -> Bool)
-> (HlsSettings -> HlsSettings -> Bool) -> Eq HlsSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsSettings -> HlsSettings -> Bool
$c/= :: HlsSettings -> HlsSettings -> Bool
== :: HlsSettings -> HlsSettings -> Bool
$c== :: HlsSettings -> HlsSettings -> Bool
Prelude.Eq, ReadPrec [HlsSettings]
ReadPrec HlsSettings
Int -> ReadS HlsSettings
ReadS [HlsSettings]
(Int -> ReadS HlsSettings)
-> ReadS [HlsSettings]
-> ReadPrec HlsSettings
-> ReadPrec [HlsSettings]
-> Read HlsSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsSettings]
$creadListPrec :: ReadPrec [HlsSettings]
readPrec :: ReadPrec HlsSettings
$creadPrec :: ReadPrec HlsSettings
readList :: ReadS [HlsSettings]
$creadList :: ReadS [HlsSettings]
readsPrec :: Int -> ReadS HlsSettings
$creadsPrec :: Int -> ReadS HlsSettings
Prelude.Read, Int -> HlsSettings -> ShowS
[HlsSettings] -> ShowS
HlsSettings -> String
(Int -> HlsSettings -> ShowS)
-> (HlsSettings -> String)
-> ([HlsSettings] -> ShowS)
-> Show HlsSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsSettings] -> ShowS
$cshowList :: [HlsSettings] -> ShowS
show :: HlsSettings -> String
$cshow :: HlsSettings -> String
showsPrec :: Int -> HlsSettings -> ShowS
$cshowsPrec :: Int -> HlsSettings -> ShowS
Prelude.Show, (forall x. HlsSettings -> Rep HlsSettings x)
-> (forall x. Rep HlsSettings x -> HlsSettings)
-> Generic HlsSettings
forall x. Rep HlsSettings x -> HlsSettings
forall x. HlsSettings -> Rep HlsSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsSettings x -> HlsSettings
$cfrom :: forall x. HlsSettings -> Rep HlsSettings x
Prelude.Generic)

-- |
-- Create a value of 'HlsSettings' 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:
--
-- 'descriptiveVideoServiceFlag', 'hlsSettings_descriptiveVideoServiceFlag' - Specify whether to flag this audio track as descriptive video service
-- (DVS) in your HLS parent manifest. When you choose Flag (FLAG),
-- MediaConvert includes the parameter
-- CHARACTERISTICS=\"public.accessibility.describes-video\" in the
-- EXT-X-MEDIA entry for this track. When you keep the default choice,
-- Don\'t flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS
-- flag can help with accessibility on Apple devices. For more information,
-- see the Apple documentation.
--
-- 'audioRenditionSets', 'hlsSettings_audioRenditionSets' - List all the audio groups that are used with the video output stream.
-- Input all the audio GROUP-IDs that are associated to the video, separate
-- by \',\'.
--
-- 'iFrameOnlyManifest', 'hlsSettings_iFrameOnlyManifest' - Choose Include (INCLUDE) to have MediaConvert generate a child manifest
-- that lists only the I-frames for this rendition, in addition to your
-- regular manifest for this rendition. You might use this manifest as part
-- of a workflow that creates preview functions for your video.
-- MediaConvert adds both the I-frame only child manifest and the regular
-- child manifest to the parent manifest. When you don\'t need the I-frame
-- only child manifest, keep the default value Exclude (EXCLUDE).
--
-- 'audioGroupId', 'hlsSettings_audioGroupId' - Specifies the group to which the audio rendition belongs.
--
-- 'segmentModifier', 'hlsSettings_segmentModifier' - Use this setting to add an identifying string to the filename of each
-- segment. The service adds this string between the name modifier and
-- segment index number. You can use format identifiers in the string. For
-- more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/using-variables-in-your-job-settings.html
--
-- 'audioOnlyContainer', 'hlsSettings_audioOnlyContainer' - Use this setting only in audio-only outputs. Choose MPEG-2 Transport
-- Stream (M2TS) to create a file in an MPEG2-TS container. Keep the
-- default value Automatic (AUTOMATIC) to create an audio-only file in a
-- raw container. Regardless of the value that you specify here, if this
-- output has video, the service will place the output into an MPEG2-TS
-- container.
--
-- 'audioTrackType', 'hlsSettings_audioTrackType' - Four types of audio-only tracks are supported: Audio-Only Variant Stream
-- The client can play back this audio-only stream instead of video in
-- low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS
-- manifest. Alternate Audio, Auto Select, Default Alternate rendition that
-- the client should try to play back by default. Represented as an
-- EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES
-- Alternate Audio, Auto Select, Not Default Alternate rendition that the
-- client may try to play back by default. Represented as an EXT-X-MEDIA in
-- the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not
-- Auto Select Alternate rendition that the client will not try to play
-- back by default. Represented as an EXT-X-MEDIA in the HLS manifest with
-- DEFAULT=NO, AUTOSELECT=NO
newHlsSettings ::
  HlsSettings
newHlsSettings :: HlsSettings
newHlsSettings =
  HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
-> Maybe Text
-> Maybe HlsIFrameOnlyManifest
-> Maybe Text
-> Maybe Text
-> Maybe HlsAudioOnlyContainer
-> Maybe HlsAudioTrackType
-> HlsSettings
HlsSettings'
    { $sel:descriptiveVideoServiceFlag:HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag =
        Maybe HlsDescriptiveVideoServiceFlag
forall a. Maybe a
Prelude.Nothing,
      $sel:audioRenditionSets:HlsSettings' :: Maybe Text
audioRenditionSets = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iFrameOnlyManifest:HlsSettings' :: Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest = Maybe HlsIFrameOnlyManifest
forall a. Maybe a
Prelude.Nothing,
      $sel:audioGroupId:HlsSettings' :: Maybe Text
audioGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:segmentModifier:HlsSettings' :: Maybe Text
segmentModifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:audioOnlyContainer:HlsSettings' :: Maybe HlsAudioOnlyContainer
audioOnlyContainer = Maybe HlsAudioOnlyContainer
forall a. Maybe a
Prelude.Nothing,
      $sel:audioTrackType:HlsSettings' :: Maybe HlsAudioTrackType
audioTrackType = Maybe HlsAudioTrackType
forall a. Maybe a
Prelude.Nothing
    }

-- | Specify whether to flag this audio track as descriptive video service
-- (DVS) in your HLS parent manifest. When you choose Flag (FLAG),
-- MediaConvert includes the parameter
-- CHARACTERISTICS=\"public.accessibility.describes-video\" in the
-- EXT-X-MEDIA entry for this track. When you keep the default choice,
-- Don\'t flag (DONT_FLAG), MediaConvert leaves this parameter out. The DVS
-- flag can help with accessibility on Apple devices. For more information,
-- see the Apple documentation.
hlsSettings_descriptiveVideoServiceFlag :: Lens.Lens' HlsSettings (Prelude.Maybe HlsDescriptiveVideoServiceFlag)
hlsSettings_descriptiveVideoServiceFlag :: (Maybe HlsDescriptiveVideoServiceFlag
 -> f (Maybe HlsDescriptiveVideoServiceFlag))
-> HlsSettings -> f HlsSettings
hlsSettings_descriptiveVideoServiceFlag = (HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag)
-> (HlsSettings
    -> Maybe HlsDescriptiveVideoServiceFlag -> HlsSettings)
-> Lens
     HlsSettings
     HlsSettings
     (Maybe HlsDescriptiveVideoServiceFlag)
     (Maybe HlsDescriptiveVideoServiceFlag)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag} -> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsDescriptiveVideoServiceFlag
a -> HlsSettings
s {$sel:descriptiveVideoServiceFlag:HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag = Maybe HlsDescriptiveVideoServiceFlag
a} :: HlsSettings)

-- | List all the audio groups that are used with the video output stream.
-- Input all the audio GROUP-IDs that are associated to the video, separate
-- by \',\'.
hlsSettings_audioRenditionSets :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_audioRenditionSets :: (Maybe Text -> f (Maybe Text)) -> HlsSettings -> f HlsSettings
hlsSettings_audioRenditionSets = (HlsSettings -> Maybe Text)
-> (HlsSettings -> Maybe Text -> HlsSettings)
-> Lens HlsSettings HlsSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
audioRenditionSets :: Maybe Text
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
audioRenditionSets} -> Maybe Text
audioRenditionSets) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:audioRenditionSets:HlsSettings' :: Maybe Text
audioRenditionSets = Maybe Text
a} :: HlsSettings)

-- | Choose Include (INCLUDE) to have MediaConvert generate a child manifest
-- that lists only the I-frames for this rendition, in addition to your
-- regular manifest for this rendition. You might use this manifest as part
-- of a workflow that creates preview functions for your video.
-- MediaConvert adds both the I-frame only child manifest and the regular
-- child manifest to the parent manifest. When you don\'t need the I-frame
-- only child manifest, keep the default value Exclude (EXCLUDE).
hlsSettings_iFrameOnlyManifest :: Lens.Lens' HlsSettings (Prelude.Maybe HlsIFrameOnlyManifest)
hlsSettings_iFrameOnlyManifest :: (Maybe HlsIFrameOnlyManifest -> f (Maybe HlsIFrameOnlyManifest))
-> HlsSettings -> f HlsSettings
hlsSettings_iFrameOnlyManifest = (HlsSettings -> Maybe HlsIFrameOnlyManifest)
-> (HlsSettings -> Maybe HlsIFrameOnlyManifest -> HlsSettings)
-> Lens
     HlsSettings
     HlsSettings
     (Maybe HlsIFrameOnlyManifest)
     (Maybe HlsIFrameOnlyManifest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest} -> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsIFrameOnlyManifest
a -> HlsSettings
s {$sel:iFrameOnlyManifest:HlsSettings' :: Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest = Maybe HlsIFrameOnlyManifest
a} :: HlsSettings)

-- | Specifies the group to which the audio rendition belongs.
hlsSettings_audioGroupId :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_audioGroupId :: (Maybe Text -> f (Maybe Text)) -> HlsSettings -> f HlsSettings
hlsSettings_audioGroupId = (HlsSettings -> Maybe Text)
-> (HlsSettings -> Maybe Text -> HlsSettings)
-> Lens HlsSettings HlsSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
audioGroupId :: Maybe Text
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
audioGroupId} -> Maybe Text
audioGroupId) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:audioGroupId:HlsSettings' :: Maybe Text
audioGroupId = Maybe Text
a} :: HlsSettings)

-- | Use this setting to add an identifying string to the filename of each
-- segment. The service adds this string between the name modifier and
-- segment index number. You can use format identifiers in the string. For
-- more information, see
-- https:\/\/docs.aws.amazon.com\/mediaconvert\/latest\/ug\/using-variables-in-your-job-settings.html
hlsSettings_segmentModifier :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_segmentModifier :: (Maybe Text -> f (Maybe Text)) -> HlsSettings -> f HlsSettings
hlsSettings_segmentModifier = (HlsSettings -> Maybe Text)
-> (HlsSettings -> Maybe Text -> HlsSettings)
-> Lens HlsSettings HlsSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe Text
segmentModifier :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
segmentModifier} -> Maybe Text
segmentModifier) (\s :: HlsSettings
s@HlsSettings' {} Maybe Text
a -> HlsSettings
s {$sel:segmentModifier:HlsSettings' :: Maybe Text
segmentModifier = Maybe Text
a} :: HlsSettings)

-- | Use this setting only in audio-only outputs. Choose MPEG-2 Transport
-- Stream (M2TS) to create a file in an MPEG2-TS container. Keep the
-- default value Automatic (AUTOMATIC) to create an audio-only file in a
-- raw container. Regardless of the value that you specify here, if this
-- output has video, the service will place the output into an MPEG2-TS
-- container.
hlsSettings_audioOnlyContainer :: Lens.Lens' HlsSettings (Prelude.Maybe HlsAudioOnlyContainer)
hlsSettings_audioOnlyContainer :: (Maybe HlsAudioOnlyContainer -> f (Maybe HlsAudioOnlyContainer))
-> HlsSettings -> f HlsSettings
hlsSettings_audioOnlyContainer = (HlsSettings -> Maybe HlsAudioOnlyContainer)
-> (HlsSettings -> Maybe HlsAudioOnlyContainer -> HlsSettings)
-> Lens
     HlsSettings
     HlsSettings
     (Maybe HlsAudioOnlyContainer)
     (Maybe HlsAudioOnlyContainer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsAudioOnlyContainer
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
audioOnlyContainer} -> Maybe HlsAudioOnlyContainer
audioOnlyContainer) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsAudioOnlyContainer
a -> HlsSettings
s {$sel:audioOnlyContainer:HlsSettings' :: Maybe HlsAudioOnlyContainer
audioOnlyContainer = Maybe HlsAudioOnlyContainer
a} :: HlsSettings)

-- | Four types of audio-only tracks are supported: Audio-Only Variant Stream
-- The client can play back this audio-only stream instead of video in
-- low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS
-- manifest. Alternate Audio, Auto Select, Default Alternate rendition that
-- the client should try to play back by default. Represented as an
-- EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES
-- Alternate Audio, Auto Select, Not Default Alternate rendition that the
-- client may try to play back by default. Represented as an EXT-X-MEDIA in
-- the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not
-- Auto Select Alternate rendition that the client will not try to play
-- back by default. Represented as an EXT-X-MEDIA in the HLS manifest with
-- DEFAULT=NO, AUTOSELECT=NO
hlsSettings_audioTrackType :: Lens.Lens' HlsSettings (Prelude.Maybe HlsAudioTrackType)
hlsSettings_audioTrackType :: (Maybe HlsAudioTrackType -> f (Maybe HlsAudioTrackType))
-> HlsSettings -> f HlsSettings
hlsSettings_audioTrackType = (HlsSettings -> Maybe HlsAudioTrackType)
-> (HlsSettings -> Maybe HlsAudioTrackType -> HlsSettings)
-> Lens
     HlsSettings
     HlsSettings
     (Maybe HlsAudioTrackType)
     (Maybe HlsAudioTrackType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HlsSettings' {Maybe HlsAudioTrackType
audioTrackType :: Maybe HlsAudioTrackType
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
audioTrackType} -> Maybe HlsAudioTrackType
audioTrackType) (\s :: HlsSettings
s@HlsSettings' {} Maybe HlsAudioTrackType
a -> HlsSettings
s {$sel:audioTrackType:HlsSettings' :: Maybe HlsAudioTrackType
audioTrackType = Maybe HlsAudioTrackType
a} :: HlsSettings)

instance Core.FromJSON HlsSettings where
  parseJSON :: Value -> Parser HlsSettings
parseJSON =
    String
-> (Object -> Parser HlsSettings) -> Value -> Parser HlsSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"HlsSettings"
      ( \Object
x ->
          Maybe HlsDescriptiveVideoServiceFlag
-> Maybe Text
-> Maybe HlsIFrameOnlyManifest
-> Maybe Text
-> Maybe Text
-> Maybe HlsAudioOnlyContainer
-> Maybe HlsAudioTrackType
-> HlsSettings
HlsSettings'
            (Maybe HlsDescriptiveVideoServiceFlag
 -> Maybe Text
 -> Maybe HlsIFrameOnlyManifest
 -> Maybe Text
 -> Maybe Text
 -> Maybe HlsAudioOnlyContainer
 -> Maybe HlsAudioTrackType
 -> HlsSettings)
-> Parser (Maybe HlsDescriptiveVideoServiceFlag)
-> Parser
     (Maybe Text
      -> Maybe HlsIFrameOnlyManifest
      -> Maybe Text
      -> Maybe Text
      -> Maybe HlsAudioOnlyContainer
      -> Maybe HlsAudioTrackType
      -> HlsSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe HlsDescriptiveVideoServiceFlag)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"descriptiveVideoServiceFlag")
            Parser
  (Maybe Text
   -> Maybe HlsIFrameOnlyManifest
   -> Maybe Text
   -> Maybe Text
   -> Maybe HlsAudioOnlyContainer
   -> Maybe HlsAudioTrackType
   -> HlsSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe HlsIFrameOnlyManifest
      -> Maybe Text
      -> Maybe Text
      -> Maybe HlsAudioOnlyContainer
      -> Maybe HlsAudioTrackType
      -> HlsSettings)
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
"audioRenditionSets")
            Parser
  (Maybe HlsIFrameOnlyManifest
   -> Maybe Text
   -> Maybe Text
   -> Maybe HlsAudioOnlyContainer
   -> Maybe HlsAudioTrackType
   -> HlsSettings)
-> Parser (Maybe HlsIFrameOnlyManifest)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe HlsAudioOnlyContainer
      -> Maybe HlsAudioTrackType
      -> HlsSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsIFrameOnlyManifest)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iFrameOnlyManifest")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe HlsAudioOnlyContainer
   -> Maybe HlsAudioTrackType
   -> HlsSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe HlsAudioOnlyContainer
      -> Maybe HlsAudioTrackType
      -> HlsSettings)
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
"audioGroupId")
            Parser
  (Maybe Text
   -> Maybe HlsAudioOnlyContainer
   -> Maybe HlsAudioTrackType
   -> HlsSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe HlsAudioOnlyContainer
      -> Maybe HlsAudioTrackType -> HlsSettings)
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
"segmentModifier")
            Parser
  (Maybe HlsAudioOnlyContainer
   -> Maybe HlsAudioTrackType -> HlsSettings)
-> Parser (Maybe HlsAudioOnlyContainer)
-> Parser (Maybe HlsAudioTrackType -> HlsSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsAudioOnlyContainer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioOnlyContainer")
            Parser (Maybe HlsAudioTrackType -> HlsSettings)
-> Parser (Maybe HlsAudioTrackType) -> Parser HlsSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HlsAudioTrackType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"audioTrackType")
      )

instance Prelude.Hashable HlsSettings

instance Prelude.NFData HlsSettings

instance Core.ToJSON HlsSettings where
  toJSON :: HlsSettings -> Value
toJSON HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
audioTrackType :: Maybe HlsAudioTrackType
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
segmentModifier :: Maybe Text
audioGroupId :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
audioRenditionSets :: Maybe Text
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"descriptiveVideoServiceFlag" Text -> HlsDescriptiveVideoServiceFlag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HlsDescriptiveVideoServiceFlag -> Pair)
-> Maybe HlsDescriptiveVideoServiceFlag -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag,
            (Text
"audioRenditionSets" 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
audioRenditionSets,
            (Text
"iFrameOnlyManifest" Text -> HlsIFrameOnlyManifest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HlsIFrameOnlyManifest -> Pair)
-> Maybe HlsIFrameOnlyManifest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest,
            (Text
"audioGroupId" 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
audioGroupId,
            (Text
"segmentModifier" 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
segmentModifier,
            (Text
"audioOnlyContainer" Text -> HlsAudioOnlyContainer -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HlsAudioOnlyContainer -> Pair)
-> Maybe HlsAudioOnlyContainer -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsAudioOnlyContainer
audioOnlyContainer,
            (Text
"audioTrackType" Text -> HlsAudioTrackType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HlsAudioTrackType -> Pair)
-> Maybe HlsAudioTrackType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HlsAudioTrackType
audioTrackType
          ]
      )