{-# 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.CertificateManager.Types.RevocationReason
-- 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.CertificateManager.Types.RevocationReason
  ( RevocationReason
      ( ..,
        RevocationReason_AFFILIATION_CHANGED,
        RevocationReason_A_A_COMPROMISE,
        RevocationReason_CA_COMPROMISE,
        RevocationReason_CERTIFICATE_HOLD,
        RevocationReason_CESSATION_OF_OPERATION,
        RevocationReason_KEY_COMPROMISE,
        RevocationReason_PRIVILEGE_WITHDRAWN,
        RevocationReason_REMOVE_FROM_CRL,
        RevocationReason_SUPERCEDED,
        RevocationReason_UNSPECIFIED
      ),
  )
where

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

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

pattern RevocationReason_AFFILIATION_CHANGED :: RevocationReason
pattern $bRevocationReason_AFFILIATION_CHANGED :: RevocationReason
$mRevocationReason_AFFILIATION_CHANGED :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_A_A_COMPROMISE = RevocationReason' "A_A_COMPROMISE"

pattern RevocationReason_CA_COMPROMISE :: RevocationReason
pattern $bRevocationReason_CA_COMPROMISE :: RevocationReason
$mRevocationReason_CA_COMPROMISE :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_CA_COMPROMISE = RevocationReason' "CA_COMPROMISE"

pattern RevocationReason_CERTIFICATE_HOLD :: RevocationReason
pattern $bRevocationReason_CERTIFICATE_HOLD :: RevocationReason
$mRevocationReason_CERTIFICATE_HOLD :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_CERTIFICATE_HOLD = RevocationReason' "CERTIFICATE_HOLD"

pattern RevocationReason_CESSATION_OF_OPERATION :: RevocationReason
pattern $bRevocationReason_CESSATION_OF_OPERATION :: RevocationReason
$mRevocationReason_CESSATION_OF_OPERATION :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_KEY_COMPROMISE = RevocationReason' "KEY_COMPROMISE"

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

pattern RevocationReason_REMOVE_FROM_CRL :: RevocationReason
pattern $bRevocationReason_REMOVE_FROM_CRL :: RevocationReason
$mRevocationReason_REMOVE_FROM_CRL :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_REMOVE_FROM_CRL = RevocationReason' "REMOVE_FROM_CRL"

pattern RevocationReason_SUPERCEDED :: RevocationReason
pattern $bRevocationReason_SUPERCEDED :: RevocationReason
$mRevocationReason_SUPERCEDED :: forall r. RevocationReason -> (Void# -> r) -> (Void# -> r) -> r
RevocationReason_SUPERCEDED = RevocationReason' "SUPERCEDED"

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

{-# COMPLETE
  RevocationReason_AFFILIATION_CHANGED,
  RevocationReason_A_A_COMPROMISE,
  RevocationReason_CA_COMPROMISE,
  RevocationReason_CERTIFICATE_HOLD,
  RevocationReason_CESSATION_OF_OPERATION,
  RevocationReason_KEY_COMPROMISE,
  RevocationReason_PRIVILEGE_WITHDRAWN,
  RevocationReason_REMOVE_FROM_CRL,
  RevocationReason_SUPERCEDED,
  RevocationReason_UNSPECIFIED,
  RevocationReason'
  #-}