{-# 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.ColorSpaceUsage
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConvert.Types.ColorSpaceUsage
  ( ColorSpaceUsage
      ( ..,
        ColorSpaceUsage_FALLBACK,
        ColorSpaceUsage_FORCE
      ),
  )
where

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

-- | There are two sources for color metadata, the input file and the job
-- input settings Color space (ColorSpace) and HDR master display
-- information settings(Hdr10Metadata). The Color space usage setting
-- determines which takes precedence. Choose Force (FORCE) to use color
-- metadata from the input job settings. If you don\'t specify values for
-- those settings, the service defaults to using metadata from your input.
-- FALLBACK - Choose Fallback (FALLBACK) to use color metadata from the
-- source when it is present. If there\'s no color metadata in your input
-- file, the service defaults to using values you specify in the input
-- settings.
newtype ColorSpaceUsage = ColorSpaceUsage'
  { ColorSpaceUsage -> Text
fromColorSpaceUsage ::
      Data.Text
  }
  deriving stock
    ( Int -> ColorSpaceUsage -> ShowS
[ColorSpaceUsage] -> ShowS
ColorSpaceUsage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColorSpaceUsage] -> ShowS
$cshowList :: [ColorSpaceUsage] -> ShowS
show :: ColorSpaceUsage -> String
$cshow :: ColorSpaceUsage -> String
showsPrec :: Int -> ColorSpaceUsage -> ShowS
$cshowsPrec :: Int -> ColorSpaceUsage -> ShowS
Prelude.Show,
      ReadPrec [ColorSpaceUsage]
ReadPrec ColorSpaceUsage
Int -> ReadS ColorSpaceUsage
ReadS [ColorSpaceUsage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColorSpaceUsage]
$creadListPrec :: ReadPrec [ColorSpaceUsage]
readPrec :: ReadPrec ColorSpaceUsage
$creadPrec :: ReadPrec ColorSpaceUsage
readList :: ReadS [ColorSpaceUsage]
$creadList :: ReadS [ColorSpaceUsage]
readsPrec :: Int -> ReadS ColorSpaceUsage
$creadsPrec :: Int -> ReadS ColorSpaceUsage
Prelude.Read,
      ColorSpaceUsage -> ColorSpaceUsage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c/= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
== :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c== :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
Prelude.Eq,
      Eq ColorSpaceUsage
ColorSpaceUsage -> ColorSpaceUsage -> Bool
ColorSpaceUsage -> ColorSpaceUsage -> Ordering
ColorSpaceUsage -> ColorSpaceUsage -> ColorSpaceUsage
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 :: ColorSpaceUsage -> ColorSpaceUsage -> ColorSpaceUsage
$cmin :: ColorSpaceUsage -> ColorSpaceUsage -> ColorSpaceUsage
max :: ColorSpaceUsage -> ColorSpaceUsage -> ColorSpaceUsage
$cmax :: ColorSpaceUsage -> ColorSpaceUsage -> ColorSpaceUsage
>= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c>= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
> :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c> :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
<= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c<= :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
< :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
$c< :: ColorSpaceUsage -> ColorSpaceUsage -> Bool
compare :: ColorSpaceUsage -> ColorSpaceUsage -> Ordering
$ccompare :: ColorSpaceUsage -> ColorSpaceUsage -> Ordering
Prelude.Ord,
      forall x. Rep ColorSpaceUsage x -> ColorSpaceUsage
forall x. ColorSpaceUsage -> Rep ColorSpaceUsage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColorSpaceUsage x -> ColorSpaceUsage
$cfrom :: forall x. ColorSpaceUsage -> Rep ColorSpaceUsage x
Prelude.Generic
    )
  deriving newtype
    ( Eq ColorSpaceUsage
Int -> ColorSpaceUsage -> Int
ColorSpaceUsage -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ColorSpaceUsage -> Int
$chash :: ColorSpaceUsage -> Int
hashWithSalt :: Int -> ColorSpaceUsage -> Int
$chashWithSalt :: Int -> ColorSpaceUsage -> Int
Prelude.Hashable,
      ColorSpaceUsage -> ()
forall a. (a -> ()) -> NFData a
rnf :: ColorSpaceUsage -> ()
$crnf :: ColorSpaceUsage -> ()
Prelude.NFData,
      Text -> Either String ColorSpaceUsage
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ColorSpaceUsage
$cfromText :: Text -> Either String ColorSpaceUsage
Data.FromText,
      ColorSpaceUsage -> Text
forall a. (a -> Text) -> ToText a
toText :: ColorSpaceUsage -> Text
$ctoText :: ColorSpaceUsage -> Text
Data.ToText,
      ColorSpaceUsage -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: ColorSpaceUsage -> ByteString
$ctoBS :: ColorSpaceUsage -> ByteString
Data.ToByteString,
      ColorSpaceUsage -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ColorSpaceUsage -> ByteStringBuilder
$cbuild :: ColorSpaceUsage -> ByteStringBuilder
Data.ToLog,
      HeaderName -> ColorSpaceUsage -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ColorSpaceUsage -> [Header]
$ctoHeader :: HeaderName -> ColorSpaceUsage -> [Header]
Data.ToHeader,
      ColorSpaceUsage -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ColorSpaceUsage -> QueryString
$ctoQuery :: ColorSpaceUsage -> QueryString
Data.ToQuery,
      Value -> Parser [ColorSpaceUsage]
Value -> Parser ColorSpaceUsage
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ColorSpaceUsage]
$cparseJSONList :: Value -> Parser [ColorSpaceUsage]
parseJSON :: Value -> Parser ColorSpaceUsage
$cparseJSON :: Value -> Parser ColorSpaceUsage
Data.FromJSON,
      FromJSONKeyFunction [ColorSpaceUsage]
FromJSONKeyFunction ColorSpaceUsage
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ColorSpaceUsage]
$cfromJSONKeyList :: FromJSONKeyFunction [ColorSpaceUsage]
fromJSONKey :: FromJSONKeyFunction ColorSpaceUsage
$cfromJSONKey :: FromJSONKeyFunction ColorSpaceUsage
Data.FromJSONKey,
      [ColorSpaceUsage] -> Encoding
[ColorSpaceUsage] -> Value
ColorSpaceUsage -> Encoding
ColorSpaceUsage -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ColorSpaceUsage] -> Encoding
$ctoEncodingList :: [ColorSpaceUsage] -> Encoding
toJSONList :: [ColorSpaceUsage] -> Value
$ctoJSONList :: [ColorSpaceUsage] -> Value
toEncoding :: ColorSpaceUsage -> Encoding
$ctoEncoding :: ColorSpaceUsage -> Encoding
toJSON :: ColorSpaceUsage -> Value
$ctoJSON :: ColorSpaceUsage -> Value
Data.ToJSON,
      ToJSONKeyFunction [ColorSpaceUsage]
ToJSONKeyFunction ColorSpaceUsage
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ColorSpaceUsage]
$ctoJSONKeyList :: ToJSONKeyFunction [ColorSpaceUsage]
toJSONKey :: ToJSONKeyFunction ColorSpaceUsage
$ctoJSONKey :: ToJSONKeyFunction ColorSpaceUsage
Data.ToJSONKey,
      [Node] -> Either String ColorSpaceUsage
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ColorSpaceUsage
$cparseXML :: [Node] -> Either String ColorSpaceUsage
Data.FromXML,
      ColorSpaceUsage -> XML
forall a. (a -> XML) -> ToXML a
toXML :: ColorSpaceUsage -> XML
$ctoXML :: ColorSpaceUsage -> XML
Data.ToXML
    )

pattern ColorSpaceUsage_FALLBACK :: ColorSpaceUsage
pattern $bColorSpaceUsage_FALLBACK :: ColorSpaceUsage
$mColorSpaceUsage_FALLBACK :: forall {r}. ColorSpaceUsage -> ((# #) -> r) -> ((# #) -> r) -> r
ColorSpaceUsage_FALLBACK = ColorSpaceUsage' "FALLBACK"

pattern ColorSpaceUsage_FORCE :: ColorSpaceUsage
pattern $bColorSpaceUsage_FORCE :: ColorSpaceUsage
$mColorSpaceUsage_FORCE :: forall {r}. ColorSpaceUsage -> ((# #) -> r) -> ((# #) -> r) -> r
ColorSpaceUsage_FORCE = ColorSpaceUsage' "FORCE"

{-# COMPLETE
  ColorSpaceUsage_FALLBACK,
  ColorSpaceUsage_FORCE,
  ColorSpaceUsage'
  #-}