{-# 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.ActionOnFailure
-- 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.ActionOnFailure
  ( ActionOnFailure
      ( ..,
        ActionOnFailure_CANCEL_AND_WAIT,
        ActionOnFailure_CONTINUE,
        ActionOnFailure_TERMINATE_CLUSTER,
        ActionOnFailure_TERMINATE_JOB_FLOW
      ),
  )
where

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

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

pattern ActionOnFailure_CANCEL_AND_WAIT :: ActionOnFailure
pattern $bActionOnFailure_CANCEL_AND_WAIT :: ActionOnFailure
$mActionOnFailure_CANCEL_AND_WAIT :: forall r. ActionOnFailure -> (Void# -> r) -> (Void# -> r) -> r
ActionOnFailure_CANCEL_AND_WAIT = ActionOnFailure' "CANCEL_AND_WAIT"

pattern ActionOnFailure_CONTINUE :: ActionOnFailure
pattern $bActionOnFailure_CONTINUE :: ActionOnFailure
$mActionOnFailure_CONTINUE :: forall r. ActionOnFailure -> (Void# -> r) -> (Void# -> r) -> r
ActionOnFailure_CONTINUE = ActionOnFailure' "CONTINUE"

pattern ActionOnFailure_TERMINATE_CLUSTER :: ActionOnFailure
pattern $bActionOnFailure_TERMINATE_CLUSTER :: ActionOnFailure
$mActionOnFailure_TERMINATE_CLUSTER :: forall r. ActionOnFailure -> (Void# -> r) -> (Void# -> r) -> r
ActionOnFailure_TERMINATE_CLUSTER = ActionOnFailure' "TERMINATE_CLUSTER"

pattern ActionOnFailure_TERMINATE_JOB_FLOW :: ActionOnFailure
pattern $bActionOnFailure_TERMINATE_JOB_FLOW :: ActionOnFailure
$mActionOnFailure_TERMINATE_JOB_FLOW :: forall r. ActionOnFailure -> (Void# -> r) -> (Void# -> r) -> r
ActionOnFailure_TERMINATE_JOB_FLOW = ActionOnFailure' "TERMINATE_JOB_FLOW"

{-# COMPLETE
  ActionOnFailure_CANCEL_AND_WAIT,
  ActionOnFailure_CONTINUE,
  ActionOnFailure_TERMINATE_CLUSTER,
  ActionOnFailure_TERMINATE_JOB_FLOW,
  ActionOnFailure'
  #-}