{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.EC2.Types.AllocationStrategy
( AllocationStrategy
( ..,
AllocationStrategy_CapacityOptimized,
AllocationStrategy_CapacityOptimizedPrioritized,
AllocationStrategy_Diversified,
AllocationStrategy_LowestPrice,
AllocationStrategy_PriceCapacityOptimized
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
newtype AllocationStrategy = AllocationStrategy'
{ AllocationStrategy -> Text
fromAllocationStrategy ::
Data.Text
}
deriving stock
( Int -> AllocationStrategy -> ShowS
[AllocationStrategy] -> ShowS
AllocationStrategy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AllocationStrategy] -> ShowS
$cshowList :: [AllocationStrategy] -> ShowS
show :: AllocationStrategy -> String
$cshow :: AllocationStrategy -> String
showsPrec :: Int -> AllocationStrategy -> ShowS
$cshowsPrec :: Int -> AllocationStrategy -> ShowS
Prelude.Show,
ReadPrec [AllocationStrategy]
ReadPrec AllocationStrategy
Int -> ReadS AllocationStrategy
ReadS [AllocationStrategy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AllocationStrategy]
$creadListPrec :: ReadPrec [AllocationStrategy]
readPrec :: ReadPrec AllocationStrategy
$creadPrec :: ReadPrec AllocationStrategy
readList :: ReadS [AllocationStrategy]
$creadList :: ReadS [AllocationStrategy]
readsPrec :: Int -> ReadS AllocationStrategy
$creadsPrec :: Int -> ReadS AllocationStrategy
Prelude.Read,
AllocationStrategy -> AllocationStrategy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AllocationStrategy -> AllocationStrategy -> Bool
$c/= :: AllocationStrategy -> AllocationStrategy -> Bool
== :: AllocationStrategy -> AllocationStrategy -> Bool
$c== :: AllocationStrategy -> AllocationStrategy -> Bool
Prelude.Eq,
Eq AllocationStrategy
AllocationStrategy -> AllocationStrategy -> Bool
AllocationStrategy -> AllocationStrategy -> Ordering
AllocationStrategy -> AllocationStrategy -> AllocationStrategy
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 :: AllocationStrategy -> AllocationStrategy -> AllocationStrategy
$cmin :: AllocationStrategy -> AllocationStrategy -> AllocationStrategy
max :: AllocationStrategy -> AllocationStrategy -> AllocationStrategy
$cmax :: AllocationStrategy -> AllocationStrategy -> AllocationStrategy
>= :: AllocationStrategy -> AllocationStrategy -> Bool
$c>= :: AllocationStrategy -> AllocationStrategy -> Bool
> :: AllocationStrategy -> AllocationStrategy -> Bool
$c> :: AllocationStrategy -> AllocationStrategy -> Bool
<= :: AllocationStrategy -> AllocationStrategy -> Bool
$c<= :: AllocationStrategy -> AllocationStrategy -> Bool
< :: AllocationStrategy -> AllocationStrategy -> Bool
$c< :: AllocationStrategy -> AllocationStrategy -> Bool
compare :: AllocationStrategy -> AllocationStrategy -> Ordering
$ccompare :: AllocationStrategy -> AllocationStrategy -> Ordering
Prelude.Ord,
forall x. Rep AllocationStrategy x -> AllocationStrategy
forall x. AllocationStrategy -> Rep AllocationStrategy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AllocationStrategy x -> AllocationStrategy
$cfrom :: forall x. AllocationStrategy -> Rep AllocationStrategy x
Prelude.Generic
)
deriving newtype
( Eq AllocationStrategy
Int -> AllocationStrategy -> Int
AllocationStrategy -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: AllocationStrategy -> Int
$chash :: AllocationStrategy -> Int
hashWithSalt :: Int -> AllocationStrategy -> Int
$chashWithSalt :: Int -> AllocationStrategy -> Int
Prelude.Hashable,
AllocationStrategy -> ()
forall a. (a -> ()) -> NFData a
rnf :: AllocationStrategy -> ()
$crnf :: AllocationStrategy -> ()
Prelude.NFData,
Text -> Either String AllocationStrategy
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String AllocationStrategy
$cfromText :: Text -> Either String AllocationStrategy
Data.FromText,
AllocationStrategy -> Text
forall a. (a -> Text) -> ToText a
toText :: AllocationStrategy -> Text
$ctoText :: AllocationStrategy -> Text
Data.ToText,
AllocationStrategy -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: AllocationStrategy -> ByteString
$ctoBS :: AllocationStrategy -> ByteString
Data.ToByteString,
AllocationStrategy -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: AllocationStrategy -> ByteStringBuilder
$cbuild :: AllocationStrategy -> ByteStringBuilder
Data.ToLog,
HeaderName -> AllocationStrategy -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> AllocationStrategy -> [Header]
$ctoHeader :: HeaderName -> AllocationStrategy -> [Header]
Data.ToHeader,
AllocationStrategy -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: AllocationStrategy -> QueryString
$ctoQuery :: AllocationStrategy -> QueryString
Data.ToQuery,
Value -> Parser [AllocationStrategy]
Value -> Parser AllocationStrategy
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [AllocationStrategy]
$cparseJSONList :: Value -> Parser [AllocationStrategy]
parseJSON :: Value -> Parser AllocationStrategy
$cparseJSON :: Value -> Parser AllocationStrategy
Data.FromJSON,
FromJSONKeyFunction [AllocationStrategy]
FromJSONKeyFunction AllocationStrategy
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [AllocationStrategy]
$cfromJSONKeyList :: FromJSONKeyFunction [AllocationStrategy]
fromJSONKey :: FromJSONKeyFunction AllocationStrategy
$cfromJSONKey :: FromJSONKeyFunction AllocationStrategy
Data.FromJSONKey,
[AllocationStrategy] -> Encoding
[AllocationStrategy] -> Value
AllocationStrategy -> Encoding
AllocationStrategy -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AllocationStrategy] -> Encoding
$ctoEncodingList :: [AllocationStrategy] -> Encoding
toJSONList :: [AllocationStrategy] -> Value
$ctoJSONList :: [AllocationStrategy] -> Value
toEncoding :: AllocationStrategy -> Encoding
$ctoEncoding :: AllocationStrategy -> Encoding
toJSON :: AllocationStrategy -> Value
$ctoJSON :: AllocationStrategy -> Value
Data.ToJSON,
ToJSONKeyFunction [AllocationStrategy]
ToJSONKeyFunction AllocationStrategy
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [AllocationStrategy]
$ctoJSONKeyList :: ToJSONKeyFunction [AllocationStrategy]
toJSONKey :: ToJSONKeyFunction AllocationStrategy
$ctoJSONKey :: ToJSONKeyFunction AllocationStrategy
Data.ToJSONKey,
[Node] -> Either String AllocationStrategy
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String AllocationStrategy
$cparseXML :: [Node] -> Either String AllocationStrategy
Data.FromXML,
AllocationStrategy -> XML
forall a. (a -> XML) -> ToXML a
toXML :: AllocationStrategy -> XML
$ctoXML :: AllocationStrategy -> XML
Data.ToXML
)
pattern AllocationStrategy_CapacityOptimized :: AllocationStrategy
pattern $bAllocationStrategy_CapacityOptimized :: AllocationStrategy
$mAllocationStrategy_CapacityOptimized :: forall {r}. AllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationStrategy_CapacityOptimized = AllocationStrategy' "capacityOptimized"
pattern AllocationStrategy_CapacityOptimizedPrioritized :: AllocationStrategy
pattern $bAllocationStrategy_CapacityOptimizedPrioritized :: AllocationStrategy
$mAllocationStrategy_CapacityOptimizedPrioritized :: forall {r}. AllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationStrategy_CapacityOptimizedPrioritized = AllocationStrategy' "capacityOptimizedPrioritized"
pattern AllocationStrategy_Diversified :: AllocationStrategy
pattern $bAllocationStrategy_Diversified :: AllocationStrategy
$mAllocationStrategy_Diversified :: forall {r}. AllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationStrategy_Diversified = AllocationStrategy' "diversified"
pattern AllocationStrategy_LowestPrice :: AllocationStrategy
pattern $bAllocationStrategy_LowestPrice :: AllocationStrategy
$mAllocationStrategy_LowestPrice :: forall {r}. AllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationStrategy_LowestPrice = AllocationStrategy' "lowestPrice"
pattern AllocationStrategy_PriceCapacityOptimized :: AllocationStrategy
pattern $bAllocationStrategy_PriceCapacityOptimized :: AllocationStrategy
$mAllocationStrategy_PriceCapacityOptimized :: forall {r}. AllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
AllocationStrategy_PriceCapacityOptimized = AllocationStrategy' "priceCapacityOptimized"
{-# COMPLETE
AllocationStrategy_CapacityOptimized,
AllocationStrategy_CapacityOptimizedPrioritized,
AllocationStrategy_Diversified,
AllocationStrategy_LowestPrice,
AllocationStrategy_PriceCapacityOptimized,
AllocationStrategy'
#-}