{-# 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.GameLift.Types.BalancingStrategy
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.GameLift.Types.BalancingStrategy
  ( BalancingStrategy
      ( ..,
        BalancingStrategy_ON_DEMAND_ONLY,
        BalancingStrategy_SPOT_ONLY,
        BalancingStrategy_SPOT_PREFERRED
      ),
  )
where

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

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

pattern BalancingStrategy_ON_DEMAND_ONLY :: BalancingStrategy
pattern $bBalancingStrategy_ON_DEMAND_ONLY :: BalancingStrategy
$mBalancingStrategy_ON_DEMAND_ONLY :: forall r. BalancingStrategy -> (Void# -> r) -> (Void# -> r) -> r
BalancingStrategy_ON_DEMAND_ONLY = BalancingStrategy' "ON_DEMAND_ONLY"

pattern BalancingStrategy_SPOT_ONLY :: BalancingStrategy
pattern $bBalancingStrategy_SPOT_ONLY :: BalancingStrategy
$mBalancingStrategy_SPOT_ONLY :: forall r. BalancingStrategy -> (Void# -> r) -> (Void# -> r) -> r
BalancingStrategy_SPOT_ONLY = BalancingStrategy' "SPOT_ONLY"

pattern BalancingStrategy_SPOT_PREFERRED :: BalancingStrategy
pattern $bBalancingStrategy_SPOT_PREFERRED :: BalancingStrategy
$mBalancingStrategy_SPOT_PREFERRED :: forall r. BalancingStrategy -> (Void# -> r) -> (Void# -> r) -> r
BalancingStrategy_SPOT_PREFERRED = BalancingStrategy' "SPOT_PREFERRED"

{-# COMPLETE
  BalancingStrategy_ON_DEMAND_ONLY,
  BalancingStrategy_SPOT_ONLY,
  BalancingStrategy_SPOT_PREFERRED,
  BalancingStrategy'
  #-}