AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
AutoScalingGroupConfiguration.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/AllocationStrategy.h>
9#include <aws/compute-optimizer/model/AsgType.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace ComputeOptimizer {
23namespace Model {
24
32 public:
33 AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration() = default;
34 AWS_COMPUTEOPTIMIZER_API AutoScalingGroupConfiguration(Aws::Utils::Json::JsonView jsonValue);
36 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
43 inline int GetDesiredCapacity() const { return m_desiredCapacity; }
44 inline bool DesiredCapacityHasBeenSet() const { return m_desiredCapacityHasBeenSet; }
45 inline void SetDesiredCapacity(int value) {
46 m_desiredCapacityHasBeenSet = true;
47 m_desiredCapacity = value;
48 }
50 SetDesiredCapacity(value);
51 return *this;
52 }
54
56
60 inline int GetMinSize() const { return m_minSize; }
61 inline bool MinSizeHasBeenSet() const { return m_minSizeHasBeenSet; }
62 inline void SetMinSize(int value) {
63 m_minSizeHasBeenSet = true;
64 m_minSize = value;
65 }
67 SetMinSize(value);
68 return *this;
69 }
71
73
77 inline int GetMaxSize() const { return m_maxSize; }
78 inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; }
79 inline void SetMaxSize(int value) {
80 m_maxSizeHasBeenSet = true;
81 m_maxSize = value;
82 }
84 SetMaxSize(value);
85 return *this;
86 }
88
90
93 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
94 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
95 template <typename InstanceTypeT = Aws::String>
96 void SetInstanceType(InstanceTypeT&& value) {
97 m_instanceTypeHasBeenSet = true;
98 m_instanceType = std::forward<InstanceTypeT>(value);
99 }
100 template <typename InstanceTypeT = Aws::String>
102 SetInstanceType(std::forward<InstanceTypeT>(value));
103 return *this;
104 }
106
108
113 inline AllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
114 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
116 m_allocationStrategyHasBeenSet = true;
117 m_allocationStrategy = value;
118 }
121 return *this;
122 }
124
126
131 inline double GetEstimatedInstanceHourReductionPercentage() const { return m_estimatedInstanceHourReductionPercentage; }
132 inline bool EstimatedInstanceHourReductionPercentageHasBeenSet() const { return m_estimatedInstanceHourReductionPercentageHasBeenSet; }
134 m_estimatedInstanceHourReductionPercentageHasBeenSet = true;
135 m_estimatedInstanceHourReductionPercentage = value;
136 }
139 return *this;
140 }
142
144
148 inline AsgType GetType() const { return m_type; }
149 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
150 inline void SetType(AsgType value) {
151 m_typeHasBeenSet = true;
152 m_type = value;
153 }
155 SetType(value);
156 return *this;
157 }
159
161
165 inline const Aws::Vector<Aws::String>& GetMixedInstanceTypes() const { return m_mixedInstanceTypes; }
166 inline bool MixedInstanceTypesHasBeenSet() const { return m_mixedInstanceTypesHasBeenSet; }
167 template <typename MixedInstanceTypesT = Aws::Vector<Aws::String>>
168 void SetMixedInstanceTypes(MixedInstanceTypesT&& value) {
169 m_mixedInstanceTypesHasBeenSet = true;
170 m_mixedInstanceTypes = std::forward<MixedInstanceTypesT>(value);
171 }
172 template <typename MixedInstanceTypesT = Aws::Vector<Aws::String>>
174 SetMixedInstanceTypes(std::forward<MixedInstanceTypesT>(value));
175 return *this;
176 }
177 template <typename MixedInstanceTypesT = Aws::String>
179 m_mixedInstanceTypesHasBeenSet = true;
180 m_mixedInstanceTypes.emplace_back(std::forward<MixedInstanceTypesT>(value));
181 return *this;
182 }
184 private:
185 int m_desiredCapacity{0};
186
187 int m_minSize{0};
188
189 int m_maxSize{0};
190
191 Aws::String m_instanceType;
192
194
195 double m_estimatedInstanceHourReductionPercentage{0.0};
196
198
199 Aws::Vector<Aws::String> m_mixedInstanceTypes;
200 bool m_desiredCapacityHasBeenSet = false;
201 bool m_minSizeHasBeenSet = false;
202 bool m_maxSizeHasBeenSet = false;
203 bool m_instanceTypeHasBeenSet = false;
204 bool m_allocationStrategyHasBeenSet = false;
205 bool m_estimatedInstanceHourReductionPercentageHasBeenSet = false;
206 bool m_typeHasBeenSet = false;
207 bool m_mixedInstanceTypesHasBeenSet = false;
208};
209
210} // namespace Model
211} // namespace ComputeOptimizer
212} // 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