AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ReservedInstances.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/CurrencyCodeValues.h>
10#include <aws/ec2/model/Tenancy.h>
11#include <aws/ec2/model/OfferingClassType.h>
12#include <aws/ec2/model/OfferingTypeValues.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/ec2/model/Scope.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/ec2/model/InstanceType.h>
17#include <aws/core/utils/DateTime.h>
18#include <aws/ec2/model/RIProductDescription.h>
19#include <aws/ec2/model/ReservedInstanceState.h>
20#include <aws/ec2/model/RecurringCharge.h>
21#include <aws/ec2/model/Tag.h>
22#include <utility>
23
24namespace Aws
25{
26namespace Utils
27{
28namespace Xml
29{
30 class XmlNode;
31} // namespace Xml
32} // namespace Utils
33namespace EC2
34{
35namespace Model
36{
37
44 {
45 public:
46 AWS_EC2_API ReservedInstances();
47 AWS_EC2_API ReservedInstances(const Aws::Utils::Xml::XmlNode& xmlNode);
49
50 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
51 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
52
53
55
60 inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
61 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
62 inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
63 inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
64 inline ReservedInstances& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
65 inline ReservedInstances& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
67
69
72 inline const Tenancy& GetInstanceTenancy() const{ return m_instanceTenancy; }
73 inline bool InstanceTenancyHasBeenSet() const { return m_instanceTenancyHasBeenSet; }
74 inline void SetInstanceTenancy(const Tenancy& value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = value; }
75 inline void SetInstanceTenancy(Tenancy&& value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = std::move(value); }
76 inline ReservedInstances& WithInstanceTenancy(const Tenancy& value) { SetInstanceTenancy(value); return *this;}
77 inline ReservedInstances& WithInstanceTenancy(Tenancy&& value) { SetInstanceTenancy(std::move(value)); return *this;}
79
81
84 inline const OfferingClassType& GetOfferingClass() const{ return m_offeringClass; }
85 inline bool OfferingClassHasBeenSet() const { return m_offeringClassHasBeenSet; }
86 inline void SetOfferingClass(const OfferingClassType& value) { m_offeringClassHasBeenSet = true; m_offeringClass = value; }
87 inline void SetOfferingClass(OfferingClassType&& value) { m_offeringClassHasBeenSet = true; m_offeringClass = std::move(value); }
88 inline ReservedInstances& WithOfferingClass(const OfferingClassType& value) { SetOfferingClass(value); return *this;}
89 inline ReservedInstances& WithOfferingClass(OfferingClassType&& value) { SetOfferingClass(std::move(value)); return *this;}
91
93
96 inline const OfferingTypeValues& GetOfferingType() const{ return m_offeringType; }
97 inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; }
98 inline void SetOfferingType(const OfferingTypeValues& value) { m_offeringTypeHasBeenSet = true; m_offeringType = value; }
99 inline void SetOfferingType(OfferingTypeValues&& value) { m_offeringTypeHasBeenSet = true; m_offeringType = std::move(value); }
100 inline ReservedInstances& WithOfferingType(const OfferingTypeValues& value) { SetOfferingType(value); return *this;}
101 inline ReservedInstances& WithOfferingType(OfferingTypeValues&& value) { SetOfferingType(std::move(value)); return *this;}
103
105
108 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const{ return m_recurringCharges; }
109 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
110 inline void SetRecurringCharges(const Aws::Vector<RecurringCharge>& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = value; }
111 inline void SetRecurringCharges(Aws::Vector<RecurringCharge>&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::move(value); }
114 inline ReservedInstances& AddRecurringCharges(const RecurringCharge& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(value); return *this; }
115 inline ReservedInstances& AddRecurringCharges(RecurringCharge&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(std::move(value)); return *this; }
117
119
122 inline const Scope& GetScope() const{ return m_scope; }
123 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
124 inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; }
125 inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); }
126 inline ReservedInstances& WithScope(const Scope& value) { SetScope(value); return *this;}
127 inline ReservedInstances& WithScope(Scope&& value) { SetScope(std::move(value)); return *this;}
129
131
134 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
135 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
136 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
137 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
138 inline ReservedInstances& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
139 inline ReservedInstances& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
140 inline ReservedInstances& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
141 inline ReservedInstances& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
143
145
148 inline const Aws::String& GetReservedInstancesId() const{ return m_reservedInstancesId; }
149 inline bool ReservedInstancesIdHasBeenSet() const { return m_reservedInstancesIdHasBeenSet; }
150 inline void SetReservedInstancesId(const Aws::String& value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId = value; }
151 inline void SetReservedInstancesId(Aws::String&& value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId = std::move(value); }
152 inline void SetReservedInstancesId(const char* value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId.assign(value); }
154 inline ReservedInstances& WithReservedInstancesId(Aws::String&& value) { SetReservedInstancesId(std::move(value)); return *this;}
155 inline ReservedInstances& WithReservedInstancesId(const char* value) { SetReservedInstancesId(value); return *this;}
157
159
162 inline const InstanceType& GetInstanceType() const{ return m_instanceType; }
163 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
164 inline void SetInstanceType(const InstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
165 inline void SetInstanceType(InstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
166 inline ReservedInstances& WithInstanceType(const InstanceType& value) { SetInstanceType(value); return *this;}
167 inline ReservedInstances& WithInstanceType(InstanceType&& value) { SetInstanceType(std::move(value)); return *this;}
169
171
174 inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
175 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
176 inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
177 inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
178 inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
179 inline ReservedInstances& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
180 inline ReservedInstances& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
181 inline ReservedInstances& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
183
185
188 inline const Aws::Utils::DateTime& GetStart() const{ return m_start; }
189 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
190 inline void SetStart(const Aws::Utils::DateTime& value) { m_startHasBeenSet = true; m_start = value; }
191 inline void SetStart(Aws::Utils::DateTime&& value) { m_startHasBeenSet = true; m_start = std::move(value); }
192 inline ReservedInstances& WithStart(const Aws::Utils::DateTime& value) { SetStart(value); return *this;}
193 inline ReservedInstances& WithStart(Aws::Utils::DateTime&& value) { SetStart(std::move(value)); return *this;}
195
197
200 inline const Aws::Utils::DateTime& GetEnd() const{ return m_end; }
201 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
202 inline void SetEnd(const Aws::Utils::DateTime& value) { m_endHasBeenSet = true; m_end = value; }
203 inline void SetEnd(Aws::Utils::DateTime&& value) { m_endHasBeenSet = true; m_end = std::move(value); }
204 inline ReservedInstances& WithEnd(const Aws::Utils::DateTime& value) { SetEnd(value); return *this;}
205 inline ReservedInstances& WithEnd(Aws::Utils::DateTime&& value) { SetEnd(std::move(value)); return *this;}
207
209
212 inline long long GetDuration() const{ return m_duration; }
213 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
214 inline void SetDuration(long long value) { m_durationHasBeenSet = true; m_duration = value; }
215 inline ReservedInstances& WithDuration(long long value) { SetDuration(value); return *this;}
217
219
222 inline double GetUsagePrice() const{ return m_usagePrice; }
223 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
224 inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; }
225 inline ReservedInstances& WithUsagePrice(double value) { SetUsagePrice(value); return *this;}
227
229
232 inline double GetFixedPrice() const{ return m_fixedPrice; }
233 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
234 inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; }
235 inline ReservedInstances& WithFixedPrice(double value) { SetFixedPrice(value); return *this;}
237
239
242 inline int GetInstanceCount() const{ return m_instanceCount; }
243 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
244 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
245 inline ReservedInstances& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
247
249
252 inline const RIProductDescription& GetProductDescription() const{ return m_productDescription; }
253 inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; }
254 inline void SetProductDescription(const RIProductDescription& value) { m_productDescriptionHasBeenSet = true; m_productDescription = value; }
255 inline void SetProductDescription(RIProductDescription&& value) { m_productDescriptionHasBeenSet = true; m_productDescription = std::move(value); }
257 inline ReservedInstances& WithProductDescription(RIProductDescription&& value) { SetProductDescription(std::move(value)); return *this;}
259
261
264 inline const ReservedInstanceState& GetState() const{ return m_state; }
265 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
266 inline void SetState(const ReservedInstanceState& value) { m_stateHasBeenSet = true; m_state = value; }
267 inline void SetState(ReservedInstanceState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
268 inline ReservedInstances& WithState(const ReservedInstanceState& value) { SetState(value); return *this;}
269 inline ReservedInstances& WithState(ReservedInstanceState&& value) { SetState(std::move(value)); return *this;}
271 private:
272
273 CurrencyCodeValues m_currencyCode;
274 bool m_currencyCodeHasBeenSet = false;
275
276 Tenancy m_instanceTenancy;
277 bool m_instanceTenancyHasBeenSet = false;
278
279 OfferingClassType m_offeringClass;
280 bool m_offeringClassHasBeenSet = false;
281
282 OfferingTypeValues m_offeringType;
283 bool m_offeringTypeHasBeenSet = false;
284
285 Aws::Vector<RecurringCharge> m_recurringCharges;
286 bool m_recurringChargesHasBeenSet = false;
287
288 Scope m_scope;
289 bool m_scopeHasBeenSet = false;
290
291 Aws::Vector<Tag> m_tags;
292 bool m_tagsHasBeenSet = false;
293
294 Aws::String m_reservedInstancesId;
295 bool m_reservedInstancesIdHasBeenSet = false;
296
297 InstanceType m_instanceType;
298 bool m_instanceTypeHasBeenSet = false;
299
300 Aws::String m_availabilityZone;
301 bool m_availabilityZoneHasBeenSet = false;
302
303 Aws::Utils::DateTime m_start;
304 bool m_startHasBeenSet = false;
305
307 bool m_endHasBeenSet = false;
308
309 long long m_duration;
310 bool m_durationHasBeenSet = false;
311
312 double m_usagePrice;
313 bool m_usagePriceHasBeenSet = false;
314
315 double m_fixedPrice;
316 bool m_fixedPriceHasBeenSet = false;
317
318 int m_instanceCount;
319 bool m_instanceCountHasBeenSet = false;
320
321 RIProductDescription m_productDescription;
322 bool m_productDescriptionHasBeenSet = false;
323
324 ReservedInstanceState m_state;
325 bool m_stateHasBeenSet = false;
326 };
327
328} // namespace Model
329} // namespace EC2
330} // namespace Aws
ReservedInstances & WithScope(Scope &&value)
const Aws::Utils::DateTime & GetStart() const
ReservedInstances & WithTags(Aws::Vector< Tag > &&value)
const OfferingClassType & GetOfferingClass() const
void SetCurrencyCode(CurrencyCodeValues &&value)
ReservedInstances & WithRecurringCharges(Aws::Vector< RecurringCharge > &&value)
const InstanceType & GetInstanceType() const
ReservedInstances & WithInstanceTenancy(const Tenancy &value)
ReservedInstances & AddTags(const Tag &value)
ReservedInstances & WithOfferingType(OfferingTypeValues &&value)
void SetInstanceTenancy(Tenancy &&value)
ReservedInstances & WithCurrencyCode(CurrencyCodeValues &&value)
void SetOfferingType(const OfferingTypeValues &value)
void SetCurrencyCode(const CurrencyCodeValues &value)
ReservedInstances & WithCurrencyCode(const CurrencyCodeValues &value)
void SetInstanceType(const InstanceType &value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetRecurringCharges(const Aws::Vector< RecurringCharge > &value)
ReservedInstances & WithInstanceTenancy(Tenancy &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetTags(Aws::Vector< Tag > &&value)
const CurrencyCodeValues & GetCurrencyCode() const
void SetProductDescription(RIProductDescription &&value)
ReservedInstances & AddRecurringCharges(RecurringCharge &&value)
void SetReservedInstancesId(Aws::String &&value)
ReservedInstances & WithFixedPrice(double value)
AWS_EC2_API ReservedInstances(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetStart(const Aws::Utils::DateTime &value)
void SetState(const ReservedInstanceState &value)
ReservedInstances & WithState(ReservedInstanceState &&value)
ReservedInstances & WithScope(const Scope &value)
void SetInstanceTenancy(const Tenancy &value)
void SetOfferingType(OfferingTypeValues &&value)
void SetTags(const Aws::Vector< Tag > &value)
ReservedInstances & WithInstanceType(const InstanceType &value)
ReservedInstances & WithInstanceCount(int value)
ReservedInstances & WithAvailabilityZone(const Aws::String &value)
AWS_EC2_API ReservedInstances & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ReservedInstances & WithAvailabilityZone(Aws::String &&value)
const Aws::String & GetAvailabilityZone() const
void SetAvailabilityZone(const Aws::String &value)
ReservedInstances & WithReservedInstancesId(const Aws::String &value)
void SetProductDescription(const RIProductDescription &value)
ReservedInstances & WithDuration(long long value)
ReservedInstances & WithProductDescription(RIProductDescription &&value)
const ReservedInstanceState & GetState() const
void SetOfferingClass(const OfferingClassType &value)
void SetStart(Aws::Utils::DateTime &&value)
void SetEnd(const Aws::Utils::DateTime &value)
ReservedInstances & WithRecurringCharges(const Aws::Vector< RecurringCharge > &value)
ReservedInstances & WithEnd(const Aws::Utils::DateTime &value)
ReservedInstances & WithState(const ReservedInstanceState &value)
const Aws::Vector< Tag > & GetTags() const
ReservedInstances & WithReservedInstancesId(Aws::String &&value)
const Aws::Utils::DateTime & GetEnd() const
void SetAvailabilityZone(const char *value)
ReservedInstances & WithStart(const Aws::Utils::DateTime &value)
ReservedInstances & WithOfferingType(const OfferingTypeValues &value)
ReservedInstances & WithStart(Aws::Utils::DateTime &&value)
ReservedInstances & AddRecurringCharges(const RecurringCharge &value)
void SetRecurringCharges(Aws::Vector< RecurringCharge > &&value)
const RIProductDescription & GetProductDescription() const
const Aws::String & GetReservedInstancesId() const
void SetEnd(Aws::Utils::DateTime &&value)
ReservedInstances & WithAvailabilityZone(const char *value)
ReservedInstances & WithOfferingClass(OfferingClassType &&value)
ReservedInstances & WithOfferingClass(const OfferingClassType &value)
void SetReservedInstancesId(const Aws::String &value)
ReservedInstances & WithTags(const Aws::Vector< Tag > &value)
void SetAvailabilityZone(Aws::String &&value)
const Tenancy & GetInstanceTenancy() const
ReservedInstances & WithReservedInstancesId(const char *value)
ReservedInstances & WithProductDescription(const RIProductDescription &value)
ReservedInstances & WithInstanceType(InstanceType &&value)
ReservedInstances & AddTags(Tag &&value)
void SetOfferingClass(OfferingClassType &&value)
void SetReservedInstancesId(const char *value)
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
void SetState(ReservedInstanceState &&value)
const OfferingTypeValues & GetOfferingType() const
ReservedInstances & WithEnd(Aws::Utils::DateTime &&value)
ReservedInstances & WithUsagePrice(double value)
void SetInstanceType(InstanceType &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream