AWS SDK for C++  0.14.3
AWS SDK for C++
ScalingPolicy.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Json
28 {
29  class JsonValue;
30 } // namespace Json
31 } // namespace Utils
32 namespace GameLift
33 {
34 namespace Model
35 {
36 
42  {
43  public:
44  ScalingPolicy();
46  ScalingPolicy& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
52  inline const Aws::String& GetFleetId() const{ return m_fleetId; }
53 
57  inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; }
58 
62  inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; }
63 
67  inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); }
68 
72  inline ScalingPolicy& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;}
73 
77  inline ScalingPolicy& WithFleetId(Aws::String&& value) { SetFleetId(value); return *this;}
78 
82  inline ScalingPolicy& WithFleetId(const char* value) { SetFleetId(value); return *this;}
83 
88  inline const Aws::String& GetName() const{ return m_name; }
89 
94  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
95 
100  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
101 
106  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
107 
112  inline ScalingPolicy& WithName(const Aws::String& value) { SetName(value); return *this;}
113 
118  inline ScalingPolicy& WithName(Aws::String&& value) { SetName(value); return *this;}
119 
124  inline ScalingPolicy& WithName(const char* value) { SetName(value); return *this;}
125 
137  inline const ScalingStatusType& GetStatus() const{ return m_status; }
138 
150  inline void SetStatus(const ScalingStatusType& value) { m_statusHasBeenSet = true; m_status = value; }
151 
163  inline void SetStatus(ScalingStatusType&& value) { m_statusHasBeenSet = true; m_status = value; }
164 
176  inline ScalingPolicy& WithStatus(const ScalingStatusType& value) { SetStatus(value); return *this;}
177 
189  inline ScalingPolicy& WithStatus(ScalingStatusType&& value) { SetStatus(value); return *this;}
190 
194  inline int GetScalingAdjustment() const{ return m_scalingAdjustment; }
195 
199  inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
200 
204  inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
205 
216  inline const ScalingAdjustmentType& GetScalingAdjustmentType() const{ return m_scalingAdjustmentType; }
217 
228  inline void SetScalingAdjustmentType(const ScalingAdjustmentType& value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = value; }
229 
240  inline void SetScalingAdjustmentType(ScalingAdjustmentType&& value) { m_scalingAdjustmentTypeHasBeenSet = true; m_scalingAdjustmentType = value; }
241 
252  inline ScalingPolicy& WithScalingAdjustmentType(const ScalingAdjustmentType& value) { SetScalingAdjustmentType(value); return *this;}
253 
264  inline ScalingPolicy& WithScalingAdjustmentType(ScalingAdjustmentType&& value) { SetScalingAdjustmentType(value); return *this;}
265 
270  inline const ComparisonOperatorType& GetComparisonOperator() const{ return m_comparisonOperator; }
271 
276  inline void SetComparisonOperator(const ComparisonOperatorType& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
277 
282  inline void SetComparisonOperator(ComparisonOperatorType&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; }
283 
288  inline ScalingPolicy& WithComparisonOperator(const ComparisonOperatorType& value) { SetComparisonOperator(value); return *this;}
289 
294  inline ScalingPolicy& WithComparisonOperator(ComparisonOperatorType&& value) { SetComparisonOperator(value); return *this;}
295 
299  inline double GetThreshold() const{ return m_threshold; }
300 
304  inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; }
305 
309  inline ScalingPolicy& WithThreshold(double value) { SetThreshold(value); return *this;}
310 
315  inline int GetEvaluationPeriods() const{ return m_evaluationPeriods; }
316 
321  inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; }
322 
327  inline ScalingPolicy& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;}
328 
346  inline const MetricName& GetMetricName() const{ return m_metricName; }
347 
365  inline void SetMetricName(const MetricName& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
366 
384  inline void SetMetricName(MetricName&& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
385 
403  inline ScalingPolicy& WithMetricName(const MetricName& value) { SetMetricName(value); return *this;}
404 
422  inline ScalingPolicy& WithMetricName(MetricName&& value) { SetMetricName(value); return *this;}
423 
424  private:
425  Aws::String m_fleetId;
426  bool m_fleetIdHasBeenSet;
427  Aws::String m_name;
428  bool m_nameHasBeenSet;
429  ScalingStatusType m_status;
430  bool m_statusHasBeenSet;
431  int m_scalingAdjustment;
432  bool m_scalingAdjustmentHasBeenSet;
433  ScalingAdjustmentType m_scalingAdjustmentType;
434  bool m_scalingAdjustmentTypeHasBeenSet;
435  ComparisonOperatorType m_comparisonOperator;
436  bool m_comparisonOperatorHasBeenSet;
437  double m_threshold;
438  bool m_thresholdHasBeenSet;
439  int m_evaluationPeriods;
440  bool m_evaluationPeriodsHasBeenSet;
441  MetricName m_metricName;
442  bool m_metricNameHasBeenSet;
443  };
444 
445 } // namespace Model
446 } // namespace GameLift
447 } // namespace Aws
void SetStatus(const ScalingStatusType &value)
ScalingPolicy & WithEvaluationPeriods(int value)
const ScalingAdjustmentType & GetScalingAdjustmentType() const
#define AWS_GAMELIFT_API
ScalingPolicy & WithMetricName(MetricName &&value)
void SetScalingAdjustmentType(ScalingAdjustmentType &&value)
ScalingPolicy & WithName(const char *value)
void SetName(const char *value)
ScalingPolicy & WithThreshold(double value)
void SetMetricName(const MetricName &value)
void SetMetricName(MetricName &&value)
ScalingPolicy & WithFleetId(const Aws::String &value)
Definition: ScalingPolicy.h:72
ScalingPolicy & WithFleetId(Aws::String &&value)
Definition: ScalingPolicy.h:77
ScalingPolicy & WithComparisonOperator(const ComparisonOperatorType &value)
void SetFleetId(const Aws::String &value)
Definition: ScalingPolicy.h:57
ScalingPolicy & WithName(const Aws::String &value)
ScalingPolicy & WithFleetId(const char *value)
Definition: ScalingPolicy.h:82
ScalingPolicy & WithName(Aws::String &&value)
ScalingPolicy & WithScalingAdjustment(int value)
const Aws::String & GetName() const
Definition: ScalingPolicy.h:88
void SetName(const Aws::String &value)
Definition: ScalingPolicy.h:94
ScalingPolicy & WithStatus(const ScalingStatusType &value)
ScalingPolicy & WithStatus(ScalingStatusType &&value)
void SetComparisonOperator(ComparisonOperatorType &&value)
void SetName(Aws::String &&value)
void SetComparisonOperator(const ComparisonOperatorType &value)
void SetScalingAdjustmentType(const ScalingAdjustmentType &value)
const Aws::String & GetFleetId() const
Definition: ScalingPolicy.h:52
void SetStatus(ScalingStatusType &&value)
void SetFleetId(const char *value)
Definition: ScalingPolicy.h:67
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ScalingPolicy & WithComparisonOperator(ComparisonOperatorType &&value)
const MetricName & GetMetricName() const
const ScalingStatusType & GetStatus() const
void SetFleetId(Aws::String &&value)
Definition: ScalingPolicy.h:62
ScalingPolicy & WithScalingAdjustmentType(ScalingAdjustmentType &&value)
const ComparisonOperatorType & GetComparisonOperator() const
ScalingPolicy & WithScalingAdjustmentType(const ScalingAdjustmentType &value)
ScalingPolicy & WithMetricName(const MetricName &value)
JSON (JavaScript Object Notation).