{-# 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.CmafKeyProviderType
-- 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.MediaConvert.Types.CmafKeyProviderType
  ( CmafKeyProviderType
      ( ..,
        CmafKeyProviderType_SPEKE,
        CmafKeyProviderType_STATIC_KEY
      ),
  )
where

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

-- | Specify whether your DRM encryption key is static or from a key provider
-- that follows the SPEKE standard. For more information about SPEKE, see
-- https:\/\/docs.aws.amazon.com\/speke\/latest\/documentation\/what-is-speke.html.
newtype CmafKeyProviderType = CmafKeyProviderType'
  { CmafKeyProviderType -> Text
fromCmafKeyProviderType ::
      Core.Text
  }
  deriving stock
    ( Int -> CmafKeyProviderType -> ShowS
[CmafKeyProviderType] -> ShowS
CmafKeyProviderType -> String
(Int -> CmafKeyProviderType -> ShowS)
-> (CmafKeyProviderType -> String)
-> ([CmafKeyProviderType] -> ShowS)
-> Show CmafKeyProviderType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CmafKeyProviderType] -> ShowS
$cshowList :: [CmafKeyProviderType] -> ShowS
show :: CmafKeyProviderType -> String
$cshow :: CmafKeyProviderType -> String
showsPrec :: Int -> CmafKeyProviderType -> ShowS
$cshowsPrec :: Int -> CmafKeyProviderType -> ShowS
Prelude.Show,
      ReadPrec [CmafKeyProviderType]
ReadPrec CmafKeyProviderType
Int -> ReadS CmafKeyProviderType
ReadS [CmafKeyProviderType]
(Int -> ReadS CmafKeyProviderType)
-> ReadS [CmafKeyProviderType]
-> ReadPrec CmafKeyProviderType
-> ReadPrec [CmafKeyProviderType]
-> Read CmafKeyProviderType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CmafKeyProviderType]
$creadListPrec :: ReadPrec [CmafKeyProviderType]
readPrec :: ReadPrec CmafKeyProviderType
$creadPrec :: ReadPrec CmafKeyProviderType
readList :: ReadS [CmafKeyProviderType]
$creadList :: ReadS [CmafKeyProviderType]
readsPrec :: Int -> ReadS CmafKeyProviderType
$creadsPrec :: Int -> ReadS CmafKeyProviderType
Prelude.Read,
      CmafKeyProviderType -> CmafKeyProviderType -> Bool
(CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> (CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> Eq CmafKeyProviderType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c/= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
== :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c== :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
Prelude.Eq,
      Eq CmafKeyProviderType
Eq CmafKeyProviderType
-> (CmafKeyProviderType -> CmafKeyProviderType -> Ordering)
-> (CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> (CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> (CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> (CmafKeyProviderType -> CmafKeyProviderType -> Bool)
-> (CmafKeyProviderType
    -> CmafKeyProviderType -> CmafKeyProviderType)
-> (CmafKeyProviderType
    -> CmafKeyProviderType -> CmafKeyProviderType)
-> Ord CmafKeyProviderType
CmafKeyProviderType -> CmafKeyProviderType -> Bool
CmafKeyProviderType -> CmafKeyProviderType -> Ordering
CmafKeyProviderType -> CmafKeyProviderType -> CmafKeyProviderType
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 :: CmafKeyProviderType -> CmafKeyProviderType -> CmafKeyProviderType
$cmin :: CmafKeyProviderType -> CmafKeyProviderType -> CmafKeyProviderType
max :: CmafKeyProviderType -> CmafKeyProviderType -> CmafKeyProviderType
$cmax :: CmafKeyProviderType -> CmafKeyProviderType -> CmafKeyProviderType
>= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c>= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
> :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c> :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
<= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c<= :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
< :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
$c< :: CmafKeyProviderType -> CmafKeyProviderType -> Bool
compare :: CmafKeyProviderType -> CmafKeyProviderType -> Ordering
$ccompare :: CmafKeyProviderType -> CmafKeyProviderType -> Ordering
$cp1Ord :: Eq CmafKeyProviderType
Prelude.Ord,
      (forall x. CmafKeyProviderType -> Rep CmafKeyProviderType x)
-> (forall x. Rep CmafKeyProviderType x -> CmafKeyProviderType)
-> Generic CmafKeyProviderType
forall x. Rep CmafKeyProviderType x -> CmafKeyProviderType
forall x. CmafKeyProviderType -> Rep CmafKeyProviderType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CmafKeyProviderType x -> CmafKeyProviderType
$cfrom :: forall x. CmafKeyProviderType -> Rep CmafKeyProviderType x
Prelude.Generic
    )
  deriving newtype
    ( Int -> CmafKeyProviderType -> Int
CmafKeyProviderType -> Int
(Int -> CmafKeyProviderType -> Int)
-> (CmafKeyProviderType -> Int) -> Hashable CmafKeyProviderType
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: CmafKeyProviderType -> Int
$chash :: CmafKeyProviderType -> Int
hashWithSalt :: Int -> CmafKeyProviderType -> Int
$chashWithSalt :: Int -> CmafKeyProviderType -> Int
Prelude.Hashable,
      CmafKeyProviderType -> ()
(CmafKeyProviderType -> ()) -> NFData CmafKeyProviderType
forall a. (a -> ()) -> NFData a
rnf :: CmafKeyProviderType -> ()
$crnf :: CmafKeyProviderType -> ()
Prelude.NFData,
      Text -> Either String CmafKeyProviderType
(Text -> Either String CmafKeyProviderType)
-> FromText CmafKeyProviderType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String CmafKeyProviderType
$cfromText :: Text -> Either String CmafKeyProviderType
Core.FromText,
      CmafKeyProviderType -> Text
(CmafKeyProviderType -> Text) -> ToText CmafKeyProviderType
forall a. (a -> Text) -> ToText a
toText :: CmafKeyProviderType -> Text
$ctoText :: CmafKeyProviderType -> Text
Core.ToText,
      CmafKeyProviderType -> ByteString
(CmafKeyProviderType -> ByteString)
-> ToByteString CmafKeyProviderType
forall a. (a -> ByteString) -> ToByteString a
toBS :: CmafKeyProviderType -> ByteString
$ctoBS :: CmafKeyProviderType -> ByteString
Core.ToByteString,
      CmafKeyProviderType -> ByteStringBuilder
(CmafKeyProviderType -> ByteStringBuilder)
-> ToLog CmafKeyProviderType
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: CmafKeyProviderType -> ByteStringBuilder
$cbuild :: CmafKeyProviderType -> ByteStringBuilder
Core.ToLog,
      HeaderName -> CmafKeyProviderType -> [Header]
(HeaderName -> CmafKeyProviderType -> [Header])
-> ToHeader CmafKeyProviderType
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> CmafKeyProviderType -> [Header]
$ctoHeader :: HeaderName -> CmafKeyProviderType -> [Header]
Core.ToHeader,
      CmafKeyProviderType -> QueryString
(CmafKeyProviderType -> QueryString) -> ToQuery CmafKeyProviderType
forall a. (a -> QueryString) -> ToQuery a
toQuery :: CmafKeyProviderType -> QueryString
$ctoQuery :: CmafKeyProviderType -> QueryString
Core.ToQuery,
      Value -> Parser [CmafKeyProviderType]
Value -> Parser CmafKeyProviderType
(Value -> Parser CmafKeyProviderType)
-> (Value -> Parser [CmafKeyProviderType])
-> FromJSON CmafKeyProviderType
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [CmafKeyProviderType]
$cparseJSONList :: Value -> Parser [CmafKeyProviderType]
parseJSON :: Value -> Parser CmafKeyProviderType
$cparseJSON :: Value -> Parser CmafKeyProviderType
Core.FromJSON,
      FromJSONKeyFunction [CmafKeyProviderType]
FromJSONKeyFunction CmafKeyProviderType
FromJSONKeyFunction CmafKeyProviderType
-> FromJSONKeyFunction [CmafKeyProviderType]
-> FromJSONKey CmafKeyProviderType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [CmafKeyProviderType]
$cfromJSONKeyList :: FromJSONKeyFunction [CmafKeyProviderType]
fromJSONKey :: FromJSONKeyFunction CmafKeyProviderType
$cfromJSONKey :: FromJSONKeyFunction CmafKeyProviderType
Core.FromJSONKey,
      [CmafKeyProviderType] -> Encoding
[CmafKeyProviderType] -> Value
CmafKeyProviderType -> Encoding
CmafKeyProviderType -> Value
(CmafKeyProviderType -> Value)
-> (CmafKeyProviderType -> Encoding)
-> ([CmafKeyProviderType] -> Value)
-> ([CmafKeyProviderType] -> Encoding)
-> ToJSON CmafKeyProviderType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CmafKeyProviderType] -> Encoding
$ctoEncodingList :: [CmafKeyProviderType] -> Encoding
toJSONList :: [CmafKeyProviderType] -> Value
$ctoJSONList :: [CmafKeyProviderType] -> Value
toEncoding :: CmafKeyProviderType -> Encoding
$ctoEncoding :: CmafKeyProviderType -> Encoding
toJSON :: CmafKeyProviderType -> Value
$ctoJSON :: CmafKeyProviderType -> Value
Core.ToJSON,
      ToJSONKeyFunction [CmafKeyProviderType]
ToJSONKeyFunction CmafKeyProviderType
ToJSONKeyFunction CmafKeyProviderType
-> ToJSONKeyFunction [CmafKeyProviderType]
-> ToJSONKey CmafKeyProviderType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [CmafKeyProviderType]
$ctoJSONKeyList :: ToJSONKeyFunction [CmafKeyProviderType]
toJSONKey :: ToJSONKeyFunction CmafKeyProviderType
$ctoJSONKey :: ToJSONKeyFunction CmafKeyProviderType
Core.ToJSONKey,
      [Node] -> Either String CmafKeyProviderType
([Node] -> Either String CmafKeyProviderType)
-> FromXML CmafKeyProviderType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String CmafKeyProviderType
$cparseXML :: [Node] -> Either String CmafKeyProviderType
Core.FromXML,
      CmafKeyProviderType -> XML
(CmafKeyProviderType -> XML) -> ToXML CmafKeyProviderType
forall a. (a -> XML) -> ToXML a
toXML :: CmafKeyProviderType -> XML
$ctoXML :: CmafKeyProviderType -> XML
Core.ToXML
    )

pattern CmafKeyProviderType_SPEKE :: CmafKeyProviderType
pattern $bCmafKeyProviderType_SPEKE :: CmafKeyProviderType
$mCmafKeyProviderType_SPEKE :: forall r. CmafKeyProviderType -> (Void# -> r) -> (Void# -> r) -> r
CmafKeyProviderType_SPEKE = CmafKeyProviderType' "SPEKE"

pattern CmafKeyProviderType_STATIC_KEY :: CmafKeyProviderType
pattern $bCmafKeyProviderType_STATIC_KEY :: CmafKeyProviderType
$mCmafKeyProviderType_STATIC_KEY :: forall r. CmafKeyProviderType -> (Void# -> r) -> (Void# -> r) -> r
CmafKeyProviderType_STATIC_KEY = CmafKeyProviderType' "STATIC_KEY"

{-# COMPLETE
  CmafKeyProviderType_SPEKE,
  CmafKeyProviderType_STATIC_KEY,
  CmafKeyProviderType'
  #-}