{-# 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.QLDB.Types.ErrorCause
-- 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.QLDB.Types.ErrorCause
  ( ErrorCause
      ( ..,
        ErrorCause_IAM_PERMISSION_REVOKED,
        ErrorCause_KINESIS_STREAM_NOT_FOUND
      ),
  )
where

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

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

pattern ErrorCause_IAM_PERMISSION_REVOKED :: ErrorCause
pattern $bErrorCause_IAM_PERMISSION_REVOKED :: ErrorCause
$mErrorCause_IAM_PERMISSION_REVOKED :: forall {r}. ErrorCause -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCause_IAM_PERMISSION_REVOKED = ErrorCause' "IAM_PERMISSION_REVOKED"

pattern ErrorCause_KINESIS_STREAM_NOT_FOUND :: ErrorCause
pattern $bErrorCause_KINESIS_STREAM_NOT_FOUND :: ErrorCause
$mErrorCause_KINESIS_STREAM_NOT_FOUND :: forall {r}. ErrorCause -> ((# #) -> r) -> ((# #) -> r) -> r
ErrorCause_KINESIS_STREAM_NOT_FOUND = ErrorCause' "KINESIS_STREAM_NOT_FOUND"

{-# COMPLETE
  ErrorCause_IAM_PERMISSION_REVOKED,
  ErrorCause_KINESIS_STREAM_NOT_FOUND,
  ErrorCause'
  #-}