1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h> 8 #include <aws/autoscaling-plans/AutoScalingPlansRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/autoscaling-plans/model/ApplicationSource.h> 11 #include <aws/core/utils/memory/stl/AWSVector.h> 12 #include <aws/autoscaling-plans/model/ScalingInstruction.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace AutoScalingPlans 18 { 19 namespace Model 20 { 21 22 /** 23 */ 24 class AWS_AUTOSCALINGPLANS_API CreateScalingPlanRequest : public AutoScalingPlansRequest 25 { 26 public: 27 CreateScalingPlanRequest(); 28 29 // Service request name is the Operation name which will send this request out, 30 // each operation should has unique request name, so that we can get operation's name from this request. 31 // Note: this is not true for response, multiple operations may have the same response name, 32 // so we can not get operation's name from response. GetServiceRequestName()33 inline virtual const char* GetServiceRequestName() const override { return "CreateScalingPlan"; } 34 35 Aws::String SerializePayload() const override; 36 37 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 38 39 40 /** 41 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 42 * forward slashes.</p> 43 */ GetScalingPlanName()44 inline const Aws::String& GetScalingPlanName() const{ return m_scalingPlanName; } 45 46 /** 47 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 48 * forward slashes.</p> 49 */ ScalingPlanNameHasBeenSet()50 inline bool ScalingPlanNameHasBeenSet() const { return m_scalingPlanNameHasBeenSet; } 51 52 /** 53 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 54 * forward slashes.</p> 55 */ SetScalingPlanName(const Aws::String & value)56 inline void SetScalingPlanName(const Aws::String& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = value; } 57 58 /** 59 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 60 * forward slashes.</p> 61 */ SetScalingPlanName(Aws::String && value)62 inline void SetScalingPlanName(Aws::String&& value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName = std::move(value); } 63 64 /** 65 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 66 * forward slashes.</p> 67 */ SetScalingPlanName(const char * value)68 inline void SetScalingPlanName(const char* value) { m_scalingPlanNameHasBeenSet = true; m_scalingPlanName.assign(value); } 69 70 /** 71 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 72 * forward slashes.</p> 73 */ WithScalingPlanName(const Aws::String & value)74 inline CreateScalingPlanRequest& WithScalingPlanName(const Aws::String& value) { SetScalingPlanName(value); return *this;} 75 76 /** 77 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 78 * forward slashes.</p> 79 */ WithScalingPlanName(Aws::String && value)80 inline CreateScalingPlanRequest& WithScalingPlanName(Aws::String&& value) { SetScalingPlanName(std::move(value)); return *this;} 81 82 /** 83 * <p>The name of the scaling plan. Names cannot contain vertical bars, colons, or 84 * forward slashes.</p> 85 */ WithScalingPlanName(const char * value)86 inline CreateScalingPlanRequest& WithScalingPlanName(const char* value) { SetScalingPlanName(value); return *this;} 87 88 89 /** 90 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 91 * application source.</p> <p>For more information, see <a 92 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 93 * in the <i>AWS Auto Scaling API Reference</i>.</p> 94 */ GetApplicationSource()95 inline const ApplicationSource& GetApplicationSource() const{ return m_applicationSource; } 96 97 /** 98 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 99 * application source.</p> <p>For more information, see <a 100 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 101 * in the <i>AWS Auto Scaling API Reference</i>.</p> 102 */ ApplicationSourceHasBeenSet()103 inline bool ApplicationSourceHasBeenSet() const { return m_applicationSourceHasBeenSet; } 104 105 /** 106 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 107 * application source.</p> <p>For more information, see <a 108 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 109 * in the <i>AWS Auto Scaling API Reference</i>.</p> 110 */ SetApplicationSource(const ApplicationSource & value)111 inline void SetApplicationSource(const ApplicationSource& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = value; } 112 113 /** 114 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 115 * application source.</p> <p>For more information, see <a 116 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 117 * in the <i>AWS Auto Scaling API Reference</i>.</p> 118 */ SetApplicationSource(ApplicationSource && value)119 inline void SetApplicationSource(ApplicationSource&& value) { m_applicationSourceHasBeenSet = true; m_applicationSource = std::move(value); } 120 121 /** 122 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 123 * application source.</p> <p>For more information, see <a 124 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 125 * in the <i>AWS Auto Scaling API Reference</i>.</p> 126 */ WithApplicationSource(const ApplicationSource & value)127 inline CreateScalingPlanRequest& WithApplicationSource(const ApplicationSource& value) { SetApplicationSource(value); return *this;} 128 129 /** 130 * <p>A CloudFormation stack or set of tags. You can create one scaling plan per 131 * application source.</p> <p>For more information, see <a 132 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ApplicationSource.html">ApplicationSource</a> 133 * in the <i>AWS Auto Scaling API Reference</i>.</p> 134 */ WithApplicationSource(ApplicationSource && value)135 inline CreateScalingPlanRequest& WithApplicationSource(ApplicationSource&& value) { SetApplicationSource(std::move(value)); return *this;} 136 137 138 /** 139 * <p>The scaling instructions.</p> <p>For more information, see <a 140 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 141 * in the <i>AWS Auto Scaling API Reference</i>.</p> 142 */ GetScalingInstructions()143 inline const Aws::Vector<ScalingInstruction>& GetScalingInstructions() const{ return m_scalingInstructions; } 144 145 /** 146 * <p>The scaling instructions.</p> <p>For more information, see <a 147 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 148 * in the <i>AWS Auto Scaling API Reference</i>.</p> 149 */ ScalingInstructionsHasBeenSet()150 inline bool ScalingInstructionsHasBeenSet() const { return m_scalingInstructionsHasBeenSet; } 151 152 /** 153 * <p>The scaling instructions.</p> <p>For more information, see <a 154 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 155 * in the <i>AWS Auto Scaling API Reference</i>.</p> 156 */ SetScalingInstructions(const Aws::Vector<ScalingInstruction> & value)157 inline void SetScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = value; } 158 159 /** 160 * <p>The scaling instructions.</p> <p>For more information, see <a 161 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 162 * in the <i>AWS Auto Scaling API Reference</i>.</p> 163 */ SetScalingInstructions(Aws::Vector<ScalingInstruction> && value)164 inline void SetScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions = std::move(value); } 165 166 /** 167 * <p>The scaling instructions.</p> <p>For more information, see <a 168 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 169 * in the <i>AWS Auto Scaling API Reference</i>.</p> 170 */ WithScalingInstructions(const Aws::Vector<ScalingInstruction> & value)171 inline CreateScalingPlanRequest& WithScalingInstructions(const Aws::Vector<ScalingInstruction>& value) { SetScalingInstructions(value); return *this;} 172 173 /** 174 * <p>The scaling instructions.</p> <p>For more information, see <a 175 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 176 * in the <i>AWS Auto Scaling API Reference</i>.</p> 177 */ WithScalingInstructions(Aws::Vector<ScalingInstruction> && value)178 inline CreateScalingPlanRequest& WithScalingInstructions(Aws::Vector<ScalingInstruction>&& value) { SetScalingInstructions(std::move(value)); return *this;} 179 180 /** 181 * <p>The scaling instructions.</p> <p>For more information, see <a 182 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 183 * in the <i>AWS Auto Scaling API Reference</i>.</p> 184 */ AddScalingInstructions(const ScalingInstruction & value)185 inline CreateScalingPlanRequest& AddScalingInstructions(const ScalingInstruction& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(value); return *this; } 186 187 /** 188 * <p>The scaling instructions.</p> <p>For more information, see <a 189 * href="https://docs.aws.amazon.com/autoscaling/plans/APIReference/API_ScalingInstruction.html">ScalingInstruction</a> 190 * in the <i>AWS Auto Scaling API Reference</i>.</p> 191 */ AddScalingInstructions(ScalingInstruction && value)192 inline CreateScalingPlanRequest& AddScalingInstructions(ScalingInstruction&& value) { m_scalingInstructionsHasBeenSet = true; m_scalingInstructions.push_back(std::move(value)); return *this; } 193 194 private: 195 196 Aws::String m_scalingPlanName; 197 bool m_scalingPlanNameHasBeenSet; 198 199 ApplicationSource m_applicationSource; 200 bool m_applicationSourceHasBeenSet; 201 202 Aws::Vector<ScalingInstruction> m_scalingInstructions; 203 bool m_scalingInstructionsHasBeenSet; 204 }; 205 206 } // namespace Model 207 } // namespace AutoScalingPlans 208 } // namespace Aws 209