AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
PutScalingPolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/gamelift/GameLiftRequest.h>
9#include <aws/gamelift/GameLift_EXPORTS.h>
10#include <aws/gamelift/model/ComparisonOperatorType.h>
11#include <aws/gamelift/model/MetricName.h>
12#include <aws/gamelift/model/PolicyType.h>
13#include <aws/gamelift/model/ScalingAdjustmentType.h>
14#include <aws/gamelift/model/TargetConfiguration.h>
15
16#include <utility>
17
18namespace Aws {
19namespace GameLift {
20namespace Model {
21
25 public:
26 AWS_GAMELIFT_API PutScalingPolicyRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "PutScalingPolicy"; }
33
34 AWS_GAMELIFT_API Aws::String SerializePayload() const override;
35
37
39
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template <typename NameT = Aws::String>
47 void SetName(NameT&& value) {
48 m_nameHasBeenSet = true;
49 m_name = std::forward<NameT>(value);
50 }
51 template <typename NameT = Aws::String>
53 SetName(std::forward<NameT>(value));
54 return *this;
55 }
57
59
64 inline const Aws::String& GetFleetId() const { return m_fleetId; }
65 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
66 template <typename FleetIdT = Aws::String>
67 void SetFleetId(FleetIdT&& value) {
68 m_fleetIdHasBeenSet = true;
69 m_fleetId = std::forward<FleetIdT>(value);
70 }
71 template <typename FleetIdT = Aws::String>
73 SetFleetId(std::forward<FleetIdT>(value));
74 return *this;
75 }
77
79
82 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
83 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
84 inline void SetScalingAdjustment(int value) {
85 m_scalingAdjustmentHasBeenSet = true;
86 m_scalingAdjustment = value;
87 }
90 return *this;
91 }
93
95
105 inline ScalingAdjustmentType GetScalingAdjustmentType() const { return m_scalingAdjustmentType; }
106 inline bool ScalingAdjustmentTypeHasBeenSet() const { return m_scalingAdjustmentTypeHasBeenSet; }
108 m_scalingAdjustmentTypeHasBeenSet = true;
109 m_scalingAdjustmentType = value;
110 }
113 return *this;
114 }
116
118
121 inline double GetThreshold() const { return m_threshold; }
122 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
123 inline void SetThreshold(double value) {
124 m_thresholdHasBeenSet = true;
125 m_threshold = value;
126 }
128 SetThreshold(value);
129 return *this;
130 }
132
134
138 inline ComparisonOperatorType GetComparisonOperator() const { return m_comparisonOperator; }
139 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
141 m_comparisonOperatorHasBeenSet = true;
142 m_comparisonOperator = value;
143 }
146 return *this;
147 }
149
151
155 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
156 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
157 inline void SetEvaluationPeriods(int value) {
158 m_evaluationPeriodsHasBeenSet = true;
159 m_evaluationPeriods = value;
160 }
163 return *this;
164 }
166
168
196 inline MetricName GetMetricName() const { return m_metricName; }
197 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
198 inline void SetMetricName(MetricName value) {
199 m_metricNameHasBeenSet = true;
200 m_metricName = value;
201 }
203 SetMetricName(value);
204 return *this;
205 }
207
209
217 inline PolicyType GetPolicyType() const { return m_policyType; }
218 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
219 inline void SetPolicyType(PolicyType value) {
220 m_policyTypeHasBeenSet = true;
221 m_policyType = value;
222 }
224 SetPolicyType(value);
225 return *this;
226 }
228
230
233 inline const TargetConfiguration& GetTargetConfiguration() const { return m_targetConfiguration; }
234 inline bool TargetConfigurationHasBeenSet() const { return m_targetConfigurationHasBeenSet; }
235 template <typename TargetConfigurationT = TargetConfiguration>
236 void SetTargetConfiguration(TargetConfigurationT&& value) {
237 m_targetConfigurationHasBeenSet = true;
238 m_targetConfiguration = std::forward<TargetConfigurationT>(value);
239 }
240 template <typename TargetConfigurationT = TargetConfiguration>
241 PutScalingPolicyRequest& WithTargetConfiguration(TargetConfigurationT&& value) {
242 SetTargetConfiguration(std::forward<TargetConfigurationT>(value));
243 return *this;
244 }
246 private:
247 Aws::String m_name;
248
249 Aws::String m_fleetId;
250
251 int m_scalingAdjustment{0};
252
254
255 double m_threshold{0.0};
256
258
259 int m_evaluationPeriods{0};
260
261 MetricName m_metricName{MetricName::NOT_SET};
262
263 PolicyType m_policyType{PolicyType::NOT_SET};
264
265 TargetConfiguration m_targetConfiguration;
266 bool m_nameHasBeenSet = false;
267 bool m_fleetIdHasBeenSet = false;
268 bool m_scalingAdjustmentHasBeenSet = false;
269 bool m_scalingAdjustmentTypeHasBeenSet = false;
270 bool m_thresholdHasBeenSet = false;
271 bool m_comparisonOperatorHasBeenSet = false;
272 bool m_evaluationPeriodsHasBeenSet = false;
273 bool m_metricNameHasBeenSet = false;
274 bool m_policyTypeHasBeenSet = false;
275 bool m_targetConfigurationHasBeenSet = false;
276};
277
278} // namespace Model
279} // namespace GameLift
280} // namespace Aws
PutScalingPolicyRequest & WithPolicyType(PolicyType value)
PutScalingPolicyRequest & WithTargetConfiguration(TargetConfigurationT &&value)
PutScalingPolicyRequest & WithName(NameT &&value)
virtual const char * GetServiceRequestName() const override
AWS_GAMELIFT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutScalingPolicyRequest & WithThreshold(double value)
PutScalingPolicyRequest & WithMetricName(MetricName value)
PutScalingPolicyRequest & WithComparisonOperator(ComparisonOperatorType value)
PutScalingPolicyRequest & WithScalingAdjustment(int value)
PutScalingPolicyRequest & WithScalingAdjustmentType(ScalingAdjustmentType value)
void SetComparisonOperator(ComparisonOperatorType value)
AWS_GAMELIFT_API Aws::String SerializePayload() const override
PutScalingPolicyRequest & WithFleetId(FleetIdT &&value)
const TargetConfiguration & GetTargetConfiguration() const
void SetTargetConfiguration(TargetConfigurationT &&value)
AWS_GAMELIFT_API PutScalingPolicyRequest()=default
PutScalingPolicyRequest & WithEvaluationPeriods(int value)
void SetScalingAdjustmentType(ScalingAdjustmentType value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String