{-# 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.CognitoIdentity.Types.CognitoErrorCode
-- 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.CognitoIdentity.Types.CognitoErrorCode
  ( CognitoErrorCode
      ( ..,
        CognitoErrorCode_AccessDenied,
        CognitoErrorCode_InternalServerError
      ),
  )
where

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

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

pattern CognitoErrorCode_AccessDenied :: CognitoErrorCode
pattern $bCognitoErrorCode_AccessDenied :: CognitoErrorCode
$mCognitoErrorCode_AccessDenied :: forall {r}. CognitoErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CognitoErrorCode_AccessDenied = CognitoErrorCode' "AccessDenied"

pattern CognitoErrorCode_InternalServerError :: CognitoErrorCode
pattern $bCognitoErrorCode_InternalServerError :: CognitoErrorCode
$mCognitoErrorCode_InternalServerError :: forall {r}. CognitoErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CognitoErrorCode_InternalServerError = CognitoErrorCode' "InternalServerError"

{-# COMPLETE
  CognitoErrorCode_AccessDenied,
  CognitoErrorCode_InternalServerError,
  CognitoErrorCode'
  #-}