AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ScalingPolicy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/gamelift/GameLift_EXPORTS.h>
9#include <aws/gamelift/model/ComparisonOperatorType.h>
10#include <aws/gamelift/model/LocationUpdateStatus.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/ScalingStatusType.h>
15#include <aws/gamelift/model/TargetConfiguration.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace GameLift {
27namespace Model {
28
37 public:
38 AWS_GAMELIFT_API ScalingPolicy() = default;
39 AWS_GAMELIFT_API ScalingPolicy(Aws::Utils::Json::JsonView jsonValue);
41 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
48 inline const Aws::String& GetFleetId() const { return m_fleetId; }
49 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
50 template <typename FleetIdT = Aws::String>
51 void SetFleetId(FleetIdT&& value) {
52 m_fleetIdHasBeenSet = true;
53 m_fleetId = std::forward<FleetIdT>(value);
54 }
55 template <typename FleetIdT = Aws::String>
56 ScalingPolicy& WithFleetId(FleetIdT&& value) {
57 SetFleetId(std::forward<FleetIdT>(value));
58 return *this;
59 }
61
63
70 inline const Aws::String& GetFleetArn() const { return m_fleetArn; }
71 inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; }
72 template <typename FleetArnT = Aws::String>
73 void SetFleetArn(FleetArnT&& value) {
74 m_fleetArnHasBeenSet = true;
75 m_fleetArn = std::forward<FleetArnT>(value);
76 }
77 template <typename FleetArnT = Aws::String>
78 ScalingPolicy& WithFleetArn(FleetArnT&& value) {
79 SetFleetArn(std::forward<FleetArnT>(value));
80 return *this;
81 }
83
85
89 inline const Aws::String& GetName() const { return m_name; }
90 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
91 template <typename NameT = Aws::String>
92 void SetName(NameT&& value) {
93 m_nameHasBeenSet = true;
94 m_name = std::forward<NameT>(value);
95 }
96 template <typename NameT = Aws::String>
97 ScalingPolicy& WithName(NameT&& value) {
98 SetName(std::forward<NameT>(value));
99 return *this;
100 }
102
104
118 inline ScalingStatusType GetStatus() const { return m_status; }
119 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
120 inline void SetStatus(ScalingStatusType value) {
121 m_statusHasBeenSet = true;
122 m_status = value;
123 }
125 SetStatus(value);
126 return *this;
127 }
129
131
134 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
135 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
136 inline void SetScalingAdjustment(int value) {
137 m_scalingAdjustmentHasBeenSet = true;
138 m_scalingAdjustment = value;
139 }
142 return *this;
143 }
145
147
157 inline ScalingAdjustmentType GetScalingAdjustmentType() const { return m_scalingAdjustmentType; }
158 inline bool ScalingAdjustmentTypeHasBeenSet() const { return m_scalingAdjustmentTypeHasBeenSet; }
160 m_scalingAdjustmentTypeHasBeenSet = true;
161 m_scalingAdjustmentType = value;
162 }
165 return *this;
166 }
168
170
174 inline ComparisonOperatorType GetComparisonOperator() const { return m_comparisonOperator; }
175 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
177 m_comparisonOperatorHasBeenSet = true;
178 m_comparisonOperator = value;
179 }
182 return *this;
183 }
185
187
190 inline double GetThreshold() const { return m_threshold; }
191 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
192 inline void SetThreshold(double value) {
193 m_thresholdHasBeenSet = true;
194 m_threshold = value;
195 }
196 inline ScalingPolicy& WithThreshold(double value) {
197 SetThreshold(value);
198 return *this;
199 }
201
203
207 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
208 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
209 inline void SetEvaluationPeriods(int value) {
210 m_evaluationPeriodsHasBeenSet = true;
211 m_evaluationPeriods = value;
212 }
215 return *this;
216 }
218
220
248 inline MetricName GetMetricName() const { return m_metricName; }
249 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
250 inline void SetMetricName(MetricName value) {
251 m_metricNameHasBeenSet = true;
252 m_metricName = value;
253 }
255 SetMetricName(value);
256 return *this;
257 }
259
261
269 inline PolicyType GetPolicyType() const { return m_policyType; }
270 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
271 inline void SetPolicyType(PolicyType value) {
272 m_policyTypeHasBeenSet = true;
273 m_policyType = value;
274 }
276 SetPolicyType(value);
277 return *this;
278 }
280
282
285 inline const TargetConfiguration& GetTargetConfiguration() const { return m_targetConfiguration; }
286 inline bool TargetConfigurationHasBeenSet() const { return m_targetConfigurationHasBeenSet; }
287 template <typename TargetConfigurationT = TargetConfiguration>
288 void SetTargetConfiguration(TargetConfigurationT&& value) {
289 m_targetConfigurationHasBeenSet = true;
290 m_targetConfiguration = std::forward<TargetConfigurationT>(value);
291 }
292 template <typename TargetConfigurationT = TargetConfiguration>
293 ScalingPolicy& WithTargetConfiguration(TargetConfigurationT&& value) {
294 SetTargetConfiguration(std::forward<TargetConfigurationT>(value));
295 return *this;
296 }
298
300
305 inline LocationUpdateStatus GetUpdateStatus() const { return m_updateStatus; }
306 inline bool UpdateStatusHasBeenSet() const { return m_updateStatusHasBeenSet; }
308 m_updateStatusHasBeenSet = true;
309 m_updateStatus = value;
310 }
312 SetUpdateStatus(value);
313 return *this;
314 }
316
318
321 inline const Aws::String& GetLocation() const { return m_location; }
322 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
323 template <typename LocationT = Aws::String>
324 void SetLocation(LocationT&& value) {
325 m_locationHasBeenSet = true;
326 m_location = std::forward<LocationT>(value);
327 }
328 template <typename LocationT = Aws::String>
329 ScalingPolicy& WithLocation(LocationT&& value) {
330 SetLocation(std::forward<LocationT>(value));
331 return *this;
332 }
334 private:
335 Aws::String m_fleetId;
336
337 Aws::String m_fleetArn;
338
339 Aws::String m_name;
340
342
343 int m_scalingAdjustment{0};
344
346
348
349 double m_threshold{0.0};
350
351 int m_evaluationPeriods{0};
352
353 MetricName m_metricName{MetricName::NOT_SET};
354
355 PolicyType m_policyType{PolicyType::NOT_SET};
356
357 TargetConfiguration m_targetConfiguration;
358
360
361 Aws::String m_location;
362 bool m_fleetIdHasBeenSet = false;
363 bool m_fleetArnHasBeenSet = false;
364 bool m_nameHasBeenSet = false;
365 bool m_statusHasBeenSet = false;
366 bool m_scalingAdjustmentHasBeenSet = false;
367 bool m_scalingAdjustmentTypeHasBeenSet = false;
368 bool m_comparisonOperatorHasBeenSet = false;
369 bool m_thresholdHasBeenSet = false;
370 bool m_evaluationPeriodsHasBeenSet = false;
371 bool m_metricNameHasBeenSet = false;
372 bool m_policyTypeHasBeenSet = false;
373 bool m_targetConfigurationHasBeenSet = false;
374 bool m_updateStatusHasBeenSet = false;
375 bool m_locationHasBeenSet = false;
376};
377
378} // namespace Model
379} // namespace GameLift
380} // namespace Aws
ScalingAdjustmentType GetScalingAdjustmentType() const
void SetLocation(LocationT &&value)
void SetComparisonOperator(ComparisonOperatorType value)
ScalingPolicy & WithUpdateStatus(LocationUpdateStatus value)
AWS_GAMELIFT_API ScalingPolicy()=default
ScalingPolicy & WithTargetConfiguration(TargetConfigurationT &&value)
ScalingPolicy & WithComparisonOperator(ComparisonOperatorType value)
ComparisonOperatorType GetComparisonOperator() const
ScalingStatusType GetStatus() const
void SetUpdateStatus(LocationUpdateStatus value)
ScalingPolicy & WithLocation(LocationT &&value)
void SetFleetId(FleetIdT &&value)
ScalingPolicy & WithFleetArn(FleetArnT &&value)
LocationUpdateStatus GetUpdateStatus() const
ScalingPolicy & WithFleetId(FleetIdT &&value)
void SetScalingAdjustmentType(ScalingAdjustmentType value)
void SetPolicyType(PolicyType value)
const Aws::String & GetName() const
ScalingPolicy & WithScalingAdjustmentType(ScalingAdjustmentType value)
AWS_GAMELIFT_API ScalingPolicy & operator=(Aws::Utils::Json::JsonView jsonValue)
ScalingPolicy & WithName(NameT &&value)
const TargetConfiguration & GetTargetConfiguration() const
ScalingPolicy & WithScalingAdjustment(int value)
ScalingPolicy & WithThreshold(double value)
ScalingPolicy & WithEvaluationPeriods(int value)
AWS_GAMELIFT_API ScalingPolicy(Aws::Utils::Json::JsonView jsonValue)
AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTargetConfiguration(TargetConfigurationT &&value)
ScalingPolicy & WithPolicyType(PolicyType value)
void SetMetricName(MetricName value)
const Aws::String & GetFleetArn() const
const Aws::String & GetFleetId() const
void SetFleetArn(FleetArnT &&value)
void SetStatus(ScalingStatusType value)
const Aws::String & GetLocation() const
ScalingPolicy & WithMetricName(MetricName value)
ScalingPolicy & WithStatus(ScalingStatusType value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue