{-# 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.MediaPackageVOD.Types.EncryptionMethod
-- 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.MediaPackageVOD.Types.EncryptionMethod
  ( EncryptionMethod
      ( ..,
        EncryptionMethod_AES_128,
        EncryptionMethod_SAMPLE_AES
      ),
  )
where

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

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

pattern EncryptionMethod_AES_128 :: EncryptionMethod
pattern $bEncryptionMethod_AES_128 :: EncryptionMethod
$mEncryptionMethod_AES_128 :: forall r. EncryptionMethod -> (Void# -> r) -> (Void# -> r) -> r
EncryptionMethod_AES_128 = EncryptionMethod' "AES_128"

pattern EncryptionMethod_SAMPLE_AES :: EncryptionMethod
pattern $bEncryptionMethod_SAMPLE_AES :: EncryptionMethod
$mEncryptionMethod_SAMPLE_AES :: forall r. EncryptionMethod -> (Void# -> r) -> (Void# -> r) -> r
EncryptionMethod_SAMPLE_AES = EncryptionMethod' "SAMPLE_AES"

{-# COMPLETE
  EncryptionMethod_AES_128,
  EncryptionMethod_SAMPLE_AES,
  EncryptionMethod'
  #-}