AWS SDK for C++

AWS SDK for C++ Version 1.11.612

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#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Xml
17{
18 class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace AutoScaling
22{
23namespace Model
24{
25
34 {
35 public:
36 AWS_AUTOSCALING_API InstancesDistribution() = default;
37 AWS_AUTOSCALING_API InstancesDistribution(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_AUTOSCALING_API InstancesDistribution& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
64 inline const Aws::String& GetOnDemandAllocationStrategy() const { return m_onDemandAllocationStrategy; }
65 inline bool OnDemandAllocationStrategyHasBeenSet() const { return m_onDemandAllocationStrategyHasBeenSet; }
66 template<typename OnDemandAllocationStrategyT = Aws::String>
67 void SetOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) { m_onDemandAllocationStrategyHasBeenSet = true; m_onDemandAllocationStrategy = std::forward<OnDemandAllocationStrategyT>(value); }
68 template<typename OnDemandAllocationStrategyT = Aws::String>
69 InstancesDistribution& WithOnDemandAllocationStrategy(OnDemandAllocationStrategyT&& value) { SetOnDemandAllocationStrategy(std::forward<OnDemandAllocationStrategyT>(value)); return *this;}
71
73
83 inline int GetOnDemandBaseCapacity() const { return m_onDemandBaseCapacity; }
84 inline bool OnDemandBaseCapacityHasBeenSet() const { return m_onDemandBaseCapacityHasBeenSet; }
85 inline void SetOnDemandBaseCapacity(int value) { m_onDemandBaseCapacityHasBeenSet = true; m_onDemandBaseCapacity = value; }
88
90
96 inline int GetOnDemandPercentageAboveBaseCapacity() const { return m_onDemandPercentageAboveBaseCapacity; }
97 inline bool OnDemandPercentageAboveBaseCapacityHasBeenSet() const { return m_onDemandPercentageAboveBaseCapacityHasBeenSet; }
98 inline void SetOnDemandPercentageAboveBaseCapacity(int value) { m_onDemandPercentageAboveBaseCapacityHasBeenSet = true; m_onDemandPercentageAboveBaseCapacity = value; }
101
103
130 inline const Aws::String& GetSpotAllocationStrategy() const { return m_spotAllocationStrategy; }
131 inline bool SpotAllocationStrategyHasBeenSet() const { return m_spotAllocationStrategyHasBeenSet; }
132 template<typename SpotAllocationStrategyT = Aws::String>
133 void SetSpotAllocationStrategy(SpotAllocationStrategyT&& value) { m_spotAllocationStrategyHasBeenSet = true; m_spotAllocationStrategy = std::forward<SpotAllocationStrategyT>(value); }
134 template<typename SpotAllocationStrategyT = Aws::String>
135 InstancesDistribution& WithSpotAllocationStrategy(SpotAllocationStrategyT&& value) { SetSpotAllocationStrategy(std::forward<SpotAllocationStrategyT>(value)); return *this;}
137
139
146 inline int GetSpotInstancePools() const { return m_spotInstancePools; }
147 inline bool SpotInstancePoolsHasBeenSet() const { return m_spotInstancePoolsHasBeenSet; }
148 inline void SetSpotInstancePools(int value) { m_spotInstancePoolsHasBeenSet = true; m_spotInstancePools = value; }
149 inline InstancesDistribution& WithSpotInstancePools(int value) { SetSpotInstancePools(value); return *this;}
151
153
164 inline const Aws::String& GetSpotMaxPrice() const { return m_spotMaxPrice; }
165 inline bool SpotMaxPriceHasBeenSet() const { return m_spotMaxPriceHasBeenSet; }
166 template<typename SpotMaxPriceT = Aws::String>
167 void SetSpotMaxPrice(SpotMaxPriceT&& value) { m_spotMaxPriceHasBeenSet = true; m_spotMaxPrice = std::forward<SpotMaxPriceT>(value); }
168 template<typename SpotMaxPriceT = Aws::String>
169 InstancesDistribution& WithSpotMaxPrice(SpotMaxPriceT&& value) { SetSpotMaxPrice(std::forward<SpotMaxPriceT>(value)); return *this;}
171 private:
172
173 Aws::String m_onDemandAllocationStrategy;
174 bool m_onDemandAllocationStrategyHasBeenSet = false;
175
176 int m_onDemandBaseCapacity{0};
177 bool m_onDemandBaseCapacityHasBeenSet = false;
178
179 int m_onDemandPercentageAboveBaseCapacity{0};
180 bool m_onDemandPercentageAboveBaseCapacityHasBeenSet = false;
181
182 Aws::String m_spotAllocationStrategy;
183 bool m_spotAllocationStrategyHasBeenSet = false;
184
185 int m_spotInstancePools{0};
186 bool m_spotInstancePoolsHasBeenSet = false;
187
188 Aws::String m_spotMaxPrice;
189 bool m_spotMaxPriceHasBeenSet = false;
190 };
191
192} // namespace Model
193} // namespace AutoScaling
194} // 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