{-# 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.ScaleDownBehavior
-- 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.ScaleDownBehavior
  ( ScaleDownBehavior
      ( ..,
        ScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR,
        ScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION
      ),
  )
where

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

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

pattern ScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR :: ScaleDownBehavior
pattern $bScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR :: ScaleDownBehavior
$mScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR :: forall r. ScaleDownBehavior -> (Void# -> r) -> (Void# -> r) -> r
ScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR = ScaleDownBehavior' "TERMINATE_AT_INSTANCE_HOUR"

pattern ScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION :: ScaleDownBehavior
pattern $bScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION :: ScaleDownBehavior
$mScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION :: forall r. ScaleDownBehavior -> (Void# -> r) -> (Void# -> r) -> r
ScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION = ScaleDownBehavior' "TERMINATE_AT_TASK_COMPLETION"

{-# COMPLETE
  ScaleDownBehavior_TERMINATE_AT_INSTANCE_HOUR,
  ScaleDownBehavior_TERMINATE_AT_TASK_COMPLETION,
  ScaleDownBehavior'
  #-}