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