{-# 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.InstanceFleetStateChangeReasonCode
-- 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.InstanceFleetStateChangeReasonCode
  ( InstanceFleetStateChangeReasonCode
      ( ..,
        InstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED,
        InstanceFleetStateChangeReasonCode_INSTANCE_FAILURE,
        InstanceFleetStateChangeReasonCode_INTERNAL_ERROR,
        InstanceFleetStateChangeReasonCode_VALIDATION_ERROR
      ),
  )
where

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

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

pattern InstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceFleetStateChangeReasonCode
pattern $bInstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED :: InstanceFleetStateChangeReasonCode
$mInstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED :: forall r.
InstanceFleetStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED = InstanceFleetStateChangeReasonCode' "CLUSTER_TERMINATED"

pattern InstanceFleetStateChangeReasonCode_INSTANCE_FAILURE :: InstanceFleetStateChangeReasonCode
pattern $bInstanceFleetStateChangeReasonCode_INSTANCE_FAILURE :: InstanceFleetStateChangeReasonCode
$mInstanceFleetStateChangeReasonCode_INSTANCE_FAILURE :: forall r.
InstanceFleetStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceFleetStateChangeReasonCode_INSTANCE_FAILURE = InstanceFleetStateChangeReasonCode' "INSTANCE_FAILURE"

pattern InstanceFleetStateChangeReasonCode_INTERNAL_ERROR :: InstanceFleetStateChangeReasonCode
pattern $bInstanceFleetStateChangeReasonCode_INTERNAL_ERROR :: InstanceFleetStateChangeReasonCode
$mInstanceFleetStateChangeReasonCode_INTERNAL_ERROR :: forall r.
InstanceFleetStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceFleetStateChangeReasonCode_INTERNAL_ERROR = InstanceFleetStateChangeReasonCode' "INTERNAL_ERROR"

pattern InstanceFleetStateChangeReasonCode_VALIDATION_ERROR :: InstanceFleetStateChangeReasonCode
pattern $bInstanceFleetStateChangeReasonCode_VALIDATION_ERROR :: InstanceFleetStateChangeReasonCode
$mInstanceFleetStateChangeReasonCode_VALIDATION_ERROR :: forall r.
InstanceFleetStateChangeReasonCode
-> (Void# -> r) -> (Void# -> r) -> r
InstanceFleetStateChangeReasonCode_VALIDATION_ERROR = InstanceFleetStateChangeReasonCode' "VALIDATION_ERROR"

{-# COMPLETE
  InstanceFleetStateChangeReasonCode_CLUSTER_TERMINATED,
  InstanceFleetStateChangeReasonCode_INSTANCE_FAILURE,
  InstanceFleetStateChangeReasonCode_INTERNAL_ERROR,
  InstanceFleetStateChangeReasonCode_VALIDATION_ERROR,
  InstanceFleetStateChangeReasonCode'
  #-}