{-# 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.Batch.Types.CRAllocationStrategy
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Batch.Types.CRAllocationStrategy
  ( CRAllocationStrategy
      ( ..,
        CRAllocationStrategy_BEST_FIT,
        CRAllocationStrategy_BEST_FIT_PROGRESSIVE,
        CRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED
      ),
  )
where

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

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

pattern CRAllocationStrategy_BEST_FIT :: CRAllocationStrategy
pattern $bCRAllocationStrategy_BEST_FIT :: CRAllocationStrategy
$mCRAllocationStrategy_BEST_FIT :: forall {r}.
CRAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
CRAllocationStrategy_BEST_FIT = CRAllocationStrategy' "BEST_FIT"

pattern CRAllocationStrategy_BEST_FIT_PROGRESSIVE :: CRAllocationStrategy
pattern $bCRAllocationStrategy_BEST_FIT_PROGRESSIVE :: CRAllocationStrategy
$mCRAllocationStrategy_BEST_FIT_PROGRESSIVE :: forall {r}.
CRAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
CRAllocationStrategy_BEST_FIT_PROGRESSIVE = CRAllocationStrategy' "BEST_FIT_PROGRESSIVE"

pattern CRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: CRAllocationStrategy
pattern $bCRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: CRAllocationStrategy
$mCRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: forall {r}.
CRAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
CRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED = CRAllocationStrategy' "SPOT_CAPACITY_OPTIMIZED"

{-# COMPLETE
  CRAllocationStrategy_BEST_FIT,
  CRAllocationStrategy_BEST_FIT_PROGRESSIVE,
  CRAllocationStrategy_SPOT_CAPACITY_OPTIMIZED,
  CRAllocationStrategy'
  #-}