AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 CurrencyCodeValues GetCurrencyCode() const { return m_currencyCode; }
61 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
62 inline void SetCurrencyCode(CurrencyCodeValues value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
65
67
70 inline Tenancy GetInstanceTenancy() const { return m_instanceTenancy; }
71 inline bool InstanceTenancyHasBeenSet() const { return m_instanceTenancyHasBeenSet; }
72 inline void SetInstanceTenancy(Tenancy value) { m_instanceTenancyHasBeenSet = true; m_instanceTenancy = value; }
73 inline ReservedInstances& WithInstanceTenancy(Tenancy value) { SetInstanceTenancy(value); return *this;}
75
77
80 inline OfferingClassType GetOfferingClass() const { return m_offeringClass; }
81 inline bool OfferingClassHasBeenSet() const { return m_offeringClassHasBeenSet; }
82 inline void SetOfferingClass(OfferingClassType value) { m_offeringClassHasBeenSet = true; m_offeringClass = value; }
85
87
90 inline OfferingTypeValues GetOfferingType() const { return m_offeringType; }
91 inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; }
92 inline void SetOfferingType(OfferingTypeValues value) { m_offeringTypeHasBeenSet = true; m_offeringType = value; }
95
97
100 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const { return m_recurringCharges; }
101 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
102 template<typename RecurringChargesT = Aws::Vector<RecurringCharge>>
103 void SetRecurringCharges(RecurringChargesT&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::forward<RecurringChargesT>(value); }
104 template<typename RecurringChargesT = Aws::Vector<RecurringCharge>>
105 ReservedInstances& WithRecurringCharges(RecurringChargesT&& value) { SetRecurringCharges(std::forward<RecurringChargesT>(value)); return *this;}
106 template<typename RecurringChargesT = RecurringCharge>
107 ReservedInstances& AddRecurringCharges(RecurringChargesT&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.emplace_back(std::forward<RecurringChargesT>(value)); return *this; }
109
111
114 inline Scope GetScope() const { return m_scope; }
115 inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; }
116 inline void SetScope(Scope value) { m_scopeHasBeenSet = true; m_scope = value; }
117 inline ReservedInstances& WithScope(Scope value) { SetScope(value); return *this;}
119
121
124 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
125 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
126 template<typename TagsT = Aws::Vector<Tag>>
127 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
128 template<typename TagsT = Aws::Vector<Tag>>
129 ReservedInstances& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
130 template<typename TagsT = Tag>
131 ReservedInstances& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
133
135
138 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
139 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
140 template<typename AvailabilityZoneIdT = Aws::String>
141 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value); }
142 template<typename AvailabilityZoneIdT = Aws::String>
143 ReservedInstances& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) { SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value)); return *this;}
145
147
150 inline const Aws::String& GetReservedInstancesId() const { return m_reservedInstancesId; }
151 inline bool ReservedInstancesIdHasBeenSet() const { return m_reservedInstancesIdHasBeenSet; }
152 template<typename ReservedInstancesIdT = Aws::String>
153 void SetReservedInstancesId(ReservedInstancesIdT&& value) { m_reservedInstancesIdHasBeenSet = true; m_reservedInstancesId = std::forward<ReservedInstancesIdT>(value); }
154 template<typename ReservedInstancesIdT = Aws::String>
155 ReservedInstances& WithReservedInstancesId(ReservedInstancesIdT&& value) { SetReservedInstancesId(std::forward<ReservedInstancesIdT>(value)); return *this;}
157
159
162 inline InstanceType GetInstanceType() const { return m_instanceType; }
163 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
164 inline void SetInstanceType(InstanceType value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
165 inline ReservedInstances& WithInstanceType(InstanceType value) { SetInstanceType(value); return *this;}
167
169
172 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
173 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
174 template<typename AvailabilityZoneT = Aws::String>
175 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
176 template<typename AvailabilityZoneT = Aws::String>
177 ReservedInstances& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
179
181
184 inline const Aws::Utils::DateTime& GetStart() const { return m_start; }
185 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
186 template<typename StartT = Aws::Utils::DateTime>
187 void SetStart(StartT&& value) { m_startHasBeenSet = true; m_start = std::forward<StartT>(value); }
188 template<typename StartT = Aws::Utils::DateTime>
189 ReservedInstances& WithStart(StartT&& value) { SetStart(std::forward<StartT>(value)); return *this;}
191
193
196 inline const Aws::Utils::DateTime& GetEnd() const { return m_end; }
197 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
198 template<typename EndT = Aws::Utils::DateTime>
199 void SetEnd(EndT&& value) { m_endHasBeenSet = true; m_end = std::forward<EndT>(value); }
200 template<typename EndT = Aws::Utils::DateTime>
201 ReservedInstances& WithEnd(EndT&& value) { SetEnd(std::forward<EndT>(value)); return *this;}
203
205
208 inline long long GetDuration() const { return m_duration; }
209 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
210 inline void SetDuration(long long value) { m_durationHasBeenSet = true; m_duration = value; }
211 inline ReservedInstances& WithDuration(long long value) { SetDuration(value); return *this;}
213
215
218 inline double GetUsagePrice() const { return m_usagePrice; }
219 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
220 inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; }
221 inline ReservedInstances& WithUsagePrice(double value) { SetUsagePrice(value); return *this;}
223
225
228 inline double GetFixedPrice() const { return m_fixedPrice; }
229 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
230 inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; }
231 inline ReservedInstances& WithFixedPrice(double value) { SetFixedPrice(value); return *this;}
233
235
238 inline int GetInstanceCount() const { return m_instanceCount; }
239 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
240 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
241 inline ReservedInstances& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
243
245
248 inline RIProductDescription GetProductDescription() const { return m_productDescription; }
249 inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; }
250 inline void SetProductDescription(RIProductDescription value) { m_productDescriptionHasBeenSet = true; m_productDescription = value; }
253
255
258 inline ReservedInstanceState GetState() const { return m_state; }
259 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
260 inline void SetState(ReservedInstanceState value) { m_stateHasBeenSet = true; m_state = value; }
261 inline ReservedInstances& WithState(ReservedInstanceState value) { SetState(value); return *this;}
263 private:
264
266 bool m_currencyCodeHasBeenSet = false;
267
268 Tenancy m_instanceTenancy{Tenancy::NOT_SET};
269 bool m_instanceTenancyHasBeenSet = false;
270
272 bool m_offeringClassHasBeenSet = false;
273
275 bool m_offeringTypeHasBeenSet = false;
276
277 Aws::Vector<RecurringCharge> m_recurringCharges;
278 bool m_recurringChargesHasBeenSet = false;
279
280 Scope m_scope{Scope::NOT_SET};
281 bool m_scopeHasBeenSet = false;
282
283 Aws::Vector<Tag> m_tags;
284 bool m_tagsHasBeenSet = false;
285
286 Aws::String m_availabilityZoneId;
287 bool m_availabilityZoneIdHasBeenSet = false;
288
289 Aws::String m_reservedInstancesId;
290 bool m_reservedInstancesIdHasBeenSet = false;
291
292 InstanceType m_instanceType{InstanceType::NOT_SET};
293 bool m_instanceTypeHasBeenSet = false;
294
295 Aws::String m_availabilityZone;
296 bool m_availabilityZoneHasBeenSet = false;
297
298 Aws::Utils::DateTime m_start{};
299 bool m_startHasBeenSet = false;
300
301 Aws::Utils::DateTime m_end{};
302 bool m_endHasBeenSet = false;
303
304 long long m_duration{0};
305 bool m_durationHasBeenSet = false;
306
307 double m_usagePrice{0.0};
308 bool m_usagePriceHasBeenSet = false;
309
310 double m_fixedPrice{0.0};
311 bool m_fixedPriceHasBeenSet = false;
312
313 int m_instanceCount{0};
314 bool m_instanceCountHasBeenSet = false;
315
317 bool m_productDescriptionHasBeenSet = false;
318
320 bool m_stateHasBeenSet = false;
321 };
322
323} // namespace Model
324} // namespace EC2
325} // namespace Aws
ReservedInstanceState GetState() const
const Aws::Utils::DateTime & GetStart() const
ReservedInstances & WithOfferingType(OfferingTypeValues value)
ReservedInstances & WithEnd(EndT &&value)
void SetOfferingType(OfferingTypeValues value)
AWS_EC2_API ReservedInstances()=default
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
CurrencyCodeValues GetCurrencyCode() const
ReservedInstances & WithState(ReservedInstanceState value)
ReservedInstances & WithTags(TagsT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetAvailabilityZoneId() const
ReservedInstances & WithInstanceTenancy(Tenancy value)
ReservedInstances & AddTags(TagsT &&value)
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
ReservedInstances & WithFixedPrice(double value)
AWS_EC2_API ReservedInstances(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetCurrencyCode(CurrencyCodeValues value)
ReservedInstances & WithAvailabilityZone(AvailabilityZoneT &&value)
ReservedInstances & WithScope(Scope value)
RIProductDescription GetProductDescription() const
ReservedInstances & WithInstanceCount(int value)
AWS_EC2_API ReservedInstances & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetAvailabilityZone() const
void SetAvailabilityZone(AvailabilityZoneT &&value)
ReservedInstances & WithInstanceType(InstanceType value)
ReservedInstances & WithDuration(long long value)
ReservedInstances & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
void SetRecurringCharges(RecurringChargesT &&value)
OfferingClassType GetOfferingClass() const
const Aws::Vector< Tag > & GetTags() const
void SetInstanceType(InstanceType value)
const Aws::Utils::DateTime & GetEnd() const
ReservedInstances & WithReservedInstancesId(ReservedInstancesIdT &&value)
ReservedInstances & AddRecurringCharges(RecurringChargesT &&value)
ReservedInstances & WithCurrencyCode(CurrencyCodeValues value)
const Aws::String & GetReservedInstancesId() const
void SetOfferingClass(OfferingClassType value)
ReservedInstances & WithProductDescription(RIProductDescription value)
void SetState(ReservedInstanceState value)
ReservedInstances & WithOfferingClass(OfferingClassType value)
OfferingTypeValues GetOfferingType() const
void SetReservedInstancesId(ReservedInstancesIdT &&value)
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
void SetProductDescription(RIProductDescription value)
ReservedInstances & WithUsagePrice(double value)
ReservedInstances & WithStart(StartT &&value)
ReservedInstances & WithRecurringCharges(RecurringChargesT &&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