{-# 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.InstanceState
-- 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.InstanceState
  ( InstanceState
      ( ..,
        InstanceState_AWAITING_FULFILLMENT,
        InstanceState_BOOTSTRAPPING,
        InstanceState_PROVISIONING,
        InstanceState_RUNNING,
        InstanceState_TERMINATED
      ),
  )
where

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

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

pattern InstanceState_AWAITING_FULFILLMENT :: InstanceState
pattern $bInstanceState_AWAITING_FULFILLMENT :: InstanceState
$mInstanceState_AWAITING_FULFILLMENT :: forall r. InstanceState -> (Void# -> r) -> (Void# -> r) -> r
InstanceState_AWAITING_FULFILLMENT = InstanceState' "AWAITING_FULFILLMENT"

pattern InstanceState_BOOTSTRAPPING :: InstanceState
pattern $bInstanceState_BOOTSTRAPPING :: InstanceState
$mInstanceState_BOOTSTRAPPING :: forall r. InstanceState -> (Void# -> r) -> (Void# -> r) -> r
InstanceState_BOOTSTRAPPING = InstanceState' "BOOTSTRAPPING"

pattern InstanceState_PROVISIONING :: InstanceState
pattern $bInstanceState_PROVISIONING :: InstanceState
$mInstanceState_PROVISIONING :: forall r. InstanceState -> (Void# -> r) -> (Void# -> r) -> r
InstanceState_PROVISIONING = InstanceState' "PROVISIONING"

pattern InstanceState_RUNNING :: InstanceState
pattern $bInstanceState_RUNNING :: InstanceState
$mInstanceState_RUNNING :: forall r. InstanceState -> (Void# -> r) -> (Void# -> r) -> r
InstanceState_RUNNING = InstanceState' "RUNNING"

pattern InstanceState_TERMINATED :: InstanceState
pattern $bInstanceState_TERMINATED :: InstanceState
$mInstanceState_TERMINATED :: forall r. InstanceState -> (Void# -> r) -> (Void# -> r) -> r
InstanceState_TERMINATED = InstanceState' "TERMINATED"

{-# COMPLETE
  InstanceState_AWAITING_FULFILLMENT,
  InstanceState_BOOTSTRAPPING,
  InstanceState_PROVISIONING,
  InstanceState_RUNNING,
  InstanceState_TERMINATED,
  InstanceState'
  #-}