{-# 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.CertificateManagerPCA.Types.ExtendedKeyUsageType
-- 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.CertificateManagerPCA.Types.ExtendedKeyUsageType
  ( ExtendedKeyUsageType
      ( ..,
        ExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY,
        ExtendedKeyUsageType_CLIENT_AUTH,
        ExtendedKeyUsageType_CODE_SIGNING,
        ExtendedKeyUsageType_DOCUMENT_SIGNING,
        ExtendedKeyUsageType_EMAIL_PROTECTION,
        ExtendedKeyUsageType_OCSP_SIGNING,
        ExtendedKeyUsageType_SERVER_AUTH,
        ExtendedKeyUsageType_SMART_CARD_LOGIN,
        ExtendedKeyUsageType_TIME_STAMPING
      ),
  )
where

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

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

pattern ExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY :: ExtendedKeyUsageType
$mExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY = ExtendedKeyUsageType' "CERTIFICATE_TRANSPARENCY"

pattern ExtendedKeyUsageType_CLIENT_AUTH :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_CLIENT_AUTH :: ExtendedKeyUsageType
$mExtendedKeyUsageType_CLIENT_AUTH :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_CLIENT_AUTH = ExtendedKeyUsageType' "CLIENT_AUTH"

pattern ExtendedKeyUsageType_CODE_SIGNING :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_CODE_SIGNING :: ExtendedKeyUsageType
$mExtendedKeyUsageType_CODE_SIGNING :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_CODE_SIGNING = ExtendedKeyUsageType' "CODE_SIGNING"

pattern ExtendedKeyUsageType_DOCUMENT_SIGNING :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_DOCUMENT_SIGNING :: ExtendedKeyUsageType
$mExtendedKeyUsageType_DOCUMENT_SIGNING :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_DOCUMENT_SIGNING = ExtendedKeyUsageType' "DOCUMENT_SIGNING"

pattern ExtendedKeyUsageType_EMAIL_PROTECTION :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_EMAIL_PROTECTION :: ExtendedKeyUsageType
$mExtendedKeyUsageType_EMAIL_PROTECTION :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_EMAIL_PROTECTION = ExtendedKeyUsageType' "EMAIL_PROTECTION"

pattern ExtendedKeyUsageType_OCSP_SIGNING :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_OCSP_SIGNING :: ExtendedKeyUsageType
$mExtendedKeyUsageType_OCSP_SIGNING :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_OCSP_SIGNING = ExtendedKeyUsageType' "OCSP_SIGNING"

pattern ExtendedKeyUsageType_SERVER_AUTH :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_SERVER_AUTH :: ExtendedKeyUsageType
$mExtendedKeyUsageType_SERVER_AUTH :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_SERVER_AUTH = ExtendedKeyUsageType' "SERVER_AUTH"

pattern ExtendedKeyUsageType_SMART_CARD_LOGIN :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_SMART_CARD_LOGIN :: ExtendedKeyUsageType
$mExtendedKeyUsageType_SMART_CARD_LOGIN :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_SMART_CARD_LOGIN = ExtendedKeyUsageType' "SMART_CARD_LOGIN"

pattern ExtendedKeyUsageType_TIME_STAMPING :: ExtendedKeyUsageType
pattern $bExtendedKeyUsageType_TIME_STAMPING :: ExtendedKeyUsageType
$mExtendedKeyUsageType_TIME_STAMPING :: forall r. ExtendedKeyUsageType -> (Void# -> r) -> (Void# -> r) -> r
ExtendedKeyUsageType_TIME_STAMPING = ExtendedKeyUsageType' "TIME_STAMPING"

{-# COMPLETE
  ExtendedKeyUsageType_CERTIFICATE_TRANSPARENCY,
  ExtendedKeyUsageType_CLIENT_AUTH,
  ExtendedKeyUsageType_CODE_SIGNING,
  ExtendedKeyUsageType_DOCUMENT_SIGNING,
  ExtendedKeyUsageType_EMAIL_PROTECTION,
  ExtendedKeyUsageType_OCSP_SIGNING,
  ExtendedKeyUsageType_SERVER_AUTH,
  ExtendedKeyUsageType_SMART_CARD_LOGIN,
  ExtendedKeyUsageType_TIME_STAMPING,
  ExtendedKeyUsageType'
  #-}