module Stratosphere.ECS.CapacityProvider.AutoScalingGroupProviderProperty (
        module Exports, AutoScalingGroupProviderProperty(..),
        mkAutoScalingGroupProviderProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ECS.CapacityProvider.ManagedScalingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AutoScalingGroupProviderProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html>
    AutoScalingGroupProviderProperty {AutoScalingGroupProviderProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn>
                                      AutoScalingGroupProviderProperty -> Value Text
autoScalingGroupArn :: (Value Prelude.Text),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining>
                                      AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedDraining :: (Prelude.Maybe (Value Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling>
                                      AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedScaling :: (Prelude.Maybe ManagedScalingProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-autoscalinggroupprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection>
                                      AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedTerminationProtection :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty -> Bool
(AutoScalingGroupProviderProperty
 -> AutoScalingGroupProviderProperty -> Bool)
-> (AutoScalingGroupProviderProperty
    -> AutoScalingGroupProviderProperty -> Bool)
-> Eq AutoScalingGroupProviderProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty -> Bool
== :: AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty -> Bool
$c/= :: AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty -> Bool
/= :: AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty -> Bool
Prelude.Eq, Int -> AutoScalingGroupProviderProperty -> ShowS
[AutoScalingGroupProviderProperty] -> ShowS
AutoScalingGroupProviderProperty -> String
(Int -> AutoScalingGroupProviderProperty -> ShowS)
-> (AutoScalingGroupProviderProperty -> String)
-> ([AutoScalingGroupProviderProperty] -> ShowS)
-> Show AutoScalingGroupProviderProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AutoScalingGroupProviderProperty -> ShowS
showsPrec :: Int -> AutoScalingGroupProviderProperty -> ShowS
$cshow :: AutoScalingGroupProviderProperty -> String
show :: AutoScalingGroupProviderProperty -> String
$cshowList :: [AutoScalingGroupProviderProperty] -> ShowS
showList :: [AutoScalingGroupProviderProperty] -> ShowS
Prelude.Show)
mkAutoScalingGroupProviderProperty ::
  Value Prelude.Text -> AutoScalingGroupProviderProperty
mkAutoScalingGroupProviderProperty :: Value Text -> AutoScalingGroupProviderProperty
mkAutoScalingGroupProviderProperty Value Text
autoScalingGroupArn
  = AutoScalingGroupProviderProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       autoScalingGroupArn :: Value Text
autoScalingGroupArn = Value Text
autoScalingGroupArn,
       managedDraining :: Maybe (Value Text)
managedDraining = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       managedScaling :: Maybe ManagedScalingProperty
managedScaling = Maybe ManagedScalingProperty
forall a. Maybe a
Prelude.Nothing,
       managedTerminationProtection :: Maybe (Value Text)
managedTerminationProtection = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AutoScalingGroupProviderProperty where
  toResourceProperties :: AutoScalingGroupProviderProperty -> ResourceProperties
toResourceProperties AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider.AutoScalingGroupProvider",
         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
"AutoScalingGroupArn" 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
autoScalingGroupArn]
                           ([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
"ManagedDraining" (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)
managedDraining,
                               Key -> ManagedScalingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedScaling" (ManagedScalingProperty -> (Key, Value))
-> Maybe ManagedScalingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedScalingProperty
managedScaling,
                               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
"ManagedTerminationProtection"
                                 (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)
managedTerminationProtection]))}
instance JSON.ToJSON AutoScalingGroupProviderProperty where
  toJSON :: AutoScalingGroupProviderProperty -> Value
toJSON AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = [(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
"AutoScalingGroupArn" 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
autoScalingGroupArn]
              ([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
"ManagedDraining" (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)
managedDraining,
                  Key -> ManagedScalingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedScaling" (ManagedScalingProperty -> (Key, Value))
-> Maybe ManagedScalingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedScalingProperty
managedScaling,
                  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
"ManagedTerminationProtection"
                    (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)
managedTerminationProtection])))
instance Property "AutoScalingGroupArn" AutoScalingGroupProviderProperty where
  type PropertyType "AutoScalingGroupArn" AutoScalingGroupProviderProperty = Value Prelude.Text
  set :: PropertyType "AutoScalingGroupArn" AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
set PropertyType "AutoScalingGroupArn" AutoScalingGroupProviderProperty
newValue AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = AutoScalingGroupProviderProperty
        {autoScalingGroupArn :: Value Text
autoScalingGroupArn = PropertyType "AutoScalingGroupArn" AutoScalingGroupProviderProperty
Value Text
newValue, Maybe (Value Text)
Maybe ManagedScalingProperty
()
haddock_workaround_ :: ()
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
haddock_workaround_ :: ()
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
instance Property "ManagedDraining" AutoScalingGroupProviderProperty where
  type PropertyType "ManagedDraining" AutoScalingGroupProviderProperty = Value Prelude.Text
  set :: PropertyType "ManagedDraining" AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
set PropertyType "ManagedDraining" AutoScalingGroupProviderProperty
newValue AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = AutoScalingGroupProviderProperty
        {managedDraining :: Maybe (Value Text)
managedDraining = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ManagedDraining" AutoScalingGroupProviderProperty
Value Text
newValue, Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
instance Property "ManagedScaling" AutoScalingGroupProviderProperty where
  type PropertyType "ManagedScaling" AutoScalingGroupProviderProperty = ManagedScalingProperty
  set :: PropertyType "ManagedScaling" AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
set PropertyType "ManagedScaling" AutoScalingGroupProviderProperty
newValue AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = AutoScalingGroupProviderProperty
        {managedScaling :: Maybe ManagedScalingProperty
managedScaling = ManagedScalingProperty -> Maybe ManagedScalingProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ManagedScaling" AutoScalingGroupProviderProperty
ManagedScalingProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedTerminationProtection :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedTerminationProtection :: Maybe (Value Text)
..}
instance Property "ManagedTerminationProtection" AutoScalingGroupProviderProperty where
  type PropertyType "ManagedTerminationProtection" AutoScalingGroupProviderProperty = Value Prelude.Text
  set :: PropertyType
  "ManagedTerminationProtection" AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
-> AutoScalingGroupProviderProperty
set PropertyType
  "ManagedTerminationProtection" AutoScalingGroupProviderProperty
newValue AutoScalingGroupProviderProperty {Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: AutoScalingGroupProviderProperty -> ()
autoScalingGroupArn :: AutoScalingGroupProviderProperty -> Value Text
managedDraining :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
managedScaling :: AutoScalingGroupProviderProperty -> Maybe ManagedScalingProperty
managedTerminationProtection :: AutoScalingGroupProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
managedTerminationProtection :: Maybe (Value Text)
..}
    = AutoScalingGroupProviderProperty
        {managedTerminationProtection :: Maybe (Value Text)
managedTerminationProtection = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ManagedTerminationProtection" AutoScalingGroupProviderProperty
Value Text
newValue, Maybe (Value Text)
Maybe ManagedScalingProperty
()
Value Text
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
haddock_workaround_ :: ()
autoScalingGroupArn :: Value Text
managedDraining :: Maybe (Value Text)
managedScaling :: Maybe ManagedScalingProperty
..}