{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype EncryptionAlgorithm = EncryptionAlgorithm'
  { EncryptionAlgorithm -> Text
fromEncryptionAlgorithm ::
      Data.Text
  }
  deriving stock
    ( Int -> EncryptionAlgorithm -> ShowS
[EncryptionAlgorithm] -> ShowS
EncryptionAlgorithm -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq EncryptionAlgorithm
Int -> EncryptionAlgorithm -> Int
EncryptionAlgorithm -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: EncryptionAlgorithm -> ()
$crnf :: EncryptionAlgorithm -> ()
Prelude.NFData,
      Text -> Either String EncryptionAlgorithm
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String EncryptionAlgorithm
$cfromText :: Text -> Either String EncryptionAlgorithm
Data.FromText,
      EncryptionAlgorithm -> Text
forall a. (a -> Text) -> ToText a
toText :: EncryptionAlgorithm -> Text
$ctoText :: EncryptionAlgorithm -> Text
Data.ToText,
      EncryptionAlgorithm -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: EncryptionAlgorithm -> ByteString
$ctoBS :: EncryptionAlgorithm -> ByteString
Data.ToByteString,
      EncryptionAlgorithm -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: EncryptionAlgorithm -> ByteStringBuilder
$cbuild :: EncryptionAlgorithm -> ByteStringBuilder
Data.ToLog,
      HeaderName -> EncryptionAlgorithm -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> EncryptionAlgorithm -> [Header]
$ctoHeader :: HeaderName -> EncryptionAlgorithm -> [Header]
Data.ToHeader,
      EncryptionAlgorithm -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: EncryptionAlgorithm -> QueryString
$ctoQuery :: EncryptionAlgorithm -> QueryString
Data.ToQuery,
      Value -> Parser [EncryptionAlgorithm]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [EncryptionAlgorithm]
FromJSONKeyFunction EncryptionAlgorithm
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [EncryptionAlgorithm]
$cfromJSONKeyList :: FromJSONKeyFunction [EncryptionAlgorithm]
fromJSONKey :: FromJSONKeyFunction EncryptionAlgorithm
$cfromJSONKey :: FromJSONKeyFunction EncryptionAlgorithm
Data.FromJSONKey,
      [EncryptionAlgorithm] -> Encoding
[EncryptionAlgorithm] -> Value
EncryptionAlgorithm -> Encoding
EncryptionAlgorithm -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [EncryptionAlgorithm]
ToJSONKeyFunction EncryptionAlgorithm
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [EncryptionAlgorithm]
$ctoJSONKeyList :: ToJSONKeyFunction [EncryptionAlgorithm]
toJSONKey :: ToJSONKeyFunction EncryptionAlgorithm
$ctoJSONKey :: ToJSONKeyFunction EncryptionAlgorithm
Data.ToJSONKey,
      [Node] -> Either String EncryptionAlgorithm
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String EncryptionAlgorithm
$cparseXML :: [Node] -> Either String EncryptionAlgorithm
Data.FromXML,
      EncryptionAlgorithm -> XML
forall a. (a -> XML) -> ToXML a
toXML :: EncryptionAlgorithm -> XML
$ctoXML :: EncryptionAlgorithm -> XML
Data.ToXML
    )

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

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

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