{-# 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.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.MediaLive.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.MediaLive.Types.AacCodingMode
import Amazonka.MediaLive.Types.AacInputType
import Amazonka.MediaLive.Types.AacProfile
import Amazonka.MediaLive.Types.AacRateControlMode
import Amazonka.MediaLive.Types.AacRawFormat
import Amazonka.MediaLive.Types.AacSpec
import Amazonka.MediaLive.Types.AacVbrQuality
import qualified Amazonka.Prelude as Prelude

-- | Aac Settings
--
-- /See:/ 'newAacSettings' smart constructor.
data AacSettings = AacSettings'
  { -- | Average bitrate in bits\/second. Valid values depend on rate control
    -- mode and profile.
    AacSettings -> Maybe Double
bitrate :: Prelude.Maybe Prelude.Double,
    -- | Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control
    -- mode and profile. The adReceiverMix setting receives a stereo
    -- description plus control track and emits a mono AAC encode of the
    -- description track, with control data emitted in the PES header as per
    -- ETSI TS 101 154 Annex E.
    AacSettings -> Maybe AacCodingMode
codingMode :: Prelude.Maybe AacCodingMode,
    -- | Set to \"broadcasterMixedAd\" when input contains pre-mixed main audio +
    -- AD (narration) as a stereo pair. The Audio Type field (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. The values in audioTypeControl and audioType (in
    -- AudioDescription) are ignored when set to broadcasterMixedAd. Leave set
    -- to \"normal\" when input does not contain pre-mixed audio + AD.
    AacSettings -> Maybe AacInputType
inputType :: Prelude.Maybe AacInputType,
    -- | AAC Profile.
    AacSettings -> Maybe AacProfile
profile :: Prelude.Maybe AacProfile,
    -- | Rate Control Mode.
    AacSettings -> Maybe AacRateControlMode
rateControlMode :: Prelude.Maybe AacRateControlMode,
    -- | Sets LATM \/ LOAS AAC output for raw containers.
    AacSettings -> Maybe AacRawFormat
rawFormat :: Prelude.Maybe AacRawFormat,
    -- | Sample rate in Hz. Valid values depend on rate control mode and profile.
    AacSettings -> Maybe Double
sampleRate :: Prelude.Maybe Prelude.Double,
    -- | Use MPEG-2 AAC audio instead of MPEG-4 AAC audio for raw or MPEG-2
    -- Transport Stream containers.
    AacSettings -> Maybe AacSpec
spec :: Prelude.Maybe AacSpec,
    -- | VBR Quality Level - Only used if rateControlMode 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:
--
-- 'bitrate', 'aacSettings_bitrate' - Average bitrate in bits\/second. Valid values depend on rate control
-- mode and profile.
--
-- 'codingMode', 'aacSettings_codingMode' - Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control
-- mode and profile. The adReceiverMix setting receives a stereo
-- description plus control track and emits a mono AAC encode of the
-- description track, with control data emitted in the PES header as per
-- ETSI TS 101 154 Annex E.
--
-- 'inputType', 'aacSettings_inputType' - Set to \"broadcasterMixedAd\" when input contains pre-mixed main audio +
-- AD (narration) as a stereo pair. The Audio Type field (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. The values in audioTypeControl and audioType (in
-- AudioDescription) are ignored when set to broadcasterMixedAd. Leave set
-- to \"normal\" when input does not contain pre-mixed audio + AD.
--
-- 'profile', 'aacSettings_profile' - AAC Profile.
--
-- 'rateControlMode', 'aacSettings_rateControlMode' - Rate Control Mode.
--
-- 'rawFormat', 'aacSettings_rawFormat' - Sets LATM \/ LOAS AAC output for raw containers.
--
-- 'sampleRate', 'aacSettings_sampleRate' - Sample rate in Hz. Valid values depend on rate control mode and profile.
--
-- 'spec', 'aacSettings_spec' - Use MPEG-2 AAC audio instead of MPEG-4 AAC audio for raw or MPEG-2
-- Transport Stream containers.
--
-- 'vbrQuality', 'aacSettings_vbrQuality' - VBR Quality Level - Only used if rateControlMode is VBR.
newAacSettings ::
  AacSettings
newAacSettings :: AacSettings
newAacSettings =
  AacSettings'
    { $sel:bitrate:AacSettings' :: Maybe Double
bitrate = forall a. Maybe a
Prelude.Nothing,
      $sel:codingMode:AacSettings' :: Maybe AacCodingMode
codingMode = forall a. Maybe a
Prelude.Nothing,
      $sel:inputType:AacSettings' :: Maybe AacInputType
inputType = forall a. Maybe a
Prelude.Nothing,
      $sel:profile:AacSettings' :: Maybe AacProfile
profile = 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 Double
sampleRate = forall a. Maybe a
Prelude.Nothing,
      $sel:spec:AacSettings' :: Maybe AacSpec
spec = forall a. Maybe a
Prelude.Nothing,
      $sel:vbrQuality:AacSettings' :: Maybe AacVbrQuality
vbrQuality = forall a. Maybe a
Prelude.Nothing
    }

-- | Average bitrate in bits\/second. Valid values depend on rate control
-- mode and profile.
aacSettings_bitrate :: Lens.Lens' AacSettings (Prelude.Maybe Prelude.Double)
aacSettings_bitrate :: Lens' AacSettings (Maybe Double)
aacSettings_bitrate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe Double
bitrate :: Maybe Double
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Double
bitrate} -> Maybe Double
bitrate) (\s :: AacSettings
s@AacSettings' {} Maybe Double
a -> AacSettings
s {$sel:bitrate:AacSettings' :: Maybe Double
bitrate = Maybe Double
a} :: AacSettings)

-- | Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control
-- mode and profile. The adReceiverMix setting receives a stereo
-- description plus control track and emits a mono AAC encode of the
-- description track, with control data emitted in the PES header as per
-- ETSI TS 101 154 Annex E.
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)

-- | Set to \"broadcasterMixedAd\" when input contains pre-mixed main audio +
-- AD (narration) as a stereo pair. The Audio Type field (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. The values in audioTypeControl and audioType (in
-- AudioDescription) are ignored when set to broadcasterMixedAd. Leave set
-- to \"normal\" when input does not contain pre-mixed audio + AD.
aacSettings_inputType :: Lens.Lens' AacSettings (Prelude.Maybe AacInputType)
aacSettings_inputType :: Lens' AacSettings (Maybe AacInputType)
aacSettings_inputType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacInputType
inputType :: Maybe AacInputType
$sel:inputType:AacSettings' :: AacSettings -> Maybe AacInputType
inputType} -> Maybe AacInputType
inputType) (\s :: AacSettings
s@AacSettings' {} Maybe AacInputType
a -> AacSettings
s {$sel:inputType:AacSettings' :: Maybe AacInputType
inputType = Maybe AacInputType
a} :: AacSettings)

-- | AAC Profile.
aacSettings_profile :: Lens.Lens' AacSettings (Prelude.Maybe AacProfile)
aacSettings_profile :: Lens' AacSettings (Maybe AacProfile)
aacSettings_profile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe AacProfile
profile :: Maybe AacProfile
$sel:profile:AacSettings' :: AacSettings -> Maybe AacProfile
profile} -> Maybe AacProfile
profile) (\s :: AacSettings
s@AacSettings' {} Maybe AacProfile
a -> AacSettings
s {$sel:profile:AacSettings' :: Maybe AacProfile
profile = Maybe AacProfile
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)

-- | Sets LATM \/ LOAS AAC output for raw containers.
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)

-- | Sample rate in Hz. Valid values depend on rate control mode and profile.
aacSettings_sampleRate :: Lens.Lens' AacSettings (Prelude.Maybe Prelude.Double)
aacSettings_sampleRate :: Lens' AacSettings (Maybe Double)
aacSettings_sampleRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AacSettings' {Maybe Double
sampleRate :: Maybe Double
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Double
sampleRate} -> Maybe Double
sampleRate) (\s :: AacSettings
s@AacSettings' {} Maybe Double
a -> AacSettings
s {$sel:sampleRate:AacSettings' :: Maybe Double
sampleRate = Maybe Double
a} :: AacSettings)

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

-- | VBR Quality Level - Only used if rateControlMode 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 Double
-> Maybe AacCodingMode
-> Maybe AacInputType
-> Maybe AacProfile
-> Maybe AacRateControlMode
-> Maybe AacRawFormat
-> Maybe Double
-> Maybe AacSpec
-> 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
"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
"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
"inputType")
            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
"profile")
            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
"spec")
            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 Double
Maybe AacCodingMode
Maybe AacInputType
Maybe AacProfile
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpec
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
spec :: Maybe AacSpec
sampleRate :: Maybe Double
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
profile :: Maybe AacProfile
inputType :: Maybe AacInputType
codingMode :: Maybe AacCodingMode
bitrate :: Maybe Double
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:spec:AacSettings' :: AacSettings -> Maybe AacSpec
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Double
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:profile:AacSettings' :: AacSettings -> Maybe AacProfile
$sel:inputType:AacSettings' :: AacSettings -> Maybe AacInputType
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Double
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
bitrate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacCodingMode
codingMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacInputType
inputType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacProfile
profile
      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 Double
sampleRate
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacSpec
spec
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AacVbrQuality
vbrQuality

instance Prelude.NFData AacSettings where
  rnf :: AacSettings -> ()
rnf AacSettings' {Maybe Double
Maybe AacCodingMode
Maybe AacInputType
Maybe AacProfile
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpec
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
spec :: Maybe AacSpec
sampleRate :: Maybe Double
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
profile :: Maybe AacProfile
inputType :: Maybe AacInputType
codingMode :: Maybe AacCodingMode
bitrate :: Maybe Double
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:spec:AacSettings' :: AacSettings -> Maybe AacSpec
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Double
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:profile:AacSettings' :: AacSettings -> Maybe AacProfile
$sel:inputType:AacSettings' :: AacSettings -> Maybe AacInputType
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Double
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
bitrate
      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 AacInputType
inputType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacProfile
profile
      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 Double
sampleRate
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AacSpec
spec
      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 Double
Maybe AacCodingMode
Maybe AacInputType
Maybe AacProfile
Maybe AacRateControlMode
Maybe AacRawFormat
Maybe AacSpec
Maybe AacVbrQuality
vbrQuality :: Maybe AacVbrQuality
spec :: Maybe AacSpec
sampleRate :: Maybe Double
rawFormat :: Maybe AacRawFormat
rateControlMode :: Maybe AacRateControlMode
profile :: Maybe AacProfile
inputType :: Maybe AacInputType
codingMode :: Maybe AacCodingMode
bitrate :: Maybe Double
$sel:vbrQuality:AacSettings' :: AacSettings -> Maybe AacVbrQuality
$sel:spec:AacSettings' :: AacSettings -> Maybe AacSpec
$sel:sampleRate:AacSettings' :: AacSettings -> Maybe Double
$sel:rawFormat:AacSettings' :: AacSettings -> Maybe AacRawFormat
$sel:rateControlMode:AacSettings' :: AacSettings -> Maybe AacRateControlMode
$sel:profile:AacSettings' :: AacSettings -> Maybe AacProfile
$sel:inputType:AacSettings' :: AacSettings -> Maybe AacInputType
$sel:codingMode:AacSettings' :: AacSettings -> Maybe AacCodingMode
$sel:bitrate:AacSettings' :: AacSettings -> Maybe Double
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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 Double
bitrate,
            (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
"inputType" 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 AacInputType
inputType,
            (Key
"profile" 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 AacProfile
profile,
            (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 Double
sampleRate,
            (Key
"spec" 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 AacSpec
spec,
            (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
          ]
      )