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/SpotInstanceStateFault.h>
12 #include <aws/ec2/model/LaunchSpecification.h>
13 #include <aws/ec2/model/RIProductDescription.h>
14 #include <aws/ec2/model/SpotInstanceState.h>
15 #include <aws/ec2/model/SpotInstanceStatus.h>
16 #include <aws/core/utils/memory/stl/AWSVector.h>
17 #include <aws/ec2/model/SpotInstanceType.h>
18 #include <aws/ec2/model/InstanceInterruptionBehavior.h>
19 #include <aws/ec2/model/Tag.h>
20 #include <utility>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28   class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace EC2
32 {
33 namespace Model
34 {
35 
36   /**
37    * <p>Describes a Spot Instance request.</p><p><h3>See Also:</h3>   <a
38    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SpotInstanceRequest">AWS
39    * API Reference</a></p>
40    */
41   class AWS_EC2_API SpotInstanceRequest
42   {
43   public:
44     SpotInstanceRequest();
45     SpotInstanceRequest(const Aws::Utils::Xml::XmlNode& xmlNode);
46     SpotInstanceRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47 
48     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
49     void OutputToStream(Aws::OStream& oStream, const char* location) const;
50 
51 
52     /**
53      * <p>Deprecated.</p>
54      */
GetActualBlockHourlyPrice()55     inline const Aws::String& GetActualBlockHourlyPrice() const{ return m_actualBlockHourlyPrice; }
56 
57     /**
58      * <p>Deprecated.</p>
59      */
ActualBlockHourlyPriceHasBeenSet()60     inline bool ActualBlockHourlyPriceHasBeenSet() const { return m_actualBlockHourlyPriceHasBeenSet; }
61 
62     /**
63      * <p>Deprecated.</p>
64      */
SetActualBlockHourlyPrice(const Aws::String & value)65     inline void SetActualBlockHourlyPrice(const Aws::String& value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice = value; }
66 
67     /**
68      * <p>Deprecated.</p>
69      */
SetActualBlockHourlyPrice(Aws::String && value)70     inline void SetActualBlockHourlyPrice(Aws::String&& value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice = std::move(value); }
71 
72     /**
73      * <p>Deprecated.</p>
74      */
SetActualBlockHourlyPrice(const char * value)75     inline void SetActualBlockHourlyPrice(const char* value) { m_actualBlockHourlyPriceHasBeenSet = true; m_actualBlockHourlyPrice.assign(value); }
76 
77     /**
78      * <p>Deprecated.</p>
79      */
WithActualBlockHourlyPrice(const Aws::String & value)80     inline SpotInstanceRequest& WithActualBlockHourlyPrice(const Aws::String& value) { SetActualBlockHourlyPrice(value); return *this;}
81 
82     /**
83      * <p>Deprecated.</p>
84      */
WithActualBlockHourlyPrice(Aws::String && value)85     inline SpotInstanceRequest& WithActualBlockHourlyPrice(Aws::String&& value) { SetActualBlockHourlyPrice(std::move(value)); return *this;}
86 
87     /**
88      * <p>Deprecated.</p>
89      */
WithActualBlockHourlyPrice(const char * value)90     inline SpotInstanceRequest& WithActualBlockHourlyPrice(const char* value) { SetActualBlockHourlyPrice(value); return *this;}
91 
92 
93     /**
94      * <p>The Availability Zone group. If you specify the same Availability Zone group
95      * for all Spot Instance requests, all Spot Instances are launched in the same
96      * Availability Zone.</p>
97      */
GetAvailabilityZoneGroup()98     inline const Aws::String& GetAvailabilityZoneGroup() const{ return m_availabilityZoneGroup; }
99 
100     /**
101      * <p>The Availability Zone group. If you specify the same Availability Zone group
102      * for all Spot Instance requests, all Spot Instances are launched in the same
103      * Availability Zone.</p>
104      */
AvailabilityZoneGroupHasBeenSet()105     inline bool AvailabilityZoneGroupHasBeenSet() const { return m_availabilityZoneGroupHasBeenSet; }
106 
107     /**
108      * <p>The Availability Zone group. If you specify the same Availability Zone group
109      * for all Spot Instance requests, all Spot Instances are launched in the same
110      * Availability Zone.</p>
111      */
SetAvailabilityZoneGroup(const Aws::String & value)112     inline void SetAvailabilityZoneGroup(const Aws::String& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = value; }
113 
114     /**
115      * <p>The Availability Zone group. If you specify the same Availability Zone group
116      * for all Spot Instance requests, all Spot Instances are launched in the same
117      * Availability Zone.</p>
118      */
SetAvailabilityZoneGroup(Aws::String && value)119     inline void SetAvailabilityZoneGroup(Aws::String&& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = std::move(value); }
120 
121     /**
122      * <p>The Availability Zone group. If you specify the same Availability Zone group
123      * for all Spot Instance requests, all Spot Instances are launched in the same
124      * Availability Zone.</p>
125      */
SetAvailabilityZoneGroup(const char * value)126     inline void SetAvailabilityZoneGroup(const char* value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup.assign(value); }
127 
128     /**
129      * <p>The Availability Zone group. If you specify the same Availability Zone group
130      * for all Spot Instance requests, all Spot Instances are launched in the same
131      * Availability Zone.</p>
132      */
WithAvailabilityZoneGroup(const Aws::String & value)133     inline SpotInstanceRequest& WithAvailabilityZoneGroup(const Aws::String& value) { SetAvailabilityZoneGroup(value); return *this;}
134 
135     /**
136      * <p>The Availability Zone group. If you specify the same Availability Zone group
137      * for all Spot Instance requests, all Spot Instances are launched in the same
138      * Availability Zone.</p>
139      */
WithAvailabilityZoneGroup(Aws::String && value)140     inline SpotInstanceRequest& WithAvailabilityZoneGroup(Aws::String&& value) { SetAvailabilityZoneGroup(std::move(value)); return *this;}
141 
142     /**
143      * <p>The Availability Zone group. If you specify the same Availability Zone group
144      * for all Spot Instance requests, all Spot Instances are launched in the same
145      * Availability Zone.</p>
146      */
WithAvailabilityZoneGroup(const char * value)147     inline SpotInstanceRequest& WithAvailabilityZoneGroup(const char* value) { SetAvailabilityZoneGroup(value); return *this;}
148 
149 
150     /**
151      * <p>Deprecated.</p>
152      */
GetBlockDurationMinutes()153     inline int GetBlockDurationMinutes() const{ return m_blockDurationMinutes; }
154 
155     /**
156      * <p>Deprecated.</p>
157      */
BlockDurationMinutesHasBeenSet()158     inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; }
159 
160     /**
161      * <p>Deprecated.</p>
162      */
SetBlockDurationMinutes(int value)163     inline void SetBlockDurationMinutes(int value) { m_blockDurationMinutesHasBeenSet = true; m_blockDurationMinutes = value; }
164 
165     /**
166      * <p>Deprecated.</p>
167      */
WithBlockDurationMinutes(int value)168     inline SpotInstanceRequest& WithBlockDurationMinutes(int value) { SetBlockDurationMinutes(value); return *this;}
169 
170 
171     /**
172      * <p>The date and time when the Spot Instance request was created, in UTC format
173      * (for example,
174      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
175      */
GetCreateTime()176     inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; }
177 
178     /**
179      * <p>The date and time when the Spot Instance request was created, in UTC format
180      * (for example,
181      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
182      */
CreateTimeHasBeenSet()183     inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
184 
185     /**
186      * <p>The date and time when the Spot Instance request was created, in UTC format
187      * (for example,
188      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
189      */
SetCreateTime(const Aws::Utils::DateTime & value)190     inline void SetCreateTime(const Aws::Utils::DateTime& value) { m_createTimeHasBeenSet = true; m_createTime = value; }
191 
192     /**
193      * <p>The date and time when the Spot Instance request was created, in UTC format
194      * (for example,
195      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
196      */
SetCreateTime(Aws::Utils::DateTime && value)197     inline void SetCreateTime(Aws::Utils::DateTime&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); }
198 
199     /**
200      * <p>The date and time when the Spot Instance request was created, in UTC format
201      * (for example,
202      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
203      */
WithCreateTime(const Aws::Utils::DateTime & value)204     inline SpotInstanceRequest& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;}
205 
206     /**
207      * <p>The date and time when the Spot Instance request was created, in UTC format
208      * (for example,
209      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
210      */
WithCreateTime(Aws::Utils::DateTime && value)211     inline SpotInstanceRequest& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;}
212 
213 
214     /**
215      * <p>The fault codes for the Spot Instance request, if any.</p>
216      */
GetFault()217     inline const SpotInstanceStateFault& GetFault() const{ return m_fault; }
218 
219     /**
220      * <p>The fault codes for the Spot Instance request, if any.</p>
221      */
FaultHasBeenSet()222     inline bool FaultHasBeenSet() const { return m_faultHasBeenSet; }
223 
224     /**
225      * <p>The fault codes for the Spot Instance request, if any.</p>
226      */
SetFault(const SpotInstanceStateFault & value)227     inline void SetFault(const SpotInstanceStateFault& value) { m_faultHasBeenSet = true; m_fault = value; }
228 
229     /**
230      * <p>The fault codes for the Spot Instance request, if any.</p>
231      */
SetFault(SpotInstanceStateFault && value)232     inline void SetFault(SpotInstanceStateFault&& value) { m_faultHasBeenSet = true; m_fault = std::move(value); }
233 
234     /**
235      * <p>The fault codes for the Spot Instance request, if any.</p>
236      */
WithFault(const SpotInstanceStateFault & value)237     inline SpotInstanceRequest& WithFault(const SpotInstanceStateFault& value) { SetFault(value); return *this;}
238 
239     /**
240      * <p>The fault codes for the Spot Instance request, if any.</p>
241      */
WithFault(SpotInstanceStateFault && value)242     inline SpotInstanceRequest& WithFault(SpotInstanceStateFault&& value) { SetFault(std::move(value)); return *this;}
243 
244 
245     /**
246      * <p>The instance ID, if an instance has been launched to fulfill the Spot
247      * Instance request.</p>
248      */
GetInstanceId()249     inline const Aws::String& GetInstanceId() const{ return m_instanceId; }
250 
251     /**
252      * <p>The instance ID, if an instance has been launched to fulfill the Spot
253      * Instance request.</p>
254      */
InstanceIdHasBeenSet()255     inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
256 
257     /**
258      * <p>The instance ID, if an instance has been launched to fulfill the Spot
259      * Instance request.</p>
260      */
SetInstanceId(const Aws::String & value)261     inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; }
262 
263     /**
264      * <p>The instance ID, if an instance has been launched to fulfill the Spot
265      * Instance request.</p>
266      */
SetInstanceId(Aws::String && value)267     inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); }
268 
269     /**
270      * <p>The instance ID, if an instance has been launched to fulfill the Spot
271      * Instance request.</p>
272      */
SetInstanceId(const char * value)273     inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); }
274 
275     /**
276      * <p>The instance ID, if an instance has been launched to fulfill the Spot
277      * Instance request.</p>
278      */
WithInstanceId(const Aws::String & value)279     inline SpotInstanceRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;}
280 
281     /**
282      * <p>The instance ID, if an instance has been launched to fulfill the Spot
283      * Instance request.</p>
284      */
WithInstanceId(Aws::String && value)285     inline SpotInstanceRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;}
286 
287     /**
288      * <p>The instance ID, if an instance has been launched to fulfill the Spot
289      * Instance request.</p>
290      */
WithInstanceId(const char * value)291     inline SpotInstanceRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;}
292 
293 
294     /**
295      * <p>The instance launch group. Launch groups are Spot Instances that launch
296      * together and terminate together.</p>
297      */
GetLaunchGroup()298     inline const Aws::String& GetLaunchGroup() const{ return m_launchGroup; }
299 
300     /**
301      * <p>The instance launch group. Launch groups are Spot Instances that launch
302      * together and terminate together.</p>
303      */
LaunchGroupHasBeenSet()304     inline bool LaunchGroupHasBeenSet() const { return m_launchGroupHasBeenSet; }
305 
306     /**
307      * <p>The instance launch group. Launch groups are Spot Instances that launch
308      * together and terminate together.</p>
309      */
SetLaunchGroup(const Aws::String & value)310     inline void SetLaunchGroup(const Aws::String& value) { m_launchGroupHasBeenSet = true; m_launchGroup = value; }
311 
312     /**
313      * <p>The instance launch group. Launch groups are Spot Instances that launch
314      * together and terminate together.</p>
315      */
SetLaunchGroup(Aws::String && value)316     inline void SetLaunchGroup(Aws::String&& value) { m_launchGroupHasBeenSet = true; m_launchGroup = std::move(value); }
317 
318     /**
319      * <p>The instance launch group. Launch groups are Spot Instances that launch
320      * together and terminate together.</p>
321      */
SetLaunchGroup(const char * value)322     inline void SetLaunchGroup(const char* value) { m_launchGroupHasBeenSet = true; m_launchGroup.assign(value); }
323 
324     /**
325      * <p>The instance launch group. Launch groups are Spot Instances that launch
326      * together and terminate together.</p>
327      */
WithLaunchGroup(const Aws::String & value)328     inline SpotInstanceRequest& WithLaunchGroup(const Aws::String& value) { SetLaunchGroup(value); return *this;}
329 
330     /**
331      * <p>The instance launch group. Launch groups are Spot Instances that launch
332      * together and terminate together.</p>
333      */
WithLaunchGroup(Aws::String && value)334     inline SpotInstanceRequest& WithLaunchGroup(Aws::String&& value) { SetLaunchGroup(std::move(value)); return *this;}
335 
336     /**
337      * <p>The instance launch group. Launch groups are Spot Instances that launch
338      * together and terminate together.</p>
339      */
WithLaunchGroup(const char * value)340     inline SpotInstanceRequest& WithLaunchGroup(const char* value) { SetLaunchGroup(value); return *this;}
341 
342 
343     /**
344      * <p>Additional information for launching instances.</p>
345      */
GetLaunchSpecification()346     inline const LaunchSpecification& GetLaunchSpecification() const{ return m_launchSpecification; }
347 
348     /**
349      * <p>Additional information for launching instances.</p>
350      */
LaunchSpecificationHasBeenSet()351     inline bool LaunchSpecificationHasBeenSet() const { return m_launchSpecificationHasBeenSet; }
352 
353     /**
354      * <p>Additional information for launching instances.</p>
355      */
SetLaunchSpecification(const LaunchSpecification & value)356     inline void SetLaunchSpecification(const LaunchSpecification& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = value; }
357 
358     /**
359      * <p>Additional information for launching instances.</p>
360      */
SetLaunchSpecification(LaunchSpecification && value)361     inline void SetLaunchSpecification(LaunchSpecification&& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = std::move(value); }
362 
363     /**
364      * <p>Additional information for launching instances.</p>
365      */
WithLaunchSpecification(const LaunchSpecification & value)366     inline SpotInstanceRequest& WithLaunchSpecification(const LaunchSpecification& value) { SetLaunchSpecification(value); return *this;}
367 
368     /**
369      * <p>Additional information for launching instances.</p>
370      */
WithLaunchSpecification(LaunchSpecification && value)371     inline SpotInstanceRequest& WithLaunchSpecification(LaunchSpecification&& value) { SetLaunchSpecification(std::move(value)); return *this;}
372 
373 
374     /**
375      * <p>The Availability Zone in which the request is launched.</p>
376      */
GetLaunchedAvailabilityZone()377     inline const Aws::String& GetLaunchedAvailabilityZone() const{ return m_launchedAvailabilityZone; }
378 
379     /**
380      * <p>The Availability Zone in which the request is launched.</p>
381      */
LaunchedAvailabilityZoneHasBeenSet()382     inline bool LaunchedAvailabilityZoneHasBeenSet() const { return m_launchedAvailabilityZoneHasBeenSet; }
383 
384     /**
385      * <p>The Availability Zone in which the request is launched.</p>
386      */
SetLaunchedAvailabilityZone(const Aws::String & value)387     inline void SetLaunchedAvailabilityZone(const Aws::String& value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone = value; }
388 
389     /**
390      * <p>The Availability Zone in which the request is launched.</p>
391      */
SetLaunchedAvailabilityZone(Aws::String && value)392     inline void SetLaunchedAvailabilityZone(Aws::String&& value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone = std::move(value); }
393 
394     /**
395      * <p>The Availability Zone in which the request is launched.</p>
396      */
SetLaunchedAvailabilityZone(const char * value)397     inline void SetLaunchedAvailabilityZone(const char* value) { m_launchedAvailabilityZoneHasBeenSet = true; m_launchedAvailabilityZone.assign(value); }
398 
399     /**
400      * <p>The Availability Zone in which the request is launched.</p>
401      */
WithLaunchedAvailabilityZone(const Aws::String & value)402     inline SpotInstanceRequest& WithLaunchedAvailabilityZone(const Aws::String& value) { SetLaunchedAvailabilityZone(value); return *this;}
403 
404     /**
405      * <p>The Availability Zone in which the request is launched.</p>
406      */
WithLaunchedAvailabilityZone(Aws::String && value)407     inline SpotInstanceRequest& WithLaunchedAvailabilityZone(Aws::String&& value) { SetLaunchedAvailabilityZone(std::move(value)); return *this;}
408 
409     /**
410      * <p>The Availability Zone in which the request is launched.</p>
411      */
WithLaunchedAvailabilityZone(const char * value)412     inline SpotInstanceRequest& WithLaunchedAvailabilityZone(const char* value) { SetLaunchedAvailabilityZone(value); return *this;}
413 
414 
415     /**
416      * <p>The product description associated with the Spot Instance.</p>
417      */
GetProductDescription()418     inline const RIProductDescription& GetProductDescription() const{ return m_productDescription; }
419 
420     /**
421      * <p>The product description associated with the Spot Instance.</p>
422      */
ProductDescriptionHasBeenSet()423     inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; }
424 
425     /**
426      * <p>The product description associated with the Spot Instance.</p>
427      */
SetProductDescription(const RIProductDescription & value)428     inline void SetProductDescription(const RIProductDescription& value) { m_productDescriptionHasBeenSet = true; m_productDescription = value; }
429 
430     /**
431      * <p>The product description associated with the Spot Instance.</p>
432      */
SetProductDescription(RIProductDescription && value)433     inline void SetProductDescription(RIProductDescription&& value) { m_productDescriptionHasBeenSet = true; m_productDescription = std::move(value); }
434 
435     /**
436      * <p>The product description associated with the Spot Instance.</p>
437      */
WithProductDescription(const RIProductDescription & value)438     inline SpotInstanceRequest& WithProductDescription(const RIProductDescription& value) { SetProductDescription(value); return *this;}
439 
440     /**
441      * <p>The product description associated with the Spot Instance.</p>
442      */
WithProductDescription(RIProductDescription && value)443     inline SpotInstanceRequest& WithProductDescription(RIProductDescription&& value) { SetProductDescription(std::move(value)); return *this;}
444 
445 
446     /**
447      * <p>The ID of the Spot Instance request.</p>
448      */
GetSpotInstanceRequestId()449     inline const Aws::String& GetSpotInstanceRequestId() const{ return m_spotInstanceRequestId; }
450 
451     /**
452      * <p>The ID of the Spot Instance request.</p>
453      */
SpotInstanceRequestIdHasBeenSet()454     inline bool SpotInstanceRequestIdHasBeenSet() const { return m_spotInstanceRequestIdHasBeenSet; }
455 
456     /**
457      * <p>The ID of the Spot Instance request.</p>
458      */
SetSpotInstanceRequestId(const Aws::String & value)459     inline void SetSpotInstanceRequestId(const Aws::String& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = value; }
460 
461     /**
462      * <p>The ID of the Spot Instance request.</p>
463      */
SetSpotInstanceRequestId(Aws::String && value)464     inline void SetSpotInstanceRequestId(Aws::String&& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = std::move(value); }
465 
466     /**
467      * <p>The ID of the Spot Instance request.</p>
468      */
SetSpotInstanceRequestId(const char * value)469     inline void SetSpotInstanceRequestId(const char* value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId.assign(value); }
470 
471     /**
472      * <p>The ID of the Spot Instance request.</p>
473      */
WithSpotInstanceRequestId(const Aws::String & value)474     inline SpotInstanceRequest& WithSpotInstanceRequestId(const Aws::String& value) { SetSpotInstanceRequestId(value); return *this;}
475 
476     /**
477      * <p>The ID of the Spot Instance request.</p>
478      */
WithSpotInstanceRequestId(Aws::String && value)479     inline SpotInstanceRequest& WithSpotInstanceRequestId(Aws::String&& value) { SetSpotInstanceRequestId(std::move(value)); return *this;}
480 
481     /**
482      * <p>The ID of the Spot Instance request.</p>
483      */
WithSpotInstanceRequestId(const char * value)484     inline SpotInstanceRequest& WithSpotInstanceRequestId(const char* value) { SetSpotInstanceRequestId(value); return *this;}
485 
486 
487     /**
488      * <p>The maximum price per hour that you are willing to pay for a Spot
489      * Instance.</p>
490      */
GetSpotPrice()491     inline const Aws::String& GetSpotPrice() const{ return m_spotPrice; }
492 
493     /**
494      * <p>The maximum price per hour that you are willing to pay for a Spot
495      * Instance.</p>
496      */
SpotPriceHasBeenSet()497     inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
498 
499     /**
500      * <p>The maximum price per hour that you are willing to pay for a Spot
501      * Instance.</p>
502      */
SetSpotPrice(const Aws::String & value)503     inline void SetSpotPrice(const Aws::String& value) { m_spotPriceHasBeenSet = true; m_spotPrice = value; }
504 
505     /**
506      * <p>The maximum price per hour that you are willing to pay for a Spot
507      * Instance.</p>
508      */
SetSpotPrice(Aws::String && value)509     inline void SetSpotPrice(Aws::String&& value) { m_spotPriceHasBeenSet = true; m_spotPrice = std::move(value); }
510 
511     /**
512      * <p>The maximum price per hour that you are willing to pay for a Spot
513      * Instance.</p>
514      */
SetSpotPrice(const char * value)515     inline void SetSpotPrice(const char* value) { m_spotPriceHasBeenSet = true; m_spotPrice.assign(value); }
516 
517     /**
518      * <p>The maximum price per hour that you are willing to pay for a Spot
519      * Instance.</p>
520      */
WithSpotPrice(const Aws::String & value)521     inline SpotInstanceRequest& WithSpotPrice(const Aws::String& value) { SetSpotPrice(value); return *this;}
522 
523     /**
524      * <p>The maximum price per hour that you are willing to pay for a Spot
525      * Instance.</p>
526      */
WithSpotPrice(Aws::String && value)527     inline SpotInstanceRequest& WithSpotPrice(Aws::String&& value) { SetSpotPrice(std::move(value)); return *this;}
528 
529     /**
530      * <p>The maximum price per hour that you are willing to pay for a Spot
531      * Instance.</p>
532      */
WithSpotPrice(const char * value)533     inline SpotInstanceRequest& WithSpotPrice(const char* value) { SetSpotPrice(value); return *this;}
534 
535 
536     /**
537      * <p>The state of the Spot Instance request. Spot status information helps track
538      * your Spot Instance requests. For more information, see <a
539      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
540      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
541      */
GetState()542     inline const SpotInstanceState& GetState() const{ return m_state; }
543 
544     /**
545      * <p>The state of the Spot Instance request. Spot status information helps track
546      * your Spot Instance requests. For more information, see <a
547      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
548      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
549      */
StateHasBeenSet()550     inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
551 
552     /**
553      * <p>The state of the Spot Instance request. Spot status information helps track
554      * your Spot Instance requests. For more information, see <a
555      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
556      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
557      */
SetState(const SpotInstanceState & value)558     inline void SetState(const SpotInstanceState& value) { m_stateHasBeenSet = true; m_state = value; }
559 
560     /**
561      * <p>The state of the Spot Instance request. Spot status information helps track
562      * your Spot Instance requests. For more information, see <a
563      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
564      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
565      */
SetState(SpotInstanceState && value)566     inline void SetState(SpotInstanceState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
567 
568     /**
569      * <p>The state of the Spot Instance request. Spot status information helps track
570      * your Spot Instance requests. For more information, see <a
571      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
572      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
573      */
WithState(const SpotInstanceState & value)574     inline SpotInstanceRequest& WithState(const SpotInstanceState& value) { SetState(value); return *this;}
575 
576     /**
577      * <p>The state of the Spot Instance request. Spot status information helps track
578      * your Spot Instance requests. For more information, see <a
579      * href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html">Spot
580      * status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
581      */
WithState(SpotInstanceState && value)582     inline SpotInstanceRequest& WithState(SpotInstanceState&& value) { SetState(std::move(value)); return *this;}
583 
584 
585     /**
586      * <p>The status code and status message describing the Spot Instance request.</p>
587      */
GetStatus()588     inline const SpotInstanceStatus& GetStatus() const{ return m_status; }
589 
590     /**
591      * <p>The status code and status message describing the Spot Instance request.</p>
592      */
StatusHasBeenSet()593     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
594 
595     /**
596      * <p>The status code and status message describing the Spot Instance request.</p>
597      */
SetStatus(const SpotInstanceStatus & value)598     inline void SetStatus(const SpotInstanceStatus& value) { m_statusHasBeenSet = true; m_status = value; }
599 
600     /**
601      * <p>The status code and status message describing the Spot Instance request.</p>
602      */
SetStatus(SpotInstanceStatus && value)603     inline void SetStatus(SpotInstanceStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
604 
605     /**
606      * <p>The status code and status message describing the Spot Instance request.</p>
607      */
WithStatus(const SpotInstanceStatus & value)608     inline SpotInstanceRequest& WithStatus(const SpotInstanceStatus& value) { SetStatus(value); return *this;}
609 
610     /**
611      * <p>The status code and status message describing the Spot Instance request.</p>
612      */
WithStatus(SpotInstanceStatus && value)613     inline SpotInstanceRequest& WithStatus(SpotInstanceStatus&& value) { SetStatus(std::move(value)); return *this;}
614 
615 
616     /**
617      * <p>Any tags assigned to the resource.</p>
618      */
GetTags()619     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
620 
621     /**
622      * <p>Any tags assigned to the resource.</p>
623      */
TagsHasBeenSet()624     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
625 
626     /**
627      * <p>Any tags assigned to the resource.</p>
628      */
SetTags(const Aws::Vector<Tag> & value)629     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
630 
631     /**
632      * <p>Any tags assigned to the resource.</p>
633      */
SetTags(Aws::Vector<Tag> && value)634     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
635 
636     /**
637      * <p>Any tags assigned to the resource.</p>
638      */
WithTags(const Aws::Vector<Tag> & value)639     inline SpotInstanceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
640 
641     /**
642      * <p>Any tags assigned to the resource.</p>
643      */
WithTags(Aws::Vector<Tag> && value)644     inline SpotInstanceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
645 
646     /**
647      * <p>Any tags assigned to the resource.</p>
648      */
AddTags(const Tag & value)649     inline SpotInstanceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
650 
651     /**
652      * <p>Any tags assigned to the resource.</p>
653      */
AddTags(Tag && value)654     inline SpotInstanceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
655 
656 
657     /**
658      * <p>The Spot Instance request type.</p>
659      */
GetType()660     inline const SpotInstanceType& GetType() const{ return m_type; }
661 
662     /**
663      * <p>The Spot Instance request type.</p>
664      */
TypeHasBeenSet()665     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
666 
667     /**
668      * <p>The Spot Instance request type.</p>
669      */
SetType(const SpotInstanceType & value)670     inline void SetType(const SpotInstanceType& value) { m_typeHasBeenSet = true; m_type = value; }
671 
672     /**
673      * <p>The Spot Instance request type.</p>
674      */
SetType(SpotInstanceType && value)675     inline void SetType(SpotInstanceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
676 
677     /**
678      * <p>The Spot Instance request type.</p>
679      */
WithType(const SpotInstanceType & value)680     inline SpotInstanceRequest& WithType(const SpotInstanceType& value) { SetType(value); return *this;}
681 
682     /**
683      * <p>The Spot Instance request type.</p>
684      */
WithType(SpotInstanceType && value)685     inline SpotInstanceRequest& WithType(SpotInstanceType&& value) { SetType(std::move(value)); return *this;}
686 
687 
688     /**
689      * <p>The start date of the request, in UTC format (for example,
690      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
691      * becomes active at this date and time.</p>
692      */
GetValidFrom()693     inline const Aws::Utils::DateTime& GetValidFrom() const{ return m_validFrom; }
694 
695     /**
696      * <p>The start date of the request, in UTC format (for example,
697      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
698      * becomes active at this date and time.</p>
699      */
ValidFromHasBeenSet()700     inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; }
701 
702     /**
703      * <p>The start date of the request, in UTC format (for example,
704      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
705      * becomes active at this date and time.</p>
706      */
SetValidFrom(const Aws::Utils::DateTime & value)707     inline void SetValidFrom(const Aws::Utils::DateTime& value) { m_validFromHasBeenSet = true; m_validFrom = value; }
708 
709     /**
710      * <p>The start date of the request, in UTC format (for example,
711      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
712      * becomes active at this date and time.</p>
713      */
SetValidFrom(Aws::Utils::DateTime && value)714     inline void SetValidFrom(Aws::Utils::DateTime&& value) { m_validFromHasBeenSet = true; m_validFrom = std::move(value); }
715 
716     /**
717      * <p>The start date of the request, in UTC format (for example,
718      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
719      * becomes active at this date and time.</p>
720      */
WithValidFrom(const Aws::Utils::DateTime & value)721     inline SpotInstanceRequest& WithValidFrom(const Aws::Utils::DateTime& value) { SetValidFrom(value); return *this;}
722 
723     /**
724      * <p>The start date of the request, in UTC format (for example,
725      * <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request
726      * becomes active at this date and time.</p>
727      */
WithValidFrom(Aws::Utils::DateTime && value)728     inline SpotInstanceRequest& WithValidFrom(Aws::Utils::DateTime&& value) { SetValidFrom(std::move(value)); return *this;}
729 
730 
731     /**
732      * <p>The end date of the request, in UTC format
733      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
734      * <p>For a persistent request, the request remains active until the
735      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
736      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
737      * request remains active until all instances launch, the request is canceled, or
738      * the <code>validUntil</code> date and time is reached. By default, the request is
739      * valid for 7 days from the date the request was created.</p> </li> </ul>
740      */
GetValidUntil()741     inline const Aws::Utils::DateTime& GetValidUntil() const{ return m_validUntil; }
742 
743     /**
744      * <p>The end date of the request, in UTC format
745      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
746      * <p>For a persistent request, the request remains active until the
747      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
748      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
749      * request remains active until all instances launch, the request is canceled, or
750      * the <code>validUntil</code> date and time is reached. By default, the request is
751      * valid for 7 days from the date the request was created.</p> </li> </ul>
752      */
ValidUntilHasBeenSet()753     inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
754 
755     /**
756      * <p>The end date of the request, in UTC format
757      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
758      * <p>For a persistent request, the request remains active until the
759      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
760      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
761      * request remains active until all instances launch, the request is canceled, or
762      * the <code>validUntil</code> date and time is reached. By default, the request is
763      * valid for 7 days from the date the request was created.</p> </li> </ul>
764      */
SetValidUntil(const Aws::Utils::DateTime & value)765     inline void SetValidUntil(const Aws::Utils::DateTime& value) { m_validUntilHasBeenSet = true; m_validUntil = value; }
766 
767     /**
768      * <p>The end date of the request, in UTC format
769      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
770      * <p>For a persistent request, the request remains active until the
771      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
772      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
773      * request remains active until all instances launch, the request is canceled, or
774      * the <code>validUntil</code> date and time is reached. By default, the request is
775      * valid for 7 days from the date the request was created.</p> </li> </ul>
776      */
SetValidUntil(Aws::Utils::DateTime && value)777     inline void SetValidUntil(Aws::Utils::DateTime&& value) { m_validUntilHasBeenSet = true; m_validUntil = std::move(value); }
778 
779     /**
780      * <p>The end date of the request, in UTC format
781      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
782      * <p>For a persistent request, the request remains active until the
783      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
784      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
785      * request remains active until all instances launch, the request is canceled, or
786      * the <code>validUntil</code> date and time is reached. By default, the request is
787      * valid for 7 days from the date the request was created.</p> </li> </ul>
788      */
WithValidUntil(const Aws::Utils::DateTime & value)789     inline SpotInstanceRequest& WithValidUntil(const Aws::Utils::DateTime& value) { SetValidUntil(value); return *this;}
790 
791     /**
792      * <p>The end date of the request, in UTC format
793      * (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p> <ul> <li>
794      * <p>For a persistent request, the request remains active until the
795      * <code>validUntil</code> date and time is reached. Otherwise, the request remains
796      * active until you cancel it. </p> </li> <li> <p>For a one-time request, the
797      * request remains active until all instances launch, the request is canceled, or
798      * the <code>validUntil</code> date and time is reached. By default, the request is
799      * valid for 7 days from the date the request was created.</p> </li> </ul>
800      */
WithValidUntil(Aws::Utils::DateTime && value)801     inline SpotInstanceRequest& WithValidUntil(Aws::Utils::DateTime&& value) { SetValidUntil(std::move(value)); return *this;}
802 
803 
804     /**
805      * <p>The behavior when a Spot Instance is interrupted.</p>
806      */
GetInstanceInterruptionBehavior()807     inline const InstanceInterruptionBehavior& GetInstanceInterruptionBehavior() const{ return m_instanceInterruptionBehavior; }
808 
809     /**
810      * <p>The behavior when a Spot Instance is interrupted.</p>
811      */
InstanceInterruptionBehaviorHasBeenSet()812     inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
813 
814     /**
815      * <p>The behavior when a Spot Instance is interrupted.</p>
816      */
SetInstanceInterruptionBehavior(const InstanceInterruptionBehavior & value)817     inline void SetInstanceInterruptionBehavior(const InstanceInterruptionBehavior& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; }
818 
819     /**
820      * <p>The behavior when a Spot Instance is interrupted.</p>
821      */
SetInstanceInterruptionBehavior(InstanceInterruptionBehavior && value)822     inline void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior&& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = std::move(value); }
823 
824     /**
825      * <p>The behavior when a Spot Instance is interrupted.</p>
826      */
WithInstanceInterruptionBehavior(const InstanceInterruptionBehavior & value)827     inline SpotInstanceRequest& WithInstanceInterruptionBehavior(const InstanceInterruptionBehavior& value) { SetInstanceInterruptionBehavior(value); return *this;}
828 
829     /**
830      * <p>The behavior when a Spot Instance is interrupted.</p>
831      */
WithInstanceInterruptionBehavior(InstanceInterruptionBehavior && value)832     inline SpotInstanceRequest& WithInstanceInterruptionBehavior(InstanceInterruptionBehavior&& value) { SetInstanceInterruptionBehavior(std::move(value)); return *this;}
833 
834   private:
835 
836     Aws::String m_actualBlockHourlyPrice;
837     bool m_actualBlockHourlyPriceHasBeenSet;
838 
839     Aws::String m_availabilityZoneGroup;
840     bool m_availabilityZoneGroupHasBeenSet;
841 
842     int m_blockDurationMinutes;
843     bool m_blockDurationMinutesHasBeenSet;
844 
845     Aws::Utils::DateTime m_createTime;
846     bool m_createTimeHasBeenSet;
847 
848     SpotInstanceStateFault m_fault;
849     bool m_faultHasBeenSet;
850 
851     Aws::String m_instanceId;
852     bool m_instanceIdHasBeenSet;
853 
854     Aws::String m_launchGroup;
855     bool m_launchGroupHasBeenSet;
856 
857     LaunchSpecification m_launchSpecification;
858     bool m_launchSpecificationHasBeenSet;
859 
860     Aws::String m_launchedAvailabilityZone;
861     bool m_launchedAvailabilityZoneHasBeenSet;
862 
863     RIProductDescription m_productDescription;
864     bool m_productDescriptionHasBeenSet;
865 
866     Aws::String m_spotInstanceRequestId;
867     bool m_spotInstanceRequestIdHasBeenSet;
868 
869     Aws::String m_spotPrice;
870     bool m_spotPriceHasBeenSet;
871 
872     SpotInstanceState m_state;
873     bool m_stateHasBeenSet;
874 
875     SpotInstanceStatus m_status;
876     bool m_statusHasBeenSet;
877 
878     Aws::Vector<Tag> m_tags;
879     bool m_tagsHasBeenSet;
880 
881     SpotInstanceType m_type;
882     bool m_typeHasBeenSet;
883 
884     Aws::Utils::DateTime m_validFrom;
885     bool m_validFromHasBeenSet;
886 
887     Aws::Utils::DateTime m_validUntil;
888     bool m_validUntilHasBeenSet;
889 
890     InstanceInterruptionBehavior m_instanceInterruptionBehavior;
891     bool m_instanceInterruptionBehaviorHasBeenSet;
892   };
893 
894 } // namespace Model
895 } // namespace EC2
896 } // namespace Aws
897