{-# 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.CustomerMasterKeySpec
-- 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.CustomerMasterKeySpec
  ( CustomerMasterKeySpec
      ( ..,
        CustomerMasterKeySpec_ECC_NIST_P256,
        CustomerMasterKeySpec_ECC_NIST_P384,
        CustomerMasterKeySpec_ECC_NIST_P521,
        CustomerMasterKeySpec_ECC_SECG_P256K1,
        CustomerMasterKeySpec_RSA_2048,
        CustomerMasterKeySpec_RSA_3072,
        CustomerMasterKeySpec_RSA_4096,
        CustomerMasterKeySpec_SYMMETRIC_DEFAULT
      ),
  )
where

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

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

pattern CustomerMasterKeySpec_ECC_NIST_P256 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_ECC_NIST_P256 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_ECC_NIST_P256 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_ECC_NIST_P256 = CustomerMasterKeySpec' "ECC_NIST_P256"

pattern CustomerMasterKeySpec_ECC_NIST_P384 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_ECC_NIST_P384 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_ECC_NIST_P384 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_ECC_NIST_P384 = CustomerMasterKeySpec' "ECC_NIST_P384"

pattern CustomerMasterKeySpec_ECC_NIST_P521 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_ECC_NIST_P521 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_ECC_NIST_P521 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_ECC_NIST_P521 = CustomerMasterKeySpec' "ECC_NIST_P521"

pattern CustomerMasterKeySpec_ECC_SECG_P256K1 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_ECC_SECG_P256K1 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_ECC_SECG_P256K1 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_ECC_SECG_P256K1 = CustomerMasterKeySpec' "ECC_SECG_P256K1"

pattern CustomerMasterKeySpec_RSA_2048 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_RSA_2048 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_RSA_2048 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_RSA_2048 = CustomerMasterKeySpec' "RSA_2048"

pattern CustomerMasterKeySpec_RSA_3072 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_RSA_3072 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_RSA_3072 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_RSA_3072 = CustomerMasterKeySpec' "RSA_3072"

pattern CustomerMasterKeySpec_RSA_4096 :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_RSA_4096 :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_RSA_4096 :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_RSA_4096 = CustomerMasterKeySpec' "RSA_4096"

pattern CustomerMasterKeySpec_SYMMETRIC_DEFAULT :: CustomerMasterKeySpec
pattern $bCustomerMasterKeySpec_SYMMETRIC_DEFAULT :: CustomerMasterKeySpec
$mCustomerMasterKeySpec_SYMMETRIC_DEFAULT :: forall r.
CustomerMasterKeySpec -> (Void# -> r) -> (Void# -> r) -> r
CustomerMasterKeySpec_SYMMETRIC_DEFAULT = CustomerMasterKeySpec' "SYMMETRIC_DEFAULT"

{-# COMPLETE
  CustomerMasterKeySpec_ECC_NIST_P256,
  CustomerMasterKeySpec_ECC_NIST_P384,
  CustomerMasterKeySpec_ECC_NIST_P521,
  CustomerMasterKeySpec_ECC_SECG_P256K1,
  CustomerMasterKeySpec_RSA_2048,
  CustomerMasterKeySpec_RSA_3072,
  CustomerMasterKeySpec_RSA_4096,
  CustomerMasterKeySpec_SYMMETRIC_DEFAULT,
  CustomerMasterKeySpec'
  #-}