{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConvert.Types.AudioTypeControl
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.AudioTypeControl
  ( AudioTypeControl
      ( ..,
        AudioTypeControl_FOLLOW_INPUT,
        AudioTypeControl_USE_CONFIGURED
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

-- | 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.
newtype AudioTypeControl = AudioTypeControl'
  { AudioTypeControl -> Text
fromAudioTypeControl ::
      Core.Text
  }
  deriving stock
    ( Int -> AudioTypeControl -> ShowS
[AudioTypeControl] -> ShowS
AudioTypeControl -> String
(Int -> AudioTypeControl -> ShowS)
-> (AudioTypeControl -> String)
-> ([AudioTypeControl] -> ShowS)
-> Show AudioTypeControl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AudioTypeControl] -> ShowS
$cshowList :: [AudioTypeControl] -> ShowS
show :: AudioTypeControl -> String
$cshow :: AudioTypeControl -> String
showsPrec :: Int -> AudioTypeControl -> ShowS
$cshowsPrec :: Int -> AudioTypeControl -> ShowS
Prelude.Show,
      ReadPrec [AudioTypeControl]
ReadPrec AudioTypeControl
Int -> ReadS AudioTypeControl
ReadS [AudioTypeControl]
(Int -> ReadS AudioTypeControl)
-> ReadS [AudioTypeControl]
-> ReadPrec AudioTypeControl
-> ReadPrec [AudioTypeControl]
-> Read AudioTypeControl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AudioTypeControl]
$creadListPrec :: ReadPrec [AudioTypeControl]
readPrec :: ReadPrec AudioTypeControl
$creadPrec :: ReadPrec AudioTypeControl
readList :: ReadS [AudioTypeControl]
$creadList :: ReadS [AudioTypeControl]
readsPrec :: Int -> ReadS AudioTypeControl
$creadsPrec :: Int -> ReadS AudioTypeControl
Prelude.Read,
      AudioTypeControl -> AudioTypeControl -> Bool
(AudioTypeControl -> AudioTypeControl -> Bool)
-> (AudioTypeControl -> AudioTypeControl -> Bool)
-> Eq AudioTypeControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AudioTypeControl -> AudioTypeControl -> Bool
$c/= :: AudioTypeControl -> AudioTypeControl -> Bool
== :: AudioTypeControl -> AudioTypeControl -> Bool
$c== :: AudioTypeControl -> AudioTypeControl -> Bool
Prelude.Eq,
      Eq AudioTypeControl
Eq AudioTypeControl
-> (AudioTypeControl -> AudioTypeControl -> Ordering)
-> (AudioTypeControl -> AudioTypeControl -> Bool)
-> (AudioTypeControl -> AudioTypeControl -> Bool)
-> (AudioTypeControl -> AudioTypeControl -> Bool)
-> (AudioTypeControl -> AudioTypeControl -> Bool)
-> (AudioTypeControl -> AudioTypeControl -> AudioTypeControl)
-> (AudioTypeControl -> AudioTypeControl -> AudioTypeControl)
-> Ord AudioTypeControl
AudioTypeControl -> AudioTypeControl -> Bool
AudioTypeControl -> AudioTypeControl -> Ordering
AudioTypeControl -> AudioTypeControl -> AudioTypeControl
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: AudioTypeControl -> AudioTypeControl -> AudioTypeControl
$cmin :: AudioTypeControl -> AudioTypeControl -> AudioTypeControl
max :: AudioTypeControl -> AudioTypeControl -> AudioTypeControl
$cmax :: AudioTypeControl -> AudioTypeControl -> AudioTypeControl
>= :: AudioTypeControl -> AudioTypeControl -> Bool
$c>= :: AudioTypeControl -> AudioTypeControl -> Bool
> :: AudioTypeControl -> AudioTypeControl -> Bool
$c> :: AudioTypeControl -> AudioTypeControl -> Bool
<= :: AudioTypeControl -> AudioTypeControl -> Bool
$c<= :: AudioTypeControl -> AudioTypeControl -> Bool
< :: AudioTypeControl -> AudioTypeControl -> Bool
$c< :: AudioTypeControl -> AudioTypeControl -> Bool
compare :: AudioTypeControl -> AudioTypeControl -> Ordering
$ccompare :: AudioTypeControl -> AudioTypeControl -> Ordering
$cp1Ord :: Eq AudioTypeControl
Prelude.Ord,
      (forall x. AudioTypeControl -> Rep AudioTypeControl x)
-> (forall x. Rep AudioTypeControl x -> AudioTypeControl)
-> Generic AudioTypeControl
forall x. Rep AudioTypeControl x -> AudioTypeControl
forall x. AudioTypeControl -> Rep AudioTypeControl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AudioTypeControl x -> AudioTypeControl
$cfrom :: forall x. AudioTypeControl -> Rep AudioTypeControl x
Prelude.Generic
    )
  deriving newtype
    ( Int -> AudioTypeControl -> Int
AudioTypeControl -> Int
(Int -> AudioTypeControl -> Int)
-> (AudioTypeControl -> Int) -> Hashable AudioTypeControl
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: AudioTypeControl -> Int
$chash :: AudioTypeControl -> Int
hashWithSalt :: Int -> AudioTypeControl -> Int
$chashWithSalt :: Int -> AudioTypeControl -> Int
Prelude.Hashable,
      AudioTypeControl -> ()
(AudioTypeControl -> ()) -> NFData AudioTypeControl
forall a. (a -> ()) -> NFData a
rnf :: AudioTypeControl -> ()
$crnf :: AudioTypeControl -> ()
Prelude.NFData,
      Text -> Either String AudioTypeControl
(Text -> Either String AudioTypeControl)
-> FromText AudioTypeControl
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AudioTypeControl
$cfromText :: Text -> Either String AudioTypeControl
Core.FromText,
      AudioTypeControl -> Text
(AudioTypeControl -> Text) -> ToText AudioTypeControl
forall a. (a -> Text) -> ToText a
toText :: AudioTypeControl -> Text
$ctoText :: AudioTypeControl -> Text
Core.ToText,
      AudioTypeControl -> ByteString
(AudioTypeControl -> ByteString) -> ToByteString AudioTypeControl
forall a. (a -> ByteString) -> ToByteString a
toBS :: AudioTypeControl -> ByteString
$ctoBS :: AudioTypeControl -> ByteString
Core.ToByteString,
      AudioTypeControl -> ByteStringBuilder
(AudioTypeControl -> ByteStringBuilder) -> ToLog AudioTypeControl
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AudioTypeControl -> ByteStringBuilder
$cbuild :: AudioTypeControl -> ByteStringBuilder
Core.ToLog,
      HeaderName -> AudioTypeControl -> [Header]
(HeaderName -> AudioTypeControl -> [Header])
-> ToHeader AudioTypeControl
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AudioTypeControl -> [Header]
$ctoHeader :: HeaderName -> AudioTypeControl -> [Header]
Core.ToHeader,
      AudioTypeControl -> QueryString
(AudioTypeControl -> QueryString) -> ToQuery AudioTypeControl
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AudioTypeControl -> QueryString
$ctoQuery :: AudioTypeControl -> QueryString
Core.ToQuery,
      Value -> Parser [AudioTypeControl]
Value -> Parser AudioTypeControl
(Value -> Parser AudioTypeControl)
-> (Value -> Parser [AudioTypeControl])
-> FromJSON AudioTypeControl
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [AudioTypeControl]
$cparseJSONList :: Value -> Parser [AudioTypeControl]
parseJSON :: Value -> Parser AudioTypeControl
$cparseJSON :: Value -> Parser AudioTypeControl
Core.FromJSON,
      FromJSONKeyFunction [AudioTypeControl]
FromJSONKeyFunction AudioTypeControl
FromJSONKeyFunction AudioTypeControl
-> FromJSONKeyFunction [AudioTypeControl]
-> FromJSONKey AudioTypeControl
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AudioTypeControl]
$cfromJSONKeyList :: FromJSONKeyFunction [AudioTypeControl]
fromJSONKey :: FromJSONKeyFunction AudioTypeControl
$cfromJSONKey :: FromJSONKeyFunction AudioTypeControl
Core.FromJSONKey,
      [AudioTypeControl] -> Encoding
[AudioTypeControl] -> Value
AudioTypeControl -> Encoding
AudioTypeControl -> Value
(AudioTypeControl -> Value)
-> (AudioTypeControl -> Encoding)
-> ([AudioTypeControl] -> Value)
-> ([AudioTypeControl] -> Encoding)
-> ToJSON AudioTypeControl
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AudioTypeControl] -> Encoding
$ctoEncodingList :: [AudioTypeControl] -> Encoding
toJSONList :: [AudioTypeControl] -> Value
$ctoJSONList :: [AudioTypeControl] -> Value
toEncoding :: AudioTypeControl -> Encoding
$ctoEncoding :: AudioTypeControl -> Encoding
toJSON :: AudioTypeControl -> Value
$ctoJSON :: AudioTypeControl -> Value
Core.ToJSON,
      ToJSONKeyFunction [AudioTypeControl]
ToJSONKeyFunction AudioTypeControl
ToJSONKeyFunction AudioTypeControl
-> ToJSONKeyFunction [AudioTypeControl]
-> ToJSONKey AudioTypeControl
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AudioTypeControl]
$ctoJSONKeyList :: ToJSONKeyFunction [AudioTypeControl]
toJSONKey :: ToJSONKeyFunction AudioTypeControl
$ctoJSONKey :: ToJSONKeyFunction AudioTypeControl
Core.ToJSONKey,
      [Node] -> Either String AudioTypeControl
([Node] -> Either String AudioTypeControl)
-> FromXML AudioTypeControl
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AudioTypeControl
$cparseXML :: [Node] -> Either String AudioTypeControl
Core.FromXML,
      AudioTypeControl -> XML
(AudioTypeControl -> XML) -> ToXML AudioTypeControl
forall a. (a -> XML) -> ToXML a
toXML :: AudioTypeControl -> XML
$ctoXML :: AudioTypeControl -> XML
Core.ToXML
    )

pattern AudioTypeControl_FOLLOW_INPUT :: AudioTypeControl
pattern $bAudioTypeControl_FOLLOW_INPUT :: AudioTypeControl
$mAudioTypeControl_FOLLOW_INPUT :: forall r. AudioTypeControl -> (Void# -> r) -> (Void# -> r) -> r
AudioTypeControl_FOLLOW_INPUT = AudioTypeControl' "FOLLOW_INPUT"

pattern AudioTypeControl_USE_CONFIGURED :: AudioTypeControl
pattern $bAudioTypeControl_USE_CONFIGURED :: AudioTypeControl
$mAudioTypeControl_USE_CONFIGURED :: forall r. AudioTypeControl -> (Void# -> r) -> (Void# -> r) -> r
AudioTypeControl_USE_CONFIGURED = AudioTypeControl' "USE_CONFIGURED"

{-# COMPLETE
  AudioTypeControl_FOLLOW_INPUT,
  AudioTypeControl_USE_CONFIGURED,
  AudioTypeControl'
  #-}