AWS SDK for C++

AWS SDK for C++ Version 1.11.888

Loading...
Searching...
No Matches
ReservedCapacityOptionsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/FleetCapacityReservationTargetRequest.h>
11#include <aws/ec2/model/FleetReservationType.h>
12#include <aws/ec2/model/ReservedCapacityAllocationStrategy.h>
13#include <aws/ec2/model/ReservedCapacityFallbackOptionsRequest.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
44 public:
45 AWS_EC2_API ReservedCapacityOptionsRequest() = default;
48
49 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
50 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
51
53
60 inline ReservedCapacityAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
61 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
63 m_allocationStrategyHasBeenSet = true;
64 m_allocationStrategy = value;
65 }
68 return *this;
69 }
71
73
79 inline const Aws::Vector<FleetReservationType>& GetReservationTypes() const { return m_reservationTypes; }
80 inline bool ReservationTypesHasBeenSet() const { return m_reservationTypesHasBeenSet; }
81 template <typename ReservationTypesT = Aws::Vector<FleetReservationType>>
82 void SetReservationTypes(ReservationTypesT&& value) {
83 m_reservationTypesHasBeenSet = true;
84 m_reservationTypes = std::forward<ReservationTypesT>(value);
85 }
86 template <typename ReservationTypesT = Aws::Vector<FleetReservationType>>
88 SetReservationTypes(std::forward<ReservationTypesT>(value));
89 return *this;
90 }
92 m_reservationTypesHasBeenSet = true;
93 m_reservationTypes.push_back(value);
94 return *this;
95 }
97
99
104 inline const FleetCapacityReservationTargetRequest& GetCapacityReservationTarget() const { return m_capacityReservationTarget; }
105 inline bool CapacityReservationTargetHasBeenSet() const { return m_capacityReservationTargetHasBeenSet; }
106 template <typename CapacityReservationTargetT = FleetCapacityReservationTargetRequest>
107 void SetCapacityReservationTarget(CapacityReservationTargetT&& value) {
108 m_capacityReservationTargetHasBeenSet = true;
109 m_capacityReservationTarget = std::forward<CapacityReservationTargetT>(value);
110 }
111 template <typename CapacityReservationTargetT = FleetCapacityReservationTargetRequest>
113 SetCapacityReservationTarget(std::forward<CapacityReservationTargetT>(value));
114 return *this;
115 }
117
119
126 return m_reservedCapacityFallbackOptions;
127 }
128 inline bool ReservedCapacityFallbackOptionsHasBeenSet() const { return m_reservedCapacityFallbackOptionsHasBeenSet; }
129 template <typename ReservedCapacityFallbackOptionsT = ReservedCapacityFallbackOptionsRequest>
130 void SetReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT&& value) {
131 m_reservedCapacityFallbackOptionsHasBeenSet = true;
132 m_reservedCapacityFallbackOptions = std::forward<ReservedCapacityFallbackOptionsT>(value);
133 }
134 template <typename ReservedCapacityFallbackOptionsT = ReservedCapacityFallbackOptionsRequest>
135 ReservedCapacityOptionsRequest& WithReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT&& value) {
136 SetReservedCapacityFallbackOptions(std::forward<ReservedCapacityFallbackOptionsT>(value));
137 return *this;
138 }
140 private:
142
143 Aws::Vector<FleetReservationType> m_reservationTypes;
144
145 FleetCapacityReservationTargetRequest m_capacityReservationTarget;
146
147 ReservedCapacityFallbackOptionsRequest m_reservedCapacityFallbackOptions;
148 bool m_allocationStrategyHasBeenSet = false;
149 bool m_reservationTypesHasBeenSet = false;
150 bool m_capacityReservationTargetHasBeenSet = false;
151 bool m_reservedCapacityFallbackOptionsHasBeenSet = false;
152};
153
154} // namespace Model
155} // namespace EC2
156} // namespace Aws
const ReservedCapacityFallbackOptionsRequest & GetReservedCapacityFallbackOptions() const
AWS_EC2_API ReservedCapacityOptionsRequest & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
ReservedCapacityOptionsRequest & WithReservationTypes(ReservationTypesT &&value)
ReservedCapacityAllocationStrategy GetAllocationStrategy() const
ReservedCapacityOptionsRequest & WithAllocationStrategy(ReservedCapacityAllocationStrategy value)
AWS_EC2_API ReservedCapacityOptionsRequest(const Aws::Utils::Xml::XmlNode &xmlNode)
const FleetCapacityReservationTargetRequest & GetCapacityReservationTarget() const
void SetCapacityReservationTarget(CapacityReservationTargetT &&value)
void SetReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT &&value)
ReservedCapacityOptionsRequest & WithReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Aws::Vector< FleetReservationType > & GetReservationTypes() const
void SetAllocationStrategy(ReservedCapacityAllocationStrategy value)
ReservedCapacityOptionsRequest & WithCapacityReservationTarget(CapacityReservationTargetT &&value)
ReservedCapacityOptionsRequest & AddReservationTypes(FleetReservationType value)
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream