aws_sdk_s3/operation/get_object_attributes/_get_object_attributes_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 GetObjectAttributesOutput {
6 /// <p>Specifies whether the object retrieved was (<code>true</code>) or was not (<code>false</code>) a delete marker. If <code>false</code>, this response header does not appear in the response. 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>Date and time when the object was last modified.</p>
11 pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
12 /// <p>The version ID of the object.</p><note>
13 /// <p>This functionality is not supported for directory buckets.</p>
14 /// </note>
15 pub version_id: ::std::option::Option<::std::string::String>,
16 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
17 /// <p>This functionality is not supported for directory buckets.</p>
18 /// </note>
19 pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
20 /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
21 pub e_tag: ::std::option::Option<::std::string::String>,
22 /// <p>The checksum or digest of the object.</p>
23 pub checksum: ::std::option::Option<crate::types::Checksum>,
24 /// <p>A collection of parts associated with a multipart upload.</p>
25 pub object_parts: ::std::option::Option<crate::types::GetObjectAttributesParts>,
26 /// <p>Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
27 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p><note>
28 /// <p><b>Directory buckets</b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
29 /// </note>
30 pub storage_class: ::std::option::Option<crate::types::StorageClass>,
31 /// <p>The size of the object in bytes.</p>
32 pub object_size: ::std::option::Option<i64>,
33 _extended_request_id: Option<String>,
34 _request_id: Option<String>,
35}
36impl GetObjectAttributesOutput {
37 /// <p>Specifies whether the object retrieved was (<code>true</code>) or was not (<code>false</code>) a delete marker. If <code>false</code>, this response header does not appear in the response. 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>
38 /// <p>This functionality is not supported for directory buckets.</p>
39 /// </note>
40 pub fn delete_marker(&self) -> ::std::option::Option<bool> {
41 self.delete_marker
42 }
43 /// <p>Date and time when the object was last modified.</p>
44 pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
45 self.last_modified.as_ref()
46 }
47 /// <p>The version ID of the object.</p><note>
48 /// <p>This functionality is not supported for directory buckets.</p>
49 /// </note>
50 pub fn version_id(&self) -> ::std::option::Option<&str> {
51 self.version_id.as_deref()
52 }
53 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
54 /// <p>This functionality is not supported for directory buckets.</p>
55 /// </note>
56 pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
57 self.request_charged.as_ref()
58 }
59 /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
60 pub fn e_tag(&self) -> ::std::option::Option<&str> {
61 self.e_tag.as_deref()
62 }
63 /// <p>The checksum or digest of the object.</p>
64 pub fn checksum(&self) -> ::std::option::Option<&crate::types::Checksum> {
65 self.checksum.as_ref()
66 }
67 /// <p>A collection of parts associated with a multipart upload.</p>
68 pub fn object_parts(&self) -> ::std::option::Option<&crate::types::GetObjectAttributesParts> {
69 self.object_parts.as_ref()
70 }
71 /// <p>Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
72 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p><note>
73 /// <p><b>Directory buckets</b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
74 /// </note>
75 pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
76 self.storage_class.as_ref()
77 }
78 /// <p>The size of the object in bytes.</p>
79 pub fn object_size(&self) -> ::std::option::Option<i64> {
80 self.object_size
81 }
82}
83impl crate::s3_request_id::RequestIdExt for GetObjectAttributesOutput {
84 fn extended_request_id(&self) -> Option<&str> {
85 self._extended_request_id.as_deref()
86 }
87}
88impl ::aws_types::request_id::RequestId for GetObjectAttributesOutput {
89 fn request_id(&self) -> Option<&str> {
90 self._request_id.as_deref()
91 }
92}
93impl GetObjectAttributesOutput {
94 /// Creates a new builder-style object to manufacture [`GetObjectAttributesOutput`](crate::operation::get_object_attributes::GetObjectAttributesOutput).
95 pub fn builder() -> crate::operation::get_object_attributes::builders::GetObjectAttributesOutputBuilder {
96 crate::operation::get_object_attributes::builders::GetObjectAttributesOutputBuilder::default()
97 }
98}
99
100/// A builder for [`GetObjectAttributesOutput`](crate::operation::get_object_attributes::GetObjectAttributesOutput).
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
102#[non_exhaustive]
103pub struct GetObjectAttributesOutputBuilder {
104 pub(crate) delete_marker: ::std::option::Option<bool>,
105 pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
106 pub(crate) version_id: ::std::option::Option<::std::string::String>,
107 pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
108 pub(crate) e_tag: ::std::option::Option<::std::string::String>,
109 pub(crate) checksum: ::std::option::Option<crate::types::Checksum>,
110 pub(crate) object_parts: ::std::option::Option<crate::types::GetObjectAttributesParts>,
111 pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
112 pub(crate) object_size: ::std::option::Option<i64>,
113 _extended_request_id: Option<String>,
114 _request_id: Option<String>,
115}
116impl GetObjectAttributesOutputBuilder {
117 /// <p>Specifies whether the object retrieved was (<code>true</code>) or was not (<code>false</code>) a delete marker. If <code>false</code>, this response header does not appear in the response. 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>
118 /// <p>This functionality is not supported for directory buckets.</p>
119 /// </note>
120 pub fn delete_marker(mut self, input: bool) -> Self {
121 self.delete_marker = ::std::option::Option::Some(input);
122 self
123 }
124 /// <p>Specifies whether the object retrieved was (<code>true</code>) or was not (<code>false</code>) a delete marker. If <code>false</code>, this response header does not appear in the response. 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>
125 /// <p>This functionality is not supported for directory buckets.</p>
126 /// </note>
127 pub fn set_delete_marker(mut self, input: ::std::option::Option<bool>) -> Self {
128 self.delete_marker = input;
129 self
130 }
131 /// <p>Specifies whether the object retrieved was (<code>true</code>) or was not (<code>false</code>) a delete marker. If <code>false</code>, this response header does not appear in the response. 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>
132 /// <p>This functionality is not supported for directory buckets.</p>
133 /// </note>
134 pub fn get_delete_marker(&self) -> &::std::option::Option<bool> {
135 &self.delete_marker
136 }
137 /// <p>Date and time when the object was last modified.</p>
138 pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
139 self.last_modified = ::std::option::Option::Some(input);
140 self
141 }
142 /// <p>Date and time when the object was last modified.</p>
143 pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
144 self.last_modified = input;
145 self
146 }
147 /// <p>Date and time when the object was last modified.</p>
148 pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
149 &self.last_modified
150 }
151 /// <p>The version ID of the object.</p><note>
152 /// <p>This functionality is not supported for directory buckets.</p>
153 /// </note>
154 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155 self.version_id = ::std::option::Option::Some(input.into());
156 self
157 }
158 /// <p>The version ID of the object.</p><note>
159 /// <p>This functionality is not supported for directory buckets.</p>
160 /// </note>
161 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.version_id = input;
163 self
164 }
165 /// <p>The version ID of the object.</p><note>
166 /// <p>This functionality is not supported for directory buckets.</p>
167 /// </note>
168 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
169 &self.version_id
170 }
171 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
172 /// <p>This functionality is not supported for directory buckets.</p>
173 /// </note>
174 pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
175 self.request_charged = ::std::option::Option::Some(input);
176 self
177 }
178 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
179 /// <p>This functionality is not supported for directory buckets.</p>
180 /// </note>
181 pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
182 self.request_charged = input;
183 self
184 }
185 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
186 /// <p>This functionality is not supported for directory buckets.</p>
187 /// </note>
188 pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
189 &self.request_charged
190 }
191 /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
192 pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.e_tag = ::std::option::Option::Some(input.into());
194 self
195 }
196 /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
197 pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.e_tag = input;
199 self
200 }
201 /// <p>An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
202 pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
203 &self.e_tag
204 }
205 /// <p>The checksum or digest of the object.</p>
206 pub fn checksum(mut self, input: crate::types::Checksum) -> Self {
207 self.checksum = ::std::option::Option::Some(input);
208 self
209 }
210 /// <p>The checksum or digest of the object.</p>
211 pub fn set_checksum(mut self, input: ::std::option::Option<crate::types::Checksum>) -> Self {
212 self.checksum = input;
213 self
214 }
215 /// <p>The checksum or digest of the object.</p>
216 pub fn get_checksum(&self) -> &::std::option::Option<crate::types::Checksum> {
217 &self.checksum
218 }
219 /// <p>A collection of parts associated with a multipart upload.</p>
220 pub fn object_parts(mut self, input: crate::types::GetObjectAttributesParts) -> Self {
221 self.object_parts = ::std::option::Option::Some(input);
222 self
223 }
224 /// <p>A collection of parts associated with a multipart upload.</p>
225 pub fn set_object_parts(mut self, input: ::std::option::Option<crate::types::GetObjectAttributesParts>) -> Self {
226 self.object_parts = input;
227 self
228 }
229 /// <p>A collection of parts associated with a multipart upload.</p>
230 pub fn get_object_parts(&self) -> &::std::option::Option<crate::types::GetObjectAttributesParts> {
231 &self.object_parts
232 }
233 /// <p>Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
234 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p><note>
235 /// <p><b>Directory buckets</b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
236 /// </note>
237 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
238 self.storage_class = ::std::option::Option::Some(input);
239 self
240 }
241 /// <p>Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
242 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p><note>
243 /// <p><b>Directory buckets</b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
244 /// </note>
245 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
246 self.storage_class = input;
247 self
248 }
249 /// <p>Provides the storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p>
250 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a>.</p><note>
251 /// <p><b>Directory buckets</b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
252 /// </note>
253 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
254 &self.storage_class
255 }
256 /// <p>The size of the object in bytes.</p>
257 pub fn object_size(mut self, input: i64) -> Self {
258 self.object_size = ::std::option::Option::Some(input);
259 self
260 }
261 /// <p>The size of the object in bytes.</p>
262 pub fn set_object_size(mut self, input: ::std::option::Option<i64>) -> Self {
263 self.object_size = input;
264 self
265 }
266 /// <p>The size of the object in bytes.</p>
267 pub fn get_object_size(&self) -> &::std::option::Option<i64> {
268 &self.object_size
269 }
270 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
271 self._extended_request_id = Some(extended_request_id.into());
272 self
273 }
274
275 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
276 self._extended_request_id = extended_request_id;
277 self
278 }
279 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
280 self._request_id = Some(request_id.into());
281 self
282 }
283
284 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
285 self._request_id = request_id;
286 self
287 }
288 /// Consumes the builder and constructs a [`GetObjectAttributesOutput`](crate::operation::get_object_attributes::GetObjectAttributesOutput).
289 pub fn build(self) -> crate::operation::get_object_attributes::GetObjectAttributesOutput {
290 crate::operation::get_object_attributes::GetObjectAttributesOutput {
291 delete_marker: self.delete_marker,
292 last_modified: self.last_modified,
293 version_id: self.version_id,
294 request_charged: self.request_charged,
295 e_tag: self.e_tag,
296 checksum: self.checksum,
297 object_parts: self.object_parts,
298 storage_class: self.storage_class,
299 object_size: self.object_size,
300 _extended_request_id: self._extended_request_id,
301 _request_id: self._request_id,
302 }
303 }
304}