{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.HlsSettings where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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'
  { -- | Specifies the group to which the audio rendition belongs.
    HlsSettings -> Maybe Text
audioGroupId :: 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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,
    -- | 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
  }
  deriving (HlsSettings -> HlsSettings -> Bool
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]
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
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. 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:
--
-- 'audioGroupId', 'hlsSettings_audioGroupId' - Specifies the group to which the audio rendition belongs.
--
-- '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.
--
-- '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 \',\'.
--
-- '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
--
-- '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.
--
-- '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).
--
-- '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
newHlsSettings ::
  HlsSettings
newHlsSettings :: HlsSettings
newHlsSettings =
  HlsSettings'
    { $sel:audioGroupId:HlsSettings' :: Maybe Text
audioGroupId = forall a. Maybe a
Prelude.Nothing,
      $sel:audioOnlyContainer:HlsSettings' :: Maybe HlsAudioOnlyContainer
audioOnlyContainer = forall a. Maybe a
Prelude.Nothing,
      $sel:audioRenditionSets:HlsSettings' :: Maybe Text
audioRenditionSets = forall a. Maybe a
Prelude.Nothing,
      $sel:audioTrackType:HlsSettings' :: Maybe HlsAudioTrackType
audioTrackType = forall a. Maybe a
Prelude.Nothing,
      $sel:descriptiveVideoServiceFlag:HlsSettings' :: Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag = forall a. Maybe a
Prelude.Nothing,
      $sel:iFrameOnlyManifest:HlsSettings' :: Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest = forall a. Maybe a
Prelude.Nothing,
      $sel:segmentModifier:HlsSettings' :: Maybe Text
segmentModifier = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the group to which the audio rendition belongs.
hlsSettings_audioGroupId :: Lens.Lens' HlsSettings (Prelude.Maybe Prelude.Text)
hlsSettings_audioGroupId :: Lens' HlsSettings (Maybe Text)
hlsSettings_audioGroupId = 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 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 :: Lens' HlsSettings (Maybe HlsAudioOnlyContainer)
hlsSettings_audioOnlyContainer = 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)

-- | 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 :: Lens' HlsSettings (Maybe Text)
hlsSettings_audioRenditionSets = 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)

-- | 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 :: Lens' HlsSettings (Maybe HlsAudioTrackType)
hlsSettings_audioTrackType = 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)

-- | 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 :: Lens' HlsSettings (Maybe HlsDescriptiveVideoServiceFlag)
hlsSettings_descriptiveVideoServiceFlag = 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)

-- | 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 :: Lens' HlsSettings (Maybe HlsIFrameOnlyManifest)
hlsSettings_iFrameOnlyManifest = 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)

-- | 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 :: Lens' HlsSettings (Maybe Text)
hlsSettings_segmentModifier = 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)

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

instance Prelude.Hashable HlsSettings where
  hashWithSalt :: Int -> HlsSettings -> Int
hashWithSalt Int
_salt HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
segmentModifier :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
audioTrackType :: Maybe HlsAudioTrackType
audioRenditionSets :: Maybe Text
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
audioGroupId :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioGroupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAudioOnlyContainer
audioOnlyContainer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioRenditionSets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsAudioTrackType
audioTrackType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
segmentModifier

instance Prelude.NFData HlsSettings where
  rnf :: HlsSettings -> ()
rnf HlsSettings' {Maybe Text
Maybe HlsAudioOnlyContainer
Maybe HlsAudioTrackType
Maybe HlsDescriptiveVideoServiceFlag
Maybe HlsIFrameOnlyManifest
segmentModifier :: Maybe Text
iFrameOnlyManifest :: Maybe HlsIFrameOnlyManifest
descriptiveVideoServiceFlag :: Maybe HlsDescriptiveVideoServiceFlag
audioTrackType :: Maybe HlsAudioTrackType
audioRenditionSets :: Maybe Text
audioOnlyContainer :: Maybe HlsAudioOnlyContainer
audioGroupId :: Maybe Text
$sel:segmentModifier:HlsSettings' :: HlsSettings -> Maybe Text
$sel:iFrameOnlyManifest:HlsSettings' :: HlsSettings -> Maybe HlsIFrameOnlyManifest
$sel:descriptiveVideoServiceFlag:HlsSettings' :: HlsSettings -> Maybe HlsDescriptiveVideoServiceFlag
$sel:audioTrackType:HlsSettings' :: HlsSettings -> Maybe HlsAudioTrackType
$sel:audioRenditionSets:HlsSettings' :: HlsSettings -> Maybe Text
$sel:audioOnlyContainer:HlsSettings' :: HlsSettings -> Maybe HlsAudioOnlyContainer
$sel:audioGroupId:HlsSettings' :: HlsSettings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioGroupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAudioOnlyContainer
audioOnlyContainer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioRenditionSets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsAudioTrackType
audioTrackType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsDescriptiveVideoServiceFlag
descriptiveVideoServiceFlag
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HlsIFrameOnlyManifest
iFrameOnlyManifest
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
segmentModifier

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