aws_sdk_ec2/operation/create_volume/
_create_volume_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes a volume.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateVolumeOutput {
7    /// <p>The ID of the Availability Zone for the volume.</p>
8    pub availability_zone_id: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
10    pub outpost_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The ID of the source volume from which the volume copy was created. Only for volume copies.</p>
12    pub source_volume_id: ::std::option::Option<::std::string::String>,
13    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
14    pub iops: ::std::option::Option<i32>,
15    /// <p>Any tags assigned to the volume.</p>
16    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
17    /// <p>The volume type.</p>
18    pub volume_type: ::std::option::Option<crate::types::VolumeType>,
19    /// <note>
20    /// <p>This parameter is not returned by CreateVolume.</p>
21    /// </note>
22    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
23    pub fast_restored: ::std::option::Option<bool>,
24    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
25    pub multi_attach_enabled: ::std::option::Option<bool>,
26    /// <p>The throughput that the volume supports, in MiB/s.</p>
27    pub throughput: ::std::option::Option<i32>,
28    /// <note>
29    /// <p>This parameter is not returned by CreateVolume.</p>
30    /// </note>
31    /// <p>Reserved for future use.</p>
32    pub sse_type: ::std::option::Option<crate::types::SseType>,
33    /// <p>The service provider that manages the volume.</p>
34    pub operator: ::std::option::Option<crate::types::OperatorResponse>,
35    /// <p>The Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate) specified for the volume during creation, in MiB/s. If no volume initialization rate was specified, the value is <code>null</code>.</p>
36    pub volume_initialization_rate: ::std::option::Option<i32>,
37    /// <p>The ID of the volume.</p>
38    pub volume_id: ::std::option::Option<::std::string::String>,
39    /// <p>The size of the volume, in GiBs.</p>
40    pub size: ::std::option::Option<i32>,
41    /// <p>The snapshot from which the volume was created, if applicable.</p>
42    pub snapshot_id: ::std::option::Option<::std::string::String>,
43    /// <p>The Availability Zone for the volume.</p>
44    pub availability_zone: ::std::option::Option<::std::string::String>,
45    /// <p>The volume state.</p>
46    pub state: ::std::option::Option<crate::types::VolumeState>,
47    /// <p>The time stamp when volume creation was initiated.</p>
48    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
49    /// <note>
50    /// <p>This parameter is not returned by CreateVolume.</p>
51    /// </note>
52    /// <p>Information about the volume attachments.</p>
53    pub attachments: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>,
54    /// <p>Indicates whether the volume is encrypted.</p>
55    pub encrypted: ::std::option::Option<bool>,
56    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.</p>
57    pub kms_key_id: ::std::option::Option<::std::string::String>,
58    _request_id: Option<String>,
59}
60impl CreateVolumeOutput {
61    /// <p>The ID of the Availability Zone for the volume.</p>
62    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
63        self.availability_zone_id.as_deref()
64    }
65    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
66    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
67        self.outpost_arn.as_deref()
68    }
69    /// <p>The ID of the source volume from which the volume copy was created. Only for volume copies.</p>
70    pub fn source_volume_id(&self) -> ::std::option::Option<&str> {
71        self.source_volume_id.as_deref()
72    }
73    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
74    pub fn iops(&self) -> ::std::option::Option<i32> {
75        self.iops
76    }
77    /// <p>Any tags assigned to the volume.</p>
78    ///
79    /// 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()`.
80    pub fn tags(&self) -> &[crate::types::Tag] {
81        self.tags.as_deref().unwrap_or_default()
82    }
83    /// <p>The volume type.</p>
84    pub fn volume_type(&self) -> ::std::option::Option<&crate::types::VolumeType> {
85        self.volume_type.as_ref()
86    }
87    /// <note>
88    /// <p>This parameter is not returned by CreateVolume.</p>
89    /// </note>
90    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
91    pub fn fast_restored(&self) -> ::std::option::Option<bool> {
92        self.fast_restored
93    }
94    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
95    pub fn multi_attach_enabled(&self) -> ::std::option::Option<bool> {
96        self.multi_attach_enabled
97    }
98    /// <p>The throughput that the volume supports, in MiB/s.</p>
99    pub fn throughput(&self) -> ::std::option::Option<i32> {
100        self.throughput
101    }
102    /// <note>
103    /// <p>This parameter is not returned by CreateVolume.</p>
104    /// </note>
105    /// <p>Reserved for future use.</p>
106    pub fn sse_type(&self) -> ::std::option::Option<&crate::types::SseType> {
107        self.sse_type.as_ref()
108    }
109    /// <p>The service provider that manages the volume.</p>
110    pub fn operator(&self) -> ::std::option::Option<&crate::types::OperatorResponse> {
111        self.operator.as_ref()
112    }
113    /// <p>The Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate) specified for the volume during creation, in MiB/s. If no volume initialization rate was specified, the value is <code>null</code>.</p>
114    pub fn volume_initialization_rate(&self) -> ::std::option::Option<i32> {
115        self.volume_initialization_rate
116    }
117    /// <p>The ID of the volume.</p>
118    pub fn volume_id(&self) -> ::std::option::Option<&str> {
119        self.volume_id.as_deref()
120    }
121    /// <p>The size of the volume, in GiBs.</p>
122    pub fn size(&self) -> ::std::option::Option<i32> {
123        self.size
124    }
125    /// <p>The snapshot from which the volume was created, if applicable.</p>
126    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
127        self.snapshot_id.as_deref()
128    }
129    /// <p>The Availability Zone for the volume.</p>
130    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
131        self.availability_zone.as_deref()
132    }
133    /// <p>The volume state.</p>
134    pub fn state(&self) -> ::std::option::Option<&crate::types::VolumeState> {
135        self.state.as_ref()
136    }
137    /// <p>The time stamp when volume creation was initiated.</p>
138    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
139        self.create_time.as_ref()
140    }
141    /// <note>
142    /// <p>This parameter is not returned by CreateVolume.</p>
143    /// </note>
144    /// <p>Information about the volume attachments.</p>
145    ///
146    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attachments.is_none()`.
147    pub fn attachments(&self) -> &[crate::types::VolumeAttachment] {
148        self.attachments.as_deref().unwrap_or_default()
149    }
150    /// <p>Indicates whether the volume is encrypted.</p>
151    pub fn encrypted(&self) -> ::std::option::Option<bool> {
152        self.encrypted
153    }
154    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.</p>
155    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
156        self.kms_key_id.as_deref()
157    }
158}
159impl ::aws_types::request_id::RequestId for CreateVolumeOutput {
160    fn request_id(&self) -> Option<&str> {
161        self._request_id.as_deref()
162    }
163}
164impl CreateVolumeOutput {
165    /// Creates a new builder-style object to manufacture [`CreateVolumeOutput`](crate::operation::create_volume::CreateVolumeOutput).
166    pub fn builder() -> crate::operation::create_volume::builders::CreateVolumeOutputBuilder {
167        crate::operation::create_volume::builders::CreateVolumeOutputBuilder::default()
168    }
169}
170
171/// A builder for [`CreateVolumeOutput`](crate::operation::create_volume::CreateVolumeOutput).
172#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
173#[non_exhaustive]
174pub struct CreateVolumeOutputBuilder {
175    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
176    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
177    pub(crate) source_volume_id: ::std::option::Option<::std::string::String>,
178    pub(crate) iops: ::std::option::Option<i32>,
179    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
180    pub(crate) volume_type: ::std::option::Option<crate::types::VolumeType>,
181    pub(crate) fast_restored: ::std::option::Option<bool>,
182    pub(crate) multi_attach_enabled: ::std::option::Option<bool>,
183    pub(crate) throughput: ::std::option::Option<i32>,
184    pub(crate) sse_type: ::std::option::Option<crate::types::SseType>,
185    pub(crate) operator: ::std::option::Option<crate::types::OperatorResponse>,
186    pub(crate) volume_initialization_rate: ::std::option::Option<i32>,
187    pub(crate) volume_id: ::std::option::Option<::std::string::String>,
188    pub(crate) size: ::std::option::Option<i32>,
189    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
190    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
191    pub(crate) state: ::std::option::Option<crate::types::VolumeState>,
192    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
193    pub(crate) attachments: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>,
194    pub(crate) encrypted: ::std::option::Option<bool>,
195    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
196    _request_id: Option<String>,
197}
198impl CreateVolumeOutputBuilder {
199    /// <p>The ID of the Availability Zone for the volume.</p>
200    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.availability_zone_id = ::std::option::Option::Some(input.into());
202        self
203    }
204    /// <p>The ID of the Availability Zone for the volume.</p>
205    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.availability_zone_id = input;
207        self
208    }
209    /// <p>The ID of the Availability Zone for the volume.</p>
210    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
211        &self.availability_zone_id
212    }
213    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
214    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.outpost_arn = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
219    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.outpost_arn = input;
221        self
222    }
223    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
224    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
225        &self.outpost_arn
226    }
227    /// <p>The ID of the source volume from which the volume copy was created. Only for volume copies.</p>
228    pub fn source_volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.source_volume_id = ::std::option::Option::Some(input.into());
230        self
231    }
232    /// <p>The ID of the source volume from which the volume copy was created. Only for volume copies.</p>
233    pub fn set_source_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234        self.source_volume_id = input;
235        self
236    }
237    /// <p>The ID of the source volume from which the volume copy was created. Only for volume copies.</p>
238    pub fn get_source_volume_id(&self) -> &::std::option::Option<::std::string::String> {
239        &self.source_volume_id
240    }
241    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
242    pub fn iops(mut self, input: i32) -> Self {
243        self.iops = ::std::option::Option::Some(input);
244        self
245    }
246    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
247    pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
248        self.iops = input;
249        self
250    }
251    /// <p>The number of I/O operations per second (IOPS). For <code>gp3</code>, <code>io1</code>, and <code>io2</code> volumes, this represents the number of IOPS that are provisioned for the volume. For <code>gp2</code> volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.</p>
252    pub fn get_iops(&self) -> &::std::option::Option<i32> {
253        &self.iops
254    }
255    /// Appends an item to `tags`.
256    ///
257    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
258    ///
259    /// <p>Any tags assigned to the volume.</p>
260    pub fn tags(mut self, input: crate::types::Tag) -> Self {
261        let mut v = self.tags.unwrap_or_default();
262        v.push(input);
263        self.tags = ::std::option::Option::Some(v);
264        self
265    }
266    /// <p>Any tags assigned to the volume.</p>
267    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
268        self.tags = input;
269        self
270    }
271    /// <p>Any tags assigned to the volume.</p>
272    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
273        &self.tags
274    }
275    /// <p>The volume type.</p>
276    pub fn volume_type(mut self, input: crate::types::VolumeType) -> Self {
277        self.volume_type = ::std::option::Option::Some(input);
278        self
279    }
280    /// <p>The volume type.</p>
281    pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::VolumeType>) -> Self {
282        self.volume_type = input;
283        self
284    }
285    /// <p>The volume type.</p>
286    pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::VolumeType> {
287        &self.volume_type
288    }
289    /// <note>
290    /// <p>This parameter is not returned by CreateVolume.</p>
291    /// </note>
292    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
293    pub fn fast_restored(mut self, input: bool) -> Self {
294        self.fast_restored = ::std::option::Option::Some(input);
295        self
296    }
297    /// <note>
298    /// <p>This parameter is not returned by CreateVolume.</p>
299    /// </note>
300    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
301    pub fn set_fast_restored(mut self, input: ::std::option::Option<bool>) -> Self {
302        self.fast_restored = input;
303        self
304    }
305    /// <note>
306    /// <p>This parameter is not returned by CreateVolume.</p>
307    /// </note>
308    /// <p>Indicates whether the volume was created using fast snapshot restore.</p>
309    pub fn get_fast_restored(&self) -> &::std::option::Option<bool> {
310        &self.fast_restored
311    }
312    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
313    pub fn multi_attach_enabled(mut self, input: bool) -> Self {
314        self.multi_attach_enabled = ::std::option::Option::Some(input);
315        self
316    }
317    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
318    pub fn set_multi_attach_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
319        self.multi_attach_enabled = input;
320        self
321    }
322    /// <p>Indicates whether Amazon EBS Multi-Attach is enabled.</p>
323    pub fn get_multi_attach_enabled(&self) -> &::std::option::Option<bool> {
324        &self.multi_attach_enabled
325    }
326    /// <p>The throughput that the volume supports, in MiB/s.</p>
327    pub fn throughput(mut self, input: i32) -> Self {
328        self.throughput = ::std::option::Option::Some(input);
329        self
330    }
331    /// <p>The throughput that the volume supports, in MiB/s.</p>
332    pub fn set_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
333        self.throughput = input;
334        self
335    }
336    /// <p>The throughput that the volume supports, in MiB/s.</p>
337    pub fn get_throughput(&self) -> &::std::option::Option<i32> {
338        &self.throughput
339    }
340    /// <note>
341    /// <p>This parameter is not returned by CreateVolume.</p>
342    /// </note>
343    /// <p>Reserved for future use.</p>
344    pub fn sse_type(mut self, input: crate::types::SseType) -> Self {
345        self.sse_type = ::std::option::Option::Some(input);
346        self
347    }
348    /// <note>
349    /// <p>This parameter is not returned by CreateVolume.</p>
350    /// </note>
351    /// <p>Reserved for future use.</p>
352    pub fn set_sse_type(mut self, input: ::std::option::Option<crate::types::SseType>) -> Self {
353        self.sse_type = input;
354        self
355    }
356    /// <note>
357    /// <p>This parameter is not returned by CreateVolume.</p>
358    /// </note>
359    /// <p>Reserved for future use.</p>
360    pub fn get_sse_type(&self) -> &::std::option::Option<crate::types::SseType> {
361        &self.sse_type
362    }
363    /// <p>The service provider that manages the volume.</p>
364    pub fn operator(mut self, input: crate::types::OperatorResponse) -> Self {
365        self.operator = ::std::option::Option::Some(input);
366        self
367    }
368    /// <p>The service provider that manages the volume.</p>
369    pub fn set_operator(mut self, input: ::std::option::Option<crate::types::OperatorResponse>) -> Self {
370        self.operator = input;
371        self
372    }
373    /// <p>The service provider that manages the volume.</p>
374    pub fn get_operator(&self) -> &::std::option::Option<crate::types::OperatorResponse> {
375        &self.operator
376    }
377    /// <p>The Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate) specified for the volume during creation, in MiB/s. If no volume initialization rate was specified, the value is <code>null</code>.</p>
378    pub fn volume_initialization_rate(mut self, input: i32) -> Self {
379        self.volume_initialization_rate = ::std::option::Option::Some(input);
380        self
381    }
382    /// <p>The Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate) specified for the volume during creation, in MiB/s. If no volume initialization rate was specified, the value is <code>null</code>.</p>
383    pub fn set_volume_initialization_rate(mut self, input: ::std::option::Option<i32>) -> Self {
384        self.volume_initialization_rate = input;
385        self
386    }
387    /// <p>The Amazon EBS Provisioned Rate for Volume Initialization (volume initialization rate) specified for the volume during creation, in MiB/s. If no volume initialization rate was specified, the value is <code>null</code>.</p>
388    pub fn get_volume_initialization_rate(&self) -> &::std::option::Option<i32> {
389        &self.volume_initialization_rate
390    }
391    /// <p>The ID of the volume.</p>
392    pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
393        self.volume_id = ::std::option::Option::Some(input.into());
394        self
395    }
396    /// <p>The ID of the volume.</p>
397    pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398        self.volume_id = input;
399        self
400    }
401    /// <p>The ID of the volume.</p>
402    pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
403        &self.volume_id
404    }
405    /// <p>The size of the volume, in GiBs.</p>
406    pub fn size(mut self, input: i32) -> Self {
407        self.size = ::std::option::Option::Some(input);
408        self
409    }
410    /// <p>The size of the volume, in GiBs.</p>
411    pub fn set_size(mut self, input: ::std::option::Option<i32>) -> Self {
412        self.size = input;
413        self
414    }
415    /// <p>The size of the volume, in GiBs.</p>
416    pub fn get_size(&self) -> &::std::option::Option<i32> {
417        &self.size
418    }
419    /// <p>The snapshot from which the volume was created, if applicable.</p>
420    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
421        self.snapshot_id = ::std::option::Option::Some(input.into());
422        self
423    }
424    /// <p>The snapshot from which the volume was created, if applicable.</p>
425    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
426        self.snapshot_id = input;
427        self
428    }
429    /// <p>The snapshot from which the volume was created, if applicable.</p>
430    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
431        &self.snapshot_id
432    }
433    /// <p>The Availability Zone for the volume.</p>
434    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
435        self.availability_zone = ::std::option::Option::Some(input.into());
436        self
437    }
438    /// <p>The Availability Zone for the volume.</p>
439    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
440        self.availability_zone = input;
441        self
442    }
443    /// <p>The Availability Zone for the volume.</p>
444    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
445        &self.availability_zone
446    }
447    /// <p>The volume state.</p>
448    pub fn state(mut self, input: crate::types::VolumeState) -> Self {
449        self.state = ::std::option::Option::Some(input);
450        self
451    }
452    /// <p>The volume state.</p>
453    pub fn set_state(mut self, input: ::std::option::Option<crate::types::VolumeState>) -> Self {
454        self.state = input;
455        self
456    }
457    /// <p>The volume state.</p>
458    pub fn get_state(&self) -> &::std::option::Option<crate::types::VolumeState> {
459        &self.state
460    }
461    /// <p>The time stamp when volume creation was initiated.</p>
462    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
463        self.create_time = ::std::option::Option::Some(input);
464        self
465    }
466    /// <p>The time stamp when volume creation was initiated.</p>
467    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
468        self.create_time = input;
469        self
470    }
471    /// <p>The time stamp when volume creation was initiated.</p>
472    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
473        &self.create_time
474    }
475    /// Appends an item to `attachments`.
476    ///
477    /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
478    ///
479    /// <note>
480    /// <p>This parameter is not returned by CreateVolume.</p>
481    /// </note>
482    /// <p>Information about the volume attachments.</p>
483    pub fn attachments(mut self, input: crate::types::VolumeAttachment) -> Self {
484        let mut v = self.attachments.unwrap_or_default();
485        v.push(input);
486        self.attachments = ::std::option::Option::Some(v);
487        self
488    }
489    /// <note>
490    /// <p>This parameter is not returned by CreateVolume.</p>
491    /// </note>
492    /// <p>Information about the volume attachments.</p>
493    pub fn set_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>>) -> Self {
494        self.attachments = input;
495        self
496    }
497    /// <note>
498    /// <p>This parameter is not returned by CreateVolume.</p>
499    /// </note>
500    /// <p>Information about the volume attachments.</p>
501    pub fn get_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VolumeAttachment>> {
502        &self.attachments
503    }
504    /// <p>Indicates whether the volume is encrypted.</p>
505    pub fn encrypted(mut self, input: bool) -> Self {
506        self.encrypted = ::std::option::Option::Some(input);
507        self
508    }
509    /// <p>Indicates whether the volume is encrypted.</p>
510    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
511        self.encrypted = input;
512        self
513    }
514    /// <p>Indicates whether the volume is encrypted.</p>
515    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
516        &self.encrypted
517    }
518    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.</p>
519    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520        self.kms_key_id = ::std::option::Option::Some(input.into());
521        self
522    }
523    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.</p>
524    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525        self.kms_key_id = input;
526        self
527    }
528    /// <p>The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the volume.</p>
529    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
530        &self.kms_key_id
531    }
532    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
533        self._request_id = Some(request_id.into());
534        self
535    }
536
537    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
538        self._request_id = request_id;
539        self
540    }
541    /// Consumes the builder and constructs a [`CreateVolumeOutput`](crate::operation::create_volume::CreateVolumeOutput).
542    pub fn build(self) -> crate::operation::create_volume::CreateVolumeOutput {
543        crate::operation::create_volume::CreateVolumeOutput {
544            availability_zone_id: self.availability_zone_id,
545            outpost_arn: self.outpost_arn,
546            source_volume_id: self.source_volume_id,
547            iops: self.iops,
548            tags: self.tags,
549            volume_type: self.volume_type,
550            fast_restored: self.fast_restored,
551            multi_attach_enabled: self.multi_attach_enabled,
552            throughput: self.throughput,
553            sse_type: self.sse_type,
554            operator: self.operator,
555            volume_initialization_rate: self.volume_initialization_rate,
556            volume_id: self.volume_id,
557            size: self.size,
558            snapshot_id: self.snapshot_id,
559            availability_zone: self.availability_zone,
560            state: self.state,
561            create_time: self.create_time,
562            attachments: self.attachments,
563            encrypted: self.encrypted,
564            kms_key_id: self.kms_key_id,
565            _request_id: self._request_id,
566        }
567    }
568}