{-# 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.KeySpec
-- 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.KMS.Types.KeySpec
  ( KeySpec
      ( ..,
        KeySpec_ECC_NIST_P256,
        KeySpec_ECC_NIST_P384,
        KeySpec_ECC_NIST_P521,
        KeySpec_ECC_SECG_P256K1,
        KeySpec_HMAC_224,
        KeySpec_HMAC_256,
        KeySpec_HMAC_384,
        KeySpec_HMAC_512,
        KeySpec_RSA_2048,
        KeySpec_RSA_3072,
        KeySpec_RSA_4096,
        KeySpec_SM2,
        KeySpec_SYMMETRIC_DEFAULT
      ),
  )
where

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

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

pattern KeySpec_ECC_NIST_P256 :: KeySpec
pattern $bKeySpec_ECC_NIST_P256 :: KeySpec
$mKeySpec_ECC_NIST_P256 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_ECC_NIST_P256 = KeySpec' "ECC_NIST_P256"

pattern KeySpec_ECC_NIST_P384 :: KeySpec
pattern $bKeySpec_ECC_NIST_P384 :: KeySpec
$mKeySpec_ECC_NIST_P384 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_ECC_NIST_P384 = KeySpec' "ECC_NIST_P384"

pattern KeySpec_ECC_NIST_P521 :: KeySpec
pattern $bKeySpec_ECC_NIST_P521 :: KeySpec
$mKeySpec_ECC_NIST_P521 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_ECC_NIST_P521 = KeySpec' "ECC_NIST_P521"

pattern KeySpec_ECC_SECG_P256K1 :: KeySpec
pattern $bKeySpec_ECC_SECG_P256K1 :: KeySpec
$mKeySpec_ECC_SECG_P256K1 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_ECC_SECG_P256K1 = KeySpec' "ECC_SECG_P256K1"

pattern KeySpec_HMAC_224 :: KeySpec
pattern $bKeySpec_HMAC_224 :: KeySpec
$mKeySpec_HMAC_224 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_HMAC_224 = KeySpec' "HMAC_224"

pattern KeySpec_HMAC_256 :: KeySpec
pattern $bKeySpec_HMAC_256 :: KeySpec
$mKeySpec_HMAC_256 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_HMAC_256 = KeySpec' "HMAC_256"

pattern KeySpec_HMAC_384 :: KeySpec
pattern $bKeySpec_HMAC_384 :: KeySpec
$mKeySpec_HMAC_384 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_HMAC_384 = KeySpec' "HMAC_384"

pattern KeySpec_HMAC_512 :: KeySpec
pattern $bKeySpec_HMAC_512 :: KeySpec
$mKeySpec_HMAC_512 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_HMAC_512 = KeySpec' "HMAC_512"

pattern KeySpec_RSA_2048 :: KeySpec
pattern $bKeySpec_RSA_2048 :: KeySpec
$mKeySpec_RSA_2048 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_RSA_2048 = KeySpec' "RSA_2048"

pattern KeySpec_RSA_3072 :: KeySpec
pattern $bKeySpec_RSA_3072 :: KeySpec
$mKeySpec_RSA_3072 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_RSA_3072 = KeySpec' "RSA_3072"

pattern KeySpec_RSA_4096 :: KeySpec
pattern $bKeySpec_RSA_4096 :: KeySpec
$mKeySpec_RSA_4096 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_RSA_4096 = KeySpec' "RSA_4096"

pattern KeySpec_SM2 :: KeySpec
pattern $bKeySpec_SM2 :: KeySpec
$mKeySpec_SM2 :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_SM2 = KeySpec' "SM2"

pattern KeySpec_SYMMETRIC_DEFAULT :: KeySpec
pattern $bKeySpec_SYMMETRIC_DEFAULT :: KeySpec
$mKeySpec_SYMMETRIC_DEFAULT :: forall {r}. KeySpec -> ((# #) -> r) -> ((# #) -> r) -> r
KeySpec_SYMMETRIC_DEFAULT = KeySpec' "SYMMETRIC_DEFAULT"

{-# COMPLETE
  KeySpec_ECC_NIST_P256,
  KeySpec_ECC_NIST_P384,
  KeySpec_ECC_NIST_P521,
  KeySpec_ECC_SECG_P256K1,
  KeySpec_HMAC_224,
  KeySpec_HMAC_256,
  KeySpec_HMAC_384,
  KeySpec_HMAC_512,
  KeySpec_RSA_2048,
  KeySpec_RSA_3072,
  KeySpec_RSA_4096,
  KeySpec_SM2,
  KeySpec_SYMMETRIC_DEFAULT,
  KeySpec'
  #-}