{-# 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.Lambda.Types.StateReasonCode
-- 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.Lambda.Types.StateReasonCode
  ( StateReasonCode
      ( ..,
        StateReasonCode_Creating,
        StateReasonCode_EniLimitExceeded,
        StateReasonCode_Idle,
        StateReasonCode_ImageAccessDenied,
        StateReasonCode_ImageDeleted,
        StateReasonCode_InsufficientRolePermissions,
        StateReasonCode_InternalError,
        StateReasonCode_InvalidConfiguration,
        StateReasonCode_InvalidImage,
        StateReasonCode_InvalidSecurityGroup,
        StateReasonCode_InvalidSubnet,
        StateReasonCode_Restoring,
        StateReasonCode_SubnetOutOfIPAddresses
      ),
  )
where

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

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

pattern StateReasonCode_Creating :: StateReasonCode
pattern $bStateReasonCode_Creating :: StateReasonCode
$mStateReasonCode_Creating :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_Creating = StateReasonCode' "Creating"

pattern StateReasonCode_EniLimitExceeded :: StateReasonCode
pattern $bStateReasonCode_EniLimitExceeded :: StateReasonCode
$mStateReasonCode_EniLimitExceeded :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_EniLimitExceeded = StateReasonCode' "EniLimitExceeded"

pattern StateReasonCode_Idle :: StateReasonCode
pattern $bStateReasonCode_Idle :: StateReasonCode
$mStateReasonCode_Idle :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_Idle = StateReasonCode' "Idle"

pattern StateReasonCode_ImageAccessDenied :: StateReasonCode
pattern $bStateReasonCode_ImageAccessDenied :: StateReasonCode
$mStateReasonCode_ImageAccessDenied :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_ImageAccessDenied = StateReasonCode' "ImageAccessDenied"

pattern StateReasonCode_ImageDeleted :: StateReasonCode
pattern $bStateReasonCode_ImageDeleted :: StateReasonCode
$mStateReasonCode_ImageDeleted :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_ImageDeleted = StateReasonCode' "ImageDeleted"

pattern StateReasonCode_InsufficientRolePermissions :: StateReasonCode
pattern $bStateReasonCode_InsufficientRolePermissions :: StateReasonCode
$mStateReasonCode_InsufficientRolePermissions :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InsufficientRolePermissions = StateReasonCode' "InsufficientRolePermissions"

pattern StateReasonCode_InternalError :: StateReasonCode
pattern $bStateReasonCode_InternalError :: StateReasonCode
$mStateReasonCode_InternalError :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InternalError = StateReasonCode' "InternalError"

pattern StateReasonCode_InvalidConfiguration :: StateReasonCode
pattern $bStateReasonCode_InvalidConfiguration :: StateReasonCode
$mStateReasonCode_InvalidConfiguration :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InvalidConfiguration = StateReasonCode' "InvalidConfiguration"

pattern StateReasonCode_InvalidImage :: StateReasonCode
pattern $bStateReasonCode_InvalidImage :: StateReasonCode
$mStateReasonCode_InvalidImage :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InvalidImage = StateReasonCode' "InvalidImage"

pattern StateReasonCode_InvalidSecurityGroup :: StateReasonCode
pattern $bStateReasonCode_InvalidSecurityGroup :: StateReasonCode
$mStateReasonCode_InvalidSecurityGroup :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InvalidSecurityGroup = StateReasonCode' "InvalidSecurityGroup"

pattern StateReasonCode_InvalidSubnet :: StateReasonCode
pattern $bStateReasonCode_InvalidSubnet :: StateReasonCode
$mStateReasonCode_InvalidSubnet :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_InvalidSubnet = StateReasonCode' "InvalidSubnet"

pattern StateReasonCode_Restoring :: StateReasonCode
pattern $bStateReasonCode_Restoring :: StateReasonCode
$mStateReasonCode_Restoring :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_Restoring = StateReasonCode' "Restoring"

pattern StateReasonCode_SubnetOutOfIPAddresses :: StateReasonCode
pattern $bStateReasonCode_SubnetOutOfIPAddresses :: StateReasonCode
$mStateReasonCode_SubnetOutOfIPAddresses :: forall r. StateReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StateReasonCode_SubnetOutOfIPAddresses = StateReasonCode' "SubnetOutOfIPAddresses"

{-# COMPLETE
  StateReasonCode_Creating,
  StateReasonCode_EniLimitExceeded,
  StateReasonCode_Idle,
  StateReasonCode_ImageAccessDenied,
  StateReasonCode_ImageDeleted,
  StateReasonCode_InsufficientRolePermissions,
  StateReasonCode_InternalError,
  StateReasonCode_InvalidConfiguration,
  StateReasonCode_InvalidImage,
  StateReasonCode_InvalidSecurityGroup,
  StateReasonCode_InvalidSubnet,
  StateReasonCode_Restoring,
  StateReasonCode_SubnetOutOfIPAddresses,
  StateReasonCode'
  #-}