{-# 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.CmfcAudioTrackType
-- 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.CmfcAudioTrackType
  ( CmfcAudioTrackType
      ( ..,
        CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT,
        CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT,
        CmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT
      ),
  )
where

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

-- | Use this setting to control the values that MediaConvert puts in your
-- HLS parent playlist to control how the client player selects which audio
-- track to play. The other options for this setting determine the values
-- that MediaConvert writes for the DEFAULT and AUTOSELECT attributes of
-- the EXT-X-MEDIA entry for the audio variant. For more information about
-- these attributes, see the Apple documentation article
-- https:\/\/developer.apple.com\/documentation\/http_live_streaming\/example_playlists_for_http_live_streaming\/adding_alternate_media_to_a_playlist.
-- Choose Alternate audio, auto select, default
-- (ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT) to set DEFAULT=YES and
-- AUTOSELECT=YES. Choose this value for only one variant in your output
-- group. Choose Alternate audio, auto select, not default
-- (ALTERNATE_AUDIO_AUTO_SELECT) to set DEFAULT=NO and AUTOSELECT=YES.
-- Choose Alternate Audio, Not Auto Select to set DEFAULT=NO and
-- AUTOSELECT=NO. When you don\'t specify a value for this setting,
-- MediaConvert defaults to Alternate audio, auto select, default. When
-- there is more than one variant in your output group, you must explicitly
-- choose a value for this setting.
newtype CmfcAudioTrackType = CmfcAudioTrackType'
  { CmfcAudioTrackType -> Text
fromCmfcAudioTrackType ::
      Core.Text
  }
  deriving stock
    ( Int -> CmfcAudioTrackType -> ShowS
[CmfcAudioTrackType] -> ShowS
CmfcAudioTrackType -> String
(Int -> CmfcAudioTrackType -> ShowS)
-> (CmfcAudioTrackType -> String)
-> ([CmfcAudioTrackType] -> ShowS)
-> Show CmfcAudioTrackType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmfcAudioTrackType] -> ShowS
$cshowList :: [CmfcAudioTrackType] -> ShowS
show :: CmfcAudioTrackType -> String
$cshow :: CmfcAudioTrackType -> String
showsPrec :: Int -> CmfcAudioTrackType -> ShowS
$cshowsPrec :: Int -> CmfcAudioTrackType -> ShowS
Prelude.Show,
      ReadPrec [CmfcAudioTrackType]
ReadPrec CmfcAudioTrackType
Int -> ReadS CmfcAudioTrackType
ReadS [CmfcAudioTrackType]
(Int -> ReadS CmfcAudioTrackType)
-> ReadS [CmfcAudioTrackType]
-> ReadPrec CmfcAudioTrackType
-> ReadPrec [CmfcAudioTrackType]
-> Read CmfcAudioTrackType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmfcAudioTrackType]
$creadListPrec :: ReadPrec [CmfcAudioTrackType]
readPrec :: ReadPrec CmfcAudioTrackType
$creadPrec :: ReadPrec CmfcAudioTrackType
readList :: ReadS [CmfcAudioTrackType]
$creadList :: ReadS [CmfcAudioTrackType]
readsPrec :: Int -> ReadS CmfcAudioTrackType
$creadsPrec :: Int -> ReadS CmfcAudioTrackType
Prelude.Read,
      CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
(CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> Eq CmfcAudioTrackType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c/= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
== :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c== :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
Prelude.Eq,
      Eq CmfcAudioTrackType
Eq CmfcAudioTrackType
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Ordering)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> Bool)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType)
-> (CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType)
-> Ord CmfcAudioTrackType
CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
CmfcAudioTrackType -> CmfcAudioTrackType -> Ordering
CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType
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 :: CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType
$cmin :: CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType
max :: CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType
$cmax :: CmfcAudioTrackType -> CmfcAudioTrackType -> CmfcAudioTrackType
>= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c>= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
> :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c> :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
<= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c<= :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
< :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
$c< :: CmfcAudioTrackType -> CmfcAudioTrackType -> Bool
compare :: CmfcAudioTrackType -> CmfcAudioTrackType -> Ordering
$ccompare :: CmfcAudioTrackType -> CmfcAudioTrackType -> Ordering
$cp1Ord :: Eq CmfcAudioTrackType
Prelude.Ord,
      (forall x. CmfcAudioTrackType -> Rep CmfcAudioTrackType x)
-> (forall x. Rep CmfcAudioTrackType x -> CmfcAudioTrackType)
-> Generic CmfcAudioTrackType
forall x. Rep CmfcAudioTrackType x -> CmfcAudioTrackType
forall x. CmfcAudioTrackType -> Rep CmfcAudioTrackType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CmfcAudioTrackType x -> CmfcAudioTrackType
$cfrom :: forall x. CmfcAudioTrackType -> Rep CmfcAudioTrackType x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CmfcAudioTrackType -> Int
CmfcAudioTrackType -> Int
(Int -> CmfcAudioTrackType -> Int)
-> (CmfcAudioTrackType -> Int) -> Hashable CmfcAudioTrackType
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CmfcAudioTrackType -> Int
$chash :: CmfcAudioTrackType -> Int
hashWithSalt :: Int -> CmfcAudioTrackType -> Int
$chashWithSalt :: Int -> CmfcAudioTrackType -> Int
Prelude.Hashable,
      CmfcAudioTrackType -> ()
(CmfcAudioTrackType -> ()) -> NFData CmfcAudioTrackType
forall a. (a -> ()) -> NFData a
rnf :: CmfcAudioTrackType -> ()
$crnf :: CmfcAudioTrackType -> ()
Prelude.NFData,
      Text -> Either String CmfcAudioTrackType
(Text -> Either String CmfcAudioTrackType)
-> FromText CmfcAudioTrackType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmfcAudioTrackType
$cfromText :: Text -> Either String CmfcAudioTrackType
Core.FromText,
      CmfcAudioTrackType -> Text
(CmfcAudioTrackType -> Text) -> ToText CmfcAudioTrackType
forall a. (a -> Text) -> ToText a
toText :: CmfcAudioTrackType -> Text
$ctoText :: CmfcAudioTrackType -> Text
Core.ToText,
      CmfcAudioTrackType -> ByteString
(CmfcAudioTrackType -> ByteString)
-> ToByteString CmfcAudioTrackType
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmfcAudioTrackType -> ByteString
$ctoBS :: CmfcAudioTrackType -> ByteString
Core.ToByteString,
      CmfcAudioTrackType -> ByteStringBuilder
(CmfcAudioTrackType -> ByteStringBuilder)
-> ToLog CmfcAudioTrackType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmfcAudioTrackType -> ByteStringBuilder
$cbuild :: CmfcAudioTrackType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CmfcAudioTrackType -> [Header]
(HeaderName -> CmfcAudioTrackType -> [Header])
-> ToHeader CmfcAudioTrackType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmfcAudioTrackType -> [Header]
$ctoHeader :: HeaderName -> CmfcAudioTrackType -> [Header]
Core.ToHeader,
      CmfcAudioTrackType -> QueryString
(CmfcAudioTrackType -> QueryString) -> ToQuery CmfcAudioTrackType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmfcAudioTrackType -> QueryString
$ctoQuery :: CmfcAudioTrackType -> QueryString
Core.ToQuery,
      Value -> Parser [CmfcAudioTrackType]
Value -> Parser CmfcAudioTrackType
(Value -> Parser CmfcAudioTrackType)
-> (Value -> Parser [CmfcAudioTrackType])
-> FromJSON CmfcAudioTrackType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CmfcAudioTrackType]
$cparseJSONList :: Value -> Parser [CmfcAudioTrackType]
parseJSON :: Value -> Parser CmfcAudioTrackType
$cparseJSON :: Value -> Parser CmfcAudioTrackType
Core.FromJSON,
      FromJSONKeyFunction [CmfcAudioTrackType]
FromJSONKeyFunction CmfcAudioTrackType
FromJSONKeyFunction CmfcAudioTrackType
-> FromJSONKeyFunction [CmfcAudioTrackType]
-> FromJSONKey CmfcAudioTrackType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmfcAudioTrackType]
$cfromJSONKeyList :: FromJSONKeyFunction [CmfcAudioTrackType]
fromJSONKey :: FromJSONKeyFunction CmfcAudioTrackType
$cfromJSONKey :: FromJSONKeyFunction CmfcAudioTrackType
Core.FromJSONKey,
      [CmfcAudioTrackType] -> Encoding
[CmfcAudioTrackType] -> Value
CmfcAudioTrackType -> Encoding
CmfcAudioTrackType -> Value
(CmfcAudioTrackType -> Value)
-> (CmfcAudioTrackType -> Encoding)
-> ([CmfcAudioTrackType] -> Value)
-> ([CmfcAudioTrackType] -> Encoding)
-> ToJSON CmfcAudioTrackType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CmfcAudioTrackType] -> Encoding
$ctoEncodingList :: [CmfcAudioTrackType] -> Encoding
toJSONList :: [CmfcAudioTrackType] -> Value
$ctoJSONList :: [CmfcAudioTrackType] -> Value
toEncoding :: CmfcAudioTrackType -> Encoding
$ctoEncoding :: CmfcAudioTrackType -> Encoding
toJSON :: CmfcAudioTrackType -> Value
$ctoJSON :: CmfcAudioTrackType -> Value
Core.ToJSON,
      ToJSONKeyFunction [CmfcAudioTrackType]
ToJSONKeyFunction CmfcAudioTrackType
ToJSONKeyFunction CmfcAudioTrackType
-> ToJSONKeyFunction [CmfcAudioTrackType]
-> ToJSONKey CmfcAudioTrackType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmfcAudioTrackType]
$ctoJSONKeyList :: ToJSONKeyFunction [CmfcAudioTrackType]
toJSONKey :: ToJSONKeyFunction CmfcAudioTrackType
$ctoJSONKey :: ToJSONKeyFunction CmfcAudioTrackType
Core.ToJSONKey,
      [Node] -> Either String CmfcAudioTrackType
([Node] -> Either String CmfcAudioTrackType)
-> FromXML CmfcAudioTrackType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmfcAudioTrackType
$cparseXML :: [Node] -> Either String CmfcAudioTrackType
Core.FromXML,
      CmfcAudioTrackType -> XML
(CmfcAudioTrackType -> XML) -> ToXML CmfcAudioTrackType
forall a. (a -> XML) -> ToXML a
toXML :: CmfcAudioTrackType -> XML
$ctoXML :: CmfcAudioTrackType -> XML
Core.ToXML
    )

pattern CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: CmfcAudioTrackType
pattern $bCmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: CmfcAudioTrackType
$mCmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: forall r. CmfcAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT = CmfcAudioTrackType' "ALTERNATE_AUDIO_AUTO_SELECT"

pattern CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: CmfcAudioTrackType
pattern $bCmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: CmfcAudioTrackType
$mCmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: forall r. CmfcAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT = CmfcAudioTrackType' "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT"

pattern CmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: CmfcAudioTrackType
pattern $bCmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: CmfcAudioTrackType
$mCmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: forall r. CmfcAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
CmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT = CmfcAudioTrackType' "ALTERNATE_AUDIO_NOT_AUTO_SELECT"

{-# COMPLETE
  CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT,
  CmfcAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT,
  CmfcAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT,
  CmfcAudioTrackType'
  #-}