1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <aws/ec2/model/ScheduledInstanceRecurrence.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Xml
19 {
20   class XmlNode;
21 } // namespace Xml
22 } // namespace Utils
23 namespace EC2
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Describes a schedule that is available for your Scheduled
30    * Instances.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ScheduledInstanceAvailability">AWS
32    * API Reference</a></p>
33    */
34   class AWS_EC2_API ScheduledInstanceAvailability
35   {
36   public:
37     ScheduledInstanceAvailability();
38     ScheduledInstanceAvailability(const Aws::Utils::Xml::XmlNode& xmlNode);
39     ScheduledInstanceAvailability& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40 
41     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42     void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
45     /**
46      * <p>The Availability Zone.</p>
47      */
GetAvailabilityZone()48     inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; }
49 
50     /**
51      * <p>The Availability Zone.</p>
52      */
AvailabilityZoneHasBeenSet()53     inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
54 
55     /**
56      * <p>The Availability Zone.</p>
57      */
SetAvailabilityZone(const Aws::String & value)58     inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; }
59 
60     /**
61      * <p>The Availability Zone.</p>
62      */
SetAvailabilityZone(Aws::String && value)63     inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); }
64 
65     /**
66      * <p>The Availability Zone.</p>
67      */
SetAvailabilityZone(const char * value)68     inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); }
69 
70     /**
71      * <p>The Availability Zone.</p>
72      */
WithAvailabilityZone(const Aws::String & value)73     inline ScheduledInstanceAvailability& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;}
74 
75     /**
76      * <p>The Availability Zone.</p>
77      */
WithAvailabilityZone(Aws::String && value)78     inline ScheduledInstanceAvailability& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;}
79 
80     /**
81      * <p>The Availability Zone.</p>
82      */
WithAvailabilityZone(const char * value)83     inline ScheduledInstanceAvailability& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;}
84 
85 
86     /**
87      * <p>The number of available instances.</p>
88      */
GetAvailableInstanceCount()89     inline int GetAvailableInstanceCount() const{ return m_availableInstanceCount; }
90 
91     /**
92      * <p>The number of available instances.</p>
93      */
AvailableInstanceCountHasBeenSet()94     inline bool AvailableInstanceCountHasBeenSet() const { return m_availableInstanceCountHasBeenSet; }
95 
96     /**
97      * <p>The number of available instances.</p>
98      */
SetAvailableInstanceCount(int value)99     inline void SetAvailableInstanceCount(int value) { m_availableInstanceCountHasBeenSet = true; m_availableInstanceCount = value; }
100 
101     /**
102      * <p>The number of available instances.</p>
103      */
WithAvailableInstanceCount(int value)104     inline ScheduledInstanceAvailability& WithAvailableInstanceCount(int value) { SetAvailableInstanceCount(value); return *this;}
105 
106 
107     /**
108      * <p>The time period for the first schedule to start.</p>
109      */
GetFirstSlotStartTime()110     inline const Aws::Utils::DateTime& GetFirstSlotStartTime() const{ return m_firstSlotStartTime; }
111 
112     /**
113      * <p>The time period for the first schedule to start.</p>
114      */
FirstSlotStartTimeHasBeenSet()115     inline bool FirstSlotStartTimeHasBeenSet() const { return m_firstSlotStartTimeHasBeenSet; }
116 
117     /**
118      * <p>The time period for the first schedule to start.</p>
119      */
SetFirstSlotStartTime(const Aws::Utils::DateTime & value)120     inline void SetFirstSlotStartTime(const Aws::Utils::DateTime& value) { m_firstSlotStartTimeHasBeenSet = true; m_firstSlotStartTime = value; }
121 
122     /**
123      * <p>The time period for the first schedule to start.</p>
124      */
SetFirstSlotStartTime(Aws::Utils::DateTime && value)125     inline void SetFirstSlotStartTime(Aws::Utils::DateTime&& value) { m_firstSlotStartTimeHasBeenSet = true; m_firstSlotStartTime = std::move(value); }
126 
127     /**
128      * <p>The time period for the first schedule to start.</p>
129      */
WithFirstSlotStartTime(const Aws::Utils::DateTime & value)130     inline ScheduledInstanceAvailability& WithFirstSlotStartTime(const Aws::Utils::DateTime& value) { SetFirstSlotStartTime(value); return *this;}
131 
132     /**
133      * <p>The time period for the first schedule to start.</p>
134      */
WithFirstSlotStartTime(Aws::Utils::DateTime && value)135     inline ScheduledInstanceAvailability& WithFirstSlotStartTime(Aws::Utils::DateTime&& value) { SetFirstSlotStartTime(std::move(value)); return *this;}
136 
137 
138     /**
139      * <p>The hourly price for a single instance.</p>
140      */
GetHourlyPrice()141     inline const Aws::String& GetHourlyPrice() const{ return m_hourlyPrice; }
142 
143     /**
144      * <p>The hourly price for a single instance.</p>
145      */
HourlyPriceHasBeenSet()146     inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
147 
148     /**
149      * <p>The hourly price for a single instance.</p>
150      */
SetHourlyPrice(const Aws::String & value)151     inline void SetHourlyPrice(const Aws::String& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = value; }
152 
153     /**
154      * <p>The hourly price for a single instance.</p>
155      */
SetHourlyPrice(Aws::String && value)156     inline void SetHourlyPrice(Aws::String&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::move(value); }
157 
158     /**
159      * <p>The hourly price for a single instance.</p>
160      */
SetHourlyPrice(const char * value)161     inline void SetHourlyPrice(const char* value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice.assign(value); }
162 
163     /**
164      * <p>The hourly price for a single instance.</p>
165      */
WithHourlyPrice(const Aws::String & value)166     inline ScheduledInstanceAvailability& WithHourlyPrice(const Aws::String& value) { SetHourlyPrice(value); return *this;}
167 
168     /**
169      * <p>The hourly price for a single instance.</p>
170      */
WithHourlyPrice(Aws::String && value)171     inline ScheduledInstanceAvailability& WithHourlyPrice(Aws::String&& value) { SetHourlyPrice(std::move(value)); return *this;}
172 
173     /**
174      * <p>The hourly price for a single instance.</p>
175      */
WithHourlyPrice(const char * value)176     inline ScheduledInstanceAvailability& WithHourlyPrice(const char* value) { SetHourlyPrice(value); return *this;}
177 
178 
179     /**
180      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
181      * types.</p>
182      */
GetInstanceType()183     inline const Aws::String& GetInstanceType() const{ return m_instanceType; }
184 
185     /**
186      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
187      * types.</p>
188      */
InstanceTypeHasBeenSet()189     inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
190 
191     /**
192      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
193      * types.</p>
194      */
SetInstanceType(const Aws::String & value)195     inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
196 
197     /**
198      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
199      * types.</p>
200      */
SetInstanceType(Aws::String && value)201     inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
202 
203     /**
204      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
205      * types.</p>
206      */
SetInstanceType(const char * value)207     inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); }
208 
209     /**
210      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
211      * types.</p>
212      */
WithInstanceType(const Aws::String & value)213     inline ScheduledInstanceAvailability& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;}
214 
215     /**
216      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
217      * types.</p>
218      */
WithInstanceType(Aws::String && value)219     inline ScheduledInstanceAvailability& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;}
220 
221     /**
222      * <p>The instance type. You can specify one of the C3, C4, M4, or R3 instance
223      * types.</p>
224      */
WithInstanceType(const char * value)225     inline ScheduledInstanceAvailability& WithInstanceType(const char* value) { SetInstanceType(value); return *this;}
226 
227 
228     /**
229      * <p>The maximum term. The only possible value is 365 days.</p>
230      */
GetMaxTermDurationInDays()231     inline int GetMaxTermDurationInDays() const{ return m_maxTermDurationInDays; }
232 
233     /**
234      * <p>The maximum term. The only possible value is 365 days.</p>
235      */
MaxTermDurationInDaysHasBeenSet()236     inline bool MaxTermDurationInDaysHasBeenSet() const { return m_maxTermDurationInDaysHasBeenSet; }
237 
238     /**
239      * <p>The maximum term. The only possible value is 365 days.</p>
240      */
SetMaxTermDurationInDays(int value)241     inline void SetMaxTermDurationInDays(int value) { m_maxTermDurationInDaysHasBeenSet = true; m_maxTermDurationInDays = value; }
242 
243     /**
244      * <p>The maximum term. The only possible value is 365 days.</p>
245      */
WithMaxTermDurationInDays(int value)246     inline ScheduledInstanceAvailability& WithMaxTermDurationInDays(int value) { SetMaxTermDurationInDays(value); return *this;}
247 
248 
249     /**
250      * <p>The minimum term. The only possible value is 365 days.</p>
251      */
GetMinTermDurationInDays()252     inline int GetMinTermDurationInDays() const{ return m_minTermDurationInDays; }
253 
254     /**
255      * <p>The minimum term. The only possible value is 365 days.</p>
256      */
MinTermDurationInDaysHasBeenSet()257     inline bool MinTermDurationInDaysHasBeenSet() const { return m_minTermDurationInDaysHasBeenSet; }
258 
259     /**
260      * <p>The minimum term. The only possible value is 365 days.</p>
261      */
SetMinTermDurationInDays(int value)262     inline void SetMinTermDurationInDays(int value) { m_minTermDurationInDaysHasBeenSet = true; m_minTermDurationInDays = value; }
263 
264     /**
265      * <p>The minimum term. The only possible value is 365 days.</p>
266      */
WithMinTermDurationInDays(int value)267     inline ScheduledInstanceAvailability& WithMinTermDurationInDays(int value) { SetMinTermDurationInDays(value); return *this;}
268 
269 
270     /**
271      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
272      */
GetNetworkPlatform()273     inline const Aws::String& GetNetworkPlatform() const{ return m_networkPlatform; }
274 
275     /**
276      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
277      */
NetworkPlatformHasBeenSet()278     inline bool NetworkPlatformHasBeenSet() const { return m_networkPlatformHasBeenSet; }
279 
280     /**
281      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
282      */
SetNetworkPlatform(const Aws::String & value)283     inline void SetNetworkPlatform(const Aws::String& value) { m_networkPlatformHasBeenSet = true; m_networkPlatform = value; }
284 
285     /**
286      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
287      */
SetNetworkPlatform(Aws::String && value)288     inline void SetNetworkPlatform(Aws::String&& value) { m_networkPlatformHasBeenSet = true; m_networkPlatform = std::move(value); }
289 
290     /**
291      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
292      */
SetNetworkPlatform(const char * value)293     inline void SetNetworkPlatform(const char* value) { m_networkPlatformHasBeenSet = true; m_networkPlatform.assign(value); }
294 
295     /**
296      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
297      */
WithNetworkPlatform(const Aws::String & value)298     inline ScheduledInstanceAvailability& WithNetworkPlatform(const Aws::String& value) { SetNetworkPlatform(value); return *this;}
299 
300     /**
301      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
302      */
WithNetworkPlatform(Aws::String && value)303     inline ScheduledInstanceAvailability& WithNetworkPlatform(Aws::String&& value) { SetNetworkPlatform(std::move(value)); return *this;}
304 
305     /**
306      * <p>The network platform (<code>EC2-Classic</code> or <code>EC2-VPC</code>).</p>
307      */
WithNetworkPlatform(const char * value)308     inline ScheduledInstanceAvailability& WithNetworkPlatform(const char* value) { SetNetworkPlatform(value); return *this;}
309 
310 
311     /**
312      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
313      */
GetPlatform()314     inline const Aws::String& GetPlatform() const{ return m_platform; }
315 
316     /**
317      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
318      */
PlatformHasBeenSet()319     inline bool PlatformHasBeenSet() const { return m_platformHasBeenSet; }
320 
321     /**
322      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
323      */
SetPlatform(const Aws::String & value)324     inline void SetPlatform(const Aws::String& value) { m_platformHasBeenSet = true; m_platform = value; }
325 
326     /**
327      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
328      */
SetPlatform(Aws::String && value)329     inline void SetPlatform(Aws::String&& value) { m_platformHasBeenSet = true; m_platform = std::move(value); }
330 
331     /**
332      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
333      */
SetPlatform(const char * value)334     inline void SetPlatform(const char* value) { m_platformHasBeenSet = true; m_platform.assign(value); }
335 
336     /**
337      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
338      */
WithPlatform(const Aws::String & value)339     inline ScheduledInstanceAvailability& WithPlatform(const Aws::String& value) { SetPlatform(value); return *this;}
340 
341     /**
342      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
343      */
WithPlatform(Aws::String && value)344     inline ScheduledInstanceAvailability& WithPlatform(Aws::String&& value) { SetPlatform(std::move(value)); return *this;}
345 
346     /**
347      * <p>The platform (<code>Linux/UNIX</code> or <code>Windows</code>).</p>
348      */
WithPlatform(const char * value)349     inline ScheduledInstanceAvailability& WithPlatform(const char* value) { SetPlatform(value); return *this;}
350 
351 
352     /**
353      * <p>The purchase token. This token expires in two hours.</p>
354      */
GetPurchaseToken()355     inline const Aws::String& GetPurchaseToken() const{ return m_purchaseToken; }
356 
357     /**
358      * <p>The purchase token. This token expires in two hours.</p>
359      */
PurchaseTokenHasBeenSet()360     inline bool PurchaseTokenHasBeenSet() const { return m_purchaseTokenHasBeenSet; }
361 
362     /**
363      * <p>The purchase token. This token expires in two hours.</p>
364      */
SetPurchaseToken(const Aws::String & value)365     inline void SetPurchaseToken(const Aws::String& value) { m_purchaseTokenHasBeenSet = true; m_purchaseToken = value; }
366 
367     /**
368      * <p>The purchase token. This token expires in two hours.</p>
369      */
SetPurchaseToken(Aws::String && value)370     inline void SetPurchaseToken(Aws::String&& value) { m_purchaseTokenHasBeenSet = true; m_purchaseToken = std::move(value); }
371 
372     /**
373      * <p>The purchase token. This token expires in two hours.</p>
374      */
SetPurchaseToken(const char * value)375     inline void SetPurchaseToken(const char* value) { m_purchaseTokenHasBeenSet = true; m_purchaseToken.assign(value); }
376 
377     /**
378      * <p>The purchase token. This token expires in two hours.</p>
379      */
WithPurchaseToken(const Aws::String & value)380     inline ScheduledInstanceAvailability& WithPurchaseToken(const Aws::String& value) { SetPurchaseToken(value); return *this;}
381 
382     /**
383      * <p>The purchase token. This token expires in two hours.</p>
384      */
WithPurchaseToken(Aws::String && value)385     inline ScheduledInstanceAvailability& WithPurchaseToken(Aws::String&& value) { SetPurchaseToken(std::move(value)); return *this;}
386 
387     /**
388      * <p>The purchase token. This token expires in two hours.</p>
389      */
WithPurchaseToken(const char * value)390     inline ScheduledInstanceAvailability& WithPurchaseToken(const char* value) { SetPurchaseToken(value); return *this;}
391 
392 
393     /**
394      * <p>The schedule recurrence.</p>
395      */
GetRecurrence()396     inline const ScheduledInstanceRecurrence& GetRecurrence() const{ return m_recurrence; }
397 
398     /**
399      * <p>The schedule recurrence.</p>
400      */
RecurrenceHasBeenSet()401     inline bool RecurrenceHasBeenSet() const { return m_recurrenceHasBeenSet; }
402 
403     /**
404      * <p>The schedule recurrence.</p>
405      */
SetRecurrence(const ScheduledInstanceRecurrence & value)406     inline void SetRecurrence(const ScheduledInstanceRecurrence& value) { m_recurrenceHasBeenSet = true; m_recurrence = value; }
407 
408     /**
409      * <p>The schedule recurrence.</p>
410      */
SetRecurrence(ScheduledInstanceRecurrence && value)411     inline void SetRecurrence(ScheduledInstanceRecurrence&& value) { m_recurrenceHasBeenSet = true; m_recurrence = std::move(value); }
412 
413     /**
414      * <p>The schedule recurrence.</p>
415      */
WithRecurrence(const ScheduledInstanceRecurrence & value)416     inline ScheduledInstanceAvailability& WithRecurrence(const ScheduledInstanceRecurrence& value) { SetRecurrence(value); return *this;}
417 
418     /**
419      * <p>The schedule recurrence.</p>
420      */
WithRecurrence(ScheduledInstanceRecurrence && value)421     inline ScheduledInstanceAvailability& WithRecurrence(ScheduledInstanceRecurrence&& value) { SetRecurrence(std::move(value)); return *this;}
422 
423 
424     /**
425      * <p>The number of hours in the schedule.</p>
426      */
GetSlotDurationInHours()427     inline int GetSlotDurationInHours() const{ return m_slotDurationInHours; }
428 
429     /**
430      * <p>The number of hours in the schedule.</p>
431      */
SlotDurationInHoursHasBeenSet()432     inline bool SlotDurationInHoursHasBeenSet() const { return m_slotDurationInHoursHasBeenSet; }
433 
434     /**
435      * <p>The number of hours in the schedule.</p>
436      */
SetSlotDurationInHours(int value)437     inline void SetSlotDurationInHours(int value) { m_slotDurationInHoursHasBeenSet = true; m_slotDurationInHours = value; }
438 
439     /**
440      * <p>The number of hours in the schedule.</p>
441      */
WithSlotDurationInHours(int value)442     inline ScheduledInstanceAvailability& WithSlotDurationInHours(int value) { SetSlotDurationInHours(value); return *this;}
443 
444 
445     /**
446      * <p>The total number of hours for a single instance for the entire term.</p>
447      */
GetTotalScheduledInstanceHours()448     inline int GetTotalScheduledInstanceHours() const{ return m_totalScheduledInstanceHours; }
449 
450     /**
451      * <p>The total number of hours for a single instance for the entire term.</p>
452      */
TotalScheduledInstanceHoursHasBeenSet()453     inline bool TotalScheduledInstanceHoursHasBeenSet() const { return m_totalScheduledInstanceHoursHasBeenSet; }
454 
455     /**
456      * <p>The total number of hours for a single instance for the entire term.</p>
457      */
SetTotalScheduledInstanceHours(int value)458     inline void SetTotalScheduledInstanceHours(int value) { m_totalScheduledInstanceHoursHasBeenSet = true; m_totalScheduledInstanceHours = value; }
459 
460     /**
461      * <p>The total number of hours for a single instance for the entire term.</p>
462      */
WithTotalScheduledInstanceHours(int value)463     inline ScheduledInstanceAvailability& WithTotalScheduledInstanceHours(int value) { SetTotalScheduledInstanceHours(value); return *this;}
464 
465   private:
466 
467     Aws::String m_availabilityZone;
468     bool m_availabilityZoneHasBeenSet;
469 
470     int m_availableInstanceCount;
471     bool m_availableInstanceCountHasBeenSet;
472 
473     Aws::Utils::DateTime m_firstSlotStartTime;
474     bool m_firstSlotStartTimeHasBeenSet;
475 
476     Aws::String m_hourlyPrice;
477     bool m_hourlyPriceHasBeenSet;
478 
479     Aws::String m_instanceType;
480     bool m_instanceTypeHasBeenSet;
481 
482     int m_maxTermDurationInDays;
483     bool m_maxTermDurationInDaysHasBeenSet;
484 
485     int m_minTermDurationInDays;
486     bool m_minTermDurationInDaysHasBeenSet;
487 
488     Aws::String m_networkPlatform;
489     bool m_networkPlatformHasBeenSet;
490 
491     Aws::String m_platform;
492     bool m_platformHasBeenSet;
493 
494     Aws::String m_purchaseToken;
495     bool m_purchaseTokenHasBeenSet;
496 
497     ScheduledInstanceRecurrence m_recurrence;
498     bool m_recurrenceHasBeenSet;
499 
500     int m_slotDurationInHours;
501     bool m_slotDurationInHoursHasBeenSet;
502 
503     int m_totalScheduledInstanceHours;
504     bool m_totalScheduledInstanceHoursHasBeenSet;
505   };
506 
507 } // namespace Model
508 } // namespace EC2
509 } // namespace Aws
510