{-# 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.CloudControl.Types.HandlerErrorCode
-- 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.CloudControl.Types.HandlerErrorCode
  ( HandlerErrorCode
      ( ..,
        HandlerErrorCode_AccessDenied,
        HandlerErrorCode_AlreadyExists,
        HandlerErrorCode_GeneralServiceException,
        HandlerErrorCode_InternalFailure,
        HandlerErrorCode_InvalidCredentials,
        HandlerErrorCode_InvalidRequest,
        HandlerErrorCode_NetworkFailure,
        HandlerErrorCode_NotFound,
        HandlerErrorCode_NotStabilized,
        HandlerErrorCode_NotUpdatable,
        HandlerErrorCode_ResourceConflict,
        HandlerErrorCode_ServiceInternalError,
        HandlerErrorCode_ServiceLimitExceeded,
        HandlerErrorCode_ServiceTimeout,
        HandlerErrorCode_Throttling
      ),
  )
where

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pattern HandlerErrorCode_ServiceTimeout :: HandlerErrorCode
pattern $bHandlerErrorCode_ServiceTimeout :: HandlerErrorCode
$mHandlerErrorCode_ServiceTimeout :: forall r. HandlerErrorCode -> (Void# -> r) -> (Void# -> r) -> r
HandlerErrorCode_ServiceTimeout = HandlerErrorCode' "ServiceTimeout"

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

{-# COMPLETE
  HandlerErrorCode_AccessDenied,
  HandlerErrorCode_AlreadyExists,
  HandlerErrorCode_GeneralServiceException,
  HandlerErrorCode_InternalFailure,
  HandlerErrorCode_InvalidCredentials,
  HandlerErrorCode_InvalidRequest,
  HandlerErrorCode_NetworkFailure,
  HandlerErrorCode_NotFound,
  HandlerErrorCode_NotStabilized,
  HandlerErrorCode_NotUpdatable,
  HandlerErrorCode_ResourceConflict,
  HandlerErrorCode_ServiceInternalError,
  HandlerErrorCode_ServiceLimitExceeded,
  HandlerErrorCode_ServiceTimeout,
  HandlerErrorCode_Throttling,
  HandlerErrorCode'
  #-}