{-# 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.ECS.Types.SchedulingStrategy
-- 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.ECS.Types.SchedulingStrategy
  ( SchedulingStrategy
      ( ..,
        SchedulingStrategy_DAEMON,
        SchedulingStrategy_REPLICA
      ),
  )
where

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

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

pattern SchedulingStrategy_DAEMON :: SchedulingStrategy
pattern $bSchedulingStrategy_DAEMON :: SchedulingStrategy
$mSchedulingStrategy_DAEMON :: forall {r}. SchedulingStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
SchedulingStrategy_DAEMON = SchedulingStrategy' "DAEMON"

pattern SchedulingStrategy_REPLICA :: SchedulingStrategy
pattern $bSchedulingStrategy_REPLICA :: SchedulingStrategy
$mSchedulingStrategy_REPLICA :: forall {r}. SchedulingStrategy -> ((# #) -> r) -> ((# #) -> r) -> r
SchedulingStrategy_REPLICA = SchedulingStrategy' "REPLICA"

{-# COMPLETE
  SchedulingStrategy_DAEMON,
  SchedulingStrategy_REPLICA,
  SchedulingStrategy'
  #-}