{-# 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.KMS.Types.EncryptionAlgorithmSpec
-- 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.KMS.Types.EncryptionAlgorithmSpec
  ( EncryptionAlgorithmSpec
      ( ..,
        EncryptionAlgorithmSpec_RSAES_OAEP_SHA_1,
        EncryptionAlgorithmSpec_RSAES_OAEP_SHA_256,
        EncryptionAlgorithmSpec_SYMMETRIC_DEFAULT
      ),
  )
where

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

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

pattern EncryptionAlgorithmSpec_RSAES_OAEP_SHA_1 :: EncryptionAlgorithmSpec
pattern $bEncryptionAlgorithmSpec_RSAES_OAEP_SHA_1 :: EncryptionAlgorithmSpec
$mEncryptionAlgorithmSpec_RSAES_OAEP_SHA_1 :: forall r.
EncryptionAlgorithmSpec -> (Void# -> r) -> (Void# -> r) -> r
EncryptionAlgorithmSpec_RSAES_OAEP_SHA_1 = EncryptionAlgorithmSpec' "RSAES_OAEP_SHA_1"

pattern EncryptionAlgorithmSpec_RSAES_OAEP_SHA_256 :: EncryptionAlgorithmSpec
pattern $bEncryptionAlgorithmSpec_RSAES_OAEP_SHA_256 :: EncryptionAlgorithmSpec
$mEncryptionAlgorithmSpec_RSAES_OAEP_SHA_256 :: forall r.
EncryptionAlgorithmSpec -> (Void# -> r) -> (Void# -> r) -> r
EncryptionAlgorithmSpec_RSAES_OAEP_SHA_256 = EncryptionAlgorithmSpec' "RSAES_OAEP_SHA_256"

pattern EncryptionAlgorithmSpec_SYMMETRIC_DEFAULT :: EncryptionAlgorithmSpec
pattern $bEncryptionAlgorithmSpec_SYMMETRIC_DEFAULT :: EncryptionAlgorithmSpec
$mEncryptionAlgorithmSpec_SYMMETRIC_DEFAULT :: forall r.
EncryptionAlgorithmSpec -> (Void# -> r) -> (Void# -> r) -> r
EncryptionAlgorithmSpec_SYMMETRIC_DEFAULT = EncryptionAlgorithmSpec' "SYMMETRIC_DEFAULT"

{-# COMPLETE
  EncryptionAlgorithmSpec_RSAES_OAEP_SHA_1,
  EncryptionAlgorithmSpec_RSAES_OAEP_SHA_256,
  EncryptionAlgorithmSpec_SYMMETRIC_DEFAULT,
  EncryptionAlgorithmSpec'
  #-}