{-# 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.AacSettings
-- 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.AacSettings 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.AacAudioDescriptionBroadcasterMix
import Amazonka.MediaConvert.Types.AacCodecProfile
import Amazonka.MediaConvert.Types.AacCodingMode
import Amazonka.MediaConvert.Types.AacRateControlMode
import Amazonka.MediaConvert.Types.AacRawFormat
import Amazonka.MediaConvert.Types.AacSpecification
import Amazonka.MediaConvert.Types.AacVbrQuality
import qualified Amazonka.Prelude as Prelude

-- | Required when you set (Codec) under (AudioDescriptions)>(CodecSettings)
-- to the value AAC. The service accepts one of two mutually exclusive
-- groups of AAC settings--VBR and CBR. To select one of these modes, set
-- the value of Bitrate control mode (rateControlMode) to \"VBR\" or
-- \"CBR\". In VBR mode, you control the audio quality with the setting VBR
-- quality (vbrQuality). In CBR mode, you use the setting Bitrate
-- (bitrate). Defaults and valid values depend on the rate control mode.
--
-- /See:/ 'newAacSettings' smart constructor.
data AacSettings = AacSettings'
  { -- | Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio
    -- + audio description (AD) as a stereo pair. The value for AudioType will
    -- be set to 3, which signals to downstream systems that this stream
    -- contains \"broadcaster mixed AD\". Note that the input received by the
    -- encoder must contain pre-mixed audio; the encoder does not perform the
    -- mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any
    -- values you provide in AudioType and FollowInputAudioType. Choose NORMAL
    -- when the input does not contain pre-mixed audio + audio description
    -- (AD). In this case, the encoder will use any values you provide for
    -- AudioType and FollowInputAudioType.
    AacSettings -> Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix :: Prelude.Maybe AacAudioDescriptionBroadcasterMix,
    -- | Specify the average bitrate in bits per second. The set of valid values
    -- for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000,
    -- 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000,
    -- 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000,
    -- 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is
    -- also constrained by the values that you choose for Profile
    -- (codecProfile), Bitrate control mode (codingMode), and Sample rate
    -- (sampleRate). Default values depend on Bitrate control mode and Profile.
    AacSettings -> Maybe Natural
bitrate :: Prelude.Maybe Prelude.Natural,
    -- | AAC Profile.
    AacSettings -> Maybe AacCodecProfile
codecProfile :: Prelude.Maybe AacCodecProfile,
    -- | The Coding mode that you specify determines the number of audio channels
    -- and the audio channel layout metadata in your AAC output. Valid coding
    -- modes depend on the Rate control mode and Profile that you select. The
    -- following list shows the number of audio channels and channel layout for
    -- each coding mode. * 1.0 Audio Description (Receiver Mix): One channel,
    -- C. Includes audio description data from your stereo input. For more
    -- information see ETSI TS 101 154 Annex E. * 1.0 Mono: One channel, C. *
    -- 2.0 Stereo: Two channels, L, R. * 5.1 Surround: Five channels, C, L, R,
    -- Ls, Rs, LFE.
    AacSettings -> Maybe AacCodingMode
codingMode :: Prelude.Maybe AacCodingMode,
    -- | Rate Control Mode.
    AacSettings -> Maybe AacRateControlMode
rateControlMode :: Prelude.Maybe AacRateControlMode,
    -- | Enables LATM\/LOAS AAC output. Note that if you use LATM\/LOAS AAC in an
    -- output, you must choose \"No container\" for the output container.
    AacSettings -> Maybe AacRawFormat
rawFormat :: Prelude.Maybe AacRawFormat,
    -- | Specify the Sample rate in Hz. Valid sample rates depend on the Profile
    -- and Coding mode that you select. The following list shows valid sample
    -- rates for each Profile and Coding mode. * LC Profile, Coding mode 1.0,
    -- 2.0, and Receiver Mix: 8000, 12000, 16000, 22050, 24000, 32000, 44100,
    -- 48000, 88200, 96000. * LC Profile, Coding mode 5.1: 32000, 44100, 48000,
    -- 96000. * HEV1 Profile, Coding mode 1.0 and Receiver Mix: 22050, 24000,
    -- 32000, 44100, 48000. * HEV1 Profile, Coding mode 2.0 and 5.1: 32000,
    -- 44100, 48000, 96000. * HEV2 Profile, Coding mode 2.0: 22050, 24000,
    -- 32000, 44100, 48000.
    AacSettings -> Maybe Natural
sampleRate :: Prelude.Maybe Prelude.Natural,
    -- | Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport
    -- Stream containers.
    AacSettings -> Maybe AacSpecification
specification :: Prelude.Maybe AacSpecification,
    -- | VBR Quality Level - Only used if rate_control_mode is VBR.
    AacSettings -> Maybe AacVbrQuality
vbrQuality :: Prelude.Maybe AacVbrQuality
  }
  deriving (AacSettings -> AacSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AacSettings -> AacSettings -> Bool
$c/= :: AacSettings -> AacSettings -> Bool
== :: AacSettings -> AacSettings -> Bool
$c== :: AacSettings -> AacSettings -> Bool
Prelude.Eq, ReadPrec [AacSettings]
ReadPrec AacSettings
Int -> ReadS AacSettings
ReadS [AacSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AacSettings]
$creadListPrec :: ReadPrec [AacSettings]
readPrec :: ReadPrec AacSettings
$creadPrec :: ReadPrec AacSettings
readList :: ReadS [AacSettings]
$creadList :: ReadS [AacSettings]
readsPrec :: Int -> ReadS AacSettings
$creadsPrec :: Int -> ReadS AacSettings
Prelude.Read, Int -> AacSettings -> ShowS
[AacSettings] -> ShowS
AacSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AacSettings] -> ShowS
$cshowList :: [AacSettings] -> ShowS
show :: AacSettings -> String
$cshow :: AacSettings -> String
showsPrec :: Int -> AacSettings -> ShowS
$cshowsPrec :: Int -> AacSettings -> ShowS
Prelude.Show, forall x. Rep AacSettings x -> AacSettings
forall x. AacSettings -> Rep AacSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AacSettings x -> AacSettings
$cfrom :: forall x. AacSettings -> Rep AacSettings x
Prelude.Generic)

-- |
-- Create a value of 'AacSettings' 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:
--
-- 'audioDescriptionBroadcasterMix', 'aacSettings_audioDescriptionBroadcasterMix' - Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio
-- + audio description (AD) as a stereo pair. The value for AudioType will
-- be set to 3, which signals to downstream systems that this stream
-- contains \"broadcaster mixed AD\". Note that the input received by the
-- encoder must contain pre-mixed audio; the encoder does not perform the
-- mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any
-- values you provide in AudioType and FollowInputAudioType. Choose NORMAL
-- when the input does not contain pre-mixed audio + audio description
-- (AD). In this case, the encoder will use any values you provide for
-- AudioType and FollowInputAudioType.
--
-- 'bitrate', 'aacSettings_bitrate' - Specify the average bitrate in bits per second. The set of valid values
-- for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000,
-- 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000,
-- 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000,
-- 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is
-- also constrained by the values that you choose for Profile
-- (codecProfile), Bitrate control mode (codingMode), and Sample rate
-- (sampleRate). Default values depend on Bitrate control mode and Profile.
--
-- 'codecProfile', 'aacSettings_codecProfile' - AAC Profile.
--
-- 'codingMode', 'aacSettings_codingMode' - The Coding mode that you specify determines the number of audio channels
-- and the audio channel layout metadata in your AAC output. Valid coding
-- modes depend on the Rate control mode and Profile that you select. The
-- following list shows the number of audio channels and channel layout for
-- each coding mode. * 1.0 Audio Description (Receiver Mix): One channel,
-- C. Includes audio description data from your stereo input. For more
-- information see ETSI TS 101 154 Annex E. * 1.0 Mono: One channel, C. *
-- 2.0 Stereo: Two channels, L, R. * 5.1 Surround: Five channels, C, L, R,
-- Ls, Rs, LFE.
--
-- 'rateControlMode', 'aacSettings_rateControlMode' - Rate Control Mode.
--
-- 'rawFormat', 'aacSettings_rawFormat' - Enables LATM\/LOAS AAC output. Note that if you use LATM\/LOAS AAC in an
-- output, you must choose \"No container\" for the output container.
--
-- 'sampleRate', 'aacSettings_sampleRate' - Specify the Sample rate in Hz. Valid sample rates depend on the Profile
-- and Coding mode that you select. The following list shows valid sample
-- rates for each Profile and Coding mode. * LC Profile, Coding mode 1.0,
-- 2.0, and Receiver Mix: 8000, 12000, 16000, 22050, 24000, 32000, 44100,
-- 48000, 88200, 96000. * LC Profile, Coding mode 5.1: 32000, 44100, 48000,
-- 96000. * HEV1 Profile, Coding mode 1.0 and Receiver Mix: 22050, 24000,
-- 32000, 44100, 48000. * HEV1 Profile, Coding mode 2.0 and 5.1: 32000,
-- 44100, 48000, 96000. * HEV2 Profile, Coding mode 2.0: 22050, 24000,
-- 32000, 44100, 48000.
--
-- 'specification', 'aacSettings_specification' - Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport
-- Stream containers.
--
-- 'vbrQuality', 'aacSettings_vbrQuality' - VBR Quality Level - Only used if rate_control_mode is VBR.
newAacSettings ::
  AacSettings
newAacSettings :: AacSettings
newAacSettings =
  AacSettings'
    { $sel:audioDescriptionBroadcasterMix:AacSettings' :: Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix =
        forall a. Maybe a
Prelude.Nothing,
      $sel:bitrate:AacSettings' :: Maybe Natural
bitrate = forall a. Maybe a
Prelude.Nothing,
      $sel:codecProfile:AacSettings' :: Maybe AacCodecProfile
codecProfile = forall a. Maybe a
Prelude.Nothing,
      $sel:codingMode:AacSettings' :: Maybe AacCodingMode
codingMode = forall a. Maybe a
Prelude.Nothing,
      $sel:rateControlMode:AacSettings' :: Maybe AacRateControlMode
rateControlMode = forall a. Maybe a
Prelude.Nothing,
      $sel:rawFormat:AacSettings' :: Maybe AacRawFormat
rawFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleRate:AacSettings' :: Maybe Natural
sampleRate = forall a. Maybe a
Prelude.Nothing,
      $sel:specification:AacSettings' :: Maybe AacSpecification
specification = forall a. Maybe a
Prelude.Nothing,
      $sel:vbrQuality:AacSettings' :: Maybe AacVbrQuality
vbrQuality = forall a. Maybe a
Prelude.Nothing
    }

-- | Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio
-- + audio description (AD) as a stereo pair. The value for AudioType will
-- be set to 3, which signals to downstream systems that this stream
-- contains \"broadcaster mixed AD\". Note that the input received by the
-- encoder must contain pre-mixed audio; the encoder does not perform the
-- mixing. When you choose BROADCASTER_MIXED_AD, the encoder ignores any
-- values you provide in AudioType and FollowInputAudioType. Choose NORMAL
-- when the input does not contain pre-mixed audio + audio description
-- (AD). In this case, the encoder will use any values you provide for
-- AudioType and FollowInputAudioType.
aacSettings_audioDescriptionBroadcasterMix :: Lens.Lens' AacSettings (Prelude.Maybe AacAudioDescriptionBroadcasterMix)
aacSettings_audioDescriptionBroadcasterMix :: Lens' AacSettings (Maybe AacAudioDescriptionBroadcasterMix)
aacSettings_audioDescriptionBroadcasterMix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix :: Maybe AacAudioDescriptionBroadcasterMix
$sel:audioDescriptionBroadcasterMix:AacSettings' :: AacSettings -> Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix} -> Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix) (\s :: AacSettings
s@AacSettings' {} Maybe AacAudioDescriptionBroadcasterMix
a -> AacSettings
s {$sel:audioDescriptionBroadcasterMix:AacSettings' :: Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix = Maybe AacAudioDescriptionBroadcasterMix
a} :: AacSettings)

-- | Specify the average bitrate in bits per second. The set of valid values
-- for this setting is: 6000, 8000, 10000, 12000, 14000, 16000, 20000,
-- 24000, 28000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000,
-- 128000, 160000, 192000, 224000, 256000, 288000, 320000, 384000, 448000,
-- 512000, 576000, 640000, 768000, 896000, 1024000. The value you set is
-- also constrained by the values that you choose for Profile
-- (codecProfile), Bitrate control mode (codingMode), and Sample rate
-- (sampleRate). Default values depend on Bitrate control mode and Profile.
aacSettings_bitrate :: Lens.Lens' AacSettings (Prelude.Maybe Prelude.Natural)
aacSettings_bitrate :: Lens' AacSettings (Maybe Natural)
aacSettings_bitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe Natural
bitrate :: Maybe Natural
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Natural
bitrate} -> Maybe Natural
bitrate) (\s :: AacSettings
s@AacSettings' {} Maybe Natural
a -> AacSettings
s {$sel:bitrate:AacSettings' :: Maybe Natural
bitrate = Maybe Natural
a} :: AacSettings)

-- | AAC Profile.
aacSettings_codecProfile :: Lens.Lens' AacSettings (Prelude.Maybe AacCodecProfile)
aacSettings_codecProfile :: Lens' AacSettings (Maybe AacCodecProfile)
aacSettings_codecProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacCodecProfile
codecProfile :: Maybe AacCodecProfile
$sel:codecProfile:AacSettings' :: AacSettings -> Maybe AacCodecProfile
codecProfile} -> Maybe AacCodecProfile
codecProfile) (\s :: AacSettings
s@AacSettings' {} Maybe AacCodecProfile
a -> AacSettings
s {$sel:codecProfile:AacSettings' :: Maybe AacCodecProfile
codecProfile = Maybe AacCodecProfile
a} :: AacSettings)

-- | The Coding mode that you specify determines the number of audio channels
-- and the audio channel layout metadata in your AAC output. Valid coding
-- modes depend on the Rate control mode and Profile that you select. The
-- following list shows the number of audio channels and channel layout for
-- each coding mode. * 1.0 Audio Description (Receiver Mix): One channel,
-- C. Includes audio description data from your stereo input. For more
-- information see ETSI TS 101 154 Annex E. * 1.0 Mono: One channel, C. *
-- 2.0 Stereo: Two channels, L, R. * 5.1 Surround: Five channels, C, L, R,
-- Ls, Rs, LFE.
aacSettings_codingMode :: Lens.Lens' AacSettings (Prelude.Maybe AacCodingMode)
aacSettings_codingMode :: Lens' AacSettings (Maybe AacCodingMode)
aacSettings_codingMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacCodingMode
codingMode :: Maybe AacCodingMode
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
codingMode} -> Maybe AacCodingMode
codingMode) (\s :: AacSettings
s@AacSettings' {} Maybe AacCodingMode
a -> AacSettings
s {$sel:codingMode:AacSettings' :: Maybe AacCodingMode
codingMode = Maybe AacCodingMode
a} :: AacSettings)

-- | Rate Control Mode.
aacSettings_rateControlMode :: Lens.Lens' AacSettings (Prelude.Maybe AacRateControlMode)
aacSettings_rateControlMode :: Lens' AacSettings (Maybe AacRateControlMode)
aacSettings_rateControlMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacRateControlMode
rateControlMode :: Maybe AacRateControlMode
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
rateControlMode} -> Maybe AacRateControlMode
rateControlMode) (\s :: AacSettings
s@AacSettings' {} Maybe AacRateControlMode
a -> AacSettings
s {$sel:rateControlMode:AacSettings' :: Maybe AacRateControlMode
rateControlMode = Maybe AacRateControlMode
a} :: AacSettings)

-- | Enables LATM\/LOAS AAC output. Note that if you use LATM\/LOAS AAC in an
-- output, you must choose \"No container\" for the output container.
aacSettings_rawFormat :: Lens.Lens' AacSettings (Prelude.Maybe AacRawFormat)
aacSettings_rawFormat :: Lens' AacSettings (Maybe AacRawFormat)
aacSettings_rawFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacRawFormat
rawFormat :: Maybe AacRawFormat
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
rawFormat} -> Maybe AacRawFormat
rawFormat) (\s :: AacSettings
s@AacSettings' {} Maybe AacRawFormat
a -> AacSettings
s {$sel:rawFormat:AacSettings' :: Maybe AacRawFormat
rawFormat = Maybe AacRawFormat
a} :: AacSettings)

-- | Specify the Sample rate in Hz. Valid sample rates depend on the Profile
-- and Coding mode that you select. The following list shows valid sample
-- rates for each Profile and Coding mode. * LC Profile, Coding mode 1.0,
-- 2.0, and Receiver Mix: 8000, 12000, 16000, 22050, 24000, 32000, 44100,
-- 48000, 88200, 96000. * LC Profile, Coding mode 5.1: 32000, 44100, 48000,
-- 96000. * HEV1 Profile, Coding mode 1.0 and Receiver Mix: 22050, 24000,
-- 32000, 44100, 48000. * HEV1 Profile, Coding mode 2.0 and 5.1: 32000,
-- 44100, 48000, 96000. * HEV2 Profile, Coding mode 2.0: 22050, 24000,
-- 32000, 44100, 48000.
aacSettings_sampleRate :: Lens.Lens' AacSettings (Prelude.Maybe Prelude.Natural)
aacSettings_sampleRate :: Lens' AacSettings (Maybe Natural)
aacSettings_sampleRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe Natural
sampleRate :: Maybe Natural
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Natural
sampleRate} -> Maybe Natural
sampleRate) (\s :: AacSettings
s@AacSettings' {} Maybe Natural
a -> AacSettings
s {$sel:sampleRate:AacSettings' :: Maybe Natural
sampleRate = Maybe Natural
a} :: AacSettings)

-- | Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport
-- Stream containers.
aacSettings_specification :: Lens.Lens' AacSettings (Prelude.Maybe AacSpecification)
aacSettings_specification :: Lens' AacSettings (Maybe AacSpecification)
aacSettings_specification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacSpecification
specification :: Maybe AacSpecification
$sel:specification:AacSettings' :: AacSettings -> Maybe AacSpecification
specification} -> Maybe AacSpecification
specification) (\s :: AacSettings
s@AacSettings' {} Maybe AacSpecification
a -> AacSettings
s {$sel:specification:AacSettings' :: Maybe AacSpecification
specification = Maybe AacSpecification
a} :: AacSettings)

-- | VBR Quality Level - Only used if rate_control_mode is VBR.
aacSettings_vbrQuality :: Lens.Lens' AacSettings (Prelude.Maybe AacVbrQuality)
aacSettings_vbrQuality :: Lens' AacSettings (Maybe AacVbrQuality)
aacSettings_vbrQuality = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
vbrQuality} -> Maybe AacVbrQuality
vbrQuality) (\s :: AacSettings
s@AacSettings' {} Maybe AacVbrQuality
a -> AacSettings
s {$sel:vbrQuality:AacSettings' :: Maybe AacVbrQuality
vbrQuality = Maybe AacVbrQuality
a} :: AacSettings)

instance Data.FromJSON AacSettings where
  parseJSON :: Value -> Parser AacSettings
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AacSettings"
      ( \Object
x ->
          Maybe AacAudioDescriptionBroadcasterMix
-> Maybe Natural
-> Maybe AacCodecProfile
-> Maybe AacCodingMode
-> Maybe AacRateControlMode
-> Maybe AacRawFormat
-> Maybe Natural
-> Maybe AacSpecification
-> Maybe AacVbrQuality
-> AacSettings
AacSettings'
            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
"audioDescriptionBroadcasterMix")
            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
"bitrate")
            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
"codecProfile")
            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
"codingMode")
            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
"rateControlMode")
            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
"rawFormat")
            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
"sampleRate")
            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
"specification")
            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
"vbrQuality")
      )

instance Prelude.Hashable AacSettings where
  hashWithSalt :: Int -> AacSettings -> Int
hashWithSalt Int
_salt AacSettings' {Maybe Natural
Maybe AacAudioDescriptionBroadcasterMix
Maybe AacCodecProfile
Maybe AacCodingMode
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpecification
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
specification :: Maybe AacSpecification
sampleRate :: Maybe Natural
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
codingMode :: Maybe AacCodingMode
codecProfile :: Maybe AacCodecProfile
bitrate :: Maybe Natural
audioDescriptionBroadcasterMix :: Maybe AacAudioDescriptionBroadcasterMix
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:specification:AacSettings' :: AacSettings -> Maybe AacSpecification
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Natural
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:codecProfile:AacSettings' :: AacSettings -> Maybe AacCodecProfile
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Natural
$sel:audioDescriptionBroadcasterMix:AacSettings' :: AacSettings -> Maybe AacAudioDescriptionBroadcasterMix
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
bitrate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacCodecProfile
codecProfile
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacCodingMode
codingMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacRateControlMode
rateControlMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacRawFormat
rawFormat
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
sampleRate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacSpecification
specification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacVbrQuality
vbrQuality

instance Prelude.NFData AacSettings where
  rnf :: AacSettings -> ()
rnf AacSettings' {Maybe Natural
Maybe AacAudioDescriptionBroadcasterMix
Maybe AacCodecProfile
Maybe AacCodingMode
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpecification
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
specification :: Maybe AacSpecification
sampleRate :: Maybe Natural
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
codingMode :: Maybe AacCodingMode
codecProfile :: Maybe AacCodecProfile
bitrate :: Maybe Natural
audioDescriptionBroadcasterMix :: Maybe AacAudioDescriptionBroadcasterMix
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:specification:AacSettings' :: AacSettings -> Maybe AacSpecification
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Natural
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:codecProfile:AacSettings' :: AacSettings -> Maybe AacCodecProfile
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Natural
$sel:audioDescriptionBroadcasterMix:AacSettings' :: AacSettings -> Maybe AacAudioDescriptionBroadcasterMix
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
bitrate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacCodecProfile
codecProfile
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacCodingMode
codingMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacRateControlMode
rateControlMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacRawFormat
rawFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
sampleRate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacSpecification
specification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacVbrQuality
vbrQuality

instance Data.ToJSON AacSettings where
  toJSON :: AacSettings -> Value
toJSON AacSettings' {Maybe Natural
Maybe AacAudioDescriptionBroadcasterMix
Maybe AacCodecProfile
Maybe AacCodingMode
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpecification
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
specification :: Maybe AacSpecification
sampleRate :: Maybe Natural
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
codingMode :: Maybe AacCodingMode
codecProfile :: Maybe AacCodecProfile
bitrate :: Maybe Natural
audioDescriptionBroadcasterMix :: Maybe AacAudioDescriptionBroadcasterMix
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:specification:AacSettings' :: AacSettings -> Maybe AacSpecification
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Natural
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:codecProfile:AacSettings' :: AacSettings -> Maybe AacCodecProfile
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Natural
$sel:audioDescriptionBroadcasterMix:AacSettings' :: AacSettings -> Maybe AacAudioDescriptionBroadcasterMix
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"audioDescriptionBroadcasterMix" 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 AacAudioDescriptionBroadcasterMix
audioDescriptionBroadcasterMix,
            (Key
"bitrate" 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 Natural
bitrate,
            (Key
"codecProfile" 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 AacCodecProfile
codecProfile,
            (Key
"codingMode" 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 AacCodingMode
codingMode,
            (Key
"rateControlMode" 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 AacRateControlMode
rateControlMode,
            (Key
"rawFormat" 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 AacRawFormat
rawFormat,
            (Key
"sampleRate" 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 Natural
sampleRate,
            (Key
"specification" 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 AacSpecification
specification,
            (Key
"vbrQuality" 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 AacVbrQuality
vbrQuality
          ]
      )