{-# 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.ReservationCodec
-- 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.ReservationCodec
  ( ReservationCodec
      ( ..,
        ReservationCodec_AUDIO,
        ReservationCodec_AVC,
        ReservationCodec_HEVC,
        ReservationCodec_LINK,
        ReservationCodec_MPEG2
      ),
  )
where

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

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

pattern ReservationCodec_AUDIO :: ReservationCodec
pattern $bReservationCodec_AUDIO :: ReservationCodec
$mReservationCodec_AUDIO :: forall r. ReservationCodec -> (Void# -> r) -> (Void# -> r) -> r
ReservationCodec_AUDIO = ReservationCodec' "AUDIO"

pattern ReservationCodec_AVC :: ReservationCodec
pattern $bReservationCodec_AVC :: ReservationCodec
$mReservationCodec_AVC :: forall r. ReservationCodec -> (Void# -> r) -> (Void# -> r) -> r
ReservationCodec_AVC = ReservationCodec' "AVC"

pattern ReservationCodec_HEVC :: ReservationCodec
pattern $bReservationCodec_HEVC :: ReservationCodec
$mReservationCodec_HEVC :: forall r. ReservationCodec -> (Void# -> r) -> (Void# -> r) -> r
ReservationCodec_HEVC = ReservationCodec' "HEVC"

pattern ReservationCodec_LINK :: ReservationCodec
pattern $bReservationCodec_LINK :: ReservationCodec
$mReservationCodec_LINK :: forall r. ReservationCodec -> (Void# -> r) -> (Void# -> r) -> r
ReservationCodec_LINK = ReservationCodec' "LINK"

pattern ReservationCodec_MPEG2 :: ReservationCodec
pattern $bReservationCodec_MPEG2 :: ReservationCodec
$mReservationCodec_MPEG2 :: forall r. ReservationCodec -> (Void# -> r) -> (Void# -> r) -> r
ReservationCodec_MPEG2 = ReservationCodec' "MPEG2"

{-# COMPLETE
  ReservationCodec_AUDIO,
  ReservationCodec_AVC,
  ReservationCodec_HEVC,
  ReservationCodec_LINK,
  ReservationCodec_MPEG2,
  ReservationCodec'
  #-}