AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
ScalingPolicy.h
1
6#pragma once
7#include <aws/gamelift/GameLift_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/gamelift/model/ScalingStatusType.h>
10#include <aws/gamelift/model/ScalingAdjustmentType.h>
11#include <aws/gamelift/model/ComparisonOperatorType.h>
12#include <aws/gamelift/model/MetricName.h>
13#include <aws/gamelift/model/PolicyType.h>
14#include <aws/gamelift/model/TargetConfiguration.h>
15#include <aws/gamelift/model/LocationUpdateStatus.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace GameLift
29{
30namespace Model
31{
32
41 {
42 public:
43 AWS_GAMELIFT_API ScalingPolicy() = default;
44 AWS_GAMELIFT_API ScalingPolicy(Aws::Utils::Json::JsonView jsonValue);
46 AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
54 inline const Aws::String& GetFleetId() const { return m_fleetId; }
55 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
56 template<typename FleetIdT = Aws::String>
57 void SetFleetId(FleetIdT&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::forward<FleetIdT>(value); }
58 template<typename FleetIdT = Aws::String>
59 ScalingPolicy& WithFleetId(FleetIdT&& value) { SetFleetId(std::forward<FleetIdT>(value)); return *this;}
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) { m_fleetArnHasBeenSet = true; m_fleetArn = std::forward<FleetArnT>(value); }
74 template<typename FleetArnT = Aws::String>
75 ScalingPolicy& WithFleetArn(FleetArnT&& value) { SetFleetArn(std::forward<FleetArnT>(value)); return *this;}
77
79
83 inline const Aws::String& GetName() const { return m_name; }
84 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
85 template<typename NameT = Aws::String>
86 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
87 template<typename NameT = Aws::String>
88 ScalingPolicy& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
90
92
106 inline ScalingStatusType GetStatus() const { return m_status; }
107 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
108 inline void SetStatus(ScalingStatusType value) { m_statusHasBeenSet = true; m_status = value; }
109 inline ScalingPolicy& WithStatus(ScalingStatusType value) { SetStatus(value); return *this;}
111
113
116 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
117 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
118 inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
119 inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
121
123
133 inline ScalingAdjustmentType GetScalingAdjustmentType() const { return m_scalingAdjustmentType; }
134 inline bool ScalingAdjustmentTypeHasBeenSet() const { return m_scalingAdjustmentTypeHasBeenSet; }
135 inline void SetScalingAdjustmentType(ScalingAdjustmentType value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = value; }
138
140
144 inline ComparisonOperatorType GetComparisonOperator() const { return m_comparisonOperator; }
145 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
146 inline void SetComparisonOperator(ComparisonOperatorType value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
149
151
154 inline double GetThreshold() const { return m_threshold; }
155 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
156 inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
157 inline ScalingPolicy& WithThreshold(double value) { SetThreshold(value); return *this;}
159
161
165 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
166 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
167 inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
168 inline ScalingPolicy& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
170
172
200 inline MetricName GetMetricName() const { return m_metricName; }
201 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
202 inline void SetMetricName(MetricName value) { m_metricNameHasBeenSet = true; m_metricName = value; }
203 inline ScalingPolicy& WithMetricName(MetricName value) { SetMetricName(value); return *this;}
205
207
215 inline PolicyType GetPolicyType() const { return m_policyType; }
216 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
217 inline void SetPolicyType(PolicyType value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
218 inline ScalingPolicy& WithPolicyType(PolicyType value) { SetPolicyType(value); return *this;}
220
222
225 inline const TargetConfiguration& GetTargetConfiguration() const { return m_targetConfiguration; }
226 inline bool TargetConfigurationHasBeenSet() const { return m_targetConfigurationHasBeenSet; }
227 template<typename TargetConfigurationT = TargetConfiguration>
228 void SetTargetConfiguration(TargetConfigurationT&& value) { m_targetConfigurationHasBeenSet = true; m_targetConfiguration = std::forward<TargetConfigurationT>(value); }
229 template<typename TargetConfigurationT = TargetConfiguration>
230 ScalingPolicy& WithTargetConfiguration(TargetConfigurationT&& value) { SetTargetConfiguration(std::forward<TargetConfigurationT>(value)); return *this;}
232
234
239 inline LocationUpdateStatus GetUpdateStatus() const { return m_updateStatus; }
240 inline bool UpdateStatusHasBeenSet() const { return m_updateStatusHasBeenSet; }
241 inline void SetUpdateStatus(LocationUpdateStatus value) { m_updateStatusHasBeenSet = true; m_updateStatus = value; }
244
246
249 inline const Aws::String& GetLocation() const { return m_location; }
250 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
251 template<typename LocationT = Aws::String>
252 void SetLocation(LocationT&& value) { m_locationHasBeenSet = true; m_location = std::forward<LocationT>(value); }
253 template<typename LocationT = Aws::String>
254 ScalingPolicy& WithLocation(LocationT&& value) { SetLocation(std::forward<LocationT>(value)); return *this;}
256 private:
257
258 Aws::String m_fleetId;
259 bool m_fleetIdHasBeenSet = false;
260
261 Aws::String m_fleetArn;
262 bool m_fleetArnHasBeenSet = false;
263
264 Aws::String m_name;
265 bool m_nameHasBeenSet = false;
266
268 bool m_statusHasBeenSet = false;
269
270 int m_scalingAdjustment{0};
271 bool m_scalingAdjustmentHasBeenSet = false;
272
274 bool m_scalingAdjustmentTypeHasBeenSet = false;
275
277 bool m_comparisonOperatorHasBeenSet = false;
278
279 double m_threshold{0.0};
280 bool m_thresholdHasBeenSet = false;
281
282 int m_evaluationPeriods{0};
283 bool m_evaluationPeriodsHasBeenSet = false;
284
285 MetricName m_metricName{MetricName::NOT_SET};
286 bool m_metricNameHasBeenSet = false;
287
288 PolicyType m_policyType{PolicyType::NOT_SET};
289 bool m_policyTypeHasBeenSet = false;
290
291 TargetConfiguration m_targetConfiguration;
292 bool m_targetConfigurationHasBeenSet = false;
293
295 bool m_updateStatusHasBeenSet = false;
296
297 Aws::String m_location;
298 bool m_locationHasBeenSet = false;
299 };
300
301} // namespace Model
302} // namespace GameLift
303} // 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