1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a Spot Instance request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SpotInstanceRequest {
    /// <p>Deprecated.</p>
    pub actual_block_hourly_price: ::std::option::Option<::std::string::String>,
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub availability_zone_group: ::std::option::Option<::std::string::String>,
    /// <p>Deprecated.</p>
    pub block_duration_minutes: ::std::option::Option<i32>,
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fault: ::std::option::Option<crate::types::SpotInstanceStateFault>,
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub launch_group: ::std::option::Option<::std::string::String>,
    /// <p>Additional information for launching instances.</p>
    pub launch_specification: ::std::option::Option<crate::types::LaunchSpecification>,
    /// <p>The Availability Zone in which the request is launched.</p>
    pub launched_availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The product description associated with the Spot Instance.</p>
    pub product_description: ::std::option::Option<crate::types::RiProductDescription>,
    /// <p>The ID of the Spot Instance request.</p>
    pub spot_instance_request_id: ::std::option::Option<::std::string::String>,
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p><important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub spot_price: ::std::option::Option<::std::string::String>,
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub state: ::std::option::Option<crate::types::SpotInstanceState>,
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub status: ::std::option::Option<crate::types::SpotInstanceStatus>,
    /// <p>Any tags assigned to the resource.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The Spot Instance request type.</p>
    pub r#type: ::std::option::Option<crate::types::SpotInstanceType>,
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub valid_from: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li>
    /// <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p></li>
    /// <li>
    /// <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p></li>
    /// </ul>
    pub valid_until: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub instance_interruption_behavior: ::std::option::Option<crate::types::InstanceInterruptionBehavior>,
}
impl SpotInstanceRequest {
    /// <p>Deprecated.</p>
    pub fn actual_block_hourly_price(&self) -> ::std::option::Option<&str> {
        self.actual_block_hourly_price.as_deref()
    }
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub fn availability_zone_group(&self) -> ::std::option::Option<&str> {
        self.availability_zone_group.as_deref()
    }
    /// <p>Deprecated.</p>
    pub fn block_duration_minutes(&self) -> ::std::option::Option<i32> {
        self.block_duration_minutes
    }
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn fault(&self) -> ::std::option::Option<&crate::types::SpotInstanceStateFault> {
        self.fault.as_ref()
    }
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub fn launch_group(&self) -> ::std::option::Option<&str> {
        self.launch_group.as_deref()
    }
    /// <p>Additional information for launching instances.</p>
    pub fn launch_specification(&self) -> ::std::option::Option<&crate::types::LaunchSpecification> {
        self.launch_specification.as_ref()
    }
    /// <p>The Availability Zone in which the request is launched.</p>
    pub fn launched_availability_zone(&self) -> ::std::option::Option<&str> {
        self.launched_availability_zone.as_deref()
    }
    /// <p>The product description associated with the Spot Instance.</p>
    pub fn product_description(&self) -> ::std::option::Option<&crate::types::RiProductDescription> {
        self.product_description.as_ref()
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn spot_instance_request_id(&self) -> ::std::option::Option<&str> {
        self.spot_instance_request_id.as_deref()
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p><important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(&self) -> ::std::option::Option<&str> {
        self.spot_price.as_deref()
    }
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::SpotInstanceState> {
        self.state.as_ref()
    }
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::SpotInstanceStatus> {
        self.status.as_ref()
    }
    /// <p>Any tags assigned to the resource.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The Spot Instance request type.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::SpotInstanceType> {
        self.r#type.as_ref()
    }
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub fn valid_from(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.valid_from.as_ref()
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li>
    /// <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p></li>
    /// <li>
    /// <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p></li>
    /// </ul>
    pub fn valid_until(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.valid_until.as_ref()
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn instance_interruption_behavior(&self) -> ::std::option::Option<&crate::types::InstanceInterruptionBehavior> {
        self.instance_interruption_behavior.as_ref()
    }
}
impl SpotInstanceRequest {
    /// Creates a new builder-style object to manufacture [`SpotInstanceRequest`](crate::types::SpotInstanceRequest).
    pub fn builder() -> crate::types::builders::SpotInstanceRequestBuilder {
        crate::types::builders::SpotInstanceRequestBuilder::default()
    }
}

/// A builder for [`SpotInstanceRequest`](crate::types::SpotInstanceRequest).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SpotInstanceRequestBuilder {
    pub(crate) actual_block_hourly_price: ::std::option::Option<::std::string::String>,
    pub(crate) availability_zone_group: ::std::option::Option<::std::string::String>,
    pub(crate) block_duration_minutes: ::std::option::Option<i32>,
    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) fault: ::std::option::Option<crate::types::SpotInstanceStateFault>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) launch_group: ::std::option::Option<::std::string::String>,
    pub(crate) launch_specification: ::std::option::Option<crate::types::LaunchSpecification>,
    pub(crate) launched_availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) product_description: ::std::option::Option<crate::types::RiProductDescription>,
    pub(crate) spot_instance_request_id: ::std::option::Option<::std::string::String>,
    pub(crate) spot_price: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::SpotInstanceState>,
    pub(crate) status: ::std::option::Option<crate::types::SpotInstanceStatus>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) r#type: ::std::option::Option<crate::types::SpotInstanceType>,
    pub(crate) valid_from: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) valid_until: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) instance_interruption_behavior: ::std::option::Option<crate::types::InstanceInterruptionBehavior>,
}
impl SpotInstanceRequestBuilder {
    /// <p>Deprecated.</p>
    pub fn actual_block_hourly_price(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.actual_block_hourly_price = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Deprecated.</p>
    pub fn set_actual_block_hourly_price(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.actual_block_hourly_price = input;
        self
    }
    /// <p>Deprecated.</p>
    pub fn get_actual_block_hourly_price(&self) -> &::std::option::Option<::std::string::String> {
        &self.actual_block_hourly_price
    }
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub fn availability_zone_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone_group = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub fn set_availability_zone_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone_group = input;
        self
    }
    /// <p>The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.</p>
    pub fn get_availability_zone_group(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone_group
    }
    /// <p>Deprecated.</p>
    pub fn block_duration_minutes(mut self, input: i32) -> Self {
        self.block_duration_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Deprecated.</p>
    pub fn set_block_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.block_duration_minutes = input;
        self
    }
    /// <p>Deprecated.</p>
    pub fn get_block_duration_minutes(&self) -> &::std::option::Option<i32> {
        &self.block_duration_minutes
    }
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.create_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.create_time = input;
        self
    }
    /// <p>The date and time when the Spot Instance request was created, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.create_time
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn fault(mut self, input: crate::types::SpotInstanceStateFault) -> Self {
        self.fault = ::std::option::Option::Some(input);
        self
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn set_fault(mut self, input: ::std::option::Option<crate::types::SpotInstanceStateFault>) -> Self {
        self.fault = input;
        self
    }
    /// <p>The fault codes for the Spot Instance request, if any.</p>
    pub fn get_fault(&self) -> &::std::option::Option<crate::types::SpotInstanceStateFault> {
        &self.fault
    }
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The instance ID, if an instance has been launched to fulfill the Spot Instance request.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub fn launch_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch_group = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub fn set_launch_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch_group = input;
        self
    }
    /// <p>The instance launch group. Launch groups are Spot Instances that launch together and terminate together.</p>
    pub fn get_launch_group(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch_group
    }
    /// <p>Additional information for launching instances.</p>
    pub fn launch_specification(mut self, input: crate::types::LaunchSpecification) -> Self {
        self.launch_specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Additional information for launching instances.</p>
    pub fn set_launch_specification(mut self, input: ::std::option::Option<crate::types::LaunchSpecification>) -> Self {
        self.launch_specification = input;
        self
    }
    /// <p>Additional information for launching instances.</p>
    pub fn get_launch_specification(&self) -> &::std::option::Option<crate::types::LaunchSpecification> {
        &self.launch_specification
    }
    /// <p>The Availability Zone in which the request is launched.</p>
    pub fn launched_availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launched_availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone in which the request is launched.</p>
    pub fn set_launched_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launched_availability_zone = input;
        self
    }
    /// <p>The Availability Zone in which the request is launched.</p>
    pub fn get_launched_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.launched_availability_zone
    }
    /// <p>The product description associated with the Spot Instance.</p>
    pub fn product_description(mut self, input: crate::types::RiProductDescription) -> Self {
        self.product_description = ::std::option::Option::Some(input);
        self
    }
    /// <p>The product description associated with the Spot Instance.</p>
    pub fn set_product_description(mut self, input: ::std::option::Option<crate::types::RiProductDescription>) -> Self {
        self.product_description = input;
        self
    }
    /// <p>The product description associated with the Spot Instance.</p>
    pub fn get_product_description(&self) -> &::std::option::Option<crate::types::RiProductDescription> {
        &self.product_description
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn spot_instance_request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.spot_instance_request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn set_spot_instance_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.spot_instance_request_id = input;
        self
    }
    /// <p>The ID of the Spot Instance request.</p>
    pub fn get_spot_instance_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.spot_instance_request_id
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p><important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn spot_price(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.spot_price = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p><important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn set_spot_price(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.spot_price = input;
        self
    }
    /// <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p><important>
    /// <p>If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.</p>
    /// </important>
    pub fn get_spot_price(&self) -> &::std::option::Option<::std::string::String> {
        &self.spot_price
    }
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn state(mut self, input: crate::types::SpotInstanceState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::SpotInstanceState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html">Spot request status</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::SpotInstanceState> {
        &self.state
    }
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub fn status(mut self, input: crate::types::SpotInstanceStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SpotInstanceStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status code and status message describing the Spot Instance request.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::SpotInstanceStatus> {
        &self.status
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the resource.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The Spot Instance request type.</p>
    pub fn r#type(mut self, input: crate::types::SpotInstanceType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Spot Instance request type.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::SpotInstanceType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The Spot Instance request type.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::SpotInstanceType> {
        &self.r#type
    }
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub fn valid_from(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.valid_from = ::std::option::Option::Some(input);
        self
    }
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub fn set_valid_from(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.valid_from = input;
        self
    }
    /// <p>The start date of the request, in UTC format (for example, <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z). The request becomes active at this date and time.</p>
    pub fn get_valid_from(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.valid_from
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li>
    /// <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p></li>
    /// <li>
    /// <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p></li>
    /// </ul>
    pub fn valid_until(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.valid_until = ::std::option::Option::Some(input);
        self
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li>
    /// <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p></li>
    /// <li>
    /// <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p></li>
    /// </ul>
    pub fn set_valid_until(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.valid_until = input;
        self
    }
    /// <p>The end date of the request, in UTC format (<i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z).</p>
    /// <ul>
    /// <li>
    /// <p>For a persistent request, the request remains active until the <code>validUntil</code> date and time is reached. Otherwise, the request remains active until you cancel it.</p></li>
    /// <li>
    /// <p>For a one-time request, the request remains active until all instances launch, the request is canceled, or the <code>validUntil</code> date and time is reached. By default, the request is valid for 7 days from the date the request was created.</p></li>
    /// </ul>
    pub fn get_valid_until(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.valid_until
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn instance_interruption_behavior(mut self, input: crate::types::InstanceInterruptionBehavior) -> Self {
        self.instance_interruption_behavior = ::std::option::Option::Some(input);
        self
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn set_instance_interruption_behavior(mut self, input: ::std::option::Option<crate::types::InstanceInterruptionBehavior>) -> Self {
        self.instance_interruption_behavior = input;
        self
    }
    /// <p>The behavior when a Spot Instance is interrupted.</p>
    pub fn get_instance_interruption_behavior(&self) -> &::std::option::Option<crate::types::InstanceInterruptionBehavior> {
        &self.instance_interruption_behavior
    }
    /// Consumes the builder and constructs a [`SpotInstanceRequest`](crate::types::SpotInstanceRequest).
    pub fn build(self) -> crate::types::SpotInstanceRequest {
        crate::types::SpotInstanceRequest {
            actual_block_hourly_price: self.actual_block_hourly_price,
            availability_zone_group: self.availability_zone_group,
            block_duration_minutes: self.block_duration_minutes,
            create_time: self.create_time,
            fault: self.fault,
            instance_id: self.instance_id,
            launch_group: self.launch_group,
            launch_specification: self.launch_specification,
            launched_availability_zone: self.launched_availability_zone,
            product_description: self.product_description,
            spot_instance_request_id: self.spot_instance_request_id,
            spot_price: self.spot_price,
            state: self.state,
            status: self.status,
            tags: self.tags,
            r#type: self.r#type,
            valid_from: self.valid_from,
            valid_until: self.valid_until,
            instance_interruption_behavior: self.instance_interruption_behavior,
        }
    }
}