module Stratosphere.AutoScaling.AutoScalingGroup.CapacityReservationSpecificationProperty (
module Exports, CapacityReservationSpecificationProperty(..),
mkCapacityReservationSpecificationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AutoScaling.AutoScalingGroup.CapacityReservationTargetProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CapacityReservationSpecificationProperty
=
CapacityReservationSpecificationProperty {CapacityReservationSpecificationProperty -> ()
haddock_workaround_ :: (),
CapacityReservationSpecificationProperty -> Value Text
capacityReservationPreference :: (Value Prelude.Text),
CapacityReservationSpecificationProperty
-> Maybe CapacityReservationTargetProperty
capacityReservationTarget :: (Prelude.Maybe CapacityReservationTargetProperty)}
deriving stock (CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool
(CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool)
-> (CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool)
-> Eq CapacityReservationSpecificationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool
== :: CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool
$c/= :: CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool
/= :: CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty -> Bool
Prelude.Eq, Int -> CapacityReservationSpecificationProperty -> ShowS
[CapacityReservationSpecificationProperty] -> ShowS
CapacityReservationSpecificationProperty -> String
(Int -> CapacityReservationSpecificationProperty -> ShowS)
-> (CapacityReservationSpecificationProperty -> String)
-> ([CapacityReservationSpecificationProperty] -> ShowS)
-> Show CapacityReservationSpecificationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityReservationSpecificationProperty -> ShowS
showsPrec :: Int -> CapacityReservationSpecificationProperty -> ShowS
$cshow :: CapacityReservationSpecificationProperty -> String
show :: CapacityReservationSpecificationProperty -> String
$cshowList :: [CapacityReservationSpecificationProperty] -> ShowS
showList :: [CapacityReservationSpecificationProperty] -> ShowS
Prelude.Show)
mkCapacityReservationSpecificationProperty ::
Value Prelude.Text -> CapacityReservationSpecificationProperty
mkCapacityReservationSpecificationProperty :: Value Text -> CapacityReservationSpecificationProperty
mkCapacityReservationSpecificationProperty
Value Text
capacityReservationPreference
= CapacityReservationSpecificationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
capacityReservationPreference :: Value Text
capacityReservationPreference = Value Text
capacityReservationPreference,
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
capacityReservationTarget = Maybe CapacityReservationTargetProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityReservationSpecificationProperty where
toResourceProperties :: CapacityReservationSpecificationProperty -> ResourceProperties
toResourceProperties CapacityReservationSpecificationProperty {Maybe CapacityReservationTargetProperty
()
Value Text
haddock_workaround_ :: CapacityReservationSpecificationProperty -> ()
capacityReservationPreference :: CapacityReservationSpecificationProperty -> Value Text
capacityReservationTarget :: CapacityReservationSpecificationProperty
-> Maybe CapacityReservationTargetProperty
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::AutoScaling::AutoScalingGroup.CapacityReservationSpecification",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"CapacityReservationPreference"
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..= Value Text
capacityReservationPreference]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityReservationTargetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityReservationTarget"
(CapacityReservationTargetProperty -> (Key, Value))
-> Maybe CapacityReservationTargetProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityReservationTargetProperty
capacityReservationTarget]))}
instance JSON.ToJSON CapacityReservationSpecificationProperty where
toJSON :: CapacityReservationSpecificationProperty -> Value
toJSON CapacityReservationSpecificationProperty {Maybe CapacityReservationTargetProperty
()
Value Text
haddock_workaround_ :: CapacityReservationSpecificationProperty -> ()
capacityReservationPreference :: CapacityReservationSpecificationProperty -> Value Text
capacityReservationTarget :: CapacityReservationSpecificationProperty
-> Maybe CapacityReservationTargetProperty
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"CapacityReservationPreference"
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..= Value Text
capacityReservationPreference]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityReservationTargetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityReservationTarget"
(CapacityReservationTargetProperty -> (Key, Value))
-> Maybe CapacityReservationTargetProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityReservationTargetProperty
capacityReservationTarget])))
instance Property "CapacityReservationPreference" CapacityReservationSpecificationProperty where
type PropertyType "CapacityReservationPreference" CapacityReservationSpecificationProperty = Value Prelude.Text
set :: PropertyType
"CapacityReservationPreference"
CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty
set PropertyType
"CapacityReservationPreference"
CapacityReservationSpecificationProperty
newValue CapacityReservationSpecificationProperty {Maybe CapacityReservationTargetProperty
()
Value Text
haddock_workaround_ :: CapacityReservationSpecificationProperty -> ()
capacityReservationPreference :: CapacityReservationSpecificationProperty -> Value Text
capacityReservationTarget :: CapacityReservationSpecificationProperty
-> Maybe CapacityReservationTargetProperty
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
..}
= CapacityReservationSpecificationProperty
{capacityReservationPreference :: Value Text
capacityReservationPreference = PropertyType
"CapacityReservationPreference"
CapacityReservationSpecificationProperty
Value Text
newValue, Maybe CapacityReservationTargetProperty
()
haddock_workaround_ :: ()
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
haddock_workaround_ :: ()
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
..}
instance Property "CapacityReservationTarget" CapacityReservationSpecificationProperty where
type PropertyType "CapacityReservationTarget" CapacityReservationSpecificationProperty = CapacityReservationTargetProperty
set :: PropertyType
"CapacityReservationTarget"
CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty
-> CapacityReservationSpecificationProperty
set PropertyType
"CapacityReservationTarget"
CapacityReservationSpecificationProperty
newValue CapacityReservationSpecificationProperty {Maybe CapacityReservationTargetProperty
()
Value Text
haddock_workaround_ :: CapacityReservationSpecificationProperty -> ()
capacityReservationPreference :: CapacityReservationSpecificationProperty -> Value Text
capacityReservationTarget :: CapacityReservationSpecificationProperty
-> Maybe CapacityReservationTargetProperty
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
capacityReservationTarget :: Maybe CapacityReservationTargetProperty
..}
= CapacityReservationSpecificationProperty
{capacityReservationTarget :: Maybe CapacityReservationTargetProperty
capacityReservationTarget = CapacityReservationTargetProperty
-> Maybe CapacityReservationTargetProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"CapacityReservationTarget"
CapacityReservationSpecificationProperty
CapacityReservationTargetProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
haddock_workaround_ :: ()
capacityReservationPreference :: Value Text
..}