{-# 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.MediaPackage.Types.CmafEncryptionMethod
-- 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.MediaPackage.Types.CmafEncryptionMethod
  ( CmafEncryptionMethod
      ( ..,
        CmafEncryptionMethod_AES_CTR,
        CmafEncryptionMethod_SAMPLE_AES
      ),
  )
where

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

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

pattern CmafEncryptionMethod_AES_CTR :: CmafEncryptionMethod
pattern $bCmafEncryptionMethod_AES_CTR :: CmafEncryptionMethod
$mCmafEncryptionMethod_AES_CTR :: forall {r}.
CmafEncryptionMethod -> ((# #) -> r) -> ((# #) -> r) -> r
CmafEncryptionMethod_AES_CTR = CmafEncryptionMethod' "AES_CTR"

pattern CmafEncryptionMethod_SAMPLE_AES :: CmafEncryptionMethod
pattern $bCmafEncryptionMethod_SAMPLE_AES :: CmafEncryptionMethod
$mCmafEncryptionMethod_SAMPLE_AES :: forall {r}.
CmafEncryptionMethod -> ((# #) -> r) -> ((# #) -> r) -> r
CmafEncryptionMethod_SAMPLE_AES = CmafEncryptionMethod' "SAMPLE_AES"

{-# COMPLETE
  CmafEncryptionMethod_AES_CTR,
  CmafEncryptionMethod_SAMPLE_AES,
  CmafEncryptionMethod'
  #-}