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

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

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

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

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

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