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

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

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

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

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

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