{-# 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.ChimeSDKMessaging.Types.ErrorCode
-- 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.ChimeSDKMessaging.Types.ErrorCode
  ( ErrorCode
      ( ..,
        ErrorCode_AccessDenied,
        ErrorCode_BadRequest,
        ErrorCode_Conflict,
        ErrorCode_Forbidden,
        ErrorCode_NotFound,
        ErrorCode_PhoneNumberAssociationsExist,
        ErrorCode_PreconditionFailed,
        ErrorCode_ResourceLimitExceeded,
        ErrorCode_ServiceFailure,
        ErrorCode_ServiceUnavailable,
        ErrorCode_Throttled,
        ErrorCode_Throttling,
        ErrorCode_Unauthorized,
        ErrorCode_Unprocessable,
        ErrorCode_VoiceConnectorGroupAssociationsExist
      ),
  )
where

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

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

pattern ErrorCode_AccessDenied :: ErrorCode
pattern $bErrorCode_AccessDenied :: ErrorCode
$mErrorCode_AccessDenied :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_AccessDenied = ErrorCode' "AccessDenied"

pattern ErrorCode_BadRequest :: ErrorCode
pattern $bErrorCode_BadRequest :: ErrorCode
$mErrorCode_BadRequest :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_BadRequest = ErrorCode' "BadRequest"

pattern ErrorCode_Conflict :: ErrorCode
pattern $bErrorCode_Conflict :: ErrorCode
$mErrorCode_Conflict :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Conflict = ErrorCode' "Conflict"

pattern ErrorCode_Forbidden :: ErrorCode
pattern $bErrorCode_Forbidden :: ErrorCode
$mErrorCode_Forbidden :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Forbidden = ErrorCode' "Forbidden"

pattern ErrorCode_NotFound :: ErrorCode
pattern $bErrorCode_NotFound :: ErrorCode
$mErrorCode_NotFound :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_NotFound = ErrorCode' "NotFound"

pattern ErrorCode_PhoneNumberAssociationsExist :: ErrorCode
pattern $bErrorCode_PhoneNumberAssociationsExist :: ErrorCode
$mErrorCode_PhoneNumberAssociationsExist :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_PhoneNumberAssociationsExist = ErrorCode' "PhoneNumberAssociationsExist"

pattern ErrorCode_PreconditionFailed :: ErrorCode
pattern $bErrorCode_PreconditionFailed :: ErrorCode
$mErrorCode_PreconditionFailed :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_PreconditionFailed = ErrorCode' "PreconditionFailed"

pattern ErrorCode_ResourceLimitExceeded :: ErrorCode
pattern $bErrorCode_ResourceLimitExceeded :: ErrorCode
$mErrorCode_ResourceLimitExceeded :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_ResourceLimitExceeded = ErrorCode' "ResourceLimitExceeded"

pattern ErrorCode_ServiceFailure :: ErrorCode
pattern $bErrorCode_ServiceFailure :: ErrorCode
$mErrorCode_ServiceFailure :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_ServiceFailure = ErrorCode' "ServiceFailure"

pattern ErrorCode_ServiceUnavailable :: ErrorCode
pattern $bErrorCode_ServiceUnavailable :: ErrorCode
$mErrorCode_ServiceUnavailable :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_ServiceUnavailable = ErrorCode' "ServiceUnavailable"

pattern ErrorCode_Throttled :: ErrorCode
pattern $bErrorCode_Throttled :: ErrorCode
$mErrorCode_Throttled :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Throttled = ErrorCode' "Throttled"

pattern ErrorCode_Throttling :: ErrorCode
pattern $bErrorCode_Throttling :: ErrorCode
$mErrorCode_Throttling :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Throttling = ErrorCode' "Throttling"

pattern ErrorCode_Unauthorized :: ErrorCode
pattern $bErrorCode_Unauthorized :: ErrorCode
$mErrorCode_Unauthorized :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Unauthorized = ErrorCode' "Unauthorized"

pattern ErrorCode_Unprocessable :: ErrorCode
pattern $bErrorCode_Unprocessable :: ErrorCode
$mErrorCode_Unprocessable :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_Unprocessable = ErrorCode' "Unprocessable"

pattern ErrorCode_VoiceConnectorGroupAssociationsExist :: ErrorCode
pattern $bErrorCode_VoiceConnectorGroupAssociationsExist :: ErrorCode
$mErrorCode_VoiceConnectorGroupAssociationsExist :: forall r. ErrorCode -> (Void# -> r) -> (Void# -> r) -> r
ErrorCode_VoiceConnectorGroupAssociationsExist = ErrorCode' "VoiceConnectorGroupAssociationsExist"

{-# COMPLETE
  ErrorCode_AccessDenied,
  ErrorCode_BadRequest,
  ErrorCode_Conflict,
  ErrorCode_Forbidden,
  ErrorCode_NotFound,
  ErrorCode_PhoneNumberAssociationsExist,
  ErrorCode_PreconditionFailed,
  ErrorCode_ResourceLimitExceeded,
  ErrorCode_ServiceFailure,
  ErrorCode_ServiceUnavailable,
  ErrorCode_Throttled,
  ErrorCode_Throttling,
  ErrorCode_Unauthorized,
  ErrorCode_Unprocessable,
  ErrorCode_VoiceConnectorGroupAssociationsExist,
  ErrorCode'
  #-}