{-# 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.PlacementGroupStrategy
-- 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.PlacementGroupStrategy
  ( PlacementGroupStrategy
      ( ..,
        PlacementGroupStrategy_CLUSTER,
        PlacementGroupStrategy_NONE,
        PlacementGroupStrategy_PARTITION,
        PlacementGroupStrategy_SPREAD
      ),
  )
where

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

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

pattern PlacementGroupStrategy_CLUSTER :: PlacementGroupStrategy
pattern $bPlacementGroupStrategy_CLUSTER :: PlacementGroupStrategy
$mPlacementGroupStrategy_CLUSTER :: forall r.
PlacementGroupStrategy -> (Void# -> r) -> (Void# -> r) -> r
PlacementGroupStrategy_CLUSTER = PlacementGroupStrategy' "CLUSTER"

pattern PlacementGroupStrategy_NONE :: PlacementGroupStrategy
pattern $bPlacementGroupStrategy_NONE :: PlacementGroupStrategy
$mPlacementGroupStrategy_NONE :: forall r.
PlacementGroupStrategy -> (Void# -> r) -> (Void# -> r) -> r
PlacementGroupStrategy_NONE = PlacementGroupStrategy' "NONE"

pattern PlacementGroupStrategy_PARTITION :: PlacementGroupStrategy
pattern $bPlacementGroupStrategy_PARTITION :: PlacementGroupStrategy
$mPlacementGroupStrategy_PARTITION :: forall r.
PlacementGroupStrategy -> (Void# -> r) -> (Void# -> r) -> r
PlacementGroupStrategy_PARTITION = PlacementGroupStrategy' "PARTITION"

pattern PlacementGroupStrategy_SPREAD :: PlacementGroupStrategy
pattern $bPlacementGroupStrategy_SPREAD :: PlacementGroupStrategy
$mPlacementGroupStrategy_SPREAD :: forall r.
PlacementGroupStrategy -> (Void# -> r) -> (Void# -> r) -> r
PlacementGroupStrategy_SPREAD = PlacementGroupStrategy' "SPREAD"

{-# COMPLETE
  PlacementGroupStrategy_CLUSTER,
  PlacementGroupStrategy_NONE,
  PlacementGroupStrategy_PARTITION,
  PlacementGroupStrategy_SPREAD,
  PlacementGroupStrategy'
  #-}