{-# 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.MigrationHubStrategy.Types.ServerErrorCategory
-- 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.MigrationHubStrategy.Types.ServerErrorCategory
  ( ServerErrorCategory
      ( ..,
        ServerErrorCategory_ARCHITECTURE_ERROR,
        ServerErrorCategory_CONNECTIVITY_ERROR,
        ServerErrorCategory_CREDENTIAL_ERROR,
        ServerErrorCategory_OTHER_ERROR,
        ServerErrorCategory_PERMISSION_ERROR
      ),
  )
where

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

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

pattern ServerErrorCategory_ARCHITECTURE_ERROR :: ServerErrorCategory
pattern $bServerErrorCategory_ARCHITECTURE_ERROR :: ServerErrorCategory
$mServerErrorCategory_ARCHITECTURE_ERROR :: forall {r}.
ServerErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ServerErrorCategory_ARCHITECTURE_ERROR = ServerErrorCategory' "ARCHITECTURE_ERROR"

pattern ServerErrorCategory_CONNECTIVITY_ERROR :: ServerErrorCategory
pattern $bServerErrorCategory_CONNECTIVITY_ERROR :: ServerErrorCategory
$mServerErrorCategory_CONNECTIVITY_ERROR :: forall {r}.
ServerErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ServerErrorCategory_CONNECTIVITY_ERROR = ServerErrorCategory' "CONNECTIVITY_ERROR"

pattern ServerErrorCategory_CREDENTIAL_ERROR :: ServerErrorCategory
pattern $bServerErrorCategory_CREDENTIAL_ERROR :: ServerErrorCategory
$mServerErrorCategory_CREDENTIAL_ERROR :: forall {r}.
ServerErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ServerErrorCategory_CREDENTIAL_ERROR = ServerErrorCategory' "CREDENTIAL_ERROR"

pattern ServerErrorCategory_OTHER_ERROR :: ServerErrorCategory
pattern $bServerErrorCategory_OTHER_ERROR :: ServerErrorCategory
$mServerErrorCategory_OTHER_ERROR :: forall {r}.
ServerErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ServerErrorCategory_OTHER_ERROR = ServerErrorCategory' "OTHER_ERROR"

pattern ServerErrorCategory_PERMISSION_ERROR :: ServerErrorCategory
pattern $bServerErrorCategory_PERMISSION_ERROR :: ServerErrorCategory
$mServerErrorCategory_PERMISSION_ERROR :: forall {r}.
ServerErrorCategory -> ((# #) -> r) -> ((# #) -> r) -> r
ServerErrorCategory_PERMISSION_ERROR = ServerErrorCategory' "PERMISSION_ERROR"

{-# COMPLETE
  ServerErrorCategory_ARCHITECTURE_ERROR,
  ServerErrorCategory_CONNECTIVITY_ERROR,
  ServerErrorCategory_CREDENTIAL_ERROR,
  ServerErrorCategory_OTHER_ERROR,
  ServerErrorCategory_PERMISSION_ERROR,
  ServerErrorCategory'
  #-}