{-# 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.MediaLive.Types.AacRateControlMode
-- 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.MediaLive.Types.AacRateControlMode
  ( AacRateControlMode
      ( ..,
        AacRateControlMode_CBR,
        AacRateControlMode_VBR
      ),
  )
where

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

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

pattern AacRateControlMode_CBR :: AacRateControlMode
pattern $bAacRateControlMode_CBR :: AacRateControlMode
$mAacRateControlMode_CBR :: forall r. AacRateControlMode -> (Void# -> r) -> (Void# -> r) -> r
AacRateControlMode_CBR = AacRateControlMode' "CBR"

pattern AacRateControlMode_VBR :: AacRateControlMode
pattern $bAacRateControlMode_VBR :: AacRateControlMode
$mAacRateControlMode_VBR :: forall r. AacRateControlMode -> (Void# -> r) -> (Void# -> r) -> r
AacRateControlMode_VBR = AacRateControlMode' "VBR"

{-# COMPLETE
  AacRateControlMode_CBR,
  AacRateControlMode_VBR,
  AacRateControlMode'
  #-}