{-# 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.HlsAudioTrackType
-- 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.HlsAudioTrackType
  ( HlsAudioTrackType
      ( ..,
        HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT,
        HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT,
        HlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT,
        HlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM
      ),
  )
where

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

-- | Four types of audio-only tracks are supported: Audio-Only Variant Stream
-- The client can play back this audio-only stream instead of video in
-- low-bandwidth scenarios. Represented as an EXT-X-STREAM-INF in the HLS
-- manifest. Alternate Audio, Auto Select, Default Alternate rendition that
-- the client should try to play back by default. Represented as an
-- EXT-X-MEDIA in the HLS manifest with DEFAULT=YES, AUTOSELECT=YES
-- Alternate Audio, Auto Select, Not Default Alternate rendition that the
-- client may try to play back by default. Represented as an EXT-X-MEDIA in
-- the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate Audio, not
-- Auto Select Alternate rendition that the client will not try to play
-- back by default. Represented as an EXT-X-MEDIA in the HLS manifest with
-- DEFAULT=NO, AUTOSELECT=NO
newtype HlsAudioTrackType = HlsAudioTrackType'
  { HlsAudioTrackType -> Text
fromHlsAudioTrackType ::
      Core.Text
  }
  deriving stock
    ( Int -> HlsAudioTrackType -> ShowS
[HlsAudioTrackType] -> ShowS
HlsAudioTrackType -> String
(Int -> HlsAudioTrackType -> ShowS)
-> (HlsAudioTrackType -> String)
-> ([HlsAudioTrackType] -> ShowS)
-> Show HlsAudioTrackType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HlsAudioTrackType] -> ShowS
$cshowList :: [HlsAudioTrackType] -> ShowS
show :: HlsAudioTrackType -> String
$cshow :: HlsAudioTrackType -> String
showsPrec :: Int -> HlsAudioTrackType -> ShowS
$cshowsPrec :: Int -> HlsAudioTrackType -> ShowS
Prelude.Show,
      ReadPrec [HlsAudioTrackType]
ReadPrec HlsAudioTrackType
Int -> ReadS HlsAudioTrackType
ReadS [HlsAudioTrackType]
(Int -> ReadS HlsAudioTrackType)
-> ReadS [HlsAudioTrackType]
-> ReadPrec HlsAudioTrackType
-> ReadPrec [HlsAudioTrackType]
-> Read HlsAudioTrackType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HlsAudioTrackType]
$creadListPrec :: ReadPrec [HlsAudioTrackType]
readPrec :: ReadPrec HlsAudioTrackType
$creadPrec :: ReadPrec HlsAudioTrackType
readList :: ReadS [HlsAudioTrackType]
$creadList :: ReadS [HlsAudioTrackType]
readsPrec :: Int -> ReadS HlsAudioTrackType
$creadsPrec :: Int -> ReadS HlsAudioTrackType
Prelude.Read,
      HlsAudioTrackType -> HlsAudioTrackType -> Bool
(HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> (HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> Eq HlsAudioTrackType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c/= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
== :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c== :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
Prelude.Eq,
      Eq HlsAudioTrackType
Eq HlsAudioTrackType
-> (HlsAudioTrackType -> HlsAudioTrackType -> Ordering)
-> (HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> (HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> (HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> (HlsAudioTrackType -> HlsAudioTrackType -> Bool)
-> (HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType)
-> (HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType)
-> Ord HlsAudioTrackType
HlsAudioTrackType -> HlsAudioTrackType -> Bool
HlsAudioTrackType -> HlsAudioTrackType -> Ordering
HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType
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 :: HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType
$cmin :: HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType
max :: HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType
$cmax :: HlsAudioTrackType -> HlsAudioTrackType -> HlsAudioTrackType
>= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c>= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
> :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c> :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
<= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c<= :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
< :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
$c< :: HlsAudioTrackType -> HlsAudioTrackType -> Bool
compare :: HlsAudioTrackType -> HlsAudioTrackType -> Ordering
$ccompare :: HlsAudioTrackType -> HlsAudioTrackType -> Ordering
$cp1Ord :: Eq HlsAudioTrackType
Prelude.Ord,
      (forall x. HlsAudioTrackType -> Rep HlsAudioTrackType x)
-> (forall x. Rep HlsAudioTrackType x -> HlsAudioTrackType)
-> Generic HlsAudioTrackType
forall x. Rep HlsAudioTrackType x -> HlsAudioTrackType
forall x. HlsAudioTrackType -> Rep HlsAudioTrackType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HlsAudioTrackType x -> HlsAudioTrackType
$cfrom :: forall x. HlsAudioTrackType -> Rep HlsAudioTrackType x
Prelude.Generic
    )
  deriving newtype
    ( Int -> HlsAudioTrackType -> Int
HlsAudioTrackType -> Int
(Int -> HlsAudioTrackType -> Int)
-> (HlsAudioTrackType -> Int) -> Hashable HlsAudioTrackType
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: HlsAudioTrackType -> Int
$chash :: HlsAudioTrackType -> Int
hashWithSalt :: Int -> HlsAudioTrackType -> Int
$chashWithSalt :: Int -> HlsAudioTrackType -> Int
Prelude.Hashable,
      HlsAudioTrackType -> ()
(HlsAudioTrackType -> ()) -> NFData HlsAudioTrackType
forall a. (a -> ()) -> NFData a
rnf :: HlsAudioTrackType -> ()
$crnf :: HlsAudioTrackType -> ()
Prelude.NFData,
      Text -> Either String HlsAudioTrackType
(Text -> Either String HlsAudioTrackType)
-> FromText HlsAudioTrackType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String HlsAudioTrackType
$cfromText :: Text -> Either String HlsAudioTrackType
Core.FromText,
      HlsAudioTrackType -> Text
(HlsAudioTrackType -> Text) -> ToText HlsAudioTrackType
forall a. (a -> Text) -> ToText a
toText :: HlsAudioTrackType -> Text
$ctoText :: HlsAudioTrackType -> Text
Core.ToText,
      HlsAudioTrackType -> ByteString
(HlsAudioTrackType -> ByteString) -> ToByteString HlsAudioTrackType
forall a. (a -> ByteString) -> ToByteString a
toBS :: HlsAudioTrackType -> ByteString
$ctoBS :: HlsAudioTrackType -> ByteString
Core.ToByteString,
      HlsAudioTrackType -> ByteStringBuilder
(HlsAudioTrackType -> ByteStringBuilder) -> ToLog HlsAudioTrackType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: HlsAudioTrackType -> ByteStringBuilder
$cbuild :: HlsAudioTrackType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> HlsAudioTrackType -> [Header]
(HeaderName -> HlsAudioTrackType -> [Header])
-> ToHeader HlsAudioTrackType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> HlsAudioTrackType -> [Header]
$ctoHeader :: HeaderName -> HlsAudioTrackType -> [Header]
Core.ToHeader,
      HlsAudioTrackType -> QueryString
(HlsAudioTrackType -> QueryString) -> ToQuery HlsAudioTrackType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: HlsAudioTrackType -> QueryString
$ctoQuery :: HlsAudioTrackType -> QueryString
Core.ToQuery,
      Value -> Parser [HlsAudioTrackType]
Value -> Parser HlsAudioTrackType
(Value -> Parser HlsAudioTrackType)
-> (Value -> Parser [HlsAudioTrackType])
-> FromJSON HlsAudioTrackType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [HlsAudioTrackType]
$cparseJSONList :: Value -> Parser [HlsAudioTrackType]
parseJSON :: Value -> Parser HlsAudioTrackType
$cparseJSON :: Value -> Parser HlsAudioTrackType
Core.FromJSON,
      FromJSONKeyFunction [HlsAudioTrackType]
FromJSONKeyFunction HlsAudioTrackType
FromJSONKeyFunction HlsAudioTrackType
-> FromJSONKeyFunction [HlsAudioTrackType]
-> FromJSONKey HlsAudioTrackType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [HlsAudioTrackType]
$cfromJSONKeyList :: FromJSONKeyFunction [HlsAudioTrackType]
fromJSONKey :: FromJSONKeyFunction HlsAudioTrackType
$cfromJSONKey :: FromJSONKeyFunction HlsAudioTrackType
Core.FromJSONKey,
      [HlsAudioTrackType] -> Encoding
[HlsAudioTrackType] -> Value
HlsAudioTrackType -> Encoding
HlsAudioTrackType -> Value
(HlsAudioTrackType -> Value)
-> (HlsAudioTrackType -> Encoding)
-> ([HlsAudioTrackType] -> Value)
-> ([HlsAudioTrackType] -> Encoding)
-> ToJSON HlsAudioTrackType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [HlsAudioTrackType] -> Encoding
$ctoEncodingList :: [HlsAudioTrackType] -> Encoding
toJSONList :: [HlsAudioTrackType] -> Value
$ctoJSONList :: [HlsAudioTrackType] -> Value
toEncoding :: HlsAudioTrackType -> Encoding
$ctoEncoding :: HlsAudioTrackType -> Encoding
toJSON :: HlsAudioTrackType -> Value
$ctoJSON :: HlsAudioTrackType -> Value
Core.ToJSON,
      ToJSONKeyFunction [HlsAudioTrackType]
ToJSONKeyFunction HlsAudioTrackType
ToJSONKeyFunction HlsAudioTrackType
-> ToJSONKeyFunction [HlsAudioTrackType]
-> ToJSONKey HlsAudioTrackType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [HlsAudioTrackType]
$ctoJSONKeyList :: ToJSONKeyFunction [HlsAudioTrackType]
toJSONKey :: ToJSONKeyFunction HlsAudioTrackType
$ctoJSONKey :: ToJSONKeyFunction HlsAudioTrackType
Core.ToJSONKey,
      [Node] -> Either String HlsAudioTrackType
([Node] -> Either String HlsAudioTrackType)
-> FromXML HlsAudioTrackType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String HlsAudioTrackType
$cparseXML :: [Node] -> Either String HlsAudioTrackType
Core.FromXML,
      HlsAudioTrackType -> XML
(HlsAudioTrackType -> XML) -> ToXML HlsAudioTrackType
forall a. (a -> XML) -> ToXML a
toXML :: HlsAudioTrackType -> XML
$ctoXML :: HlsAudioTrackType -> XML
Core.ToXML
    )

pattern HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: HlsAudioTrackType
pattern $bHlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: HlsAudioTrackType
$mHlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT :: forall r. HlsAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT = HlsAudioTrackType' "ALTERNATE_AUDIO_AUTO_SELECT"

pattern HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: HlsAudioTrackType
pattern $bHlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: HlsAudioTrackType
$mHlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT :: forall r. HlsAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT = HlsAudioTrackType' "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT"

pattern HlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: HlsAudioTrackType
pattern $bHlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: HlsAudioTrackType
$mHlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT :: forall r. HlsAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
HlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT = HlsAudioTrackType' "ALTERNATE_AUDIO_NOT_AUTO_SELECT"

pattern HlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM :: HlsAudioTrackType
pattern $bHlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM :: HlsAudioTrackType
$mHlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM :: forall r. HlsAudioTrackType -> (Void# -> r) -> (Void# -> r) -> r
HlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM = HlsAudioTrackType' "AUDIO_ONLY_VARIANT_STREAM"

{-# COMPLETE
  HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT,
  HlsAudioTrackType_ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT,
  HlsAudioTrackType_ALTERNATE_AUDIO_NOT_AUTO_SELECT,
  HlsAudioTrackType_AUDIO_ONLY_VARIANT_STREAM,
  HlsAudioTrackType'
  #-}