aws_sdk_ec2/operation/create_snapshot/
_create_snapshot_output.rs

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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a snapshot.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSnapshotOutput {
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub owner_alias: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Any tags assigned to the snapshot.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub storage_tier: ::std::option::Option<crate::types::StorageTier>,
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub restore_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Reserved for future use.</p>
    pub sse_type: ::std::option::Option<crate::types::SseType>,
    /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <note>
    /// <p>Only for snapshot copies.</p>
    /// </note>
    /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
    /// <ul>
    /// <li>
    /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
    /// <li>
    /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
    /// </ul>
    pub transfer_type: ::std::option::Option<crate::types::TransferType>,
    /// <note>
    /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
    /// </note>
    /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
    pub completion_duration_minutes: ::std::option::Option<i32>,
    /// <p>The time stamp when the snapshot was completed.</p>
    pub completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub snapshot_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub volume_id: ::std::option::Option<::std::string::String>,
    /// <p>The snapshot state.</p>
    pub state: ::std::option::Option<crate::types::SnapshotState>,
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub state_message: ::std::option::Option<::std::string::String>,
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The progress of the snapshot, as a percentage.</p>
    pub progress: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>The description for the snapshot.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The size of the volume, in GiB.</p>
    pub volume_size: ::std::option::Option<i32>,
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub encrypted: ::std::option::Option<bool>,
    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub data_encryption_key_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateSnapshotOutput {
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub fn owner_alias(&self) -> ::std::option::Option<&str> {
        self.owner_alias.as_deref()
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Any tags assigned to the snapshot.</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 storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn storage_tier(&self) -> ::std::option::Option<&crate::types::StorageTier> {
        self.storage_tier.as_ref()
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn restore_expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.restore_expiry_time.as_ref()
    }
    /// <p>Reserved for future use.</p>
    pub fn sse_type(&self) -> ::std::option::Option<&crate::types::SseType> {
        self.sse_type.as_ref()
    }
    /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <note>
    /// <p>Only for snapshot copies.</p>
    /// </note>
    /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
    /// <ul>
    /// <li>
    /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
    /// <li>
    /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
    /// </ul>
    pub fn transfer_type(&self) -> ::std::option::Option<&crate::types::TransferType> {
        self.transfer_type.as_ref()
    }
    /// <note>
    /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
    /// </note>
    /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
    pub fn completion_duration_minutes(&self) -> ::std::option::Option<i32> {
        self.completion_duration_minutes
    }
    /// <p>The time stamp when the snapshot was completed.</p>
    pub fn completion_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completion_time.as_ref()
    }
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
        self.snapshot_id.as_deref()
    }
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub fn volume_id(&self) -> ::std::option::Option<&str> {
        self.volume_id.as_deref()
    }
    /// <p>The snapshot state.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::SnapshotState> {
        self.state.as_ref()
    }
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn state_message(&self) -> ::std::option::Option<&str> {
        self.state_message.as_deref()
    }
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The progress of the snapshot, as a percentage.</p>
    pub fn progress(&self) -> ::std::option::Option<&str> {
        self.progress.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>The description for the snapshot.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn volume_size(&self) -> ::std::option::Option<i32> {
        self.volume_size
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn encrypted(&self) -> ::std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn data_encryption_key_id(&self) -> ::std::option::Option<&str> {
        self.data_encryption_key_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateSnapshotOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateSnapshotOutput {
    /// Creates a new builder-style object to manufacture [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
    pub fn builder() -> crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder {
        crate::operation::create_snapshot::builders::CreateSnapshotOutputBuilder::default()
    }
}

/// A builder for [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSnapshotOutputBuilder {
    pub(crate) owner_alias: ::std::option::Option<::std::string::String>,
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) storage_tier: ::std::option::Option<crate::types::StorageTier>,
    pub(crate) restore_expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) sse_type: ::std::option::Option<crate::types::SseType>,
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) transfer_type: ::std::option::Option<crate::types::TransferType>,
    pub(crate) completion_duration_minutes: ::std::option::Option<i32>,
    pub(crate) completion_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
    pub(crate) volume_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::SnapshotState>,
    pub(crate) state_message: ::std::option::Option<::std::string::String>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) progress: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) volume_size: ::std::option::Option<i32>,
    pub(crate) encrypted: ::std::option::Option<bool>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) data_encryption_key_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateSnapshotOutputBuilder {
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub fn owner_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_alias = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub fn set_owner_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_alias = input;
        self
    }
    /// <p>The Amazon Web Services owner alias, from an Amazon-maintained list (<code>amazon</code>). This is not the user-configured Amazon Web Services account alias set using the IAM console.</p>
    pub fn get_owner_alias(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_alias
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The ARN of the Outpost on which the snapshot is stored. For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the snapshot.</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 snapshot.</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 snapshot.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn storage_tier(mut self, input: crate::types::StorageTier) -> Self {
        self.storage_tier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn set_storage_tier(mut self, input: ::std::option::Option<crate::types::StorageTier>) -> Self {
        self.storage_tier = input;
        self
    }
    /// <p>The storage tier in which the snapshot is stored. <code>standard</code> indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. <code>archive</code> indicates that the snapshot is currently archived and that it must be restored before it can be used.</p>
    pub fn get_storage_tier(&self) -> &::std::option::Option<crate::types::StorageTier> {
        &self.storage_tier
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn restore_expiry_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.restore_expiry_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn set_restore_expiry_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.restore_expiry_time = input;
        self
    }
    /// <p>Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.</p>
    pub fn get_restore_expiry_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.restore_expiry_time
    }
    /// <p>Reserved for future use.</p>
    pub fn sse_type(mut self, input: crate::types::SseType) -> Self {
        self.sse_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Reserved for future use.</p>
    pub fn set_sse_type(mut self, input: ::std::option::Option<crate::types::SseType>) -> Self {
        self.sse_type = input;
        self
    }
    /// <p>Reserved for future use.</p>
    pub fn get_sse_type(&self) -> &::std::option::Option<crate::types::SseType> {
        &self.sse_type
    }
    /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone or Local Zone of the snapshot. For example, <code>us-west-1a</code> (Availability Zone) or <code>us-west-2-lax-1a</code> (Local Zone).</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <note>
    /// <p>Only for snapshot copies.</p>
    /// </note>
    /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
    /// <ul>
    /// <li>
    /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
    /// <li>
    /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
    /// </ul>
    pub fn transfer_type(mut self, input: crate::types::TransferType) -> Self {
        self.transfer_type = ::std::option::Option::Some(input);
        self
    }
    /// <note>
    /// <p>Only for snapshot copies.</p>
    /// </note>
    /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
    /// <ul>
    /// <li>
    /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
    /// <li>
    /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
    /// </ul>
    pub fn set_transfer_type(mut self, input: ::std::option::Option<crate::types::TransferType>) -> Self {
        self.transfer_type = input;
        self
    }
    /// <note>
    /// <p>Only for snapshot copies.</p>
    /// </note>
    /// <p>Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.</p>
    /// <ul>
    /// <li>
    /// <p><code>standard</code> - The snapshot copy was created with a standard snapshot copy operation.</p></li>
    /// <li>
    /// <p><code>time-based</code> - The snapshot copy was created with a time-based snapshot copy operation.</p></li>
    /// </ul>
    pub fn get_transfer_type(&self) -> &::std::option::Option<crate::types::TransferType> {
        &self.transfer_type
    }
    /// <note>
    /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
    /// </note>
    /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
    pub fn completion_duration_minutes(mut self, input: i32) -> Self {
        self.completion_duration_minutes = ::std::option::Option::Some(input);
        self
    }
    /// <note>
    /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
    /// </note>
    /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
    pub fn set_completion_duration_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.completion_duration_minutes = input;
        self
    }
    /// <note>
    /// <p>Only for snapshot copies created with time-based snapshot copy operations.</p>
    /// </note>
    /// <p>The completion duration requested for the time-based snapshot copy operation.</p>
    pub fn get_completion_duration_minutes(&self) -> &::std::option::Option<i32> {
        &self.completion_duration_minutes
    }
    /// <p>The time stamp when the snapshot was completed.</p>
    pub fn completion_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completion_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time stamp when the snapshot was completed.</p>
    pub fn set_completion_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completion_time = input;
        self
    }
    /// <p>The time stamp when the snapshot was completed.</p>
    pub fn get_completion_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completion_time
    }
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_id = input;
        self
    }
    /// <p>The ID of the snapshot. Each snapshot receives a unique identifier when it is created.</p>
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_id
    }
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.volume_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.volume_id = input;
        self
    }
    /// <p>The ID of the volume that was used to create the snapshot. Snapshots created by the <code>CopySnapshot</code> action have an arbitrary volume ID that should not be used for any purpose.</p>
    pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.volume_id
    }
    /// <p>The snapshot state.</p>
    pub fn state(mut self, input: crate::types::SnapshotState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The snapshot state.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::SnapshotState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The snapshot state.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::SnapshotState> {
        &self.state
    }
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn state_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.state_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn set_state_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.state_message = input;
        self
    }
    /// <p>Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper KMS permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn get_state_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.state_message
    }
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The time stamp when the snapshot was initiated.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The progress of the snapshot, as a percentage.</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 snapshot, as a percentage.</p>
    pub fn set_progress(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.progress = input;
        self
    }
    /// <p>The progress of the snapshot, as a percentage.</p>
    pub fn get_progress(&self) -> &::std::option::Option<::std::string::String> {
        &self.progress
    }
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the EBS snapshot.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>The description for the snapshot.</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>The description for the snapshot.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description for the snapshot.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn volume_size(mut self, input: i32) -> Self {
        self.volume_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn set_volume_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.volume_size = input;
        self
    }
    /// <p>The size of the volume, in GiB.</p>
    pub fn get_volume_size(&self) -> &::std::option::Option<i32> {
        &self.volume_size
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn encrypted(mut self, input: bool) -> Self {
        self.encrypted = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
        self.encrypted = input;
        self
    }
    /// <p>Indicates whether the snapshot is encrypted.</p>
    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
        &self.encrypted
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</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 Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</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 Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn data_encryption_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_encryption_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn set_data_encryption_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_encryption_key_id = input;
        self
    }
    /// <p>The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by <code>DescribeSnapshots</code>.</p>
    pub fn get_data_encryption_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_encryption_key_id
    }
    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 [`CreateSnapshotOutput`](crate::operation::create_snapshot::CreateSnapshotOutput).
    pub fn build(self) -> crate::operation::create_snapshot::CreateSnapshotOutput {
        crate::operation::create_snapshot::CreateSnapshotOutput {
            owner_alias: self.owner_alias,
            outpost_arn: self.outpost_arn,
            tags: self.tags,
            storage_tier: self.storage_tier,
            restore_expiry_time: self.restore_expiry_time,
            sse_type: self.sse_type,
            availability_zone: self.availability_zone,
            transfer_type: self.transfer_type,
            completion_duration_minutes: self.completion_duration_minutes,
            completion_time: self.completion_time,
            snapshot_id: self.snapshot_id,
            volume_id: self.volume_id,
            state: self.state,
            state_message: self.state_message,
            start_time: self.start_time,
            progress: self.progress,
            owner_id: self.owner_id,
            description: self.description,
            volume_size: self.volume_size,
            encrypted: self.encrypted,
            kms_key_id: self.kms_key_id,
            data_encryption_key_id: self.data_encryption_key_id,
            _request_id: self._request_id,
        }
    }
}