{-# 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.CdiInputResolution
-- 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.CdiInputResolution
  ( CdiInputResolution
      ( ..,
        CdiInputResolution_FHD,
        CdiInputResolution_HD,
        CdiInputResolution_SD,
        CdiInputResolution_UHD
      ),
  )
where

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

-- | Maximum CDI input resolution; SD is 480i and 576i up to 30
-- frames-per-second (fps), HD is 720p up to 60 fps \/ 1080i up to 30 fps,
-- FHD is 1080p up to 60 fps, UHD is 2160p up to 60 fps
newtype CdiInputResolution = CdiInputResolution'
  { CdiInputResolution -> Text
fromCdiInputResolution ::
      Core.Text
  }
  deriving stock
    ( Int -> CdiInputResolution -> ShowS
[CdiInputResolution] -> ShowS
CdiInputResolution -> String
(Int -> CdiInputResolution -> ShowS)
-> (CdiInputResolution -> String)
-> ([CdiInputResolution] -> ShowS)
-> Show CdiInputResolution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CdiInputResolution] -> ShowS
$cshowList :: [CdiInputResolution] -> ShowS
show :: CdiInputResolution -> String
$cshow :: CdiInputResolution -> String
showsPrec :: Int -> CdiInputResolution -> ShowS
$cshowsPrec :: Int -> CdiInputResolution -> ShowS
Prelude.Show,
      ReadPrec [CdiInputResolution]
ReadPrec CdiInputResolution
Int -> ReadS CdiInputResolution
ReadS [CdiInputResolution]
(Int -> ReadS CdiInputResolution)
-> ReadS [CdiInputResolution]
-> ReadPrec CdiInputResolution
-> ReadPrec [CdiInputResolution]
-> Read CdiInputResolution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CdiInputResolution]
$creadListPrec :: ReadPrec [CdiInputResolution]
readPrec :: ReadPrec CdiInputResolution
$creadPrec :: ReadPrec CdiInputResolution
readList :: ReadS [CdiInputResolution]
$creadList :: ReadS [CdiInputResolution]
readsPrec :: Int -> ReadS CdiInputResolution
$creadsPrec :: Int -> ReadS CdiInputResolution
Prelude.Read,
      CdiInputResolution -> CdiInputResolution -> Bool
(CdiInputResolution -> CdiInputResolution -> Bool)
-> (CdiInputResolution -> CdiInputResolution -> Bool)
-> Eq CdiInputResolution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CdiInputResolution -> CdiInputResolution -> Bool
$c/= :: CdiInputResolution -> CdiInputResolution -> Bool
== :: CdiInputResolution -> CdiInputResolution -> Bool
$c== :: CdiInputResolution -> CdiInputResolution -> Bool
Prelude.Eq,
      Eq CdiInputResolution
Eq CdiInputResolution
-> (CdiInputResolution -> CdiInputResolution -> Ordering)
-> (CdiInputResolution -> CdiInputResolution -> Bool)
-> (CdiInputResolution -> CdiInputResolution -> Bool)
-> (CdiInputResolution -> CdiInputResolution -> Bool)
-> (CdiInputResolution -> CdiInputResolution -> Bool)
-> (CdiInputResolution -> CdiInputResolution -> CdiInputResolution)
-> (CdiInputResolution -> CdiInputResolution -> CdiInputResolution)
-> Ord CdiInputResolution
CdiInputResolution -> CdiInputResolution -> Bool
CdiInputResolution -> CdiInputResolution -> Ordering
CdiInputResolution -> CdiInputResolution -> CdiInputResolution
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 :: CdiInputResolution -> CdiInputResolution -> CdiInputResolution
$cmin :: CdiInputResolution -> CdiInputResolution -> CdiInputResolution
max :: CdiInputResolution -> CdiInputResolution -> CdiInputResolution
$cmax :: CdiInputResolution -> CdiInputResolution -> CdiInputResolution
>= :: CdiInputResolution -> CdiInputResolution -> Bool
$c>= :: CdiInputResolution -> CdiInputResolution -> Bool
> :: CdiInputResolution -> CdiInputResolution -> Bool
$c> :: CdiInputResolution -> CdiInputResolution -> Bool
<= :: CdiInputResolution -> CdiInputResolution -> Bool
$c<= :: CdiInputResolution -> CdiInputResolution -> Bool
< :: CdiInputResolution -> CdiInputResolution -> Bool
$c< :: CdiInputResolution -> CdiInputResolution -> Bool
compare :: CdiInputResolution -> CdiInputResolution -> Ordering
$ccompare :: CdiInputResolution -> CdiInputResolution -> Ordering
$cp1Ord :: Eq CdiInputResolution
Prelude.Ord,
      (forall x. CdiInputResolution -> Rep CdiInputResolution x)
-> (forall x. Rep CdiInputResolution x -> CdiInputResolution)
-> Generic CdiInputResolution
forall x. Rep CdiInputResolution x -> CdiInputResolution
forall x. CdiInputResolution -> Rep CdiInputResolution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CdiInputResolution x -> CdiInputResolution
$cfrom :: forall x. CdiInputResolution -> Rep CdiInputResolution x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CdiInputResolution -> Int
CdiInputResolution -> Int
(Int -> CdiInputResolution -> Int)
-> (CdiInputResolution -> Int) -> Hashable CdiInputResolution
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CdiInputResolution -> Int
$chash :: CdiInputResolution -> Int
hashWithSalt :: Int -> CdiInputResolution -> Int
$chashWithSalt :: Int -> CdiInputResolution -> Int
Prelude.Hashable,
      CdiInputResolution -> ()
(CdiInputResolution -> ()) -> NFData CdiInputResolution
forall a. (a -> ()) -> NFData a
rnf :: CdiInputResolution -> ()
$crnf :: CdiInputResolution -> ()
Prelude.NFData,
      Text -> Either String CdiInputResolution
(Text -> Either String CdiInputResolution)
-> FromText CdiInputResolution
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CdiInputResolution
$cfromText :: Text -> Either String CdiInputResolution
Core.FromText,
      CdiInputResolution -> Text
(CdiInputResolution -> Text) -> ToText CdiInputResolution
forall a. (a -> Text) -> ToText a
toText :: CdiInputResolution -> Text
$ctoText :: CdiInputResolution -> Text
Core.ToText,
      CdiInputResolution -> ByteString
(CdiInputResolution -> ByteString)
-> ToByteString CdiInputResolution
forall a. (a -> ByteString) -> ToByteString a
toBS :: CdiInputResolution -> ByteString
$ctoBS :: CdiInputResolution -> ByteString
Core.ToByteString,
      CdiInputResolution -> ByteStringBuilder
(CdiInputResolution -> ByteStringBuilder)
-> ToLog CdiInputResolution
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CdiInputResolution -> ByteStringBuilder
$cbuild :: CdiInputResolution -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CdiInputResolution -> [Header]
(HeaderName -> CdiInputResolution -> [Header])
-> ToHeader CdiInputResolution
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CdiInputResolution -> [Header]
$ctoHeader :: HeaderName -> CdiInputResolution -> [Header]
Core.ToHeader,
      CdiInputResolution -> QueryString
(CdiInputResolution -> QueryString) -> ToQuery CdiInputResolution
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CdiInputResolution -> QueryString
$ctoQuery :: CdiInputResolution -> QueryString
Core.ToQuery,
      Value -> Parser [CdiInputResolution]
Value -> Parser CdiInputResolution
(Value -> Parser CdiInputResolution)
-> (Value -> Parser [CdiInputResolution])
-> FromJSON CdiInputResolution
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CdiInputResolution]
$cparseJSONList :: Value -> Parser [CdiInputResolution]
parseJSON :: Value -> Parser CdiInputResolution
$cparseJSON :: Value -> Parser CdiInputResolution
Core.FromJSON,
      FromJSONKeyFunction [CdiInputResolution]
FromJSONKeyFunction CdiInputResolution
FromJSONKeyFunction CdiInputResolution
-> FromJSONKeyFunction [CdiInputResolution]
-> FromJSONKey CdiInputResolution
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CdiInputResolution]
$cfromJSONKeyList :: FromJSONKeyFunction [CdiInputResolution]
fromJSONKey :: FromJSONKeyFunction CdiInputResolution
$cfromJSONKey :: FromJSONKeyFunction CdiInputResolution
Core.FromJSONKey,
      [CdiInputResolution] -> Encoding
[CdiInputResolution] -> Value
CdiInputResolution -> Encoding
CdiInputResolution -> Value
(CdiInputResolution -> Value)
-> (CdiInputResolution -> Encoding)
-> ([CdiInputResolution] -> Value)
-> ([CdiInputResolution] -> Encoding)
-> ToJSON CdiInputResolution
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CdiInputResolution] -> Encoding
$ctoEncodingList :: [CdiInputResolution] -> Encoding
toJSONList :: [CdiInputResolution] -> Value
$ctoJSONList :: [CdiInputResolution] -> Value
toEncoding :: CdiInputResolution -> Encoding
$ctoEncoding :: CdiInputResolution -> Encoding
toJSON :: CdiInputResolution -> Value
$ctoJSON :: CdiInputResolution -> Value
Core.ToJSON,
      ToJSONKeyFunction [CdiInputResolution]
ToJSONKeyFunction CdiInputResolution
ToJSONKeyFunction CdiInputResolution
-> ToJSONKeyFunction [CdiInputResolution]
-> ToJSONKey CdiInputResolution
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CdiInputResolution]
$ctoJSONKeyList :: ToJSONKeyFunction [CdiInputResolution]
toJSONKey :: ToJSONKeyFunction CdiInputResolution
$ctoJSONKey :: ToJSONKeyFunction CdiInputResolution
Core.ToJSONKey,
      [Node] -> Either String CdiInputResolution
([Node] -> Either String CdiInputResolution)
-> FromXML CdiInputResolution
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CdiInputResolution
$cparseXML :: [Node] -> Either String CdiInputResolution
Core.FromXML,
      CdiInputResolution -> XML
(CdiInputResolution -> XML) -> ToXML CdiInputResolution
forall a. (a -> XML) -> ToXML a
toXML :: CdiInputResolution -> XML
$ctoXML :: CdiInputResolution -> XML
Core.ToXML
    )

pattern CdiInputResolution_FHD :: CdiInputResolution
pattern $bCdiInputResolution_FHD :: CdiInputResolution
$mCdiInputResolution_FHD :: forall r. CdiInputResolution -> (Void# -> r) -> (Void# -> r) -> r
CdiInputResolution_FHD = CdiInputResolution' "FHD"

pattern CdiInputResolution_HD :: CdiInputResolution
pattern $bCdiInputResolution_HD :: CdiInputResolution
$mCdiInputResolution_HD :: forall r. CdiInputResolution -> (Void# -> r) -> (Void# -> r) -> r
CdiInputResolution_HD = CdiInputResolution' "HD"

pattern CdiInputResolution_SD :: CdiInputResolution
pattern $bCdiInputResolution_SD :: CdiInputResolution
$mCdiInputResolution_SD :: forall r. CdiInputResolution -> (Void# -> r) -> (Void# -> r) -> r
CdiInputResolution_SD = CdiInputResolution' "SD"

pattern CdiInputResolution_UHD :: CdiInputResolution
pattern $bCdiInputResolution_UHD :: CdiInputResolution
$mCdiInputResolution_UHD :: forall r. CdiInputResolution -> (Void# -> r) -> (Void# -> r) -> r
CdiInputResolution_UHD = CdiInputResolution' "UHD"

{-# COMPLETE
  CdiInputResolution_FHD,
  CdiInputResolution_HD,
  CdiInputResolution_SD,
  CdiInputResolution_UHD,
  CdiInputResolution'
  #-}