{-# 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.EMR.Types.InstanceGroupStateChangeReasonCode
-- 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.EMR.Types.InstanceGroupStateChangeReasonCode
  ( InstanceGroupStateChangeReasonCode
      ( ..,
        InstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED,
        InstanceGroupStateChangeReasonCode_INSTANCE_FAILURE,
        InstanceGroupStateChangeReasonCode_INTERNAL_ERROR,
        InstanceGroupStateChangeReasonCode_VALIDATION_ERROR
      ),
  )
where

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

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

pattern InstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceGroupStateChangeReasonCode
pattern $bInstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceGroupStateChangeReasonCode
$mInstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED :: forall r.
InstanceGroupStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED = InstanceGroupStateChangeReasonCode' "CLUSTER_TERMINATED"

pattern InstanceGroupStateChangeReasonCode_INSTANCE_FAILURE :: InstanceGroupStateChangeReasonCode
pattern $bInstanceGroupStateChangeReasonCode_INSTANCE_FAILURE :: InstanceGroupStateChangeReasonCode
$mInstanceGroupStateChangeReasonCode_INSTANCE_FAILURE :: forall r.
InstanceGroupStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupStateChangeReasonCode_INSTANCE_FAILURE = InstanceGroupStateChangeReasonCode' "INSTANCE_FAILURE"

pattern InstanceGroupStateChangeReasonCode_INTERNAL_ERROR :: InstanceGroupStateChangeReasonCode
pattern $bInstanceGroupStateChangeReasonCode_INTERNAL_ERROR :: InstanceGroupStateChangeReasonCode
$mInstanceGroupStateChangeReasonCode_INTERNAL_ERROR :: forall r.
InstanceGroupStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupStateChangeReasonCode_INTERNAL_ERROR = InstanceGroupStateChangeReasonCode' "INTERNAL_ERROR"

pattern InstanceGroupStateChangeReasonCode_VALIDATION_ERROR :: InstanceGroupStateChangeReasonCode
pattern $bInstanceGroupStateChangeReasonCode_VALIDATION_ERROR :: InstanceGroupStateChangeReasonCode
$mInstanceGroupStateChangeReasonCode_VALIDATION_ERROR :: forall r.
InstanceGroupStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceGroupStateChangeReasonCode_VALIDATION_ERROR = InstanceGroupStateChangeReasonCode' "VALIDATION_ERROR"

{-# COMPLETE
  InstanceGroupStateChangeReasonCode_CLUSTER_TERMINATED,
  InstanceGroupStateChangeReasonCode_INSTANCE_FAILURE,
  InstanceGroupStateChangeReasonCode_INTERNAL_ERROR,
  InstanceGroupStateChangeReasonCode_VALIDATION_ERROR,
  InstanceGroupStateChangeReasonCode'
  #-}