{-# 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.Signer.Types.EncryptionAlgorithm
-- 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.Signer.Types.EncryptionAlgorithm
  ( EncryptionAlgorithm
      ( ..,
        EncryptionAlgorithm_ECDSA,
        EncryptionAlgorithm_RSA
      ),
  )
where

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

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

pattern EncryptionAlgorithm_ECDSA :: EncryptionAlgorithm
pattern $bEncryptionAlgorithm_ECDSA :: EncryptionAlgorithm
$mEncryptionAlgorithm_ECDSA :: forall r. EncryptionAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
EncryptionAlgorithm_ECDSA = EncryptionAlgorithm' "ECDSA"

pattern EncryptionAlgorithm_RSA :: EncryptionAlgorithm
pattern $bEncryptionAlgorithm_RSA :: EncryptionAlgorithm
$mEncryptionAlgorithm_RSA :: forall r. EncryptionAlgorithm -> (Void# -> r) -> (Void# -> r) -> r
EncryptionAlgorithm_RSA = EncryptionAlgorithm' "RSA"

{-# COMPLETE
  EncryptionAlgorithm_ECDSA,
  EncryptionAlgorithm_RSA,
  EncryptionAlgorithm'
  #-}