{-# 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.CloudFormation.Types.HandlerErrorCode
-- 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.CloudFormation.Types.HandlerErrorCode
  ( HandlerErrorCode
      ( ..,
        HandlerErrorCode_AccessDenied,
        HandlerErrorCode_AlreadyExists,
        HandlerErrorCode_GeneralServiceException,
        HandlerErrorCode_HandlerInternalFailure,
        HandlerErrorCode_InternalFailure,
        HandlerErrorCode_InvalidCredentials,
        HandlerErrorCode_InvalidRequest,
        HandlerErrorCode_InvalidTypeConfiguration,
        HandlerErrorCode_NetworkFailure,
        HandlerErrorCode_NonCompliant,
        HandlerErrorCode_NotFound,
        HandlerErrorCode_NotStabilized,
        HandlerErrorCode_NotUpdatable,
        HandlerErrorCode_ResourceConflict,
        HandlerErrorCode_ServiceInternalError,
        HandlerErrorCode_ServiceLimitExceeded,
        HandlerErrorCode_Throttling,
        HandlerErrorCode_Unknown,
        HandlerErrorCode_UnsupportedTarget
      ),
  )
where

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

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

pattern HandlerErrorCode_AccessDenied :: HandlerErrorCode
pattern $bHandlerErrorCode_AccessDenied :: HandlerErrorCode
$mHandlerErrorCode_AccessDenied :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_AccessDenied = HandlerErrorCode' "AccessDenied"

pattern HandlerErrorCode_AlreadyExists :: HandlerErrorCode
pattern $bHandlerErrorCode_AlreadyExists :: HandlerErrorCode
$mHandlerErrorCode_AlreadyExists :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_AlreadyExists = HandlerErrorCode' "AlreadyExists"

pattern HandlerErrorCode_GeneralServiceException :: HandlerErrorCode
pattern $bHandlerErrorCode_GeneralServiceException :: HandlerErrorCode
$mHandlerErrorCode_GeneralServiceException :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_GeneralServiceException = HandlerErrorCode' "GeneralServiceException"

pattern HandlerErrorCode_HandlerInternalFailure :: HandlerErrorCode
pattern $bHandlerErrorCode_HandlerInternalFailure :: HandlerErrorCode
$mHandlerErrorCode_HandlerInternalFailure :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_HandlerInternalFailure = HandlerErrorCode' "HandlerInternalFailure"

pattern HandlerErrorCode_InternalFailure :: HandlerErrorCode
pattern $bHandlerErrorCode_InternalFailure :: HandlerErrorCode
$mHandlerErrorCode_InternalFailure :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_InternalFailure = HandlerErrorCode' "InternalFailure"

pattern HandlerErrorCode_InvalidCredentials :: HandlerErrorCode
pattern $bHandlerErrorCode_InvalidCredentials :: HandlerErrorCode
$mHandlerErrorCode_InvalidCredentials :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_InvalidCredentials = HandlerErrorCode' "InvalidCredentials"

pattern HandlerErrorCode_InvalidRequest :: HandlerErrorCode
pattern $bHandlerErrorCode_InvalidRequest :: HandlerErrorCode
$mHandlerErrorCode_InvalidRequest :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_InvalidRequest = HandlerErrorCode' "InvalidRequest"

pattern HandlerErrorCode_InvalidTypeConfiguration :: HandlerErrorCode
pattern $bHandlerErrorCode_InvalidTypeConfiguration :: HandlerErrorCode
$mHandlerErrorCode_InvalidTypeConfiguration :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_InvalidTypeConfiguration = HandlerErrorCode' "InvalidTypeConfiguration"

pattern HandlerErrorCode_NetworkFailure :: HandlerErrorCode
pattern $bHandlerErrorCode_NetworkFailure :: HandlerErrorCode
$mHandlerErrorCode_NetworkFailure :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_NetworkFailure = HandlerErrorCode' "NetworkFailure"

pattern HandlerErrorCode_NonCompliant :: HandlerErrorCode
pattern $bHandlerErrorCode_NonCompliant :: HandlerErrorCode
$mHandlerErrorCode_NonCompliant :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_NonCompliant = HandlerErrorCode' "NonCompliant"

pattern HandlerErrorCode_NotFound :: HandlerErrorCode
pattern $bHandlerErrorCode_NotFound :: HandlerErrorCode
$mHandlerErrorCode_NotFound :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_NotFound = HandlerErrorCode' "NotFound"

pattern HandlerErrorCode_NotStabilized :: HandlerErrorCode
pattern $bHandlerErrorCode_NotStabilized :: HandlerErrorCode
$mHandlerErrorCode_NotStabilized :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_NotStabilized = HandlerErrorCode' "NotStabilized"

pattern HandlerErrorCode_NotUpdatable :: HandlerErrorCode
pattern $bHandlerErrorCode_NotUpdatable :: HandlerErrorCode
$mHandlerErrorCode_NotUpdatable :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_NotUpdatable = HandlerErrorCode' "NotUpdatable"

pattern HandlerErrorCode_ResourceConflict :: HandlerErrorCode
pattern $bHandlerErrorCode_ResourceConflict :: HandlerErrorCode
$mHandlerErrorCode_ResourceConflict :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_ResourceConflict = HandlerErrorCode' "ResourceConflict"

pattern HandlerErrorCode_ServiceInternalError :: HandlerErrorCode
pattern $bHandlerErrorCode_ServiceInternalError :: HandlerErrorCode
$mHandlerErrorCode_ServiceInternalError :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_ServiceInternalError = HandlerErrorCode' "ServiceInternalError"

pattern HandlerErrorCode_ServiceLimitExceeded :: HandlerErrorCode
pattern $bHandlerErrorCode_ServiceLimitExceeded :: HandlerErrorCode
$mHandlerErrorCode_ServiceLimitExceeded :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_ServiceLimitExceeded = HandlerErrorCode' "ServiceLimitExceeded"

pattern HandlerErrorCode_Throttling :: HandlerErrorCode
pattern $bHandlerErrorCode_Throttling :: HandlerErrorCode
$mHandlerErrorCode_Throttling :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_Throttling = HandlerErrorCode' "Throttling"

pattern HandlerErrorCode_Unknown :: HandlerErrorCode
pattern $bHandlerErrorCode_Unknown :: HandlerErrorCode
$mHandlerErrorCode_Unknown :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_Unknown = HandlerErrorCode' "Unknown"

pattern HandlerErrorCode_UnsupportedTarget :: HandlerErrorCode
pattern $bHandlerErrorCode_UnsupportedTarget :: HandlerErrorCode
$mHandlerErrorCode_UnsupportedTarget :: forall {r}. HandlerErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
HandlerErrorCode_UnsupportedTarget = HandlerErrorCode' "UnsupportedTarget"

{-# COMPLETE
  HandlerErrorCode_AccessDenied,
  HandlerErrorCode_AlreadyExists,
  HandlerErrorCode_GeneralServiceException,
  HandlerErrorCode_HandlerInternalFailure,
  HandlerErrorCode_InternalFailure,
  HandlerErrorCode_InvalidCredentials,
  HandlerErrorCode_InvalidRequest,
  HandlerErrorCode_InvalidTypeConfiguration,
  HandlerErrorCode_NetworkFailure,
  HandlerErrorCode_NonCompliant,
  HandlerErrorCode_NotFound,
  HandlerErrorCode_NotStabilized,
  HandlerErrorCode_NotUpdatable,
  HandlerErrorCode_ResourceConflict,
  HandlerErrorCode_ServiceInternalError,
  HandlerErrorCode_ServiceLimitExceeded,
  HandlerErrorCode_Throttling,
  HandlerErrorCode_Unknown,
  HandlerErrorCode_UnsupportedTarget,
  HandlerErrorCode'
  #-}