{-# 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.CRUpdateAllocationStrategy
-- 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.CRUpdateAllocationStrategy
  ( CRUpdateAllocationStrategy
      ( ..,
        CRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE,
        CRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED
      ),
  )
where

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

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

pattern CRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE :: CRUpdateAllocationStrategy
pattern $bCRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE :: CRUpdateAllocationStrategy
$mCRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE :: forall {r}.
CRUpdateAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
CRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE = CRUpdateAllocationStrategy' "BEST_FIT_PROGRESSIVE"

pattern CRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: CRUpdateAllocationStrategy
pattern $bCRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: CRUpdateAllocationStrategy
$mCRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED :: forall {r}.
CRUpdateAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
CRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED = CRUpdateAllocationStrategy' "SPOT_CAPACITY_OPTIMIZED"

{-# COMPLETE
  CRUpdateAllocationStrategy_BEST_FIT_PROGRESSIVE,
  CRUpdateAllocationStrategy_SPOT_CAPACITY_OPTIMIZED,
  CRUpdateAllocationStrategy'
  #-}