{-# 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.StepCancellationOption
-- 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.StepCancellationOption
  ( StepCancellationOption
      ( ..,
        StepCancellationOption_SEND_INTERRUPT,
        StepCancellationOption_TERMINATE_PROCESS
      ),
  )
where

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

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

pattern StepCancellationOption_SEND_INTERRUPT :: StepCancellationOption
pattern $bStepCancellationOption_SEND_INTERRUPT :: StepCancellationOption
$mStepCancellationOption_SEND_INTERRUPT :: forall r.
StepCancellationOption -> (Void# -> r) -> (Void# -> r) -> r
StepCancellationOption_SEND_INTERRUPT = StepCancellationOption' "SEND_INTERRUPT"

pattern StepCancellationOption_TERMINATE_PROCESS :: StepCancellationOption
pattern $bStepCancellationOption_TERMINATE_PROCESS :: StepCancellationOption
$mStepCancellationOption_TERMINATE_PROCESS :: forall r.
StepCancellationOption -> (Void# -> r) -> (Void# -> r) -> r
StepCancellationOption_TERMINATE_PROCESS = StepCancellationOption' "TERMINATE_PROCESS"

{-# COMPLETE
  StepCancellationOption_SEND_INTERRUPT,
  StepCancellationOption_TERMINATE_PROCESS,
  StepCancellationOption'
  #-}