{-# 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.H265RateControlMode
-- 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.H265RateControlMode
  ( H265RateControlMode
      ( ..,
        H265RateControlMode_CBR,
        H265RateControlMode_MULTIPLEX,
        H265RateControlMode_QVBR
      ),
  )
where

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

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

pattern H265RateControlMode_CBR :: H265RateControlMode
pattern $bH265RateControlMode_CBR :: H265RateControlMode
$mH265RateControlMode_CBR :: forall r. H265RateControlMode -> (Void# -> r) -> (Void# -> r) -> r
H265RateControlMode_CBR = H265RateControlMode' "CBR"

pattern H265RateControlMode_MULTIPLEX :: H265RateControlMode
pattern $bH265RateControlMode_MULTIPLEX :: H265RateControlMode
$mH265RateControlMode_MULTIPLEX :: forall r. H265RateControlMode -> (Void# -> r) -> (Void# -> r) -> r
H265RateControlMode_MULTIPLEX = H265RateControlMode' "MULTIPLEX"

pattern H265RateControlMode_QVBR :: H265RateControlMode
pattern $bH265RateControlMode_QVBR :: H265RateControlMode
$mH265RateControlMode_QVBR :: forall r. H265RateControlMode -> (Void# -> r) -> (Void# -> r) -> r
H265RateControlMode_QVBR = H265RateControlMode' "QVBR"

{-# COMPLETE
  H265RateControlMode_CBR,
  H265RateControlMode_MULTIPLEX,
  H265RateControlMode_QVBR,
  H265RateControlMode'
  #-}