aws_sdk_fsx/operation/delete_volume/
_delete_volume_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteVolumeOutput {
6    /// <p>The ID of the volume that's being deleted.</p>
7    pub volume_id: ::std::option::Option<::std::string::String>,
8    /// <p>The lifecycle state of the volume being deleted. If the <code>DeleteVolume</code> operation is successful, this value is <code>DELETING</code>.</p>
9    pub lifecycle: ::std::option::Option<crate::types::VolumeLifecycle>,
10    /// <p>Returned after a <code>DeleteVolume</code> request, showing the status of the delete request.</p>
11    pub ontap_response: ::std::option::Option<crate::types::DeleteVolumeOntapResponse>,
12    _request_id: Option<String>,
13}
14impl DeleteVolumeOutput {
15    /// <p>The ID of the volume that's being deleted.</p>
16    pub fn volume_id(&self) -> ::std::option::Option<&str> {
17        self.volume_id.as_deref()
18    }
19    /// <p>The lifecycle state of the volume being deleted. If the <code>DeleteVolume</code> operation is successful, this value is <code>DELETING</code>.</p>
20    pub fn lifecycle(&self) -> ::std::option::Option<&crate::types::VolumeLifecycle> {
21        self.lifecycle.as_ref()
22    }
23    /// <p>Returned after a <code>DeleteVolume</code> request, showing the status of the delete request.</p>
24    pub fn ontap_response(&self) -> ::std::option::Option<&crate::types::DeleteVolumeOntapResponse> {
25        self.ontap_response.as_ref()
26    }
27}
28impl ::aws_types::request_id::RequestId for DeleteVolumeOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl DeleteVolumeOutput {
34    /// Creates a new builder-style object to manufacture [`DeleteVolumeOutput`](crate::operation::delete_volume::DeleteVolumeOutput).
35    pub fn builder() -> crate::operation::delete_volume::builders::DeleteVolumeOutputBuilder {
36        crate::operation::delete_volume::builders::DeleteVolumeOutputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteVolumeOutput`](crate::operation::delete_volume::DeleteVolumeOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteVolumeOutputBuilder {
44    pub(crate) volume_id: ::std::option::Option<::std::string::String>,
45    pub(crate) lifecycle: ::std::option::Option<crate::types::VolumeLifecycle>,
46    pub(crate) ontap_response: ::std::option::Option<crate::types::DeleteVolumeOntapResponse>,
47    _request_id: Option<String>,
48}
49impl DeleteVolumeOutputBuilder {
50    /// <p>The ID of the volume that's being deleted.</p>
51    pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.volume_id = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The ID of the volume that's being deleted.</p>
56    pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.volume_id = input;
58        self
59    }
60    /// <p>The ID of the volume that's being deleted.</p>
61    pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
62        &self.volume_id
63    }
64    /// <p>The lifecycle state of the volume being deleted. If the <code>DeleteVolume</code> operation is successful, this value is <code>DELETING</code>.</p>
65    pub fn lifecycle(mut self, input: crate::types::VolumeLifecycle) -> Self {
66        self.lifecycle = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>The lifecycle state of the volume being deleted. If the <code>DeleteVolume</code> operation is successful, this value is <code>DELETING</code>.</p>
70    pub fn set_lifecycle(mut self, input: ::std::option::Option<crate::types::VolumeLifecycle>) -> Self {
71        self.lifecycle = input;
72        self
73    }
74    /// <p>The lifecycle state of the volume being deleted. If the <code>DeleteVolume</code> operation is successful, this value is <code>DELETING</code>.</p>
75    pub fn get_lifecycle(&self) -> &::std::option::Option<crate::types::VolumeLifecycle> {
76        &self.lifecycle
77    }
78    /// <p>Returned after a <code>DeleteVolume</code> request, showing the status of the delete request.</p>
79    pub fn ontap_response(mut self, input: crate::types::DeleteVolumeOntapResponse) -> Self {
80        self.ontap_response = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>Returned after a <code>DeleteVolume</code> request, showing the status of the delete request.</p>
84    pub fn set_ontap_response(mut self, input: ::std::option::Option<crate::types::DeleteVolumeOntapResponse>) -> Self {
85        self.ontap_response = input;
86        self
87    }
88    /// <p>Returned after a <code>DeleteVolume</code> request, showing the status of the delete request.</p>
89    pub fn get_ontap_response(&self) -> &::std::option::Option<crate::types::DeleteVolumeOntapResponse> {
90        &self.ontap_response
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`DeleteVolumeOutput`](crate::operation::delete_volume::DeleteVolumeOutput).
102    pub fn build(self) -> crate::operation::delete_volume::DeleteVolumeOutput {
103        crate::operation::delete_volume::DeleteVolumeOutput {
104            volume_id: self.volume_id,
105            lifecycle: self.lifecycle,
106            ontap_response: self.ontap_response,
107            _request_id: self._request_id,
108        }
109    }
110}