{-# 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.EKS.Types.EKSErrorCode
-- 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.EKS.Types.EKSErrorCode
  ( EKSErrorCode
      ( ..,
        EKSErrorCode_AccessDenied,
        EKSErrorCode_AdmissionRequestDenied,
        EKSErrorCode_ClusterUnreachable,
        EKSErrorCode_ConfigurationConflict,
        EKSErrorCode_EniLimitReached,
        EKSErrorCode_InsufficientFreeAddresses,
        EKSErrorCode_InsufficientNumberOfReplicas,
        EKSErrorCode_IpNotAvailable,
        EKSErrorCode_K8sResourceNotFound,
        EKSErrorCode_NodeCreationFailure,
        EKSErrorCode_OperationNotPermitted,
        EKSErrorCode_PodEvictionFailure,
        EKSErrorCode_SecurityGroupNotFound,
        EKSErrorCode_SubnetNotFound,
        EKSErrorCode_Unknown,
        EKSErrorCode_UnsupportedAddonModification,
        EKSErrorCode_VpcIdNotFound
      ),
  )
where

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

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

pattern EKSErrorCode_AccessDenied :: EKSErrorCode
pattern $bEKSErrorCode_AccessDenied :: EKSErrorCode
$mEKSErrorCode_AccessDenied :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_AccessDenied = EKSErrorCode' "AccessDenied"

pattern EKSErrorCode_AdmissionRequestDenied :: EKSErrorCode
pattern $bEKSErrorCode_AdmissionRequestDenied :: EKSErrorCode
$mEKSErrorCode_AdmissionRequestDenied :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_AdmissionRequestDenied = EKSErrorCode' "AdmissionRequestDenied"

pattern EKSErrorCode_ClusterUnreachable :: EKSErrorCode
pattern $bEKSErrorCode_ClusterUnreachable :: EKSErrorCode
$mEKSErrorCode_ClusterUnreachable :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_ClusterUnreachable = EKSErrorCode' "ClusterUnreachable"

pattern EKSErrorCode_ConfigurationConflict :: EKSErrorCode
pattern $bEKSErrorCode_ConfigurationConflict :: EKSErrorCode
$mEKSErrorCode_ConfigurationConflict :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_ConfigurationConflict = EKSErrorCode' "ConfigurationConflict"

pattern EKSErrorCode_EniLimitReached :: EKSErrorCode
pattern $bEKSErrorCode_EniLimitReached :: EKSErrorCode
$mEKSErrorCode_EniLimitReached :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_EniLimitReached = EKSErrorCode' "EniLimitReached"

pattern EKSErrorCode_InsufficientFreeAddresses :: EKSErrorCode
pattern $bEKSErrorCode_InsufficientFreeAddresses :: EKSErrorCode
$mEKSErrorCode_InsufficientFreeAddresses :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_InsufficientFreeAddresses = EKSErrorCode' "InsufficientFreeAddresses"

pattern EKSErrorCode_InsufficientNumberOfReplicas :: EKSErrorCode
pattern $bEKSErrorCode_InsufficientNumberOfReplicas :: EKSErrorCode
$mEKSErrorCode_InsufficientNumberOfReplicas :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_InsufficientNumberOfReplicas = EKSErrorCode' "InsufficientNumberOfReplicas"

pattern EKSErrorCode_IpNotAvailable :: EKSErrorCode
pattern $bEKSErrorCode_IpNotAvailable :: EKSErrorCode
$mEKSErrorCode_IpNotAvailable :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_IpNotAvailable = EKSErrorCode' "IpNotAvailable"

pattern EKSErrorCode_K8sResourceNotFound :: EKSErrorCode
pattern $bEKSErrorCode_K8sResourceNotFound :: EKSErrorCode
$mEKSErrorCode_K8sResourceNotFound :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_K8sResourceNotFound = EKSErrorCode' "K8sResourceNotFound"

pattern EKSErrorCode_NodeCreationFailure :: EKSErrorCode
pattern $bEKSErrorCode_NodeCreationFailure :: EKSErrorCode
$mEKSErrorCode_NodeCreationFailure :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_NodeCreationFailure = EKSErrorCode' "NodeCreationFailure"

pattern EKSErrorCode_OperationNotPermitted :: EKSErrorCode
pattern $bEKSErrorCode_OperationNotPermitted :: EKSErrorCode
$mEKSErrorCode_OperationNotPermitted :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_OperationNotPermitted = EKSErrorCode' "OperationNotPermitted"

pattern EKSErrorCode_PodEvictionFailure :: EKSErrorCode
pattern $bEKSErrorCode_PodEvictionFailure :: EKSErrorCode
$mEKSErrorCode_PodEvictionFailure :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_PodEvictionFailure = EKSErrorCode' "PodEvictionFailure"

pattern EKSErrorCode_SecurityGroupNotFound :: EKSErrorCode
pattern $bEKSErrorCode_SecurityGroupNotFound :: EKSErrorCode
$mEKSErrorCode_SecurityGroupNotFound :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_SecurityGroupNotFound = EKSErrorCode' "SecurityGroupNotFound"

pattern EKSErrorCode_SubnetNotFound :: EKSErrorCode
pattern $bEKSErrorCode_SubnetNotFound :: EKSErrorCode
$mEKSErrorCode_SubnetNotFound :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_SubnetNotFound = EKSErrorCode' "SubnetNotFound"

pattern EKSErrorCode_Unknown :: EKSErrorCode
pattern $bEKSErrorCode_Unknown :: EKSErrorCode
$mEKSErrorCode_Unknown :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_Unknown = EKSErrorCode' "Unknown"

pattern EKSErrorCode_UnsupportedAddonModification :: EKSErrorCode
pattern $bEKSErrorCode_UnsupportedAddonModification :: EKSErrorCode
$mEKSErrorCode_UnsupportedAddonModification :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_UnsupportedAddonModification = EKSErrorCode' "UnsupportedAddonModification"

pattern EKSErrorCode_VpcIdNotFound :: EKSErrorCode
pattern $bEKSErrorCode_VpcIdNotFound :: EKSErrorCode
$mEKSErrorCode_VpcIdNotFound :: forall r. EKSErrorCode -> (Void# -> r) -> (Void# -> r) -> r
EKSErrorCode_VpcIdNotFound = EKSErrorCode' "VpcIdNotFound"

{-# COMPLETE
  EKSErrorCode_AccessDenied,
  EKSErrorCode_AdmissionRequestDenied,
  EKSErrorCode_ClusterUnreachable,
  EKSErrorCode_ConfigurationConflict,
  EKSErrorCode_EniLimitReached,
  EKSErrorCode_InsufficientFreeAddresses,
  EKSErrorCode_InsufficientNumberOfReplicas,
  EKSErrorCode_IpNotAvailable,
  EKSErrorCode_K8sResourceNotFound,
  EKSErrorCode_NodeCreationFailure,
  EKSErrorCode_OperationNotPermitted,
  EKSErrorCode_PodEvictionFailure,
  EKSErrorCode_SecurityGroupNotFound,
  EKSErrorCode_SubnetNotFound,
  EKSErrorCode_Unknown,
  EKSErrorCode_UnsupportedAddonModification,
  EKSErrorCode_VpcIdNotFound,
  EKSErrorCode'
  #-}