{-# 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.DirectoryService.Types.CertificateState
-- 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.DirectoryService.Types.CertificateState
  ( CertificateState
      ( ..,
        CertificateState_DeregisterFailed,
        CertificateState_Deregistered,
        CertificateState_Deregistering,
        CertificateState_RegisterFailed,
        CertificateState_Registered,
        CertificateState_Registering
      ),
  )
where

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

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

pattern CertificateState_DeregisterFailed :: CertificateState
pattern $bCertificateState_DeregisterFailed :: CertificateState
$mCertificateState_DeregisterFailed :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_DeregisterFailed = CertificateState' "DeregisterFailed"

pattern CertificateState_Deregistered :: CertificateState
pattern $bCertificateState_Deregistered :: CertificateState
$mCertificateState_Deregistered :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_Deregistered = CertificateState' "Deregistered"

pattern CertificateState_Deregistering :: CertificateState
pattern $bCertificateState_Deregistering :: CertificateState
$mCertificateState_Deregistering :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_Deregistering = CertificateState' "Deregistering"

pattern CertificateState_RegisterFailed :: CertificateState
pattern $bCertificateState_RegisterFailed :: CertificateState
$mCertificateState_RegisterFailed :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_RegisterFailed = CertificateState' "RegisterFailed"

pattern CertificateState_Registered :: CertificateState
pattern $bCertificateState_Registered :: CertificateState
$mCertificateState_Registered :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_Registered = CertificateState' "Registered"

pattern CertificateState_Registering :: CertificateState
pattern $bCertificateState_Registering :: CertificateState
$mCertificateState_Registering :: forall r. CertificateState -> (Void# -> r) -> (Void# -> r) -> r
CertificateState_Registering = CertificateState' "Registering"

{-# COMPLETE
  CertificateState_DeregisterFailed,
  CertificateState_Deregistered,
  CertificateState_Deregistering,
  CertificateState_RegisterFailed,
  CertificateState_Registered,
  CertificateState_Registering,
  CertificateState'
  #-}