AWS SDK for C++

AWS SDK for C++ Version 1.11.752

Loading...
Searching...
No Matches
InstancesDistribution.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace AutoScaling {
20namespace Model {
21
30 public:
31 AWS_AUTOSCALING_API InstancesDistribution() = default;
32 AWS_AUTOSCALING_API InstancesDistribution(const Aws::Utils::Xml::XmlNode& xmlNode);
33 AWS_AUTOSCALING_API InstancesDistribution& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
34
35 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
58 inline const Aws::String& GetOnDemandAllocationStrategy() const { return m_onDemandAllocationStrategy; }
59 inline bool OnDemandAllocationStrategyHasBeenSet() const { return m_onDemandAllocationStrategyHasBeenSet; }
60 template <typename OnDemandAllocationStrategyT = Aws::String>
61 void SetOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) {
62 m_onDemandAllocationStrategyHasBeenSet = true;
63 m_onDemandAllocationStrategy = std::forward<OnDemandAllocationStrategyT>(value);
64 }
65 template <typename OnDemandAllocationStrategyT = Aws::String>
66 InstancesDistribution& WithOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) {
67 SetOnDemandAllocationStrategy(std::forward<OnDemandAllocationStrategyT>(value));
68 return *this;
69 }
71
73
83 inline int GetOnDemandBaseCapacity() const { return m_onDemandBaseCapacity; }
84 inline bool OnDemandBaseCapacityHasBeenSet() const { return m_onDemandBaseCapacityHasBeenSet; }
85 inline void SetOnDemandBaseCapacity(int value) {
86 m_onDemandBaseCapacityHasBeenSet = true;
87 m_onDemandBaseCapacity = value;
88 }
91 return *this;
92 }
94
96
102 inline int GetOnDemandPercentageAboveBaseCapacity() const { return m_onDemandPercentageAboveBaseCapacity; }
103 inline bool OnDemandPercentageAboveBaseCapacityHasBeenSet() const { return m_onDemandPercentageAboveBaseCapacityHasBeenSet; }
105 m_onDemandPercentageAboveBaseCapacityHasBeenSet = true;
106 m_onDemandPercentageAboveBaseCapacity = value;
107 }
110 return *this;
111 }
113
115
142 inline const Aws::String& GetSpotAllocationStrategy() const { return m_spotAllocationStrategy; }
143 inline bool SpotAllocationStrategyHasBeenSet() const { return m_spotAllocationStrategyHasBeenSet; }
144 template <typename SpotAllocationStrategyT = Aws::String>
145 void SetSpotAllocationStrategy(SpotAllocationStrategyT&& value) {
146 m_spotAllocationStrategyHasBeenSet = true;
147 m_spotAllocationStrategy = std::forward<SpotAllocationStrategyT>(value);
148 }
149 template <typename SpotAllocationStrategyT = Aws::String>
150 InstancesDistribution& WithSpotAllocationStrategy(SpotAllocationStrategyT&& value) {
151 SetSpotAllocationStrategy(std::forward<SpotAllocationStrategyT>(value));
152 return *this;
153 }
155
157
164 inline int GetSpotInstancePools() const { return m_spotInstancePools; }
165 inline bool SpotInstancePoolsHasBeenSet() const { return m_spotInstancePoolsHasBeenSet; }
166 inline void SetSpotInstancePools(int value) {
167 m_spotInstancePoolsHasBeenSet = true;
168 m_spotInstancePools = value;
169 }
172 return *this;
173 }
175
177
188 inline const Aws::String& GetSpotMaxPrice() const { return m_spotMaxPrice; }
189 inline bool SpotMaxPriceHasBeenSet() const { return m_spotMaxPriceHasBeenSet; }
190 template <typename SpotMaxPriceT = Aws::String>
191 void SetSpotMaxPrice(SpotMaxPriceT&& value) {
192 m_spotMaxPriceHasBeenSet = true;
193 m_spotMaxPrice = std::forward<SpotMaxPriceT>(value);
194 }
195 template <typename SpotMaxPriceT = Aws::String>
196 InstancesDistribution& WithSpotMaxPrice(SpotMaxPriceT&& value) {
197 SetSpotMaxPrice(std::forward<SpotMaxPriceT>(value));
198 return *this;
199 }
201 private:
202 Aws::String m_onDemandAllocationStrategy;
203
204 int m_onDemandBaseCapacity{0};
205
206 int m_onDemandPercentageAboveBaseCapacity{0};
207
208 Aws::String m_spotAllocationStrategy;
209
210 int m_spotInstancePools{0};
211
212 Aws::String m_spotMaxPrice;
213 bool m_onDemandAllocationStrategyHasBeenSet = false;
214 bool m_onDemandBaseCapacityHasBeenSet = false;
215 bool m_onDemandPercentageAboveBaseCapacityHasBeenSet = false;
216 bool m_spotAllocationStrategyHasBeenSet = false;
217 bool m_spotInstancePoolsHasBeenSet = false;
218 bool m_spotMaxPriceHasBeenSet = false;
219};
220
221} // namespace Model
222} // namespace AutoScaling
223} // namespace Aws
AWS_AUTOSCALING_API InstancesDistribution(const Aws::Utils::Xml::XmlNode &xmlNode)
InstancesDistribution & WithOnDemandBaseCapacity(int value)
InstancesDistribution & WithSpotInstancePools(int 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 & WithOnDemandAllocationStrategy(OnDemandAllocationStrategyT &&value)
AWS_AUTOSCALING_API InstancesDistribution & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream