module Stratosphere.EC2.SpotFleet.SpotMaintenanceStrategiesProperty (
        module Exports, SpotMaintenanceStrategiesProperty(..),
        mkSpotMaintenanceStrategiesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.SpotFleet.SpotCapacityRebalanceProperty as Exports
import Stratosphere.ResourceProperties
data SpotMaintenanceStrategiesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotmaintenancestrategies.html>
    SpotMaintenanceStrategiesProperty {SpotMaintenanceStrategiesProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-spotfleet-spotmaintenancestrategies.html#cfn-ec2-spotfleet-spotmaintenancestrategies-capacityrebalance>
                                       SpotMaintenanceStrategiesProperty
-> Maybe SpotCapacityRebalanceProperty
capacityRebalance :: (Prelude.Maybe SpotCapacityRebalanceProperty)}
  deriving stock (SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty -> Bool
(SpotMaintenanceStrategiesProperty
 -> SpotMaintenanceStrategiesProperty -> Bool)
-> (SpotMaintenanceStrategiesProperty
    -> SpotMaintenanceStrategiesProperty -> Bool)
-> Eq SpotMaintenanceStrategiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty -> Bool
== :: SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty -> Bool
$c/= :: SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty -> Bool
/= :: SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty -> Bool
Prelude.Eq, Int -> SpotMaintenanceStrategiesProperty -> ShowS
[SpotMaintenanceStrategiesProperty] -> ShowS
SpotMaintenanceStrategiesProperty -> String
(Int -> SpotMaintenanceStrategiesProperty -> ShowS)
-> (SpotMaintenanceStrategiesProperty -> String)
-> ([SpotMaintenanceStrategiesProperty] -> ShowS)
-> Show SpotMaintenanceStrategiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SpotMaintenanceStrategiesProperty -> ShowS
showsPrec :: Int -> SpotMaintenanceStrategiesProperty -> ShowS
$cshow :: SpotMaintenanceStrategiesProperty -> String
show :: SpotMaintenanceStrategiesProperty -> String
$cshowList :: [SpotMaintenanceStrategiesProperty] -> ShowS
showList :: [SpotMaintenanceStrategiesProperty] -> ShowS
Prelude.Show)
mkSpotMaintenanceStrategiesProperty ::
  SpotMaintenanceStrategiesProperty
mkSpotMaintenanceStrategiesProperty :: SpotMaintenanceStrategiesProperty
mkSpotMaintenanceStrategiesProperty
  = SpotMaintenanceStrategiesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), capacityRebalance :: Maybe SpotCapacityRebalanceProperty
capacityRebalance = Maybe SpotCapacityRebalanceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SpotMaintenanceStrategiesProperty where
  toResourceProperties :: SpotMaintenanceStrategiesProperty -> ResourceProperties
toResourceProperties SpotMaintenanceStrategiesProperty {Maybe SpotCapacityRebalanceProperty
()
haddock_workaround_ :: SpotMaintenanceStrategiesProperty -> ()
capacityRebalance :: SpotMaintenanceStrategiesProperty
-> Maybe SpotCapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe SpotCapacityRebalanceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::SpotFleet.SpotMaintenanceStrategies",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> SpotCapacityRebalanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityRebalance" (SpotCapacityRebalanceProperty -> (Key, Value))
-> Maybe SpotCapacityRebalanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpotCapacityRebalanceProperty
capacityRebalance])}
instance JSON.ToJSON SpotMaintenanceStrategiesProperty where
  toJSON :: SpotMaintenanceStrategiesProperty -> Value
toJSON SpotMaintenanceStrategiesProperty {Maybe SpotCapacityRebalanceProperty
()
haddock_workaround_ :: SpotMaintenanceStrategiesProperty -> ()
capacityRebalance :: SpotMaintenanceStrategiesProperty
-> Maybe SpotCapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe SpotCapacityRebalanceProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> SpotCapacityRebalanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityRebalance" (SpotCapacityRebalanceProperty -> (Key, Value))
-> Maybe SpotCapacityRebalanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SpotCapacityRebalanceProperty
capacityRebalance]))
instance Property "CapacityRebalance" SpotMaintenanceStrategiesProperty where
  type PropertyType "CapacityRebalance" SpotMaintenanceStrategiesProperty = SpotCapacityRebalanceProperty
  set :: PropertyType "CapacityRebalance" SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty
-> SpotMaintenanceStrategiesProperty
set PropertyType "CapacityRebalance" SpotMaintenanceStrategiesProperty
newValue SpotMaintenanceStrategiesProperty {Maybe SpotCapacityRebalanceProperty
()
haddock_workaround_ :: SpotMaintenanceStrategiesProperty -> ()
capacityRebalance :: SpotMaintenanceStrategiesProperty
-> Maybe SpotCapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe SpotCapacityRebalanceProperty
..}
    = SpotMaintenanceStrategiesProperty
        {capacityRebalance :: Maybe SpotCapacityRebalanceProperty
capacityRebalance = SpotCapacityRebalanceProperty
-> Maybe SpotCapacityRebalanceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CapacityRebalance" SpotMaintenanceStrategiesProperty
SpotCapacityRebalanceProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}