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

pattern HlsKeyProviderType_SPEKE :: HlsKeyProviderType
pattern $bHlsKeyProviderType_SPEKE :: HlsKeyProviderType
$mHlsKeyProviderType_SPEKE :: forall r. HlsKeyProviderType -> (Void# -> r) -> (Void# -> r) -> r
HlsKeyProviderType_SPEKE = HlsKeyProviderType' "SPEKE"

pattern HlsKeyProviderType_STATIC_KEY :: HlsKeyProviderType
pattern $bHlsKeyProviderType_STATIC_KEY :: HlsKeyProviderType
$mHlsKeyProviderType_STATIC_KEY :: forall r. HlsKeyProviderType -> (Void# -> r) -> (Void# -> r) -> r
HlsKeyProviderType_STATIC_KEY = HlsKeyProviderType' "STATIC_KEY"

{-# COMPLETE
  HlsKeyProviderType_SPEKE,
  HlsKeyProviderType_STATIC_KEY,
  HlsKeyProviderType'
  #-}