{-# 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.RevocationReason
-- 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.CertificateManagerPCA.Types.RevocationReason
  ( RevocationReason
      ( ..,
        RevocationReason_AFFILIATION_CHANGED,
        RevocationReason_A_A_COMPROMISE,
        RevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE,
        RevocationReason_CESSATION_OF_OPERATION,
        RevocationReason_KEY_COMPROMISE,
        RevocationReason_PRIVILEGE_WITHDRAWN,
        RevocationReason_SUPERSEDED,
        RevocationReason_UNSPECIFIED
      ),
  )
where

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

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

pattern RevocationReason_AFFILIATION_CHANGED :: RevocationReason
pattern $bRevocationReason_AFFILIATION_CHANGED :: RevocationReason
$mRevocationReason_AFFILIATION_CHANGED :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_AFFILIATION_CHANGED = RevocationReason' "AFFILIATION_CHANGED"

pattern RevocationReason_A_A_COMPROMISE :: RevocationReason
pattern $bRevocationReason_A_A_COMPROMISE :: RevocationReason
$mRevocationReason_A_A_COMPROMISE :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_A_A_COMPROMISE = RevocationReason' "A_A_COMPROMISE"

pattern RevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE :: RevocationReason
pattern $bRevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE :: RevocationReason
$mRevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE = RevocationReason' "CERTIFICATE_AUTHORITY_COMPROMISE"

pattern RevocationReason_CESSATION_OF_OPERATION :: RevocationReason
pattern $bRevocationReason_CESSATION_OF_OPERATION :: RevocationReason
$mRevocationReason_CESSATION_OF_OPERATION :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_CESSATION_OF_OPERATION = RevocationReason' "CESSATION_OF_OPERATION"

pattern RevocationReason_KEY_COMPROMISE :: RevocationReason
pattern $bRevocationReason_KEY_COMPROMISE :: RevocationReason
$mRevocationReason_KEY_COMPROMISE :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_KEY_COMPROMISE = RevocationReason' "KEY_COMPROMISE"

pattern RevocationReason_PRIVILEGE_WITHDRAWN :: RevocationReason
pattern $bRevocationReason_PRIVILEGE_WITHDRAWN :: RevocationReason
$mRevocationReason_PRIVILEGE_WITHDRAWN :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_PRIVILEGE_WITHDRAWN = RevocationReason' "PRIVILEGE_WITHDRAWN"

pattern RevocationReason_SUPERSEDED :: RevocationReason
pattern $bRevocationReason_SUPERSEDED :: RevocationReason
$mRevocationReason_SUPERSEDED :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_SUPERSEDED = RevocationReason' "SUPERSEDED"

pattern RevocationReason_UNSPECIFIED :: RevocationReason
pattern $bRevocationReason_UNSPECIFIED :: RevocationReason
$mRevocationReason_UNSPECIFIED :: forall {r}. RevocationReason -> ((# #) -> r) -> ((# #) -> r) -> r
RevocationReason_UNSPECIFIED = RevocationReason' "UNSPECIFIED"

{-# COMPLETE
  RevocationReason_AFFILIATION_CHANGED,
  RevocationReason_A_A_COMPROMISE,
  RevocationReason_CERTIFICATE_AUTHORITY_COMPROMISE,
  RevocationReason_CESSATION_OF_OPERATION,
  RevocationReason_KEY_COMPROMISE,
  RevocationReason_PRIVILEGE_WITHDRAWN,
  RevocationReason_SUPERSEDED,
  RevocationReason_UNSPECIFIED,
  RevocationReason'
  #-}