{-# 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.EC2.Types.FleetOnDemandAllocationStrategy
-- 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.EC2.Types.FleetOnDemandAllocationStrategy
  ( FleetOnDemandAllocationStrategy
      ( ..,
        FleetOnDemandAllocationStrategy_Lowest_price,
        FleetOnDemandAllocationStrategy_Prioritized
      ),
  )
where

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

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

pattern FleetOnDemandAllocationStrategy_Lowest_price :: FleetOnDemandAllocationStrategy
pattern $bFleetOnDemandAllocationStrategy_Lowest_price :: FleetOnDemandAllocationStrategy
$mFleetOnDemandAllocationStrategy_Lowest_price :: forall {r}.
FleetOnDemandAllocationStrategy
-> ((# #) -> r) -> ((# #) -> r) -> r
FleetOnDemandAllocationStrategy_Lowest_price = FleetOnDemandAllocationStrategy' "lowest-price"

pattern FleetOnDemandAllocationStrategy_Prioritized :: FleetOnDemandAllocationStrategy
pattern $bFleetOnDemandAllocationStrategy_Prioritized :: FleetOnDemandAllocationStrategy
$mFleetOnDemandAllocationStrategy_Prioritized :: forall {r}.
FleetOnDemandAllocationStrategy
-> ((# #) -> r) -> ((# #) -> r) -> r
FleetOnDemandAllocationStrategy_Prioritized = FleetOnDemandAllocationStrategy' "prioritized"

{-# COMPLETE
  FleetOnDemandAllocationStrategy_Lowest_price,
  FleetOnDemandAllocationStrategy_Prioritized,
  FleetOnDemandAllocationStrategy'
  #-}