AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
AutoScalingGroupConfiguration.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/compute-optimizer/model/AllocationStrategy.h>
10#include <aws/compute-optimizer/model/AsgType.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace ComputeOptimizer
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration() = default;
39 AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration(Aws::Utils::Json::JsonView jsonValue);
41 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
49 inline int GetDesiredCapacity() const { return m_desiredCapacity; }
50 inline bool DesiredCapacityHasBeenSet() const { return m_desiredCapacityHasBeenSet; }
51 inline void SetDesiredCapacity(int value) { m_desiredCapacityHasBeenSet = true; m_desiredCapacity = value; }
52 inline AutoScalingGroupConfiguration& WithDesiredCapacity(int value) { SetDesiredCapacity(value); return *this;}
54
56
60 inline int GetMinSize() const { return m_minSize; }
61 inline bool MinSizeHasBeenSet() const { return m_minSizeHasBeenSet; }
62 inline void SetMinSize(int value) { m_minSizeHasBeenSet = true; m_minSize = value; }
63 inline AutoScalingGroupConfiguration& WithMinSize(int value) { SetMinSize(value); return *this;}
65
67
71 inline int GetMaxSize() const { return m_maxSize; }
72 inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; }
73 inline void SetMaxSize(int value) { m_maxSizeHasBeenSet = true; m_maxSize = value; }
74 inline AutoScalingGroupConfiguration& WithMaxSize(int value) { SetMaxSize(value); return *this;}
76
78
81 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
82 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
83 template<typename InstanceTypeT = Aws::String>
84 void SetInstanceType(InstanceTypeT&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
85 template<typename InstanceTypeT = Aws::String>
86 AutoScalingGroupConfiguration& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
88
90
95 inline AllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
96 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
97 inline void SetAllocationStrategy(AllocationStrategy value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
100
102
107 inline double GetEstimatedInstanceHourReductionPercentage() const { return m_estimatedInstanceHourReductionPercentage; }
108 inline bool EstimatedInstanceHourReductionPercentageHasBeenSet() const { return m_estimatedInstanceHourReductionPercentageHasBeenSet; }
109 inline void SetEstimatedInstanceHourReductionPercentage(double value) { m_estimatedInstanceHourReductionPercentageHasBeenSet = true; m_estimatedInstanceHourReductionPercentage = value; }
112
114
118 inline AsgType GetType() const { return m_type; }
119 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
120 inline void SetType(AsgType value) { m_typeHasBeenSet = true; m_type = value; }
121 inline AutoScalingGroupConfiguration& WithType(AsgType value) { SetType(value); return *this;}
123
125
129 inline const Aws::Vector<Aws::String>& GetMixedInstanceTypes() const { return m_mixedInstanceTypes; }
130 inline bool MixedInstanceTypesHasBeenSet() const { return m_mixedInstanceTypesHasBeenSet; }
131 template<typename MixedInstanceTypesT = Aws::Vector<Aws::String>>
132 void SetMixedInstanceTypes(MixedInstanceTypesT&& value) { m_mixedInstanceTypesHasBeenSet = true; m_mixedInstanceTypes = std::forward<MixedInstanceTypesT>(value); }
133 template<typename MixedInstanceTypesT = Aws::Vector<Aws::String>>
134 AutoScalingGroupConfiguration& WithMixedInstanceTypes(MixedInstanceTypesT&& value) { SetMixedInstanceTypes(std::forward<MixedInstanceTypesT>(value)); return *this;}
135 template<typename MixedInstanceTypesT = Aws::String>
136 AutoScalingGroupConfiguration& AddMixedInstanceTypes(MixedInstanceTypesT&& value) { m_mixedInstanceTypesHasBeenSet = true; m_mixedInstanceTypes.emplace_back(std::forward<MixedInstanceTypesT>(value)); return *this; }
138 private:
139
140 int m_desiredCapacity{0};
141 bool m_desiredCapacityHasBeenSet = false;
142
143 int m_minSize{0};
144 bool m_minSizeHasBeenSet = false;
145
146 int m_maxSize{0};
147 bool m_maxSizeHasBeenSet = false;
148
149 Aws::String m_instanceType;
150 bool m_instanceTypeHasBeenSet = false;
151
153 bool m_allocationStrategyHasBeenSet = false;
154
155 double m_estimatedInstanceHourReductionPercentage{0.0};
156 bool m_estimatedInstanceHourReductionPercentageHasBeenSet = false;
157
159 bool m_typeHasBeenSet = false;
160
161 Aws::Vector<Aws::String> m_mixedInstanceTypes;
162 bool m_mixedInstanceTypesHasBeenSet = false;
163 };
164
165} // namespace Model
166} // namespace ComputeOptimizer
167} // namespace Aws
AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const
AutoScalingGroupConfiguration & WithAllocationStrategy(AllocationStrategy value)
AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration()=default
AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AutoScalingGroupConfiguration & WithMixedInstanceTypes(MixedInstanceTypesT &&value)
AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration(Aws::Utils::Json::JsonView jsonValue)
AutoScalingGroupConfiguration & WithInstanceType(InstanceTypeT &&value)
AutoScalingGroupConfiguration & AddMixedInstanceTypes(MixedInstanceTypesT &&value)
AutoScalingGroupConfiguration & WithEstimatedInstanceHourReductionPercentage(double value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue