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

pattern OnDemandAllocationStrategy_LowestPrice :: OnDemandAllocationStrategy
pattern $bOnDemandAllocationStrategy_LowestPrice :: OnDemandAllocationStrategy
$mOnDemandAllocationStrategy_LowestPrice :: forall {r}.
OnDemandAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
OnDemandAllocationStrategy_LowestPrice = OnDemandAllocationStrategy' "lowestPrice"

pattern OnDemandAllocationStrategy_Prioritized :: OnDemandAllocationStrategy
pattern $bOnDemandAllocationStrategy_Prioritized :: OnDemandAllocationStrategy
$mOnDemandAllocationStrategy_Prioritized :: forall {r}.
OnDemandAllocationStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
OnDemandAllocationStrategy_Prioritized = OnDemandAllocationStrategy' "prioritized"

{-# COMPLETE
  OnDemandAllocationStrategy_LowestPrice,
  OnDemandAllocationStrategy_Prioritized,
  OnDemandAllocationStrategy'
  #-}