{-# 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.ClusterState
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EMR.Types.ClusterState
  ( ClusterState
      ( ..,
        ClusterState_BOOTSTRAPPING,
        ClusterState_RUNNING,
        ClusterState_STARTING,
        ClusterState_TERMINATED,
        ClusterState_TERMINATED_WITH_ERRORS,
        ClusterState_TERMINATING,
        ClusterState_WAITING
      ),
  )
where

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

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

pattern ClusterState_BOOTSTRAPPING :: ClusterState
pattern $bClusterState_BOOTSTRAPPING :: ClusterState
$mClusterState_BOOTSTRAPPING :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_BOOTSTRAPPING = ClusterState' "BOOTSTRAPPING"

pattern ClusterState_RUNNING :: ClusterState
pattern $bClusterState_RUNNING :: ClusterState
$mClusterState_RUNNING :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_RUNNING = ClusterState' "RUNNING"

pattern ClusterState_STARTING :: ClusterState
pattern $bClusterState_STARTING :: ClusterState
$mClusterState_STARTING :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_STARTING = ClusterState' "STARTING"

pattern ClusterState_TERMINATED :: ClusterState
pattern $bClusterState_TERMINATED :: ClusterState
$mClusterState_TERMINATED :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_TERMINATED = ClusterState' "TERMINATED"

pattern ClusterState_TERMINATED_WITH_ERRORS :: ClusterState
pattern $bClusterState_TERMINATED_WITH_ERRORS :: ClusterState
$mClusterState_TERMINATED_WITH_ERRORS :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_TERMINATED_WITH_ERRORS = ClusterState' "TERMINATED_WITH_ERRORS"

pattern ClusterState_TERMINATING :: ClusterState
pattern $bClusterState_TERMINATING :: ClusterState
$mClusterState_TERMINATING :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_TERMINATING = ClusterState' "TERMINATING"

pattern ClusterState_WAITING :: ClusterState
pattern $bClusterState_WAITING :: ClusterState
$mClusterState_WAITING :: forall {r}. ClusterState -> ((# #) -> r) -> ((# #) -> r) -> r
ClusterState_WAITING = ClusterState' "WAITING"

{-# COMPLETE
  ClusterState_BOOTSTRAPPING,
  ClusterState_RUNNING,
  ClusterState_STARTING,
  ClusterState_TERMINATED,
  ClusterState_TERMINATED_WITH_ERRORS,
  ClusterState_TERMINATING,
  ClusterState_WAITING,
  ClusterState'
  #-}