aws-sdk-ec2 1.221.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportImageOutput {
    /// <p>The architecture of the virtual machine.</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 AMI is encrypted.</p>
    pub encrypted: ::std::option::Option<bool>,
    /// <p>The target hypervisor of the import task.</p>
    pub hypervisor: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Machine Image (AMI) created by the import task.</p>
    pub image_id: ::std::option::Option<::std::string::String>,
    /// <p>The task ID of the import image task.</p>
    pub import_task_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the symmetric KMS key that was used to create the encrypted AMI.</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 operating system of the virtual machine.</p>
    pub platform: ::std::option::Option<::std::string::String>,
    /// <p>The progress of the 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 of the task.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>A detailed status message of the import task.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The ARNs of the license configurations.</p>
    pub license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
    /// <p>Any tags assigned to the import image task.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The usage operation value.</p>
    pub usage_operation: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ImportImageOutput {
    /// <p>The architecture of the virtual machine.</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 AMI is encrypted.</p>
    pub fn encrypted(&self) -> ::std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The target hypervisor of the import task.</p>
    pub fn hypervisor(&self) -> ::std::option::Option<&str> {
        self.hypervisor.as_deref()
    }
    /// <p>The ID of the Amazon Machine Image (AMI) created by the import task.</p>
    pub fn image_id(&self) -> ::std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The task 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 symmetric KMS key that was used to create the encrypted AMI.</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 operating system of the virtual machine.</p>
    pub fn platform(&self) -> ::std::option::Option<&str> {
        self.platform.as_deref()
    }
    /// <p>The progress of the task.</p>
    pub fn progress(&self) -> ::std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>Information about the snapshots.</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 `.snapshot_details.is_none()`.
    pub fn snapshot_details(&self) -> &[crate::types::SnapshotDetail] {
        self.snapshot_details.as_deref().unwrap_or_default()
    }
    /// <p>A brief status of the task.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>A detailed status message of the import task.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The ARNs of the license configurations.</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 `.license_specifications.is_none()`.
    pub fn license_specifications(&self) -> &[crate::types::ImportImageLicenseConfigurationResponse] {
        self.license_specifications.as_deref().unwrap_or_default()
    }
    /// <p>Any tags assigned to the import image task.</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 usage operation value.</p>
    pub fn usage_operation(&self) -> ::std::option::Option<&str> {
        self.usage_operation.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ImportImageOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ImportImageOutput {
    /// Creates a new builder-style object to manufacture [`ImportImageOutput`](crate::operation::import_image::ImportImageOutput).
    pub fn builder() -> crate::operation::import_image::builders::ImportImageOutputBuilder {
        crate::operation::import_image::builders::ImportImageOutputBuilder::default()
    }
}

/// A builder for [`ImportImageOutput`](crate::operation::import_image::ImportImageOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ImportImageOutputBuilder {
    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) license_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) usage_operation: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ImportImageOutputBuilder {
    /// <p>The architecture of the virtual machine.</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>
    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>
    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 AMI is encrypted.</p>
    pub fn encrypted(mut self, input: bool) -> Self {
        self.encrypted = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the AMI is encrypted.</p>
    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
        self.encrypted = input;
        self
    }
    /// <p>Indicates whether the AMI is encrypted.</p>
    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
        &self.encrypted
    }
    /// <p>The target hypervisor of the import task.</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 of the import task.</p>
    pub fn set_hypervisor(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hypervisor = input;
        self
    }
    /// <p>The target hypervisor of the import task.</p>
    pub fn get_hypervisor(&self) -> &::std::option::Option<::std::string::String> {
        &self.hypervisor
    }
    /// <p>The ID of the Amazon Machine Image (AMI) created by the import task.</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) created by the import task.</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) created by the import task.</p>
    pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_id
    }
    /// <p>The task 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 task 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 task 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 symmetric KMS key that was used to create the encrypted AMI.</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 symmetric KMS key that was used to create the encrypted AMI.</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 symmetric KMS key that was used to create the encrypted AMI.</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 operating system of the virtual machine.</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 operating system of the virtual machine.</p>
    pub fn set_platform(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.platform = input;
        self
    }
    /// <p>The operating system of the virtual machine.</p>
    pub fn get_platform(&self) -> &::std::option::Option<::std::string::String> {
        &self.platform
    }
    /// <p>The progress of the 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 progress of the task.</p>
    pub fn set_progress(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.progress = input;
        self
    }
    /// <p>The progress of the 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 of the 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 of the task.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>A brief status of the task.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>A detailed status message of the import 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 detailed status message of the import task.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>A detailed status message of the import task.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// 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.</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.</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.</p>
    pub fn get_license_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImportImageLicenseConfigurationResponse>> {
        &self.license_specifications
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to 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>Any tags assigned to 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>Any tags assigned to the import image task.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <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
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ImportImageOutput`](crate::operation::import_image::ImportImageOutput).
    pub fn build(self) -> crate::operation::import_image::ImportImageOutput {
        crate::operation::import_image::ImportImageOutput {
            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,
            license_specifications: self.license_specifications,
            tags: self.tags,
            usage_operation: self.usage_operation,
            _request_id: self._request_id,
        }
    }
}