{-# 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.CertificateAuthorityType
-- 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.CertificateAuthorityType
  ( CertificateAuthorityType
      ( ..,
        CertificateAuthorityType_ROOT,
        CertificateAuthorityType_SUBORDINATE
      ),
  )
where

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

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

pattern CertificateAuthorityType_ROOT :: CertificateAuthorityType
pattern $bCertificateAuthorityType_ROOT :: CertificateAuthorityType
$mCertificateAuthorityType_ROOT :: forall r.
CertificateAuthorityType -> (Void# -> r) -> (Void# -> r) -> r
CertificateAuthorityType_ROOT = CertificateAuthorityType' "ROOT"

pattern CertificateAuthorityType_SUBORDINATE :: CertificateAuthorityType
pattern $bCertificateAuthorityType_SUBORDINATE :: CertificateAuthorityType
$mCertificateAuthorityType_SUBORDINATE :: forall r.
CertificateAuthorityType -> (Void# -> r) -> (Void# -> r) -> r
CertificateAuthorityType_SUBORDINATE = CertificateAuthorityType' "SUBORDINATE"

{-# COMPLETE
  CertificateAuthorityType_ROOT,
  CertificateAuthorityType_SUBORDINATE,
  CertificateAuthorityType'
  #-}