{-# 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.AudioDescription
-- 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.AudioDescription 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.AudioChannelTaggingSettings
import Amazonka.MediaConvert.Types.AudioCodecSettings
import Amazonka.MediaConvert.Types.AudioLanguageCodeControl
import Amazonka.MediaConvert.Types.AudioNormalizationSettings
import Amazonka.MediaConvert.Types.AudioTypeControl
import Amazonka.MediaConvert.Types.LanguageCode
import Amazonka.MediaConvert.Types.RemixSettings
import qualified Amazonka.Prelude as Prelude

-- | Settings related to one audio tab on the MediaConvert console. In your
-- job JSON, an instance of AudioDescription is equivalent to one audio tab
-- in the console. Usually, one audio tab corresponds to one output audio
-- track. Depending on how you set up your input audio selectors and
-- whether you use audio selector groups, one audio tab can correspond to a
-- group of output audio tracks.
--
-- /See:/ 'newAudioDescription' smart constructor.
data AudioDescription = AudioDescription'
  { -- | When you mimic a multi-channel audio layout with multiple mono-channel
    -- tracks, you can tag each channel layout manually. For example, you would
    -- tag the tracks that contain your left, right, and center audio with Left
    -- (L), Right (R), and Center (C), respectively. When you don\'t specify a
    -- value, MediaConvert labels your track as Center (C) by default. To use
    -- audio layout tagging, your output must be in a QuickTime (.mov)
    -- container; your audio codec must be AAC, WAV, or AIFF; and you must set
    -- up your audio track to have only one channel.
    AudioDescription -> Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings :: Prelude.Maybe AudioChannelTaggingSettings,
    -- | Advanced audio normalization settings. Ignore these settings unless you
    -- need to comply with a loudness standard.
    AudioDescription -> Maybe AudioNormalizationSettings
audioNormalizationSettings :: Prelude.Maybe AudioNormalizationSettings,
    -- | Specifies which audio data to use from each input. In the simplest case,
    -- specify an \"Audio Selector\":#inputs-audio_selector by name based on
    -- its order within each input. For example if you specify \"Audio Selector
    -- 3\", then the third audio selector will be used from each input. If an
    -- input does not have an \"Audio Selector 3\", then the audio selector
    -- marked as \"default\" in that input will be used. If there is no audio
    -- selector marked as \"default\", silence will be inserted for the
    -- duration of that input. Alternatively, an \"Audio Selector
    -- Group\":#inputs-audio_selector_group name may be specified, with similar
    -- default\/silence behavior. If no audio_source_name is specified, then
    -- \"Audio Selector 1\" will be chosen automatically.
    AudioDescription -> Maybe Text
audioSourceName :: Prelude.Maybe Prelude.Text,
    -- | Applies only if Follow Input Audio Type is unchecked (false). A number
    -- between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 =
    -- Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually
    -- Impaired Commentary, 4-255 = Reserved.
    AudioDescription -> Maybe Natural
audioType :: Prelude.Maybe Prelude.Natural,
    -- | When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type,
    -- then that value is passed through to the output. If the input contains
    -- no ISO 639 audio_type, the value in Audio Type is included in the
    -- output. Otherwise the value in Audio Type is included in the output.
    -- Note that this field and audioType are both ignored if
    -- audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
    AudioDescription -> Maybe AudioTypeControl
audioTypeControl :: Prelude.Maybe AudioTypeControl,
    -- | Settings related to audio encoding. The settings in this group vary
    -- depending on the value that you choose for your audio codec.
    AudioDescription -> Maybe AudioCodecSettings
codecSettings :: Prelude.Maybe AudioCodecSettings,
    -- | Specify the language for this audio output track. The service puts this
    -- language code into your output audio track when you set Language code
    -- control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED).
    -- The service also uses your specified custom language code when you set
    -- Language code control (AudioLanguageCodeControl) to Follow input
    -- (FOLLOW_INPUT), but your input file doesn\'t specify a language code.
    -- For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For
    -- streaming outputs, you can also use any other code in the full RFC-5646
    -- specification. Streaming outputs are those that are in one of the
    -- following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth
    -- Streaming.
    AudioDescription -> Maybe Text
customLanguageCode :: Prelude.Maybe Prelude.Text,
    -- | Indicates the language of the audio output track. The ISO 639 language
    -- specified in the \'Language Code\' drop down will be used when \'Follow
    -- Input Language Code\' is not selected or when \'Follow Input Language
    -- Code\' is selected but there is no ISO 639 language code specified by
    -- the input.
    AudioDescription -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | Specify which source for language code takes precedence for this audio
    -- track. When you choose Follow input (FOLLOW_INPUT), the service uses the
    -- language code from the input track if it\'s present. If there\'s no
    -- languge code on the input track, the service uses the code that you
    -- specify in the setting Language code (languageCode or
    -- customLanguageCode). When you choose Use configured (USE_CONFIGURED),
    -- the service uses the language code that you specify.
    AudioDescription -> Maybe AudioLanguageCodeControl
languageCodeControl :: Prelude.Maybe AudioLanguageCodeControl,
    -- | Advanced audio remixing settings.
    AudioDescription -> Maybe RemixSettings
remixSettings :: Prelude.Maybe RemixSettings,
    -- | Specify a label for this output audio stream. For example, \"English\",
    -- \"Director commentary\", or \"track_2\". For streaming outputs,
    -- MediaConvert passes this information into destination manifests for
    -- display on the end-viewer\'s player device. For outputs in other output
    -- groups, the service ignores this setting.
    AudioDescription -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text
  }
  deriving (AudioDescription -> AudioDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioDescription -> AudioDescription -> Bool
$c/= :: AudioDescription -> AudioDescription -> Bool
== :: AudioDescription -> AudioDescription -> Bool
$c== :: AudioDescription -> AudioDescription -> Bool
Prelude.Eq, ReadPrec [AudioDescription]
ReadPrec AudioDescription
Int -> ReadS AudioDescription
ReadS [AudioDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioDescription]
$creadListPrec :: ReadPrec [AudioDescription]
readPrec :: ReadPrec AudioDescription
$creadPrec :: ReadPrec AudioDescription
readList :: ReadS [AudioDescription]
$creadList :: ReadS [AudioDescription]
readsPrec :: Int -> ReadS AudioDescription
$creadsPrec :: Int -> ReadS AudioDescription
Prelude.Read, Int -> AudioDescription -> ShowS
[AudioDescription] -> ShowS
AudioDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioDescription] -> ShowS
$cshowList :: [AudioDescription] -> ShowS
show :: AudioDescription -> String
$cshow :: AudioDescription -> String
showsPrec :: Int -> AudioDescription -> ShowS
$cshowsPrec :: Int -> AudioDescription -> ShowS
Prelude.Show, forall x. Rep AudioDescription x -> AudioDescription
forall x. AudioDescription -> Rep AudioDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioDescription x -> AudioDescription
$cfrom :: forall x. AudioDescription -> Rep AudioDescription x
Prelude.Generic)

-- |
-- Create a value of 'AudioDescription' 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:
--
-- 'audioChannelTaggingSettings', 'audioDescription_audioChannelTaggingSettings' - When you mimic a multi-channel audio layout with multiple mono-channel
-- tracks, you can tag each channel layout manually. For example, you would
-- tag the tracks that contain your left, right, and center audio with Left
-- (L), Right (R), and Center (C), respectively. When you don\'t specify a
-- value, MediaConvert labels your track as Center (C) by default. To use
-- audio layout tagging, your output must be in a QuickTime (.mov)
-- container; your audio codec must be AAC, WAV, or AIFF; and you must set
-- up your audio track to have only one channel.
--
-- 'audioNormalizationSettings', 'audioDescription_audioNormalizationSettings' - Advanced audio normalization settings. Ignore these settings unless you
-- need to comply with a loudness standard.
--
-- 'audioSourceName', 'audioDescription_audioSourceName' - Specifies which audio data to use from each input. In the simplest case,
-- specify an \"Audio Selector\":#inputs-audio_selector by name based on
-- its order within each input. For example if you specify \"Audio Selector
-- 3\", then the third audio selector will be used from each input. If an
-- input does not have an \"Audio Selector 3\", then the audio selector
-- marked as \"default\" in that input will be used. If there is no audio
-- selector marked as \"default\", silence will be inserted for the
-- duration of that input. Alternatively, an \"Audio Selector
-- Group\":#inputs-audio_selector_group name may be specified, with similar
-- default\/silence behavior. If no audio_source_name is specified, then
-- \"Audio Selector 1\" will be chosen automatically.
--
-- 'audioType', 'audioDescription_audioType' - Applies only if Follow Input Audio Type is unchecked (false). A number
-- between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 =
-- Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually
-- Impaired Commentary, 4-255 = Reserved.
--
-- 'audioTypeControl', 'audioDescription_audioTypeControl' - When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type,
-- then that value is passed through to the output. If the input contains
-- no ISO 639 audio_type, the value in Audio Type is included in the
-- output. Otherwise the value in Audio Type is included in the output.
-- Note that this field and audioType are both ignored if
-- audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
--
-- 'codecSettings', 'audioDescription_codecSettings' - Settings related to audio encoding. The settings in this group vary
-- depending on the value that you choose for your audio codec.
--
-- 'customLanguageCode', 'audioDescription_customLanguageCode' - Specify the language for this audio output track. The service puts this
-- language code into your output audio track when you set Language code
-- control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED).
-- The service also uses your specified custom language code when you set
-- Language code control (AudioLanguageCodeControl) to Follow input
-- (FOLLOW_INPUT), but your input file doesn\'t specify a language code.
-- For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For
-- streaming outputs, you can also use any other code in the full RFC-5646
-- specification. Streaming outputs are those that are in one of the
-- following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth
-- Streaming.
--
-- 'languageCode', 'audioDescription_languageCode' - Indicates the language of the audio output track. The ISO 639 language
-- specified in the \'Language Code\' drop down will be used when \'Follow
-- Input Language Code\' is not selected or when \'Follow Input Language
-- Code\' is selected but there is no ISO 639 language code specified by
-- the input.
--
-- 'languageCodeControl', 'audioDescription_languageCodeControl' - Specify which source for language code takes precedence for this audio
-- track. When you choose Follow input (FOLLOW_INPUT), the service uses the
-- language code from the input track if it\'s present. If there\'s no
-- languge code on the input track, the service uses the code that you
-- specify in the setting Language code (languageCode or
-- customLanguageCode). When you choose Use configured (USE_CONFIGURED),
-- the service uses the language code that you specify.
--
-- 'remixSettings', 'audioDescription_remixSettings' - Advanced audio remixing settings.
--
-- 'streamName', 'audioDescription_streamName' - Specify a label for this output audio stream. For example, \"English\",
-- \"Director commentary\", or \"track_2\". For streaming outputs,
-- MediaConvert passes this information into destination manifests for
-- display on the end-viewer\'s player device. For outputs in other output
-- groups, the service ignores this setting.
newAudioDescription ::
  AudioDescription
newAudioDescription :: AudioDescription
newAudioDescription =
  AudioDescription'
    { $sel:audioChannelTaggingSettings:AudioDescription' :: Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings =
        forall a. Maybe a
Prelude.Nothing,
      $sel:audioNormalizationSettings:AudioDescription' :: Maybe AudioNormalizationSettings
audioNormalizationSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:audioSourceName:AudioDescription' :: Maybe Text
audioSourceName = forall a. Maybe a
Prelude.Nothing,
      $sel:audioType:AudioDescription' :: Maybe Natural
audioType = forall a. Maybe a
Prelude.Nothing,
      $sel:audioTypeControl:AudioDescription' :: Maybe AudioTypeControl
audioTypeControl = forall a. Maybe a
Prelude.Nothing,
      $sel:codecSettings:AudioDescription' :: Maybe AudioCodecSettings
codecSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:customLanguageCode:AudioDescription' :: Maybe Text
customLanguageCode = forall a. Maybe a
Prelude.Nothing,
      $sel:languageCode:AudioDescription' :: Maybe LanguageCode
languageCode = forall a. Maybe a
Prelude.Nothing,
      $sel:languageCodeControl:AudioDescription' :: Maybe AudioLanguageCodeControl
languageCodeControl = forall a. Maybe a
Prelude.Nothing,
      $sel:remixSettings:AudioDescription' :: Maybe RemixSettings
remixSettings = forall a. Maybe a
Prelude.Nothing,
      $sel:streamName:AudioDescription' :: Maybe Text
streamName = forall a. Maybe a
Prelude.Nothing
    }

-- | When you mimic a multi-channel audio layout with multiple mono-channel
-- tracks, you can tag each channel layout manually. For example, you would
-- tag the tracks that contain your left, right, and center audio with Left
-- (L), Right (R), and Center (C), respectively. When you don\'t specify a
-- value, MediaConvert labels your track as Center (C) by default. To use
-- audio layout tagging, your output must be in a QuickTime (.mov)
-- container; your audio codec must be AAC, WAV, or AIFF; and you must set
-- up your audio track to have only one channel.
audioDescription_audioChannelTaggingSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioChannelTaggingSettings)
audioDescription_audioChannelTaggingSettings :: Lens' AudioDescription (Maybe AudioChannelTaggingSettings)
audioDescription_audioChannelTaggingSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings :: Maybe AudioChannelTaggingSettings
$sel:audioChannelTaggingSettings:AudioDescription' :: AudioDescription -> Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings} -> Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioChannelTaggingSettings
a -> AudioDescription
s {$sel:audioChannelTaggingSettings:AudioDescription' :: Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings = Maybe AudioChannelTaggingSettings
a} :: AudioDescription)

-- | Advanced audio normalization settings. Ignore these settings unless you
-- need to comply with a loudness standard.
audioDescription_audioNormalizationSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioNormalizationSettings)
audioDescription_audioNormalizationSettings :: Lens' AudioDescription (Maybe AudioNormalizationSettings)
audioDescription_audioNormalizationSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioNormalizationSettings
audioNormalizationSettings :: Maybe AudioNormalizationSettings
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
audioNormalizationSettings} -> Maybe AudioNormalizationSettings
audioNormalizationSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioNormalizationSettings
a -> AudioDescription
s {$sel:audioNormalizationSettings:AudioDescription' :: Maybe AudioNormalizationSettings
audioNormalizationSettings = Maybe AudioNormalizationSettings
a} :: AudioDescription)

-- | Specifies which audio data to use from each input. In the simplest case,
-- specify an \"Audio Selector\":#inputs-audio_selector by name based on
-- its order within each input. For example if you specify \"Audio Selector
-- 3\", then the third audio selector will be used from each input. If an
-- input does not have an \"Audio Selector 3\", then the audio selector
-- marked as \"default\" in that input will be used. If there is no audio
-- selector marked as \"default\", silence will be inserted for the
-- duration of that input. Alternatively, an \"Audio Selector
-- Group\":#inputs-audio_selector_group name may be specified, with similar
-- default\/silence behavior. If no audio_source_name is specified, then
-- \"Audio Selector 1\" will be chosen automatically.
audioDescription_audioSourceName :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Text)
audioDescription_audioSourceName :: Lens' AudioDescription (Maybe Text)
audioDescription_audioSourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Text
audioSourceName :: Maybe Text
$sel:audioSourceName:AudioDescription' :: AudioDescription -> Maybe Text
audioSourceName} -> Maybe Text
audioSourceName) (\s :: AudioDescription
s@AudioDescription' {} Maybe Text
a -> AudioDescription
s {$sel:audioSourceName:AudioDescription' :: Maybe Text
audioSourceName = Maybe Text
a} :: AudioDescription)

-- | Applies only if Follow Input Audio Type is unchecked (false). A number
-- between 0 and 255. The following are defined in ISO-IEC 13818-1: 0 =
-- Undefined, 1 = Clean Effects, 2 = Hearing Impaired, 3 = Visually
-- Impaired Commentary, 4-255 = Reserved.
audioDescription_audioType :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Natural)
audioDescription_audioType :: Lens' AudioDescription (Maybe Natural)
audioDescription_audioType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Natural
audioType :: Maybe Natural
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe Natural
audioType} -> Maybe Natural
audioType) (\s :: AudioDescription
s@AudioDescription' {} Maybe Natural
a -> AudioDescription
s {$sel:audioType:AudioDescription' :: Maybe Natural
audioType = Maybe Natural
a} :: AudioDescription)

-- | When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type,
-- then that value is passed through to the output. If the input contains
-- no ISO 639 audio_type, the value in Audio Type is included in the
-- output. Otherwise the value in Audio Type is included in the output.
-- Note that this field and audioType are both ignored if
-- audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD.
audioDescription_audioTypeControl :: Lens.Lens' AudioDescription (Prelude.Maybe AudioTypeControl)
audioDescription_audioTypeControl :: Lens' AudioDescription (Maybe AudioTypeControl)
audioDescription_audioTypeControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioTypeControl
audioTypeControl :: Maybe AudioTypeControl
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioTypeControl
audioTypeControl} -> Maybe AudioTypeControl
audioTypeControl) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioTypeControl
a -> AudioDescription
s {$sel:audioTypeControl:AudioDescription' :: Maybe AudioTypeControl
audioTypeControl = Maybe AudioTypeControl
a} :: AudioDescription)

-- | Settings related to audio encoding. The settings in this group vary
-- depending on the value that you choose for your audio codec.
audioDescription_codecSettings :: Lens.Lens' AudioDescription (Prelude.Maybe AudioCodecSettings)
audioDescription_codecSettings :: Lens' AudioDescription (Maybe AudioCodecSettings)
audioDescription_codecSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioCodecSettings
codecSettings :: Maybe AudioCodecSettings
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
codecSettings} -> Maybe AudioCodecSettings
codecSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioCodecSettings
a -> AudioDescription
s {$sel:codecSettings:AudioDescription' :: Maybe AudioCodecSettings
codecSettings = Maybe AudioCodecSettings
a} :: AudioDescription)

-- | Specify the language for this audio output track. The service puts this
-- language code into your output audio track when you set Language code
-- control (AudioLanguageCodeControl) to Use configured (USE_CONFIGURED).
-- The service also uses your specified custom language code when you set
-- Language code control (AudioLanguageCodeControl) to Follow input
-- (FOLLOW_INPUT), but your input file doesn\'t specify a language code.
-- For all outputs, you can use an ISO 639-2 or ISO 639-3 code. For
-- streaming outputs, you can also use any other code in the full RFC-5646
-- specification. Streaming outputs are those that are in one of the
-- following output groups: CMAF, DASH ISO, Apple HLS, or Microsoft Smooth
-- Streaming.
audioDescription_customLanguageCode :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Text)
audioDescription_customLanguageCode :: Lens' AudioDescription (Maybe Text)
audioDescription_customLanguageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Text
customLanguageCode :: Maybe Text
$sel:customLanguageCode:AudioDescription' :: AudioDescription -> Maybe Text
customLanguageCode} -> Maybe Text
customLanguageCode) (\s :: AudioDescription
s@AudioDescription' {} Maybe Text
a -> AudioDescription
s {$sel:customLanguageCode:AudioDescription' :: Maybe Text
customLanguageCode = Maybe Text
a} :: AudioDescription)

-- | Indicates the language of the audio output track. The ISO 639 language
-- specified in the \'Language Code\' drop down will be used when \'Follow
-- Input Language Code\' is not selected or when \'Follow Input Language
-- Code\' is selected but there is no ISO 639 language code specified by
-- the input.
audioDescription_languageCode :: Lens.Lens' AudioDescription (Prelude.Maybe LanguageCode)
audioDescription_languageCode :: Lens' AudioDescription (Maybe LanguageCode)
audioDescription_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: AudioDescription
s@AudioDescription' {} Maybe LanguageCode
a -> AudioDescription
s {$sel:languageCode:AudioDescription' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: AudioDescription)

-- | Specify which source for language code takes precedence for this audio
-- track. When you choose Follow input (FOLLOW_INPUT), the service uses the
-- language code from the input track if it\'s present. If there\'s no
-- languge code on the input track, the service uses the code that you
-- specify in the setting Language code (languageCode or
-- customLanguageCode). When you choose Use configured (USE_CONFIGURED),
-- the service uses the language code that you specify.
audioDescription_languageCodeControl :: Lens.Lens' AudioDescription (Prelude.Maybe AudioLanguageCodeControl)
audioDescription_languageCodeControl :: Lens' AudioDescription (Maybe AudioLanguageCodeControl)
audioDescription_languageCodeControl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe AudioLanguageCodeControl
languageCodeControl :: Maybe AudioLanguageCodeControl
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioLanguageCodeControl
languageCodeControl} -> Maybe AudioLanguageCodeControl
languageCodeControl) (\s :: AudioDescription
s@AudioDescription' {} Maybe AudioLanguageCodeControl
a -> AudioDescription
s {$sel:languageCodeControl:AudioDescription' :: Maybe AudioLanguageCodeControl
languageCodeControl = Maybe AudioLanguageCodeControl
a} :: AudioDescription)

-- | Advanced audio remixing settings.
audioDescription_remixSettings :: Lens.Lens' AudioDescription (Prelude.Maybe RemixSettings)
audioDescription_remixSettings :: Lens' AudioDescription (Maybe RemixSettings)
audioDescription_remixSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe RemixSettings
remixSettings :: Maybe RemixSettings
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
remixSettings} -> Maybe RemixSettings
remixSettings) (\s :: AudioDescription
s@AudioDescription' {} Maybe RemixSettings
a -> AudioDescription
s {$sel:remixSettings:AudioDescription' :: Maybe RemixSettings
remixSettings = Maybe RemixSettings
a} :: AudioDescription)

-- | Specify a label for this output audio stream. For example, \"English\",
-- \"Director commentary\", or \"track_2\". For streaming outputs,
-- MediaConvert passes this information into destination manifests for
-- display on the end-viewer\'s player device. For outputs in other output
-- groups, the service ignores this setting.
audioDescription_streamName :: Lens.Lens' AudioDescription (Prelude.Maybe Prelude.Text)
audioDescription_streamName :: Lens' AudioDescription (Maybe Text)
audioDescription_streamName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AudioDescription' {Maybe Text
streamName :: Maybe Text
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: AudioDescription
s@AudioDescription' {} Maybe Text
a -> AudioDescription
s {$sel:streamName:AudioDescription' :: Maybe Text
streamName = Maybe Text
a} :: AudioDescription)

instance Data.FromJSON AudioDescription where
  parseJSON :: Value -> Parser AudioDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"AudioDescription"
      ( \Object
x ->
          Maybe AudioChannelTaggingSettings
-> Maybe AudioNormalizationSettings
-> Maybe Text
-> Maybe Natural
-> Maybe AudioTypeControl
-> Maybe AudioCodecSettings
-> Maybe Text
-> Maybe LanguageCode
-> Maybe AudioLanguageCodeControl
-> Maybe RemixSettings
-> Maybe Text
-> AudioDescription
AudioDescription'
            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
"audioChannelTaggingSettings")
            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
"audioNormalizationSettings")
            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
"audioSourceName")
            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
"audioType")
            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
"audioTypeControl")
            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
"codecSettings")
            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
"customLanguageCode")
            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
"languageCode")
            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
"languageCodeControl")
            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
"remixSettings")
            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
"streamName")
      )

instance Prelude.Hashable AudioDescription where
  hashWithSalt :: Int -> AudioDescription -> Int
hashWithSalt Int
_salt AudioDescription' {Maybe Natural
Maybe Text
Maybe AudioChannelTaggingSettings
Maybe AudioLanguageCodeControl
Maybe AudioNormalizationSettings
Maybe AudioTypeControl
Maybe LanguageCode
Maybe RemixSettings
Maybe AudioCodecSettings
streamName :: Maybe Text
remixSettings :: Maybe RemixSettings
languageCodeControl :: Maybe AudioLanguageCodeControl
languageCode :: Maybe LanguageCode
customLanguageCode :: Maybe Text
codecSettings :: Maybe AudioCodecSettings
audioTypeControl :: Maybe AudioTypeControl
audioType :: Maybe Natural
audioSourceName :: Maybe Text
audioNormalizationSettings :: Maybe AudioNormalizationSettings
audioChannelTaggingSettings :: Maybe AudioChannelTaggingSettings
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioLanguageCodeControl
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe LanguageCode
$sel:customLanguageCode:AudioDescription' :: AudioDescription -> Maybe Text
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioTypeControl
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe Natural
$sel:audioSourceName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
$sel:audioChannelTaggingSettings:AudioDescription' :: AudioDescription -> Maybe AudioChannelTaggingSettings
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioNormalizationSettings
audioNormalizationSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
audioSourceName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
audioType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioTypeControl
audioTypeControl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioCodecSettings
codecSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customLanguageCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LanguageCode
languageCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AudioLanguageCodeControl
languageCodeControl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RemixSettings
remixSettings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamName

instance Prelude.NFData AudioDescription where
  rnf :: AudioDescription -> ()
rnf AudioDescription' {Maybe Natural
Maybe Text
Maybe AudioChannelTaggingSettings
Maybe AudioLanguageCodeControl
Maybe AudioNormalizationSettings
Maybe AudioTypeControl
Maybe LanguageCode
Maybe RemixSettings
Maybe AudioCodecSettings
streamName :: Maybe Text
remixSettings :: Maybe RemixSettings
languageCodeControl :: Maybe AudioLanguageCodeControl
languageCode :: Maybe LanguageCode
customLanguageCode :: Maybe Text
codecSettings :: Maybe AudioCodecSettings
audioTypeControl :: Maybe AudioTypeControl
audioType :: Maybe Natural
audioSourceName :: Maybe Text
audioNormalizationSettings :: Maybe AudioNormalizationSettings
audioChannelTaggingSettings :: Maybe AudioChannelTaggingSettings
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioLanguageCodeControl
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe LanguageCode
$sel:customLanguageCode:AudioDescription' :: AudioDescription -> Maybe Text
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioTypeControl
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe Natural
$sel:audioSourceName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
$sel:audioChannelTaggingSettings:AudioDescription' :: AudioDescription -> Maybe AudioChannelTaggingSettings
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioChannelTaggingSettings
audioChannelTaggingSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioNormalizationSettings
audioNormalizationSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
audioSourceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
audioType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioTypeControl
audioTypeControl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioCodecSettings
codecSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customLanguageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LanguageCode
languageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AudioLanguageCodeControl
languageCodeControl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RemixSettings
remixSettings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamName

instance Data.ToJSON AudioDescription where
  toJSON :: AudioDescription -> Value
toJSON AudioDescription' {Maybe Natural
Maybe Text
Maybe AudioChannelTaggingSettings
Maybe AudioLanguageCodeControl
Maybe AudioNormalizationSettings
Maybe AudioTypeControl
Maybe LanguageCode
Maybe RemixSettings
Maybe AudioCodecSettings
streamName :: Maybe Text
remixSettings :: Maybe RemixSettings
languageCodeControl :: Maybe AudioLanguageCodeControl
languageCode :: Maybe LanguageCode
customLanguageCode :: Maybe Text
codecSettings :: Maybe AudioCodecSettings
audioTypeControl :: Maybe AudioTypeControl
audioType :: Maybe Natural
audioSourceName :: Maybe Text
audioNormalizationSettings :: Maybe AudioNormalizationSettings
audioChannelTaggingSettings :: Maybe AudioChannelTaggingSettings
$sel:streamName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:remixSettings:AudioDescription' :: AudioDescription -> Maybe RemixSettings
$sel:languageCodeControl:AudioDescription' :: AudioDescription -> Maybe AudioLanguageCodeControl
$sel:languageCode:AudioDescription' :: AudioDescription -> Maybe LanguageCode
$sel:customLanguageCode:AudioDescription' :: AudioDescription -> Maybe Text
$sel:codecSettings:AudioDescription' :: AudioDescription -> Maybe AudioCodecSettings
$sel:audioTypeControl:AudioDescription' :: AudioDescription -> Maybe AudioTypeControl
$sel:audioType:AudioDescription' :: AudioDescription -> Maybe Natural
$sel:audioSourceName:AudioDescription' :: AudioDescription -> Maybe Text
$sel:audioNormalizationSettings:AudioDescription' :: AudioDescription -> Maybe AudioNormalizationSettings
$sel:audioChannelTaggingSettings:AudioDescription' :: AudioDescription -> Maybe AudioChannelTaggingSettings
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"audioChannelTaggingSettings" 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 AudioChannelTaggingSettings
audioChannelTaggingSettings,
            (Key
"audioNormalizationSettings" 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 AudioNormalizationSettings
audioNormalizationSettings,
            (Key
"audioSourceName" 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
audioSourceName,
            (Key
"audioType" 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
audioType,
            (Key
"audioTypeControl" 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 AudioTypeControl
audioTypeControl,
            (Key
"codecSettings" 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 AudioCodecSettings
codecSettings,
            (Key
"customLanguageCode" 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
customLanguageCode,
            (Key
"languageCode" 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 LanguageCode
languageCode,
            (Key
"languageCodeControl" 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 AudioLanguageCodeControl
languageCodeControl,
            (Key
"remixSettings" 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 RemixSettings
remixSettings,
            (Key
"streamName" 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
streamName
          ]
      )