AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ScheduledInstance.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/ScheduledInstanceRecurrence.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
30 public:
31 AWS_EC2_API ScheduledInstance() = default;
32 AWS_EC2_API ScheduledInstance(const Aws::Utils::Xml::XmlNode& xmlNode);
34
35 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
42 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
43 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
44 template <typename AvailabilityZoneT = Aws::String>
45 void SetAvailabilityZone(AvailabilityZoneT&& value) {
46 m_availabilityZoneHasBeenSet = true;
47 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
48 }
49 template <typename AvailabilityZoneT = Aws::String>
50 ScheduledInstance& WithAvailabilityZone(AvailabilityZoneT&& value) {
51 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Utils::DateTime& GetCreateDate() const { return m_createDate; }
61 inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; }
62 template <typename CreateDateT = Aws::Utils::DateTime>
63 void SetCreateDate(CreateDateT&& value) {
64 m_createDateHasBeenSet = true;
65 m_createDate = std::forward<CreateDateT>(value);
66 }
67 template <typename CreateDateT = Aws::Utils::DateTime>
68 ScheduledInstance& WithCreateDate(CreateDateT&& value) {
69 SetCreateDate(std::forward<CreateDateT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetHourlyPrice() const { return m_hourlyPrice; }
79 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
80 template <typename HourlyPriceT = Aws::String>
81 void SetHourlyPrice(HourlyPriceT&& value) {
82 m_hourlyPriceHasBeenSet = true;
83 m_hourlyPrice = std::forward<HourlyPriceT>(value);
84 }
85 template <typename HourlyPriceT = Aws::String>
86 ScheduledInstance& WithHourlyPrice(HourlyPriceT&& value) {
87 SetHourlyPrice(std::forward<HourlyPriceT>(value));
88 return *this;
89 }
91
93
96 inline int GetInstanceCount() const { return m_instanceCount; }
97 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
98 inline void SetInstanceCount(int value) {
99 m_instanceCountHasBeenSet = true;
100 m_instanceCount = value;
101 }
103 SetInstanceCount(value);
104 return *this;
105 }
107
109
112 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
113 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
114 template <typename InstanceTypeT = Aws::String>
115 void SetInstanceType(InstanceTypeT&& value) {
116 m_instanceTypeHasBeenSet = true;
117 m_instanceType = std::forward<InstanceTypeT>(value);
118 }
119 template <typename InstanceTypeT = Aws::String>
120 ScheduledInstance& WithInstanceType(InstanceTypeT&& value) {
121 SetInstanceType(std::forward<InstanceTypeT>(value));
122 return *this;
123 }
125
127
130 inline const Aws::String& GetNetworkPlatform() const { return m_networkPlatform; }
131 inline bool NetworkPlatformHasBeenSet() const { return m_networkPlatformHasBeenSet; }
132 template <typename NetworkPlatformT = Aws::String>
133 void SetNetworkPlatform(NetworkPlatformT&& value) {
134 m_networkPlatformHasBeenSet = true;
135 m_networkPlatform = std::forward<NetworkPlatformT>(value);
136 }
137 template <typename NetworkPlatformT = Aws::String>
138 ScheduledInstance& WithNetworkPlatform(NetworkPlatformT&& value) {
139 SetNetworkPlatform(std::forward<NetworkPlatformT>(value));
140 return *this;
141 }
143
145
148 inline const Aws::Utils::DateTime& GetNextSlotStartTime() const { return m_nextSlotStartTime; }
149 inline bool NextSlotStartTimeHasBeenSet() const { return m_nextSlotStartTimeHasBeenSet; }
150 template <typename NextSlotStartTimeT = Aws::Utils::DateTime>
151 void SetNextSlotStartTime(NextSlotStartTimeT&& value) {
152 m_nextSlotStartTimeHasBeenSet = true;
153 m_nextSlotStartTime = std::forward<NextSlotStartTimeT>(value);
154 }
155 template <typename NextSlotStartTimeT = Aws::Utils::DateTime>
156 ScheduledInstance& WithNextSlotStartTime(NextSlotStartTimeT&& value) {
157 SetNextSlotStartTime(std::forward<NextSlotStartTimeT>(value));
158 return *this;
159 }
161
163
166 inline const Aws::String& GetPlatform() const { return m_platform; }
167 inline bool PlatformHasBeenSet() const { return m_platformHasBeenSet; }
168 template <typename PlatformT = Aws::String>
169 void SetPlatform(PlatformT&& value) {
170 m_platformHasBeenSet = true;
171 m_platform = std::forward<PlatformT>(value);
172 }
173 template <typename PlatformT = Aws::String>
174 ScheduledInstance& WithPlatform(PlatformT&& value) {
175 SetPlatform(std::forward<PlatformT>(value));
176 return *this;
177 }
179
181
184 inline const Aws::Utils::DateTime& GetPreviousSlotEndTime() const { return m_previousSlotEndTime; }
185 inline bool PreviousSlotEndTimeHasBeenSet() const { return m_previousSlotEndTimeHasBeenSet; }
186 template <typename PreviousSlotEndTimeT = Aws::Utils::DateTime>
187 void SetPreviousSlotEndTime(PreviousSlotEndTimeT&& value) {
188 m_previousSlotEndTimeHasBeenSet = true;
189 m_previousSlotEndTime = std::forward<PreviousSlotEndTimeT>(value);
190 }
191 template <typename PreviousSlotEndTimeT = Aws::Utils::DateTime>
192 ScheduledInstance& WithPreviousSlotEndTime(PreviousSlotEndTimeT&& value) {
193 SetPreviousSlotEndTime(std::forward<PreviousSlotEndTimeT>(value));
194 return *this;
195 }
197
199
202 inline const ScheduledInstanceRecurrence& GetRecurrence() const { return m_recurrence; }
203 inline bool RecurrenceHasBeenSet() const { return m_recurrenceHasBeenSet; }
204 template <typename RecurrenceT = ScheduledInstanceRecurrence>
205 void SetRecurrence(RecurrenceT&& value) {
206 m_recurrenceHasBeenSet = true;
207 m_recurrence = std::forward<RecurrenceT>(value);
208 }
209 template <typename RecurrenceT = ScheduledInstanceRecurrence>
210 ScheduledInstance& WithRecurrence(RecurrenceT&& value) {
211 SetRecurrence(std::forward<RecurrenceT>(value));
212 return *this;
213 }
215
217
220 inline const Aws::String& GetScheduledInstanceId() const { return m_scheduledInstanceId; }
221 inline bool ScheduledInstanceIdHasBeenSet() const { return m_scheduledInstanceIdHasBeenSet; }
222 template <typename ScheduledInstanceIdT = Aws::String>
223 void SetScheduledInstanceId(ScheduledInstanceIdT&& value) {
224 m_scheduledInstanceIdHasBeenSet = true;
225 m_scheduledInstanceId = std::forward<ScheduledInstanceIdT>(value);
226 }
227 template <typename ScheduledInstanceIdT = Aws::String>
228 ScheduledInstance& WithScheduledInstanceId(ScheduledInstanceIdT&& value) {
229 SetScheduledInstanceId(std::forward<ScheduledInstanceIdT>(value));
230 return *this;
231 }
233
235
238 inline int GetSlotDurationInHours() const { return m_slotDurationInHours; }
239 inline bool SlotDurationInHoursHasBeenSet() const { return m_slotDurationInHoursHasBeenSet; }
240 inline void SetSlotDurationInHours(int value) {
241 m_slotDurationInHoursHasBeenSet = true;
242 m_slotDurationInHours = value;
243 }
246 return *this;
247 }
249
251
254 inline const Aws::Utils::DateTime& GetTermEndDate() const { return m_termEndDate; }
255 inline bool TermEndDateHasBeenSet() const { return m_termEndDateHasBeenSet; }
256 template <typename TermEndDateT = Aws::Utils::DateTime>
257 void SetTermEndDate(TermEndDateT&& value) {
258 m_termEndDateHasBeenSet = true;
259 m_termEndDate = std::forward<TermEndDateT>(value);
260 }
261 template <typename TermEndDateT = Aws::Utils::DateTime>
262 ScheduledInstance& WithTermEndDate(TermEndDateT&& value) {
263 SetTermEndDate(std::forward<TermEndDateT>(value));
264 return *this;
265 }
267
269
272 inline const Aws::Utils::DateTime& GetTermStartDate() const { return m_termStartDate; }
273 inline bool TermStartDateHasBeenSet() const { return m_termStartDateHasBeenSet; }
274 template <typename TermStartDateT = Aws::Utils::DateTime>
275 void SetTermStartDate(TermStartDateT&& value) {
276 m_termStartDateHasBeenSet = true;
277 m_termStartDate = std::forward<TermStartDateT>(value);
278 }
279 template <typename TermStartDateT = Aws::Utils::DateTime>
280 ScheduledInstance& WithTermStartDate(TermStartDateT&& value) {
281 SetTermStartDate(std::forward<TermStartDateT>(value));
282 return *this;
283 }
285
287
290 inline int GetTotalScheduledInstanceHours() const { return m_totalScheduledInstanceHours; }
291 inline bool TotalScheduledInstanceHoursHasBeenSet() const { return m_totalScheduledInstanceHoursHasBeenSet; }
292 inline void SetTotalScheduledInstanceHours(int value) {
293 m_totalScheduledInstanceHoursHasBeenSet = true;
294 m_totalScheduledInstanceHours = value;
295 }
298 return *this;
299 }
301 private:
302 Aws::String m_availabilityZone;
303
304 Aws::Utils::DateTime m_createDate{};
305
306 Aws::String m_hourlyPrice;
307
308 int m_instanceCount{0};
309
310 Aws::String m_instanceType;
311
312 Aws::String m_networkPlatform;
313
314 Aws::Utils::DateTime m_nextSlotStartTime{};
315
316 Aws::String m_platform;
317
318 Aws::Utils::DateTime m_previousSlotEndTime{};
319
320 ScheduledInstanceRecurrence m_recurrence;
321
322 Aws::String m_scheduledInstanceId;
323
324 int m_slotDurationInHours{0};
325
326 Aws::Utils::DateTime m_termEndDate{};
327
328 Aws::Utils::DateTime m_termStartDate{};
329
330 int m_totalScheduledInstanceHours{0};
331 bool m_availabilityZoneHasBeenSet = false;
332 bool m_createDateHasBeenSet = false;
333 bool m_hourlyPriceHasBeenSet = false;
334 bool m_instanceCountHasBeenSet = false;
335 bool m_instanceTypeHasBeenSet = false;
336 bool m_networkPlatformHasBeenSet = false;
337 bool m_nextSlotStartTimeHasBeenSet = false;
338 bool m_platformHasBeenSet = false;
339 bool m_previousSlotEndTimeHasBeenSet = false;
340 bool m_recurrenceHasBeenSet = false;
341 bool m_scheduledInstanceIdHasBeenSet = false;
342 bool m_slotDurationInHoursHasBeenSet = false;
343 bool m_termEndDateHasBeenSet = false;
344 bool m_termStartDateHasBeenSet = false;
345 bool m_totalScheduledInstanceHoursHasBeenSet = false;
346};
347
348} // namespace Model
349} // namespace EC2
350} // namespace Aws
void SetAvailabilityZone(AvailabilityZoneT &&value)
const ScheduledInstanceRecurrence & GetRecurrence() const
ScheduledInstance & WithScheduledInstanceId(ScheduledInstanceIdT &&value)
const Aws::Utils::DateTime & GetNextSlotStartTime() const
const Aws::String & GetHourlyPrice() const
ScheduledInstance & WithPreviousSlotEndTime(PreviousSlotEndTimeT &&value)
AWS_EC2_API ScheduledInstance & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ScheduledInstance & WithTotalScheduledInstanceHours(int value)
void SetNetworkPlatform(NetworkPlatformT &&value)
ScheduledInstance & WithAvailabilityZone(AvailabilityZoneT &&value)
void SetScheduledInstanceId(ScheduledInstanceIdT &&value)
ScheduledInstance & WithNextSlotStartTime(NextSlotStartTimeT &&value)
void SetPreviousSlotEndTime(PreviousSlotEndTimeT &&value)
const Aws::String & GetNetworkPlatform() const
ScheduledInstance & WithSlotDurationInHours(int value)
ScheduledInstance & WithTermStartDate(TermStartDateT &&value)
ScheduledInstance & WithTermEndDate(TermEndDateT &&value)
AWS_EC2_API ScheduledInstance(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetInstanceType() const
void SetNextSlotStartTime(NextSlotStartTimeT &&value)
void SetHourlyPrice(HourlyPriceT &&value)
ScheduledInstance & WithRecurrence(RecurrenceT &&value)
void SetRecurrence(RecurrenceT &&value)
const Aws::String & GetPlatform() const
const Aws::Utils::DateTime & GetTermStartDate() const
ScheduledInstance & WithHourlyPrice(HourlyPriceT &&value)
ScheduledInstance & WithNetworkPlatform(NetworkPlatformT &&value)
void SetCreateDate(CreateDateT &&value)
ScheduledInstance & WithInstanceType(InstanceTypeT &&value)
const Aws::Utils::DateTime & GetCreateDate() const
void SetTermStartDate(TermStartDateT &&value)
AWS_EC2_API ScheduledInstance()=default
const Aws::Utils::DateTime & GetTermEndDate() const
const Aws::String & GetScheduledInstanceId() const
const Aws::Utils::DateTime & GetPreviousSlotEndTime() const
void SetInstanceType(InstanceTypeT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetAvailabilityZone() const
void SetTermEndDate(TermEndDateT &&value)
ScheduledInstance & WithInstanceCount(int value)
ScheduledInstance & WithCreateDate(CreateDateT &&value)
ScheduledInstance & WithPlatform(PlatformT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream