module Stratosphere.AutoScaling.AutoScalingGroup.LaunchTemplateOverridesProperty (
        module Exports, LaunchTemplateOverridesProperty(..),
        mkLaunchTemplateOverridesProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AutoScaling.AutoScalingGroup.InstanceRequirementsProperty as Exports
import {-# SOURCE #-} Stratosphere.AutoScaling.AutoScalingGroup.LaunchTemplateSpecificationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LaunchTemplateOverridesProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html>
    LaunchTemplateOverridesProperty {LaunchTemplateOverridesProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancerequirements>
                                     LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceRequirements :: (Prelude.Maybe InstanceRequirementsProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype>
                                     LaunchTemplateOverridesProperty -> Maybe (Value Text)
instanceType :: (Prelude.Maybe (Value Prelude.Text)),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification>
                                     LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
launchTemplateSpecification :: (Prelude.Maybe LaunchTemplateSpecificationProperty),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity>
                                     LaunchTemplateOverridesProperty -> Maybe (Value Text)
weightedCapacity :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty -> Bool
(LaunchTemplateOverridesProperty
 -> LaunchTemplateOverridesProperty -> Bool)
-> (LaunchTemplateOverridesProperty
    -> LaunchTemplateOverridesProperty -> Bool)
-> Eq LaunchTemplateOverridesProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty -> Bool
== :: LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty -> Bool
$c/= :: LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty -> Bool
/= :: LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty -> Bool
Prelude.Eq, Int -> LaunchTemplateOverridesProperty -> ShowS
[LaunchTemplateOverridesProperty] -> ShowS
LaunchTemplateOverridesProperty -> String
(Int -> LaunchTemplateOverridesProperty -> ShowS)
-> (LaunchTemplateOverridesProperty -> String)
-> ([LaunchTemplateOverridesProperty] -> ShowS)
-> Show LaunchTemplateOverridesProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LaunchTemplateOverridesProperty -> ShowS
showsPrec :: Int -> LaunchTemplateOverridesProperty -> ShowS
$cshow :: LaunchTemplateOverridesProperty -> String
show :: LaunchTemplateOverridesProperty -> String
$cshowList :: [LaunchTemplateOverridesProperty] -> ShowS
showList :: [LaunchTemplateOverridesProperty] -> ShowS
Prelude.Show)
mkLaunchTemplateOverridesProperty ::
  LaunchTemplateOverridesProperty
mkLaunchTemplateOverridesProperty :: LaunchTemplateOverridesProperty
mkLaunchTemplateOverridesProperty
  = LaunchTemplateOverridesProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), instanceRequirements :: Maybe InstanceRequirementsProperty
instanceRequirements = Maybe InstanceRequirementsProperty
forall a. Maybe a
Prelude.Nothing,
       instanceType :: Maybe (Value Text)
instanceType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
launchTemplateSpecification = Maybe LaunchTemplateSpecificationProperty
forall a. Maybe a
Prelude.Nothing,
       weightedCapacity :: Maybe (Value Text)
weightedCapacity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LaunchTemplateOverridesProperty where
  toResourceProperties :: LaunchTemplateOverridesProperty -> ResourceProperties
toResourceProperties LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AutoScaling::AutoScalingGroup.LaunchTemplateOverrides",
         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 -> InstanceRequirementsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceRequirements" (InstanceRequirementsProperty -> (Key, Value))
-> Maybe InstanceRequirementsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceRequirementsProperty
instanceRequirements,
                            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
"InstanceType" (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)
instanceType,
                            Key -> LaunchTemplateSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LaunchTemplateSpecification"
                              (LaunchTemplateSpecificationProperty -> (Key, Value))
-> Maybe LaunchTemplateSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchTemplateSpecificationProperty
launchTemplateSpecification,
                            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
"WeightedCapacity" (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)
weightedCapacity])}
instance JSON.ToJSON LaunchTemplateOverridesProperty where
  toJSON :: LaunchTemplateOverridesProperty -> Value
toJSON LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = [(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 -> InstanceRequirementsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InstanceRequirements" (InstanceRequirementsProperty -> (Key, Value))
-> Maybe InstanceRequirementsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceRequirementsProperty
instanceRequirements,
               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
"InstanceType" (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)
instanceType,
               Key -> LaunchTemplateSpecificationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"LaunchTemplateSpecification"
                 (LaunchTemplateSpecificationProperty -> (Key, Value))
-> Maybe LaunchTemplateSpecificationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchTemplateSpecificationProperty
launchTemplateSpecification,
               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
"WeightedCapacity" (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)
weightedCapacity]))
instance Property "InstanceRequirements" LaunchTemplateOverridesProperty where
  type PropertyType "InstanceRequirements" LaunchTemplateOverridesProperty = InstanceRequirementsProperty
  set :: PropertyType "InstanceRequirements" LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
set PropertyType "InstanceRequirements" LaunchTemplateOverridesProperty
newValue LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = LaunchTemplateOverridesProperty
        {instanceRequirements :: Maybe InstanceRequirementsProperty
instanceRequirements = InstanceRequirementsProperty -> Maybe InstanceRequirementsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceRequirements" LaunchTemplateOverridesProperty
InstanceRequirementsProperty
newValue, Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
()
haddock_workaround_ :: ()
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
instance Property "InstanceType" LaunchTemplateOverridesProperty where
  type PropertyType "InstanceType" LaunchTemplateOverridesProperty = Value Prelude.Text
  set :: PropertyType "InstanceType" LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
set PropertyType "InstanceType" LaunchTemplateOverridesProperty
newValue LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = LaunchTemplateOverridesProperty
        {instanceType :: Maybe (Value Text)
instanceType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InstanceType" LaunchTemplateOverridesProperty
Value Text
newValue, Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
instance Property "LaunchTemplateSpecification" LaunchTemplateOverridesProperty where
  type PropertyType "LaunchTemplateSpecification" LaunchTemplateOverridesProperty = LaunchTemplateSpecificationProperty
  set :: PropertyType
  "LaunchTemplateSpecification" LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
set PropertyType
  "LaunchTemplateSpecification" LaunchTemplateOverridesProperty
newValue LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = LaunchTemplateOverridesProperty
        {launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
launchTemplateSpecification = LaunchTemplateSpecificationProperty
-> Maybe LaunchTemplateSpecificationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "LaunchTemplateSpecification" LaunchTemplateOverridesProperty
LaunchTemplateSpecificationProperty
newValue, Maybe (Value Text)
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
weightedCapacity :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
weightedCapacity :: Maybe (Value Text)
..}
instance Property "WeightedCapacity" LaunchTemplateOverridesProperty where
  type PropertyType "WeightedCapacity" LaunchTemplateOverridesProperty = Value Prelude.Text
  set :: PropertyType "WeightedCapacity" LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
-> LaunchTemplateOverridesProperty
set PropertyType "WeightedCapacity" LaunchTemplateOverridesProperty
newValue LaunchTemplateOverridesProperty {Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: LaunchTemplateOverridesProperty -> ()
instanceRequirements :: LaunchTemplateOverridesProperty
-> Maybe InstanceRequirementsProperty
instanceType :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
launchTemplateSpecification :: LaunchTemplateOverridesProperty
-> Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: LaunchTemplateOverridesProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
weightedCapacity :: Maybe (Value Text)
..}
    = LaunchTemplateOverridesProperty
        {weightedCapacity :: Maybe (Value Text)
weightedCapacity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WeightedCapacity" LaunchTemplateOverridesProperty
Value Text
newValue, Maybe (Value Text)
Maybe LaunchTemplateSpecificationProperty
Maybe InstanceRequirementsProperty
()
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
haddock_workaround_ :: ()
instanceRequirements :: Maybe InstanceRequirementsProperty
instanceType :: Maybe (Value Text)
launchTemplateSpecification :: Maybe LaunchTemplateSpecificationProperty
..}