AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
PutScalingPolicyRequest.h
1
6#pragma once
7#include <aws/gamelift/GameLift_EXPORTS.h>
8#include <aws/gamelift/GameLiftRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.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 <utility>
16
17namespace Aws
18{
19namespace GameLift
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_GAMELIFT_API PutScalingPolicyRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "PutScalingPolicy"; }
36
37 AWS_GAMELIFT_API Aws::String SerializePayload() const override;
38
40
41
43
48 inline const Aws::String& GetName() const { return m_name; }
49 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 template<typename NameT = Aws::String>
51 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
52 template<typename NameT = Aws::String>
53 PutScalingPolicyRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
55
57
62 inline const Aws::String& GetFleetId() const { return m_fleetId; }
63 inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; }
64 template<typename FleetIdT = Aws::String>
65 void SetFleetId(FleetIdT&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::forward<FleetIdT>(value); }
66 template<typename FleetIdT = Aws::String>
67 PutScalingPolicyRequest& WithFleetId(FleetIdT&& value) { SetFleetId(std::forward<FleetIdT>(value)); return *this;}
69
71
74 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
75 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
76 inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
77 inline PutScalingPolicyRequest& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
79
81
91 inline ScalingAdjustmentType GetScalingAdjustmentType() const { return m_scalingAdjustmentType; }
92 inline bool ScalingAdjustmentTypeHasBeenSet() const { return m_scalingAdjustmentTypeHasBeenSet; }
93 inline void SetScalingAdjustmentType(ScalingAdjustmentType value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = value; }
96
98
101 inline double GetThreshold() const { return m_threshold; }
102 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
103 inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
104 inline PutScalingPolicyRequest& WithThreshold(double value) { SetThreshold(value); return *this;}
106
108
112 inline ComparisonOperatorType GetComparisonOperator() const { return m_comparisonOperator; }
113 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
114 inline void SetComparisonOperator(ComparisonOperatorType value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
117
119
123 inline int GetEvaluationPeriods() const { return m_evaluationPeriods; }
124 inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; }
125 inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
126 inline PutScalingPolicyRequest& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
128
130
158 inline MetricName GetMetricName() const { return m_metricName; }
159 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
160 inline void SetMetricName(MetricName value) { m_metricNameHasBeenSet = true; m_metricName = value; }
161 inline PutScalingPolicyRequest& WithMetricName(MetricName value) { SetMetricName(value); return *this;}
163
165
173 inline PolicyType GetPolicyType() const { return m_policyType; }
174 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
175 inline void SetPolicyType(PolicyType value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
176 inline PutScalingPolicyRequest& WithPolicyType(PolicyType value) { SetPolicyType(value); return *this;}
178
180
183 inline const TargetConfiguration& GetTargetConfiguration() const { return m_targetConfiguration; }
184 inline bool TargetConfigurationHasBeenSet() const { return m_targetConfigurationHasBeenSet; }
185 template<typename TargetConfigurationT = TargetConfiguration>
186 void SetTargetConfiguration(TargetConfigurationT&& value) { m_targetConfigurationHasBeenSet = true; m_targetConfiguration = std::forward<TargetConfigurationT>(value); }
187 template<typename TargetConfigurationT = TargetConfiguration>
188 PutScalingPolicyRequest& WithTargetConfiguration(TargetConfigurationT&& value) { SetTargetConfiguration(std::forward<TargetConfigurationT>(value)); return *this;}
190 private:
191
192 Aws::String m_name;
193 bool m_nameHasBeenSet = false;
194
195 Aws::String m_fleetId;
196 bool m_fleetIdHasBeenSet = false;
197
198 int m_scalingAdjustment{0};
199 bool m_scalingAdjustmentHasBeenSet = false;
200
202 bool m_scalingAdjustmentTypeHasBeenSet = false;
203
204 double m_threshold{0.0};
205 bool m_thresholdHasBeenSet = false;
206
208 bool m_comparisonOperatorHasBeenSet = false;
209
210 int m_evaluationPeriods{0};
211 bool m_evaluationPeriodsHasBeenSet = false;
212
213 MetricName m_metricName{MetricName::NOT_SET};
214 bool m_metricNameHasBeenSet = false;
215
216 PolicyType m_policyType{PolicyType::NOT_SET};
217 bool m_policyTypeHasBeenSet = false;
218
219 TargetConfiguration m_targetConfiguration;
220 bool m_targetConfigurationHasBeenSet = false;
221 };
222
223} // namespace Model
224} // namespace GameLift
225} // 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