aws_sdk_s3/operation/delete_object/
_delete_object_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 DeleteObjectOutput {
6    /// <p>Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p><note>
7    /// <p>This functionality is not supported for directory buckets.</p>
8    /// </note>
9    pub delete_marker: ::std::option::Option<bool>,
10    /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p><note>
11    /// <p>This functionality is not supported for directory buckets.</p>
12    /// </note>
13    pub version_id: ::std::option::Option<::std::string::String>,
14    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
15    /// <p>This functionality is not supported for directory buckets.</p>
16    /// </note>
17    pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
18    _extended_request_id: Option<String>,
19    _request_id: Option<String>,
20}
21impl DeleteObjectOutput {
22    /// <p>Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p><note>
23    /// <p>This functionality is not supported for directory buckets.</p>
24    /// </note>
25    pub fn delete_marker(&self) -> ::std::option::Option<bool> {
26        self.delete_marker
27    }
28    /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p><note>
29    /// <p>This functionality is not supported for directory buckets.</p>
30    /// </note>
31    pub fn version_id(&self) -> ::std::option::Option<&str> {
32        self.version_id.as_deref()
33    }
34    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
35    /// <p>This functionality is not supported for directory buckets.</p>
36    /// </note>
37    pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
38        self.request_charged.as_ref()
39    }
40}
41impl crate::s3_request_id::RequestIdExt for DeleteObjectOutput {
42    fn extended_request_id(&self) -> Option<&str> {
43        self._extended_request_id.as_deref()
44    }
45}
46impl ::aws_types::request_id::RequestId for DeleteObjectOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl DeleteObjectOutput {
52    /// Creates a new builder-style object to manufacture [`DeleteObjectOutput`](crate::operation::delete_object::DeleteObjectOutput).
53    pub fn builder() -> crate::operation::delete_object::builders::DeleteObjectOutputBuilder {
54        crate::operation::delete_object::builders::DeleteObjectOutputBuilder::default()
55    }
56}
57
58/// A builder for [`DeleteObjectOutput`](crate::operation::delete_object::DeleteObjectOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct DeleteObjectOutputBuilder {
62    pub(crate) delete_marker: ::std::option::Option<bool>,
63    pub(crate) version_id: ::std::option::Option<::std::string::String>,
64    pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
65    _extended_request_id: Option<String>,
66    _request_id: Option<String>,
67}
68impl DeleteObjectOutputBuilder {
69    /// <p>Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p><note>
70    /// <p>This functionality is not supported for directory buckets.</p>
71    /// </note>
72    pub fn delete_marker(mut self, input: bool) -> Self {
73        self.delete_marker = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p><note>
77    /// <p>This functionality is not supported for directory buckets.</p>
78    /// </note>
79    pub fn set_delete_marker(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.delete_marker = input;
81        self
82    }
83    /// <p>Indicates whether the specified object version that was permanently deleted was (true) or was not (false) a delete marker before deletion. In a simple DELETE, this header indicates whether (true) or not (false) the current version of the object is a delete marker. To learn more about delete markers, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html">Working with delete markers</a>.</p><note>
84    /// <p>This functionality is not supported for directory buckets.</p>
85    /// </note>
86    pub fn get_delete_marker(&self) -> &::std::option::Option<bool> {
87        &self.delete_marker
88    }
89    /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p><note>
90    /// <p>This functionality is not supported for directory buckets.</p>
91    /// </note>
92    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.version_id = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p><note>
97    /// <p>This functionality is not supported for directory buckets.</p>
98    /// </note>
99    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.version_id = input;
101        self
102    }
103    /// <p>Returns the version ID of the delete marker created as a result of the DELETE operation.</p><note>
104    /// <p>This functionality is not supported for directory buckets.</p>
105    /// </note>
106    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
107        &self.version_id
108    }
109    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
110    /// <p>This functionality is not supported for directory buckets.</p>
111    /// </note>
112    pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
113        self.request_charged = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
117    /// <p>This functionality is not supported for directory buckets.</p>
118    /// </note>
119    pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
120        self.request_charged = input;
121        self
122    }
123    /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
124    /// <p>This functionality is not supported for directory buckets.</p>
125    /// </note>
126    pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
127        &self.request_charged
128    }
129    pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
130        self._extended_request_id = Some(extended_request_id.into());
131        self
132    }
133
134    pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
135        self._extended_request_id = extended_request_id;
136        self
137    }
138    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
139        self._request_id = Some(request_id.into());
140        self
141    }
142
143    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
144        self._request_id = request_id;
145        self
146    }
147    /// Consumes the builder and constructs a [`DeleteObjectOutput`](crate::operation::delete_object::DeleteObjectOutput).
148    pub fn build(self) -> crate::operation::delete_object::DeleteObjectOutput {
149        crate::operation::delete_object::DeleteObjectOutput {
150            delete_marker: self.delete_marker,
151            version_id: self.version_id,
152            request_charged: self.request_charged,
153            _extended_request_id: self._extended_request_id,
154            _request_id: self._request_id,
155        }
156    }
157}