{-# 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.FailureReason
-- 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.FailureReason
  ( FailureReason
      ( ..,
        FailureReason_OTHER,
        FailureReason_REQUEST_TIMED_OUT,
        FailureReason_UNSUPPORTED_ALGORITHM
      ),
  )
where

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

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

pattern FailureReason_OTHER :: FailureReason
pattern $bFailureReason_OTHER :: FailureReason
$mFailureReason_OTHER :: forall r. FailureReason -> (Void# -> r) -> (Void# -> r) -> r
FailureReason_OTHER = FailureReason' "OTHER"

pattern FailureReason_REQUEST_TIMED_OUT :: FailureReason
pattern $bFailureReason_REQUEST_TIMED_OUT :: FailureReason
$mFailureReason_REQUEST_TIMED_OUT :: forall r. FailureReason -> (Void# -> r) -> (Void# -> r) -> r
FailureReason_REQUEST_TIMED_OUT = FailureReason' "REQUEST_TIMED_OUT"

pattern FailureReason_UNSUPPORTED_ALGORITHM :: FailureReason
pattern $bFailureReason_UNSUPPORTED_ALGORITHM :: FailureReason
$mFailureReason_UNSUPPORTED_ALGORITHM :: forall r. FailureReason -> (Void# -> r) -> (Void# -> r) -> r
FailureReason_UNSUPPORTED_ALGORITHM = FailureReason' "UNSUPPORTED_ALGORITHM"

{-# COMPLETE
  FailureReason_OTHER,
  FailureReason_REQUEST_TIMED_OUT,
  FailureReason_UNSUPPORTED_ALGORITHM,
  FailureReason'
  #-}