AWS SDK for C++

AWS SDK for C++ Version 1.11.889

Loading...
Searching...
No Matches
InstancesDistribution.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/DistributionSegment.h>
9#include <aws/core/utils/memory/stl/AWSStreamFwd.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 Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace AutoScaling {
22namespace Model {
23
33 public:
34 AWS_AUTOSCALING_API InstancesDistribution() = default;
35 AWS_AUTOSCALING_API InstancesDistribution(const Aws::Utils::Xml::XmlNode& xmlNode);
36 AWS_AUTOSCALING_API InstancesDistribution& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
61 inline const Aws::String& GetOnDemandAllocationStrategy() const { return m_onDemandAllocationStrategy; }
62 inline bool OnDemandAllocationStrategyHasBeenSet() const { return m_onDemandAllocationStrategyHasBeenSet; }
63 template <typename OnDemandAllocationStrategyT = Aws::String>
64 void SetOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) {
65 m_onDemandAllocationStrategyHasBeenSet = true;
66 m_onDemandAllocationStrategy = std::forward<OnDemandAllocationStrategyT>(value);
67 }
68 template <typename OnDemandAllocationStrategyT = Aws::String>
69 InstancesDistribution& WithOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) {
70 SetOnDemandAllocationStrategy(std::forward<OnDemandAllocationStrategyT>(value));
71 return *this;
72 }
74
76
86 inline int GetOnDemandBaseCapacity() const { return m_onDemandBaseCapacity; }
87 inline bool OnDemandBaseCapacityHasBeenSet() const { return m_onDemandBaseCapacityHasBeenSet; }
88 inline void SetOnDemandBaseCapacity(int value) {
89 m_onDemandBaseCapacityHasBeenSet = true;
90 m_onDemandBaseCapacity = value;
91 }
94 return *this;
95 }
97
99
105 inline int GetOnDemandPercentageAboveBaseCapacity() const { return m_onDemandPercentageAboveBaseCapacity; }
106 inline bool OnDemandPercentageAboveBaseCapacityHasBeenSet() const { return m_onDemandPercentageAboveBaseCapacityHasBeenSet; }
108 m_onDemandPercentageAboveBaseCapacityHasBeenSet = true;
109 m_onDemandPercentageAboveBaseCapacity = value;
110 }
113 return *this;
114 }
116
118
145 inline const Aws::String& GetSpotAllocationStrategy() const { return m_spotAllocationStrategy; }
146 inline bool SpotAllocationStrategyHasBeenSet() const { return m_spotAllocationStrategyHasBeenSet; }
147 template <typename SpotAllocationStrategyT = Aws::String>
148 void SetSpotAllocationStrategy(SpotAllocationStrategyT&& value) {
149 m_spotAllocationStrategyHasBeenSet = true;
150 m_spotAllocationStrategy = std::forward<SpotAllocationStrategyT>(value);
151 }
152 template <typename SpotAllocationStrategyT = Aws::String>
153 InstancesDistribution& WithSpotAllocationStrategy(SpotAllocationStrategyT&& value) {
154 SetSpotAllocationStrategy(std::forward<SpotAllocationStrategyT>(value));
155 return *this;
156 }
158
160
167 inline int GetSpotInstancePools() const { return m_spotInstancePools; }
168 inline bool SpotInstancePoolsHasBeenSet() const { return m_spotInstancePoolsHasBeenSet; }
169 inline void SetSpotInstancePools(int value) {
170 m_spotInstancePoolsHasBeenSet = true;
171 m_spotInstancePools = value;
172 }
175 return *this;
176 }
178
180
191 inline const Aws::String& GetSpotMaxPrice() const { return m_spotMaxPrice; }
192 inline bool SpotMaxPriceHasBeenSet() const { return m_spotMaxPriceHasBeenSet; }
193 template <typename SpotMaxPriceT = Aws::String>
194 void SetSpotMaxPrice(SpotMaxPriceT&& value) {
195 m_spotMaxPriceHasBeenSet = true;
196 m_spotMaxPrice = std::forward<SpotMaxPriceT>(value);
197 }
198 template <typename SpotMaxPriceT = Aws::String>
199 InstancesDistribution& WithSpotMaxPrice(SpotMaxPriceT&& value) {
200 SetSpotMaxPrice(std::forward<SpotMaxPriceT>(value));
201 return *this;
202 }
204
206
213 inline const Aws::Vector<DistributionSegment>& GetDistributionSegments() const { return m_distributionSegments; }
214 inline bool DistributionSegmentsHasBeenSet() const { return m_distributionSegmentsHasBeenSet; }
215 template <typename DistributionSegmentsT = Aws::Vector<DistributionSegment>>
216 void SetDistributionSegments(DistributionSegmentsT&& value) {
217 m_distributionSegmentsHasBeenSet = true;
218 m_distributionSegments = std::forward<DistributionSegmentsT>(value);
219 }
220 template <typename DistributionSegmentsT = Aws::Vector<DistributionSegment>>
221 InstancesDistribution& WithDistributionSegments(DistributionSegmentsT&& value) {
222 SetDistributionSegments(std::forward<DistributionSegmentsT>(value));
223 return *this;
224 }
225 template <typename DistributionSegmentsT = DistributionSegment>
226 InstancesDistribution& AddDistributionSegments(DistributionSegmentsT&& value) {
227 m_distributionSegmentsHasBeenSet = true;
228 m_distributionSegments.emplace_back(std::forward<DistributionSegmentsT>(value));
229 return *this;
230 }
232 private:
233 Aws::String m_onDemandAllocationStrategy;
234
235 int m_onDemandBaseCapacity{0};
236
237 int m_onDemandPercentageAboveBaseCapacity{0};
238
239 Aws::String m_spotAllocationStrategy;
240
241 int m_spotInstancePools{0};
242
243 Aws::String m_spotMaxPrice;
244
245 Aws::Vector<DistributionSegment> m_distributionSegments;
246 bool m_onDemandAllocationStrategyHasBeenSet = false;
247 bool m_onDemandBaseCapacityHasBeenSet = false;
248 bool m_onDemandPercentageAboveBaseCapacityHasBeenSet = false;
249 bool m_spotAllocationStrategyHasBeenSet = false;
250 bool m_spotInstancePoolsHasBeenSet = false;
251 bool m_spotMaxPriceHasBeenSet = false;
252 bool m_distributionSegmentsHasBeenSet = false;
253};
254
255} // namespace Model
256} // namespace AutoScaling
257} // namespace Aws
AWS_AUTOSCALING_API InstancesDistribution(const Aws::Utils::Xml::XmlNode &xmlNode)
InstancesDistribution & WithOnDemandBaseCapacity(int value)
InstancesDistribution & WithSpotInstancePools(int value)
void SetDistributionSegments(DistributionSegmentsT &&value)
void SetOnDemandAllocationStrategy(OnDemandAllocationStrategyT &&value)
void SetSpotAllocationStrategy(SpotAllocationStrategyT &&value)
InstancesDistribution & WithSpotMaxPrice(SpotMaxPriceT &&value)
AWS_AUTOSCALING_API InstancesDistribution()=default
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
InstancesDistribution & WithOnDemandPercentageAboveBaseCapacity(int value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
InstancesDistribution & WithSpotAllocationStrategy(SpotAllocationStrategyT &&value)
InstancesDistribution & WithDistributionSegments(DistributionSegmentsT &&value)
InstancesDistribution & WithOnDemandAllocationStrategy(OnDemandAllocationStrategyT &&value)
AWS_AUTOSCALING_API InstancesDistribution & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
InstancesDistribution & AddDistributionSegments(DistributionSegmentsT &&value)
const Aws::Vector< DistributionSegment > & GetDistributionSegments() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream