{-# 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.DecryptionMode
-- 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.DecryptionMode
  ( DecryptionMode
      ( ..,
        DecryptionMode_AES_CBC,
        DecryptionMode_AES_CTR,
        DecryptionMode_AES_GCM
      ),
  )
where

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

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

pattern DecryptionMode_AES_CBC :: DecryptionMode
pattern $bDecryptionMode_AES_CBC :: DecryptionMode
$mDecryptionMode_AES_CBC :: forall r. DecryptionMode -> (Void# -> r) -> (Void# -> r) -> r
DecryptionMode_AES_CBC = DecryptionMode' "AES_CBC"

pattern DecryptionMode_AES_CTR :: DecryptionMode
pattern $bDecryptionMode_AES_CTR :: DecryptionMode
$mDecryptionMode_AES_CTR :: forall r. DecryptionMode -> (Void# -> r) -> (Void# -> r) -> r
DecryptionMode_AES_CTR = DecryptionMode' "AES_CTR"

pattern DecryptionMode_AES_GCM :: DecryptionMode
pattern $bDecryptionMode_AES_GCM :: DecryptionMode
$mDecryptionMode_AES_GCM :: forall r. DecryptionMode -> (Void# -> r) -> (Void# -> r) -> r
DecryptionMode_AES_GCM = DecryptionMode' "AES_GCM"

{-# COMPLETE
  DecryptionMode_AES_CBC,
  DecryptionMode_AES_CTR,
  DecryptionMode_AES_GCM,
  DecryptionMode'
  #-}