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