module Stratosphere.EC2.EC2Fleet.MaintenanceStrategiesProperty (
module Exports, MaintenanceStrategiesProperty(..),
mkMaintenanceStrategiesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EC2.EC2Fleet.CapacityRebalanceProperty as Exports
import Stratosphere.ResourceProperties
data MaintenanceStrategiesProperty
=
MaintenanceStrategiesProperty {MaintenanceStrategiesProperty -> ()
haddock_workaround_ :: (),
MaintenanceStrategiesProperty -> Maybe CapacityRebalanceProperty
capacityRebalance :: (Prelude.Maybe CapacityRebalanceProperty)}
deriving stock (MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool
(MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool)
-> (MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool)
-> Eq MaintenanceStrategiesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool
== :: MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool
$c/= :: MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool
/= :: MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> Bool
Prelude.Eq, Int -> MaintenanceStrategiesProperty -> ShowS
[MaintenanceStrategiesProperty] -> ShowS
MaintenanceStrategiesProperty -> String
(Int -> MaintenanceStrategiesProperty -> ShowS)
-> (MaintenanceStrategiesProperty -> String)
-> ([MaintenanceStrategiesProperty] -> ShowS)
-> Show MaintenanceStrategiesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MaintenanceStrategiesProperty -> ShowS
showsPrec :: Int -> MaintenanceStrategiesProperty -> ShowS
$cshow :: MaintenanceStrategiesProperty -> String
show :: MaintenanceStrategiesProperty -> String
$cshowList :: [MaintenanceStrategiesProperty] -> ShowS
showList :: [MaintenanceStrategiesProperty] -> ShowS
Prelude.Show)
mkMaintenanceStrategiesProperty :: MaintenanceStrategiesProperty
mkMaintenanceStrategiesProperty :: MaintenanceStrategiesProperty
mkMaintenanceStrategiesProperty
= MaintenanceStrategiesProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), capacityRebalance :: Maybe CapacityRebalanceProperty
capacityRebalance = Maybe CapacityRebalanceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MaintenanceStrategiesProperty where
toResourceProperties :: MaintenanceStrategiesProperty -> ResourceProperties
toResourceProperties MaintenanceStrategiesProperty {Maybe CapacityRebalanceProperty
()
haddock_workaround_ :: MaintenanceStrategiesProperty -> ()
capacityRebalance :: MaintenanceStrategiesProperty -> Maybe CapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe CapacityRebalanceProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EC2::EC2Fleet.MaintenanceStrategies",
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 -> CapacityRebalanceProperty -> (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" (CapacityRebalanceProperty -> (Key, Value))
-> Maybe CapacityRebalanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityRebalanceProperty
capacityRebalance])}
instance JSON.ToJSON MaintenanceStrategiesProperty where
toJSON :: MaintenanceStrategiesProperty -> Value
toJSON MaintenanceStrategiesProperty {Maybe CapacityRebalanceProperty
()
haddock_workaround_ :: MaintenanceStrategiesProperty -> ()
capacityRebalance :: MaintenanceStrategiesProperty -> Maybe CapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe CapacityRebalanceProperty
..}
= [(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 -> CapacityRebalanceProperty -> (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" (CapacityRebalanceProperty -> (Key, Value))
-> Maybe CapacityRebalanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityRebalanceProperty
capacityRebalance]))
instance Property "CapacityRebalance" MaintenanceStrategiesProperty where
type PropertyType "CapacityRebalance" MaintenanceStrategiesProperty = CapacityRebalanceProperty
set :: PropertyType "CapacityRebalance" MaintenanceStrategiesProperty
-> MaintenanceStrategiesProperty -> MaintenanceStrategiesProperty
set PropertyType "CapacityRebalance" MaintenanceStrategiesProperty
newValue MaintenanceStrategiesProperty {Maybe CapacityRebalanceProperty
()
haddock_workaround_ :: MaintenanceStrategiesProperty -> ()
capacityRebalance :: MaintenanceStrategiesProperty -> Maybe CapacityRebalanceProperty
haddock_workaround_ :: ()
capacityRebalance :: Maybe CapacityRebalanceProperty
..}
= MaintenanceStrategiesProperty
{capacityRebalance :: Maybe CapacityRebalanceProperty
capacityRebalance = CapacityRebalanceProperty -> Maybe CapacityRebalanceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CapacityRebalance" MaintenanceStrategiesProperty
CapacityRebalanceProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}