aws_sdk_fsx/operation/delete_backup/
_delete_backup_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The response object for the <code>DeleteBackup</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteBackupOutput {
7    /// <p>The ID of the backup that was deleted.</p>
8    pub backup_id: ::std::option::Option<::std::string::String>,
9    /// <p>The lifecycle status of the backup. If the <code>DeleteBackup</code> operation is successful, the status is <code>DELETED</code>.</p>
10    pub lifecycle: ::std::option::Option<crate::types::BackupLifecycle>,
11    _request_id: Option<String>,
12}
13impl DeleteBackupOutput {
14    /// <p>The ID of the backup that was deleted.</p>
15    pub fn backup_id(&self) -> ::std::option::Option<&str> {
16        self.backup_id.as_deref()
17    }
18    /// <p>The lifecycle status of the backup. If the <code>DeleteBackup</code> operation is successful, the status is <code>DELETED</code>.</p>
19    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::BackupLifecycle> {
20        self.lifecycle.as_ref()
21    }
22}
23impl ::aws_types::request_id::RequestId for DeleteBackupOutput {
24    fn request_id(&self) -> Option<&str> {
25        self._request_id.as_deref()
26    }
27}
28impl DeleteBackupOutput {
29    /// Creates a new builder-style object to manufacture [`DeleteBackupOutput`](crate::operation::delete_backup::DeleteBackupOutput).
30    pub fn builder() -> crate::operation::delete_backup::builders::DeleteBackupOutputBuilder {
31        crate::operation::delete_backup::builders::DeleteBackupOutputBuilder::default()
32    }
33}
34
35/// A builder for [`DeleteBackupOutput`](crate::operation::delete_backup::DeleteBackupOutput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DeleteBackupOutputBuilder {
39    pub(crate) backup_id: ::std::option::Option<::std::string::String>,
40    pub(crate) lifecycle: ::std::option::Option<crate::types::BackupLifecycle>,
41    _request_id: Option<String>,
42}
43impl DeleteBackupOutputBuilder {
44    /// <p>The ID of the backup that was deleted.</p>
45    pub fn backup_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.backup_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the backup that was deleted.</p>
50    pub fn set_backup_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.backup_id = input;
52        self
53    }
54    /// <p>The ID of the backup that was deleted.</p>
55    pub fn get_backup_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.backup_id
57    }
58    /// <p>The lifecycle status of the backup. If the <code>DeleteBackup</code> operation is successful, the status is <code>DELETED</code>.</p>
59    pub fn lifecycle(mut self, input: crate::types::BackupLifecycle) -> Self {
60        self.lifecycle = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The lifecycle status of the backup. If the <code>DeleteBackup</code> operation is successful, the status is <code>DELETED</code>.</p>
64    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::BackupLifecycle>) -> Self {
65        self.lifecycle = input;
66        self
67    }
68    /// <p>The lifecycle status of the backup. If the <code>DeleteBackup</code> operation is successful, the status is <code>DELETED</code>.</p>
69    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::BackupLifecycle> {
70        &self.lifecycle
71    }
72    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
73        self._request_id = Some(request_id.into());
74        self
75    }
76
77    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
78        self._request_id = request_id;
79        self
80    }
81    /// Consumes the builder and constructs a [`DeleteBackupOutput`](crate::operation::delete_backup::DeleteBackupOutput).
82    pub fn build(self) -> crate::operation::delete_backup::DeleteBackupOutput {
83        crate::operation::delete_backup::DeleteBackupOutput {
84            backup_id: self.backup_id,
85            lifecycle: self.lifecycle,
86            _request_id: self._request_id,
87        }
88    }
89}