{-# 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.SpotProvisioningTimeoutAction
-- 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.SpotProvisioningTimeoutAction
  ( SpotProvisioningTimeoutAction
      ( ..,
        SpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND,
        SpotProvisioningTimeoutAction_TERMINATE_CLUSTER
      ),
  )
where

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

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

pattern SpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND :: SpotProvisioningTimeoutAction
pattern $bSpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND :: SpotProvisioningTimeoutAction
$mSpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND :: forall r.
SpotProvisioningTimeoutAction -> (Void# -> r) -> (Void# -> r) -> r
SpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND = SpotProvisioningTimeoutAction' "SWITCH_TO_ON_DEMAND"

pattern SpotProvisioningTimeoutAction_TERMINATE_CLUSTER :: SpotProvisioningTimeoutAction
pattern $bSpotProvisioningTimeoutAction_TERMINATE_CLUSTER :: SpotProvisioningTimeoutAction
$mSpotProvisioningTimeoutAction_TERMINATE_CLUSTER :: forall r.
SpotProvisioningTimeoutAction -> (Void# -> r) -> (Void# -> r) -> r
SpotProvisioningTimeoutAction_TERMINATE_CLUSTER = SpotProvisioningTimeoutAction' "TERMINATE_CLUSTER"

{-# COMPLETE
  SpotProvisioningTimeoutAction_SWITCH_TO_ON_DEMAND,
  SpotProvisioningTimeoutAction_TERMINATE_CLUSTER,
  SpotProvisioningTimeoutAction'
  #-}