{-# 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.FinSpaceData.Types.ErrorCategory
-- 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.FinSpaceData.Types.ErrorCategory
  ( ErrorCategory
      ( ..,
        ErrorCategory_ACCESS_DENIED,
        ErrorCategory_CANCELLED,
        ErrorCategory_INTERNAL_SERVICE_EXCEPTION,
        ErrorCategory_RESOURCE_NOT_FOUND,
        ErrorCategory_SERVICE_QUOTA_EXCEEDED,
        ErrorCategory_THROTTLING,
        ErrorCategory_USER_RECOVERABLE,
        ErrorCategory_VALIDATION
      ),
  )
where

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

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

pattern ErrorCategory_ACCESS_DENIED :: ErrorCategory
pattern $bErrorCategory_ACCESS_DENIED :: ErrorCategory
$mErrorCategory_ACCESS_DENIED :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_ACCESS_DENIED = ErrorCategory' "ACCESS_DENIED"

pattern ErrorCategory_CANCELLED :: ErrorCategory
pattern $bErrorCategory_CANCELLED :: ErrorCategory
$mErrorCategory_CANCELLED :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_CANCELLED = ErrorCategory' "CANCELLED"

pattern ErrorCategory_INTERNAL_SERVICE_EXCEPTION :: ErrorCategory
pattern $bErrorCategory_INTERNAL_SERVICE_EXCEPTION :: ErrorCategory
$mErrorCategory_INTERNAL_SERVICE_EXCEPTION :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_INTERNAL_SERVICE_EXCEPTION = ErrorCategory' "INTERNAL_SERVICE_EXCEPTION"

pattern ErrorCategory_RESOURCE_NOT_FOUND :: ErrorCategory
pattern $bErrorCategory_RESOURCE_NOT_FOUND :: ErrorCategory
$mErrorCategory_RESOURCE_NOT_FOUND :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_RESOURCE_NOT_FOUND = ErrorCategory' "RESOURCE_NOT_FOUND"

pattern ErrorCategory_SERVICE_QUOTA_EXCEEDED :: ErrorCategory
pattern $bErrorCategory_SERVICE_QUOTA_EXCEEDED :: ErrorCategory
$mErrorCategory_SERVICE_QUOTA_EXCEEDED :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_SERVICE_QUOTA_EXCEEDED = ErrorCategory' "SERVICE_QUOTA_EXCEEDED"

pattern ErrorCategory_THROTTLING :: ErrorCategory
pattern $bErrorCategory_THROTTLING :: ErrorCategory
$mErrorCategory_THROTTLING :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_THROTTLING = ErrorCategory' "THROTTLING"

pattern ErrorCategory_USER_RECOVERABLE :: ErrorCategory
pattern $bErrorCategory_USER_RECOVERABLE :: ErrorCategory
$mErrorCategory_USER_RECOVERABLE :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_USER_RECOVERABLE = ErrorCategory' "USER_RECOVERABLE"

pattern ErrorCategory_VALIDATION :: ErrorCategory
pattern $bErrorCategory_VALIDATION :: ErrorCategory
$mErrorCategory_VALIDATION :: forall {r}. ErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCategory_VALIDATION = ErrorCategory' "VALIDATION"

{-# COMPLETE
  ErrorCategory_ACCESS_DENIED,
  ErrorCategory_CANCELLED,
  ErrorCategory_INTERNAL_SERVICE_EXCEPTION,
  ErrorCategory_RESOURCE_NOT_FOUND,
  ErrorCategory_SERVICE_QUOTA_EXCEEDED,
  ErrorCategory_THROTTLING,
  ErrorCategory_USER_RECOVERABLE,
  ErrorCategory_VALIDATION,
  ErrorCategory'
  #-}