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

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

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

pattern ErrorCause_IAM_PERMISSION_REVOKED :: ErrorCause
pattern $bErrorCause_IAM_PERMISSION_REVOKED :: ErrorCause
$mErrorCause_IAM_PERMISSION_REVOKED :: forall r. ErrorCause -> (Void# -> r) -> (Void# -> 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 -> (Void# -> r) -> (Void# -> r) -> r
ErrorCause_KINESIS_STREAM_NOT_FOUND = ErrorCause' "KINESIS_STREAM_NOT_FOUND"

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