AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
OnDemandOptionsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/CapacityReservationOptionsRequest.h>
11#include <aws/ec2/model/FleetOnDemandAllocationStrategy.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
31 public:
32 AWS_EC2_API OnDemandOptionsRequest() = default;
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
48 inline FleetOnDemandAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
49 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
51 m_allocationStrategyHasBeenSet = true;
52 m_allocationStrategy = value;
53 }
56 return *this;
57 }
59
61
65 inline const CapacityReservationOptionsRequest& GetCapacityReservationOptions() const { return m_capacityReservationOptions; }
66 inline bool CapacityReservationOptionsHasBeenSet() const { return m_capacityReservationOptionsHasBeenSet; }
67 template <typename CapacityReservationOptionsT = CapacityReservationOptionsRequest>
68 void SetCapacityReservationOptions(CapacityReservationOptionsT&& value) {
69 m_capacityReservationOptionsHasBeenSet = true;
70 m_capacityReservationOptions = std::forward<CapacityReservationOptionsT>(value);
71 }
72 template <typename CapacityReservationOptionsT = CapacityReservationOptionsRequest>
73 OnDemandOptionsRequest& WithCapacityReservationOptions(CapacityReservationOptionsT&& value) {
74 SetCapacityReservationOptions(std::forward<CapacityReservationOptionsT>(value));
75 return *this;
76 }
78
80
85 inline bool GetSingleInstanceType() const { return m_singleInstanceType; }
86 inline bool SingleInstanceTypeHasBeenSet() const { return m_singleInstanceTypeHasBeenSet; }
87 inline void SetSingleInstanceType(bool value) {
88 m_singleInstanceTypeHasBeenSet = true;
89 m_singleInstanceType = value;
90 }
93 return *this;
94 }
96
98
103 inline bool GetSingleAvailabilityZone() const { return m_singleAvailabilityZone; }
104 inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; }
105 inline void SetSingleAvailabilityZone(bool value) {
106 m_singleAvailabilityZoneHasBeenSet = true;
107 m_singleAvailabilityZone = value;
108 }
111 return *this;
112 }
114
116
123 inline int GetMinTargetCapacity() const { return m_minTargetCapacity; }
124 inline bool MinTargetCapacityHasBeenSet() const { return m_minTargetCapacityHasBeenSet; }
125 inline void SetMinTargetCapacity(int value) {
126 m_minTargetCapacityHasBeenSet = true;
127 m_minTargetCapacity = value;
128 }
131 return *this;
132 }
134
136
147 inline const Aws::String& GetMaxTotalPrice() const { return m_maxTotalPrice; }
148 inline bool MaxTotalPriceHasBeenSet() const { return m_maxTotalPriceHasBeenSet; }
149 template <typename MaxTotalPriceT = Aws::String>
150 void SetMaxTotalPrice(MaxTotalPriceT&& value) {
151 m_maxTotalPriceHasBeenSet = true;
152 m_maxTotalPrice = std::forward<MaxTotalPriceT>(value);
153 }
154 template <typename MaxTotalPriceT = Aws::String>
155 OnDemandOptionsRequest& WithMaxTotalPrice(MaxTotalPriceT&& value) {
156 SetMaxTotalPrice(std::forward<MaxTotalPriceT>(value));
157 return *this;
158 }
160 private:
162
163 CapacityReservationOptionsRequest m_capacityReservationOptions;
164
165 bool m_singleInstanceType{false};
166
167 bool m_singleAvailabilityZone{false};
168
169 int m_minTargetCapacity{0};
170
171 Aws::String m_maxTotalPrice;
172 bool m_allocationStrategyHasBeenSet = false;
173 bool m_capacityReservationOptionsHasBeenSet = false;
174 bool m_singleInstanceTypeHasBeenSet = false;
175 bool m_singleAvailabilityZoneHasBeenSet = false;
176 bool m_minTargetCapacityHasBeenSet = false;
177 bool m_maxTotalPriceHasBeenSet = false;
178};
179
180} // namespace Model
181} // namespace EC2
182} // namespace Aws
AWS_EC2_API OnDemandOptionsRequest & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
OnDemandOptionsRequest & WithMaxTotalPrice(MaxTotalPriceT &&value)
void SetAllocationStrategy(FleetOnDemandAllocationStrategy value)
OnDemandOptionsRequest & WithSingleAvailabilityZone(bool value)
OnDemandOptionsRequest & WithAllocationStrategy(FleetOnDemandAllocationStrategy value)
OnDemandOptionsRequest & WithSingleInstanceType(bool value)
FleetOnDemandAllocationStrategy GetAllocationStrategy() const
void SetCapacityReservationOptions(CapacityReservationOptionsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const CapacityReservationOptionsRequest & GetCapacityReservationOptions() const
OnDemandOptionsRequest & WithMinTargetCapacity(int value)
AWS_EC2_API OnDemandOptionsRequest()=default
OnDemandOptionsRequest & WithCapacityReservationOptions(CapacityReservationOptionsT &&value)
AWS_EC2_API OnDemandOptionsRequest(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