{-# 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.AppStream.Types.StackErrorCode
-- 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.AppStream.Types.StackErrorCode
  ( StackErrorCode
      ( ..,
        StackErrorCode_INTERNAL_SERVICE_ERROR,
        StackErrorCode_STORAGE_CONNECTOR_ERROR
      ),
  )
where

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

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

pattern StackErrorCode_INTERNAL_SERVICE_ERROR :: StackErrorCode
pattern $bStackErrorCode_INTERNAL_SERVICE_ERROR :: StackErrorCode
$mStackErrorCode_INTERNAL_SERVICE_ERROR :: forall r. StackErrorCode -> (Void# -> r) -> (Void# -> r) -> r
StackErrorCode_INTERNAL_SERVICE_ERROR = StackErrorCode' "INTERNAL_SERVICE_ERROR"

pattern StackErrorCode_STORAGE_CONNECTOR_ERROR :: StackErrorCode
pattern $bStackErrorCode_STORAGE_CONNECTOR_ERROR :: StackErrorCode
$mStackErrorCode_STORAGE_CONNECTOR_ERROR :: forall r. StackErrorCode -> (Void# -> r) -> (Void# -> r) -> r
StackErrorCode_STORAGE_CONNECTOR_ERROR = StackErrorCode' "STORAGE_CONNECTOR_ERROR"

{-# COMPLETE
  StackErrorCode_INTERNAL_SERVICE_ERROR,
  StackErrorCode_STORAGE_CONNECTOR_ERROR,
  StackErrorCode'
  #-}