{-# 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.StepStateChangeReasonCode
-- 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.StepStateChangeReasonCode
  ( StepStateChangeReasonCode
      ( ..,
        StepStateChangeReasonCode_NONE
      ),
  )
where

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

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

pattern StepStateChangeReasonCode_NONE :: StepStateChangeReasonCode
pattern $bStepStateChangeReasonCode_NONE :: StepStateChangeReasonCode
$mStepStateChangeReasonCode_NONE :: forall r.
StepStateChangeReasonCode -> (Void# -> r) -> (Void# -> r) -> r
StepStateChangeReasonCode_NONE = StepStateChangeReasonCode' "NONE"

{-# COMPLETE
  StepStateChangeReasonCode_NONE,
  StepStateChangeReasonCode'
  #-}