Skip to main content

aws_sdk_fsx/types/
_delete_volume_ontap_response.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The response object for the Amazon FSx for NetApp ONTAP volume being deleted in the <code>DeleteVolume</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteVolumeOntapResponse {
7    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
8    pub final_backup_id: ::std::option::Option<::std::string::String>,
9    /// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
10    pub final_backup_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
11}
12impl DeleteVolumeOntapResponse {
13    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
14    pub fn final_backup_id(&self) -> ::std::option::Option<&str> {
15        self.final_backup_id.as_deref()
16    }
17    /// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
18    ///
19    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.final_backup_tags.is_none()`.
20    pub fn final_backup_tags(&self) -> &[crate::types::Tag] {
21        self.final_backup_tags.as_deref().unwrap_or_default()
22    }
23}
24impl DeleteVolumeOntapResponse {
25    /// Creates a new builder-style object to manufacture [`DeleteVolumeOntapResponse`](crate::types::DeleteVolumeOntapResponse).
26    pub fn builder() -> crate::types::builders::DeleteVolumeOntapResponseBuilder {
27        crate::types::builders::DeleteVolumeOntapResponseBuilder::default()
28    }
29}
30
31/// A builder for [`DeleteVolumeOntapResponse`](crate::types::DeleteVolumeOntapResponse).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct DeleteVolumeOntapResponseBuilder {
35    pub(crate) final_backup_id: ::std::option::Option<::std::string::String>,
36    pub(crate) final_backup_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
37}
38impl DeleteVolumeOntapResponseBuilder {
39    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
40    pub fn final_backup_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.final_backup_id = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
45    pub fn set_final_backup_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46        self.final_backup_id = input;
47        self
48    }
49    /// <p>The ID of the source backup. Specifies the backup that you are copying.</p>
50    pub fn get_final_backup_id(&self) -> &::std::option::Option<::std::string::String> {
51        &self.final_backup_id
52    }
53    /// Appends an item to `final_backup_tags`.
54    ///
55    /// To override the contents of this collection use [`set_final_backup_tags`](Self::set_final_backup_tags).
56    ///
57    /// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
58    pub fn final_backup_tags(mut self, input: crate::types::Tag) -> Self {
59        let mut v = self.final_backup_tags.unwrap_or_default();
60        v.push(input);
61        self.final_backup_tags = ::std::option::Option::Some(v);
62        self
63    }
64    /// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
65    pub fn set_final_backup_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
66        self.final_backup_tags = input;
67        self
68    }
69    /// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
70    pub fn get_final_backup_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
71        &self.final_backup_tags
72    }
73    /// Consumes the builder and constructs a [`DeleteVolumeOntapResponse`](crate::types::DeleteVolumeOntapResponse).
74    pub fn build(self) -> crate::types::DeleteVolumeOntapResponse {
75        crate::types::DeleteVolumeOntapResponse {
76            final_backup_id: self.final_backup_id,
77            final_backup_tags: self.final_backup_tags,
78        }
79    }
80}