AWS SDK for C++

AWS SDK for C++ Version 1.11.891

Loading...
Searching...
No Matches
ReservedCapacityOptions.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/FleetReservationType.h>
11#include <aws/ec2/model/ReservedCapacityAllocationStrategy.h>
12#include <aws/ec2/model/ReservedCapacityFallbackOptions.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
35 public:
36 AWS_EC2_API ReservedCapacityOptions() = default;
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
51 inline ReservedCapacityAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
52 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
54 m_allocationStrategyHasBeenSet = true;
55 m_allocationStrategy = value;
56 }
59 return *this;
60 }
62
64
68 inline const Aws::Vector<FleetReservationType>& GetReservationTypes() const { return m_reservationTypes; }
69 inline bool ReservationTypesHasBeenSet() const { return m_reservationTypesHasBeenSet; }
70 template <typename ReservationTypesT = Aws::Vector<FleetReservationType>>
71 void SetReservationTypes(ReservationTypesT&& value) {
72 m_reservationTypesHasBeenSet = true;
73 m_reservationTypes = std::forward<ReservationTypesT>(value);
74 }
75 template <typename ReservationTypesT = Aws::Vector<FleetReservationType>>
76 ReservedCapacityOptions& WithReservationTypes(ReservationTypesT&& value) {
77 SetReservationTypes(std::forward<ReservationTypesT>(value));
78 return *this;
79 }
81 m_reservationTypesHasBeenSet = true;
82 m_reservationTypes.push_back(value);
83 return *this;
84 }
86
88
92 inline const ReservedCapacityFallbackOptions& GetReservedCapacityFallbackOptions() const { return m_reservedCapacityFallbackOptions; }
93 inline bool ReservedCapacityFallbackOptionsHasBeenSet() const { return m_reservedCapacityFallbackOptionsHasBeenSet; }
94 template <typename ReservedCapacityFallbackOptionsT = ReservedCapacityFallbackOptions>
95 void SetReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT&& value) {
96 m_reservedCapacityFallbackOptionsHasBeenSet = true;
97 m_reservedCapacityFallbackOptions = std::forward<ReservedCapacityFallbackOptionsT>(value);
98 }
99 template <typename ReservedCapacityFallbackOptionsT = ReservedCapacityFallbackOptions>
100 ReservedCapacityOptions& WithReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT&& value) {
101 SetReservedCapacityFallbackOptions(std::forward<ReservedCapacityFallbackOptionsT>(value));
102 return *this;
103 }
105 private:
107
108 Aws::Vector<FleetReservationType> m_reservationTypes;
109
110 ReservedCapacityFallbackOptions m_reservedCapacityFallbackOptions;
111 bool m_allocationStrategyHasBeenSet = false;
112 bool m_reservationTypesHasBeenSet = false;
113 bool m_reservedCapacityFallbackOptionsHasBeenSet = false;
114};
115
116} // namespace Model
117} // namespace EC2
118} // namespace Aws
AWS_EC2_API ReservedCapacityOptions & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetReservationTypes(ReservationTypesT &&value)
AWS_EC2_API ReservedCapacityOptions(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT &&value)
ReservedCapacityOptions & AddReservationTypes(FleetReservationType value)
const Aws::Vector< FleetReservationType > & GetReservationTypes() const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
ReservedCapacityOptions & WithReservationTypes(ReservationTypesT &&value)
ReservedCapacityAllocationStrategy GetAllocationStrategy() const
void SetAllocationStrategy(ReservedCapacityAllocationStrategy value)
ReservedCapacityOptions & WithAllocationStrategy(ReservedCapacityAllocationStrategy value)
const ReservedCapacityFallbackOptions & GetReservedCapacityFallbackOptions() const
ReservedCapacityOptions & WithReservedCapacityFallbackOptions(ReservedCapacityFallbackOptionsT &&value)
AWS_EC2_API ReservedCapacityOptions()=default
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream