aws_sdk_fsx/types/
_backup.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A backup of an Amazon FSx for Windows File Server, Amazon FSx for Lustre file system, Amazon FSx for NetApp ONTAP volume, or Amazon FSx for OpenZFS file system.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Backup {
7    /// <p>The ID of the backup.</p>
8    pub backup_id: ::std::option::Option<::std::string::String>,
9    /// <p>The lifecycle status of the backup.</p>
10    /// <ul>
11    /// <li>
12    /// <p><code>AVAILABLE</code> - The backup is fully available.</p></li>
13    /// <li>
14    /// <p><code>PENDING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup.</p></li>
15    /// <li>
16    /// <p><code>CREATING</code> - Amazon FSx is creating the backup.</p></li>
17    /// <li>
18    /// <p><code>TRANSFERRING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3.</p></li>
19    /// <li>
20    /// <p><code>COPYING</code> - Amazon FSx is copying the backup.</p></li>
21    /// <li>
22    /// <p><code>DELETED</code> - Amazon FSx deleted the backup and it's no longer available.</p></li>
23    /// <li>
24    /// <p><code>FAILED</code> - Amazon FSx couldn't finish the backup.</p></li>
25    /// </ul>
26    pub lifecycle: ::std::option::Option<crate::types::BackupLifecycle>,
27    /// <p>Details explaining any failures that occurred when creating a backup.</p>
28    pub failure_details: ::std::option::Option<crate::types::BackupFailureDetails>,
29    /// <p>The type of the file-system backup.</p>
30    pub r#type: ::std::option::Option<crate::types::BackupType>,
31    /// <p>Displays the current percent of progress of an asynchronous task.</p>
32    pub progress_percent: ::std::option::Option<i32>,
33    /// <p>The time when a particular backup was created.</p>
34    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
35    /// <p>The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.</p>
36    pub kms_key_id: ::std::option::Option<::std::string::String>,
37    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
38    pub resource_arn: ::std::option::Option<::std::string::String>,
39    /// <p>The tags associated with a particular file system.</p>
40    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
41    /// <p>The metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
42    pub file_system: ::std::option::Option<crate::types::FileSystem>,
43    /// <p>The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.</p>
44    pub directory_information: ::std::option::Option<crate::types::ActiveDirectoryBackupAttributes>,
45    /// <p>An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.</p>
46    pub owner_id: ::std::option::Option<::std::string::String>,
47    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
48    pub source_backup_id: ::std::option::Option<::std::string::String>,
49    /// <p>The source Region of the backup. Specifies the Region from where this backup is copied.</p>
50    pub source_backup_region: ::std::option::Option<::std::string::String>,
51    /// <p>Specifies the resource type that's backed up.</p>
52    pub resource_type: ::std::option::Option<crate::types::ResourceType>,
53    /// <p>Describes an Amazon FSx volume.</p>
54    pub volume: ::std::option::Option<crate::types::Volume>,
55    /// <p>The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.</p>
56    pub size_in_bytes: ::std::option::Option<i64>,
57}
58impl Backup {
59    /// <p>The ID of the backup.</p>
60    pub fn backup_id(&self) -> ::std::option::Option<&str> {
61        self.backup_id.as_deref()
62    }
63    /// <p>The lifecycle status of the backup.</p>
64    /// <ul>
65    /// <li>
66    /// <p><code>AVAILABLE</code> - The backup is fully available.</p></li>
67    /// <li>
68    /// <p><code>PENDING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup.</p></li>
69    /// <li>
70    /// <p><code>CREATING</code> - Amazon FSx is creating the backup.</p></li>
71    /// <li>
72    /// <p><code>TRANSFERRING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3.</p></li>
73    /// <li>
74    /// <p><code>COPYING</code> - Amazon FSx is copying the backup.</p></li>
75    /// <li>
76    /// <p><code>DELETED</code> - Amazon FSx deleted the backup and it's no longer available.</p></li>
77    /// <li>
78    /// <p><code>FAILED</code> - Amazon FSx couldn't finish the backup.</p></li>
79    /// </ul>
80    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::BackupLifecycle> {
81        self.lifecycle.as_ref()
82    }
83    /// <p>Details explaining any failures that occurred when creating a backup.</p>
84    pub fn failure_details(&self) -> ::std::option::Option<&crate::types::BackupFailureDetails> {
85        self.failure_details.as_ref()
86    }
87    /// <p>The type of the file-system backup.</p>
88    pub fn r#type(&self) -> ::std::option::Option<&crate::types::BackupType> {
89        self.r#type.as_ref()
90    }
91    /// <p>Displays the current percent of progress of an asynchronous task.</p>
92    pub fn progress_percent(&self) -> ::std::option::Option<i32> {
93        self.progress_percent
94    }
95    /// <p>The time when a particular backup was created.</p>
96    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
97        self.creation_time.as_ref()
98    }
99    /// <p>The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.</p>
100    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
101        self.kms_key_id.as_deref()
102    }
103    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
104    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
105        self.resource_arn.as_deref()
106    }
107    /// <p>The tags associated with a particular file system.</p>
108    ///
109    /// 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()`.
110    pub fn tags(&self) -> &[crate::types::Tag] {
111        self.tags.as_deref().unwrap_or_default()
112    }
113    /// <p>The metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
114    pub fn file_system(&self) -> ::std::option::Option<&crate::types::FileSystem> {
115        self.file_system.as_ref()
116    }
117    /// <p>The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.</p>
118    pub fn directory_information(&self) -> ::std::option::Option<&crate::types::ActiveDirectoryBackupAttributes> {
119        self.directory_information.as_ref()
120    }
121    /// <p>An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.</p>
122    pub fn owner_id(&self) -> ::std::option::Option<&str> {
123        self.owner_id.as_deref()
124    }
125    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
126    pub fn source_backup_id(&self) -> ::std::option::Option<&str> {
127        self.source_backup_id.as_deref()
128    }
129    /// <p>The source Region of the backup. Specifies the Region from where this backup is copied.</p>
130    pub fn source_backup_region(&self) -> ::std::option::Option<&str> {
131        self.source_backup_region.as_deref()
132    }
133    /// <p>Specifies the resource type that's backed up.</p>
134    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
135        self.resource_type.as_ref()
136    }
137    /// <p>Describes an Amazon FSx volume.</p>
138    pub fn volume(&self) -> ::std::option::Option<&crate::types::Volume> {
139        self.volume.as_ref()
140    }
141    /// <p>The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.</p>
142    pub fn size_in_bytes(&self) -> ::std::option::Option<i64> {
143        self.size_in_bytes
144    }
145}
146impl Backup {
147    /// Creates a new builder-style object to manufacture [`Backup`](crate::types::Backup).
148    pub fn builder() -> crate::types::builders::BackupBuilder {
149        crate::types::builders::BackupBuilder::default()
150    }
151}
152
153/// A builder for [`Backup`](crate::types::Backup).
154#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
155#[non_exhaustive]
156pub struct BackupBuilder {
157    pub(crate) backup_id: ::std::option::Option<::std::string::String>,
158    pub(crate) lifecycle: ::std::option::Option<crate::types::BackupLifecycle>,
159    pub(crate) failure_details: ::std::option::Option<crate::types::BackupFailureDetails>,
160    pub(crate) r#type: ::std::option::Option<crate::types::BackupType>,
161    pub(crate) progress_percent: ::std::option::Option<i32>,
162    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
163    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
164    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
165    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
166    pub(crate) file_system: ::std::option::Option<crate::types::FileSystem>,
167    pub(crate) directory_information: ::std::option::Option<crate::types::ActiveDirectoryBackupAttributes>,
168    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
169    pub(crate) source_backup_id: ::std::option::Option<::std::string::String>,
170    pub(crate) source_backup_region: ::std::option::Option<::std::string::String>,
171    pub(crate) resource_type: ::std::option::Option<crate::types::ResourceType>,
172    pub(crate) volume: ::std::option::Option<crate::types::Volume>,
173    pub(crate) size_in_bytes: ::std::option::Option<i64>,
174}
175impl BackupBuilder {
176    /// <p>The ID of the backup.</p>
177    /// This field is required.
178    pub fn backup_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.backup_id = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>The ID of the backup.</p>
183    pub fn set_backup_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.backup_id = input;
185        self
186    }
187    /// <p>The ID of the backup.</p>
188    pub fn get_backup_id(&self) -> &::std::option::Option<::std::string::String> {
189        &self.backup_id
190    }
191    /// <p>The lifecycle status of the backup.</p>
192    /// <ul>
193    /// <li>
194    /// <p><code>AVAILABLE</code> - The backup is fully available.</p></li>
195    /// <li>
196    /// <p><code>PENDING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup.</p></li>
197    /// <li>
198    /// <p><code>CREATING</code> - Amazon FSx is creating the backup.</p></li>
199    /// <li>
200    /// <p><code>TRANSFERRING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3.</p></li>
201    /// <li>
202    /// <p><code>COPYING</code> - Amazon FSx is copying the backup.</p></li>
203    /// <li>
204    /// <p><code>DELETED</code> - Amazon FSx deleted the backup and it's no longer available.</p></li>
205    /// <li>
206    /// <p><code>FAILED</code> - Amazon FSx couldn't finish the backup.</p></li>
207    /// </ul>
208    /// This field is required.
209    pub fn lifecycle(mut self, input: crate::types::BackupLifecycle) -> Self {
210        self.lifecycle = ::std::option::Option::Some(input);
211        self
212    }
213    /// <p>The lifecycle status of the backup.</p>
214    /// <ul>
215    /// <li>
216    /// <p><code>AVAILABLE</code> - The backup is fully available.</p></li>
217    /// <li>
218    /// <p><code>PENDING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup.</p></li>
219    /// <li>
220    /// <p><code>CREATING</code> - Amazon FSx is creating the backup.</p></li>
221    /// <li>
222    /// <p><code>TRANSFERRING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3.</p></li>
223    /// <li>
224    /// <p><code>COPYING</code> - Amazon FSx is copying the backup.</p></li>
225    /// <li>
226    /// <p><code>DELETED</code> - Amazon FSx deleted the backup and it's no longer available.</p></li>
227    /// <li>
228    /// <p><code>FAILED</code> - Amazon FSx couldn't finish the backup.</p></li>
229    /// </ul>
230    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::BackupLifecycle>) -> Self {
231        self.lifecycle = input;
232        self
233    }
234    /// <p>The lifecycle status of the backup.</p>
235    /// <ul>
236    /// <li>
237    /// <p><code>AVAILABLE</code> - The backup is fully available.</p></li>
238    /// <li>
239    /// <p><code>PENDING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup.</p></li>
240    /// <li>
241    /// <p><code>CREATING</code> - Amazon FSx is creating the backup.</p></li>
242    /// <li>
243    /// <p><code>TRANSFERRING</code> - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3.</p></li>
244    /// <li>
245    /// <p><code>COPYING</code> - Amazon FSx is copying the backup.</p></li>
246    /// <li>
247    /// <p><code>DELETED</code> - Amazon FSx deleted the backup and it's no longer available.</p></li>
248    /// <li>
249    /// <p><code>FAILED</code> - Amazon FSx couldn't finish the backup.</p></li>
250    /// </ul>
251    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::BackupLifecycle> {
252        &self.lifecycle
253    }
254    /// <p>Details explaining any failures that occurred when creating a backup.</p>
255    pub fn failure_details(mut self, input: crate::types::BackupFailureDetails) -> Self {
256        self.failure_details = ::std::option::Option::Some(input);
257        self
258    }
259    /// <p>Details explaining any failures that occurred when creating a backup.</p>
260    pub fn set_failure_details(mut self, input: ::std::option::Option<crate::types::BackupFailureDetails>) -> Self {
261        self.failure_details = input;
262        self
263    }
264    /// <p>Details explaining any failures that occurred when creating a backup.</p>
265    pub fn get_failure_details(&self) -> &::std::option::Option<crate::types::BackupFailureDetails> {
266        &self.failure_details
267    }
268    /// <p>The type of the file-system backup.</p>
269    /// This field is required.
270    pub fn r#type(mut self, input: crate::types::BackupType) -> Self {
271        self.r#type = ::std::option::Option::Some(input);
272        self
273    }
274    /// <p>The type of the file-system backup.</p>
275    pub fn set_type(mut self, input: ::std::option::Option<crate::types::BackupType>) -> Self {
276        self.r#type = input;
277        self
278    }
279    /// <p>The type of the file-system backup.</p>
280    pub fn get_type(&self) -> &::std::option::Option<crate::types::BackupType> {
281        &self.r#type
282    }
283    /// <p>Displays the current percent of progress of an asynchronous task.</p>
284    pub fn progress_percent(mut self, input: i32) -> Self {
285        self.progress_percent = ::std::option::Option::Some(input);
286        self
287    }
288    /// <p>Displays the current percent of progress of an asynchronous task.</p>
289    pub fn set_progress_percent(mut self, input: ::std::option::Option<i32>) -> Self {
290        self.progress_percent = input;
291        self
292    }
293    /// <p>Displays the current percent of progress of an asynchronous task.</p>
294    pub fn get_progress_percent(&self) -> &::std::option::Option<i32> {
295        &self.progress_percent
296    }
297    /// <p>The time when a particular backup was created.</p>
298    /// This field is required.
299    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
300        self.creation_time = ::std::option::Option::Some(input);
301        self
302    }
303    /// <p>The time when a particular backup was created.</p>
304    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
305        self.creation_time = input;
306        self
307    }
308    /// <p>The time when a particular backup was created.</p>
309    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
310        &self.creation_time
311    }
312    /// <p>The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.</p>
313    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
314        self.kms_key_id = ::std::option::Option::Some(input.into());
315        self
316    }
317    /// <p>The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.</p>
318    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
319        self.kms_key_id = input;
320        self
321    }
322    /// <p>The ID of the Key Management Service (KMS) key used to encrypt the backup of the Amazon FSx file system's data at rest.</p>
323    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
324        &self.kms_key_id
325    }
326    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
327    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
328        self.resource_arn = ::std::option::Option::Some(input.into());
329        self
330    }
331    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
332    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
333        self.resource_arn = input;
334        self
335    }
336    /// <p>The Amazon Resource Name (ARN) for the backup resource.</p>
337    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
338        &self.resource_arn
339    }
340    /// Appends an item to `tags`.
341    ///
342    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
343    ///
344    /// <p>The tags associated with a particular file system.</p>
345    pub fn tags(mut self, input: crate::types::Tag) -> Self {
346        let mut v = self.tags.unwrap_or_default();
347        v.push(input);
348        self.tags = ::std::option::Option::Some(v);
349        self
350    }
351    /// <p>The tags associated with a particular file system.</p>
352    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
353        self.tags = input;
354        self
355    }
356    /// <p>The tags associated with a particular file system.</p>
357    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
358        &self.tags
359    }
360    /// <p>The metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
361    /// This field is required.
362    pub fn file_system(mut self, input: crate::types::FileSystem) -> Self {
363        self.file_system = ::std::option::Option::Some(input);
364        self
365    }
366    /// <p>The metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
367    pub fn set_file_system(mut self, input: ::std::option::Option<crate::types::FileSystem>) -> Self {
368        self.file_system = input;
369        self
370    }
371    /// <p>The metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.</p>
372    pub fn get_file_system(&self) -> &::std::option::Option<crate::types::FileSystem> {
373        &self.file_system
374    }
375    /// <p>The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.</p>
376    pub fn directory_information(mut self, input: crate::types::ActiveDirectoryBackupAttributes) -> Self {
377        self.directory_information = ::std::option::Option::Some(input);
378        self
379    }
380    /// <p>The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.</p>
381    pub fn set_directory_information(mut self, input: ::std::option::Option<crate::types::ActiveDirectoryBackupAttributes>) -> Self {
382        self.directory_information = input;
383        self
384    }
385    /// <p>The configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.</p>
386    pub fn get_directory_information(&self) -> &::std::option::Option<crate::types::ActiveDirectoryBackupAttributes> {
387        &self.directory_information
388    }
389    /// <p>An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.</p>
390    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
391        self.owner_id = ::std::option::Option::Some(input.into());
392        self
393    }
394    /// <p>An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.</p>
395    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
396        self.owner_id = input;
397        self
398    }
399    /// <p>An Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources.</p>
400    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
401        &self.owner_id
402    }
403    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
404    pub fn source_backup_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
405        self.source_backup_id = ::std::option::Option::Some(input.into());
406        self
407    }
408    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
409    pub fn set_source_backup_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410        self.source_backup_id = input;
411        self
412    }
413    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
414    pub fn get_source_backup_id(&self) -> &::std::option::Option<::std::string::String> {
415        &self.source_backup_id
416    }
417    /// <p>The source Region of the backup. Specifies the Region from where this backup is copied.</p>
418    pub fn source_backup_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
419        self.source_backup_region = ::std::option::Option::Some(input.into());
420        self
421    }
422    /// <p>The source Region of the backup. Specifies the Region from where this backup is copied.</p>
423    pub fn set_source_backup_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
424        self.source_backup_region = input;
425        self
426    }
427    /// <p>The source Region of the backup. Specifies the Region from where this backup is copied.</p>
428    pub fn get_source_backup_region(&self) -> &::std::option::Option<::std::string::String> {
429        &self.source_backup_region
430    }
431    /// <p>Specifies the resource type that's backed up.</p>
432    pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
433        self.resource_type = ::std::option::Option::Some(input);
434        self
435    }
436    /// <p>Specifies the resource type that's backed up.</p>
437    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
438        self.resource_type = input;
439        self
440    }
441    /// <p>Specifies the resource type that's backed up.</p>
442    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
443        &self.resource_type
444    }
445    /// <p>Describes an Amazon FSx volume.</p>
446    pub fn volume(mut self, input: crate::types::Volume) -> Self {
447        self.volume = ::std::option::Option::Some(input);
448        self
449    }
450    /// <p>Describes an Amazon FSx volume.</p>
451    pub fn set_volume(mut self, input: ::std::option::Option<crate::types::Volume>) -> Self {
452        self.volume = input;
453        self
454    }
455    /// <p>Describes an Amazon FSx volume.</p>
456    pub fn get_volume(&self) -> &::std::option::Option<crate::types::Volume> {
457        &self.volume
458    }
459    /// <p>The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.</p>
460    pub fn size_in_bytes(mut self, input: i64) -> Self {
461        self.size_in_bytes = ::std::option::Option::Some(input);
462        self
463    }
464    /// <p>The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.</p>
465    pub fn set_size_in_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
466        self.size_in_bytes = input;
467        self
468    }
469    /// <p>The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.</p>
470    pub fn get_size_in_bytes(&self) -> &::std::option::Option<i64> {
471        &self.size_in_bytes
472    }
473    /// Consumes the builder and constructs a [`Backup`](crate::types::Backup).
474    pub fn build(self) -> crate::types::Backup {
475        crate::types::Backup {
476            backup_id: self.backup_id,
477            lifecycle: self.lifecycle,
478            failure_details: self.failure_details,
479            r#type: self.r#type,
480            progress_percent: self.progress_percent,
481            creation_time: self.creation_time,
482            kms_key_id: self.kms_key_id,
483            resource_arn: self.resource_arn,
484            tags: self.tags,
485            file_system: self.file_system,
486            directory_information: self.directory_information,
487            owner_id: self.owner_id,
488            source_backup_id: self.source_backup_id,
489            source_backup_region: self.source_backup_region,
490            resource_type: self.resource_type,
491            volume: self.volume,
492            size_in_bytes: self.size_in_bytes,
493        }
494    }
495}