{-# 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.InstanceStateChangeReasonCode
-- 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.InstanceStateChangeReasonCode
  ( InstanceStateChangeReasonCode
      ( ..,
        InstanceStateChangeReasonCode_BOOTSTRAP_FAILURE,
        InstanceStateChangeReasonCode_CLUSTER_TERMINATED,
        InstanceStateChangeReasonCode_INSTANCE_FAILURE,
        InstanceStateChangeReasonCode_INTERNAL_ERROR,
        InstanceStateChangeReasonCode_VALIDATION_ERROR
      ),
  )
where

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

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

pattern InstanceStateChangeReasonCode_BOOTSTRAP_FAILURE :: InstanceStateChangeReasonCode
pattern $bInstanceStateChangeReasonCode_BOOTSTRAP_FAILURE :: InstanceStateChangeReasonCode
$mInstanceStateChangeReasonCode_BOOTSTRAP_FAILURE :: forall r.
InstanceStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateChangeReasonCode_BOOTSTRAP_FAILURE = InstanceStateChangeReasonCode' "BOOTSTRAP_FAILURE"

pattern InstanceStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceStateChangeReasonCode
pattern $bInstanceStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceStateChangeReasonCode
$mInstanceStateChangeReasonCode_CLUSTER_TERMINATED :: forall r.
InstanceStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateChangeReasonCode_CLUSTER_TERMINATED = InstanceStateChangeReasonCode' "CLUSTER_TERMINATED"

pattern InstanceStateChangeReasonCode_INSTANCE_FAILURE :: InstanceStateChangeReasonCode
pattern $bInstanceStateChangeReasonCode_INSTANCE_FAILURE :: InstanceStateChangeReasonCode
$mInstanceStateChangeReasonCode_INSTANCE_FAILURE :: forall r.
InstanceStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateChangeReasonCode_INSTANCE_FAILURE = InstanceStateChangeReasonCode' "INSTANCE_FAILURE"

pattern InstanceStateChangeReasonCode_INTERNAL_ERROR :: InstanceStateChangeReasonCode
pattern $bInstanceStateChangeReasonCode_INTERNAL_ERROR :: InstanceStateChangeReasonCode
$mInstanceStateChangeReasonCode_INTERNAL_ERROR :: forall r.
InstanceStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateChangeReasonCode_INTERNAL_ERROR = InstanceStateChangeReasonCode' "INTERNAL_ERROR"

pattern InstanceStateChangeReasonCode_VALIDATION_ERROR :: InstanceStateChangeReasonCode
pattern $bInstanceStateChangeReasonCode_VALIDATION_ERROR :: InstanceStateChangeReasonCode
$mInstanceStateChangeReasonCode_VALIDATION_ERROR :: forall r.
InstanceStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
InstanceStateChangeReasonCode_VALIDATION_ERROR = InstanceStateChangeReasonCode' "VALIDATION_ERROR"

{-# COMPLETE
  InstanceStateChangeReasonCode_BOOTSTRAP_FAILURE,
  InstanceStateChangeReasonCode_CLUSTER_TERMINATED,
  InstanceStateChangeReasonCode_INSTANCE_FAILURE,
  InstanceStateChangeReasonCode_INTERNAL_ERROR,
  InstanceStateChangeReasonCode_VALIDATION_ERROR,
  InstanceStateChangeReasonCode'
  #-}