AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
OnDemandOptionsRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/FleetOnDemandAllocationStrategy.h>
10#include <aws/ec2/model/CapacityReservationOptionsRequest.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Xml
19{
20 class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2
24{
25namespace Model
26{
27
35 {
36 public:
37 AWS_EC2_API OnDemandOptionsRequest() = default;
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
54 inline FleetOnDemandAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
55 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
56 inline void SetAllocationStrategy(FleetOnDemandAllocationStrategy value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
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) { m_capacityReservationOptionsHasBeenSet = true; m_capacityReservationOptions = std::forward<CapacityReservationOptionsT>(value); }
69 template<typename CapacityReservationOptionsT = CapacityReservationOptionsRequest>
70 OnDemandOptionsRequest& WithCapacityReservationOptions(CapacityReservationOptionsT&& value) { SetCapacityReservationOptions(std::forward<CapacityReservationOptionsT>(value)); return *this;}
72
74
79 inline bool GetSingleInstanceType() const { return m_singleInstanceType; }
80 inline bool SingleInstanceTypeHasBeenSet() const { return m_singleInstanceTypeHasBeenSet; }
81 inline void SetSingleInstanceType(bool value) { m_singleInstanceTypeHasBeenSet = true; m_singleInstanceType = value; }
82 inline OnDemandOptionsRequest& WithSingleInstanceType(bool value) { SetSingleInstanceType(value); return *this;}
84
86
91 inline bool GetSingleAvailabilityZone() const { return m_singleAvailabilityZone; }
92 inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; }
93 inline void SetSingleAvailabilityZone(bool value) { m_singleAvailabilityZoneHasBeenSet = true; m_singleAvailabilityZone = value; }
96
98
105 inline int GetMinTargetCapacity() const { return m_minTargetCapacity; }
106 inline bool MinTargetCapacityHasBeenSet() const { return m_minTargetCapacityHasBeenSet; }
107 inline void SetMinTargetCapacity(int value) { m_minTargetCapacityHasBeenSet = true; m_minTargetCapacity = value; }
108 inline OnDemandOptionsRequest& WithMinTargetCapacity(int value) { SetMinTargetCapacity(value); return *this;}
110
112
123 inline const Aws::String& GetMaxTotalPrice() const { return m_maxTotalPrice; }
124 inline bool MaxTotalPriceHasBeenSet() const { return m_maxTotalPriceHasBeenSet; }
125 template<typename MaxTotalPriceT = Aws::String>
126 void SetMaxTotalPrice(MaxTotalPriceT&& value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice = std::forward<MaxTotalPriceT>(value); }
127 template<typename MaxTotalPriceT = Aws::String>
128 OnDemandOptionsRequest& WithMaxTotalPrice(MaxTotalPriceT&& value) { SetMaxTotalPrice(std::forward<MaxTotalPriceT>(value)); return *this;}
130 private:
131
133 bool m_allocationStrategyHasBeenSet = false;
134
135 CapacityReservationOptionsRequest m_capacityReservationOptions;
136 bool m_capacityReservationOptionsHasBeenSet = false;
137
138 bool m_singleInstanceType{false};
139 bool m_singleInstanceTypeHasBeenSet = false;
140
141 bool m_singleAvailabilityZone{false};
142 bool m_singleAvailabilityZoneHasBeenSet = false;
143
144 int m_minTargetCapacity{0};
145 bool m_minTargetCapacityHasBeenSet = false;
146
147 Aws::String m_maxTotalPrice;
148 bool m_maxTotalPriceHasBeenSet = false;
149 };
150
151} // namespace Model
152} // namespace EC2
153} // 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