{-# 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.CloudWatchEvents.Types.PlacementStrategyType
-- 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.CloudWatchEvents.Types.PlacementStrategyType
  ( PlacementStrategyType
      ( ..,
        PlacementStrategyType_Binpack,
        PlacementStrategyType_Random,
        PlacementStrategyType_Spread
      ),
  )
where

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

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

pattern PlacementStrategyType_Binpack :: PlacementStrategyType
pattern $bPlacementStrategyType_Binpack :: PlacementStrategyType
$mPlacementStrategyType_Binpack :: forall {r}.
PlacementStrategyType -> ((# #) -> r) -> ((# #) -> r) -> r
PlacementStrategyType_Binpack = PlacementStrategyType' "binpack"

pattern PlacementStrategyType_Random :: PlacementStrategyType
pattern $bPlacementStrategyType_Random :: PlacementStrategyType
$mPlacementStrategyType_Random :: forall {r}.
PlacementStrategyType -> ((# #) -> r) -> ((# #) -> r) -> r
PlacementStrategyType_Random = PlacementStrategyType' "random"

pattern PlacementStrategyType_Spread :: PlacementStrategyType
pattern $bPlacementStrategyType_Spread :: PlacementStrategyType
$mPlacementStrategyType_Spread :: forall {r}.
PlacementStrategyType -> ((# #) -> r) -> ((# #) -> r) -> r
PlacementStrategyType_Spread = PlacementStrategyType' "spread"

{-# COMPLETE
  PlacementStrategyType_Binpack,
  PlacementStrategyType_Random,
  PlacementStrategyType_Spread,
  PlacementStrategyType'
  #-}