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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an import image task.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportImageTask {
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub architecture: ::std::option::Option<::std::string::String>,
    /// <p>A description of the import task.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the image is encrypted.</p>
    pub encrypted: ::std::option::Option<bool>,
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub hypervisor: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub image_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the import image task.</p>
    pub import_task_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The license type of the virtual machine.</p>
    pub license_type: ::std::option::Option<::std::string::String>,
    /// <p>The description string for the import image task.</p>
    pub platform: ::std::option::Option<::std::string::String>,
    /// <p>The percentage of progress of the import image task.</p>
    pub progress: ::std::option::Option<::std::string::String>,
    /// <p>Information about the snapshots.</p>
    pub snapshot_details: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>,
    /// <p>A brief status for the import image task.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>A descriptive status message for the import image task.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The tags for the import image task.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
    /// <p>The usage operation value.</p>
    pub usage_operation: ::std::option::Option<::std::string::String>,
    /// <p>The boot mode of the virtual machine.</p>
    pub boot_mode: ::std::option::Option<crate::types::BootModeValues>,
}
impl ImportImageTask {
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub fn architecture(&self) -> ::std::option::Option<&str> {
        self.architecture.as_deref()
    }
    /// <p>A description of the import task.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Indicates whether the image is encrypted.</p>
    pub fn encrypted(&self) -> ::std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub fn hypervisor(&self) -> ::std::option::Option<&str> {
        self.hypervisor.as_deref()
    }
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub fn image_id(&self) -> ::std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The ID of the import image task.</p>
    pub fn import_task_id(&self) -> ::std::option::Option<&str> {
        self.import_task_id.as_deref()
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The license type of the virtual machine.</p>
    pub fn license_type(&self) -> ::std::option::Option<&str> {
        self.license_type.as_deref()
    }
    /// <p>The description string for the import image task.</p>
    pub fn platform(&self) -> ::std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The percentage of progress of the import image task.</p>
    pub fn progress(&self) -> ::std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>Information about the snapshots.</p>
    pub fn snapshot_details(&self) -> ::std::option::Option<&[crate::types::SnapshotDetail]> {
        self.snapshot_details.as_deref()
    }
    /// <p>A brief status for the import image task.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>A descriptive status message for the import image task.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The tags for the import image task.</p>
    pub fn tags(&self) -> ::std::option::Option<&[crate::types::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub fn license_specifications(&self) -> ::std::option::Option<&[crate::types::ImportImageLicenseConfigurationResponse]> {
        self.license_specifications.as_deref()
    }
    /// <p>The usage operation value.</p>
    pub fn usage_operation(&self) -> ::std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
    /// <p>The boot mode of the virtual machine.</p>
    pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::BootModeValues> {
        self.boot_mode.as_ref()
    }
}
impl ImportImageTask {
    /// Creates a new builder-style object to manufacture [`ImportImageTask`](crate::types::ImportImageTask).
    pub fn builder() -> crate::types::builders::ImportImageTaskBuilder {
        crate::types::builders::ImportImageTaskBuilder::default()
    }
}

/// A builder for [`ImportImageTask`](crate::types::ImportImageTask).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImportImageTaskBuilder {
    pub(crate) architecture: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) encrypted: ::std::option::Option<bool>,
    pub(crate) hypervisor: ::std::option::Option<::std::string::String>,
    pub(crate) image_id: ::std::option::Option<::std::string::String>,
    pub(crate) import_task_id: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) license_type: ::std::option::Option<::std::string::String>,
    pub(crate) platform: ::std::option::Option<::std::string::String>,
    pub(crate) progress: ::std::option::Option<::std::string::String>,
    pub(crate) snapshot_details: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
    pub(crate) usage_operation: ::std::option::Option<::std::string::String>,
    pub(crate) boot_mode: ::std::option::Option<crate::types::BootModeValues>,
}
impl ImportImageTaskBuilder {
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.architecture = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub fn set_architecture(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The architecture of the virtual machine.</p>
    /// <p>Valid values: <code>i386</code> | <code>x86_64</code> | <code>arm64</code> </p>
    pub fn get_architecture(&self) -> &::std::option::Option<::std::string::String> {
        &self.architecture
    }
    /// <p>A description of the import task.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the import task.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the import task.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Indicates whether the image is encrypted.</p>
    pub fn encrypted(mut self, input: bool) -> Self {
        self.encrypted = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the image is encrypted.</p>
    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
        self.encrypted = input;
        self
    }
    /// <p>Indicates whether the image is encrypted.</p>
    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
        &self.encrypted
    }
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub fn hypervisor(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hypervisor = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub fn set_hypervisor(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hypervisor = input;
        self
    }
    /// <p>The target hypervisor for the import task.</p>
    /// <p>Valid values: <code>xen</code> </p>
    pub fn get_hypervisor(&self) -> &::std::option::Option<::std::string::String> {
        &self.hypervisor
    }
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_id = input;
        self
    }
    /// <p>The ID of the Amazon Machine Image (AMI) of the imported virtual machine.</p>
    pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_id
    }
    /// <p>The ID of the import image task.</p>
    pub fn import_task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.import_task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the import image task.</p>
    pub fn set_import_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.import_task_id = input;
        self
    }
    /// <p>The ID of the import image task.</p>
    pub fn get_import_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.import_task_id
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The identifier for the KMS key that was used to create the encrypted image.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The license type of the virtual machine.</p>
    pub fn license_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The license type of the virtual machine.</p>
    pub fn set_license_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_type = input;
        self
    }
    /// <p>The license type of the virtual machine.</p>
    pub fn get_license_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_type
    }
    /// <p>The description string for the import image task.</p>
    pub fn platform(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.platform = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description string for the import image task.</p>
    pub fn set_platform(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform = input;
        self
    }
    /// <p>The description string for the import image task.</p>
    pub fn get_platform(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform
    }
    /// <p>The percentage of progress of the import image task.</p>
    pub fn progress(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.progress = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The percentage of progress of the import image task.</p>
    pub fn set_progress(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.progress = input;
        self
    }
    /// <p>The percentage of progress of the import image task.</p>
    pub fn get_progress(&self) -> &::std::option::Option<::std::string::String> {
        &self.progress
    }
    /// Appends an item to `snapshot_details`.
    ///
    /// To override the contents of this collection use [`set_snapshot_details`](Self::set_snapshot_details).
    ///
    /// <p>Information about the snapshots.</p>
    pub fn snapshot_details(mut self, input: crate::types::SnapshotDetail) -> Self {
        let mut v = self.snapshot_details.unwrap_or_default();
        v.push(input);
        self.snapshot_details = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the snapshots.</p>
    pub fn set_snapshot_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>>) -> Self {
        self.snapshot_details = input;
        self
    }
    /// <p>Information about the snapshots.</p>
    pub fn get_snapshot_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SnapshotDetail>> {
        &self.snapshot_details
    }
    /// <p>A brief status for the import image task.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A brief status for the import image task.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>A brief status for the import image task.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>A descriptive status message for the import image task.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A descriptive status message for the import image task.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>A descriptive status message for the import image task.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags for the import image task.</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>The tags for the import image task.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags for the import image task.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Appends an item to `license_specifications`.
    ///
    /// To override the contents of this collection use [`set_license_specifications`](Self::set_license_specifications).
    ///
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub fn license_specifications(mut self, input: crate::types::ImportImageLicenseConfigurationResponse) -> Self {
        let mut v = self.license_specifications.unwrap_or_default();
        v.push(input);
        self.license_specifications = ::std::option::Option::Some(v);
        self
    }
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub fn set_license_specifications(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
    ) -> Self {
        self.license_specifications = input;
        self
    }
    /// <p>The ARNs of the license configurations that are associated with the import image task.</p>
    pub fn get_license_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>> {
        &self.license_specifications
    }
    /// <p>The usage operation value.</p>
    pub fn usage_operation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.usage_operation = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The usage operation value.</p>
    pub fn set_usage_operation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.usage_operation = input;
        self
    }
    /// <p>The usage operation value.</p>
    pub fn get_usage_operation(&self) -> &::std::option::Option<::std::string::String> {
        &self.usage_operation
    }
    /// <p>The boot mode of the virtual machine.</p>
    pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
        self.boot_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The boot mode of the virtual machine.</p>
    pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
        self.boot_mode = input;
        self
    }
    /// <p>The boot mode of the virtual machine.</p>
    pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
        &self.boot_mode
    }
    /// Consumes the builder and constructs a [`ImportImageTask`](crate::types::ImportImageTask).
    pub fn build(self) -> crate::types::ImportImageTask {
        crate::types::ImportImageTask {
            architecture: self.architecture,
            description: self.description,
            encrypted: self.encrypted,
            hypervisor: self.hypervisor,
            image_id: self.image_id,
            import_task_id: self.import_task_id,
            kms_key_id: self.kms_key_id,
            license_type: self.license_type,
            platform: self.platform,
            progress: self.progress,
            snapshot_details: self.snapshot_details,
            status: self.status,
            status_message: self.status_message,
            tags: self.tags,
            license_specifications: self.license_specifications,
            usage_operation: self.usage_operation,
            boot_mode: self.boot_mode,
        }
    }
}