aws_sdk_s3/operation/get_object/_get_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]
4pub struct GetObjectOutput {
5 /// <p>Object data.</p>
6 pub body: ::aws_smithy_types::byte_stream::ByteStream,
7 /// <p>Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p><note>
8 /// <ul>
9 /// <li>
10 /// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
11 /// <li>
12 /// <p>If the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
13 /// </ul>
14 /// </note>
15 pub delete_marker: ::std::option::Option<bool>,
16 /// <p>Indicates that a range of bytes was specified in the request.</p>
17 pub accept_ranges: ::std::option::Option<::std::string::String>,
18 /// <p>If the object expiration is configured (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html"> <code>PutBucketLifecycleConfiguration</code> </a>), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs providing object expiration information. The value of the <code>rule-id</code> is URL-encoded.</p><note>
19 /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
20 /// </note>
21 pub expiration: ::std::option::Option<::std::string::String>,
22 /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p><note>
23 /// <p>This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
24 /// </note>
25 pub restore: ::std::option::Option<::std::string::String>,
26 /// <p>Date and time when the object was last modified.</p>
27 /// <p><b>General purpose buckets </b> - When you specify a <code>versionId</code> of the object in your request, if the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p>
28 pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
29 /// <p>Size of the body in bytes.</p>
30 pub content_length: ::std::option::Option<i64>,
31 /// <p>An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
32 pub e_tag: ::std::option::Option<::std::string::String>,
33 /// <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
34 pub checksum_crc32: ::std::option::Option<::std::string::String>,
35 /// <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
36 pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
37 /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
38 pub checksum_sha1: ::std::option::Option<::std::string::String>,
39 /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
40 pub checksum_sha256: ::std::option::Option<::std::string::String>,
41 /// <p>This is set to the number of metadata entries not returned in the headers that are prefixed with <code>x-amz-meta-</code>. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p><note>
42 /// <p>This functionality is not supported for directory buckets.</p>
43 /// </note>
44 pub missing_meta: ::std::option::Option<i32>,
45 /// <p>Version ID of the object.</p><note>
46 /// <p>This functionality is not supported for directory buckets.</p>
47 /// </note>
48 pub version_id: ::std::option::Option<::std::string::String>,
49 /// <p>Specifies caching behavior along the request/reply chain.</p>
50 pub cache_control: ::std::option::Option<::std::string::String>,
51 /// <p>Specifies presentational information for the object.</p>
52 pub content_disposition: ::std::option::Option<::std::string::String>,
53 /// <p>Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
54 pub content_encoding: ::std::option::Option<::std::string::String>,
55 /// <p>The language the content is in.</p>
56 pub content_language: ::std::option::Option<::std::string::String>,
57 /// <p>The portion of the object returned in the response.</p>
58 pub content_range: ::std::option::Option<::std::string::String>,
59 /// <p>A standard MIME type describing the format of the object data.</p>
60 pub content_type: ::std::option::Option<::std::string::String>,
61 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
62 /// <p>This functionality is not supported for directory buckets.</p>
63 /// </note>
64 pub website_redirect_location: ::std::option::Option<::std::string::String>,
65 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p>
66 pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
67 /// <p>A map of metadata to store with the object in S3.</p>
68 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
69 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
70 /// <p>This functionality is not supported for directory buckets.</p>
71 /// </note>
72 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
73 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
74 /// <p>This functionality is not supported for directory buckets.</p>
75 /// </note>
76 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
77 /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
78 pub ssekms_key_id: ::std::option::Option<::std::string::String>,
79 /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
80 pub bucket_key_enabled: ::std::option::Option<bool>,
81 /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p><note>
82 /// <p><b>Directory buckets </b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
83 /// </note>
84 pub storage_class: ::std::option::Option<crate::types::StorageClass>,
85 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
86 /// <p>This functionality is not supported for directory buckets.</p>
87 /// </note>
88 pub request_charged: ::std::option::Option<crate::types::RequestCharged>,
89 /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p><note>
90 /// <p>This functionality is not supported for directory buckets.</p>
91 /// </note>
92 pub replication_status: ::std::option::Option<crate::types::ReplicationStatus>,
93 /// <p>The count of parts this object has. This value is only returned if you specify <code>partNumber</code> in your request and the object was uploaded as a multipart upload.</p>
94 pub parts_count: ::std::option::Option<i32>,
95 /// <p>The number of tags, if any, on the object, when you have the relevant permission to read object tags.</p>
96 /// <p>You can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> to retrieve the tag set associated with an object.</p><note>
97 /// <p>This functionality is not supported for directory buckets.</p>
98 /// </note>
99 pub tag_count: ::std::option::Option<i32>,
100 /// <p>The Object Lock mode that's currently in place for this object.</p><note>
101 /// <p>This functionality is not supported for directory buckets.</p>
102 /// </note>
103 pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
104 /// <p>The date and time when this object's Object Lock will expire.</p><note>
105 /// <p>This functionality is not supported for directory buckets.</p>
106 /// </note>
107 pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
108 /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.</p><note>
109 /// <p>This functionality is not supported for directory buckets.</p>
110 /// </note>
111 pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
112 /// <p>The date and time at which the object is no longer cacheable.</p>
113 #[deprecated(note = "Please use `expires_string` which contains the raw, unparsed value of this field.")]
114 pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
115 /// <p>The date and time at which the object is no longer cacheable.</p>
116 pub expires_string: ::std::option::Option<::std::string::String>,
117 _extended_request_id: Option<String>,
118 _request_id: Option<String>,
119}
120impl GetObjectOutput {
121 /// <p>Object data.</p>
122 pub fn body(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
123 &self.body
124 }
125 /// <p>Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p><note>
126 /// <ul>
127 /// <li>
128 /// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
129 /// <li>
130 /// <p>If the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
131 /// </ul>
132 /// </note>
133 pub fn delete_marker(&self) -> ::std::option::Option<bool> {
134 self.delete_marker
135 }
136 /// <p>Indicates that a range of bytes was specified in the request.</p>
137 pub fn accept_ranges(&self) -> ::std::option::Option<&str> {
138 self.accept_ranges.as_deref()
139 }
140 /// <p>If the object expiration is configured (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html"> <code>PutBucketLifecycleConfiguration</code> </a>), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs providing object expiration information. The value of the <code>rule-id</code> is URL-encoded.</p><note>
141 /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
142 /// </note>
143 pub fn expiration(&self) -> ::std::option::Option<&str> {
144 self.expiration.as_deref()
145 }
146 /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p><note>
147 /// <p>This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
148 /// </note>
149 pub fn restore(&self) -> ::std::option::Option<&str> {
150 self.restore.as_deref()
151 }
152 /// <p>Date and time when the object was last modified.</p>
153 /// <p><b>General purpose buckets </b> - When you specify a <code>versionId</code> of the object in your request, if the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p>
154 pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
155 self.last_modified.as_ref()
156 }
157 /// <p>Size of the body in bytes.</p>
158 pub fn content_length(&self) -> ::std::option::Option<i64> {
159 self.content_length
160 }
161 /// <p>An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
162 pub fn e_tag(&self) -> ::std::option::Option<&str> {
163 self.e_tag.as_deref()
164 }
165 /// <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
166 pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
167 self.checksum_crc32.as_deref()
168 }
169 /// <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
170 pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
171 self.checksum_crc32_c.as_deref()
172 }
173 /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
174 pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
175 self.checksum_sha1.as_deref()
176 }
177 /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
178 pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
179 self.checksum_sha256.as_deref()
180 }
181 /// <p>This is set to the number of metadata entries not returned in the headers that are prefixed with <code>x-amz-meta-</code>. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p><note>
182 /// <p>This functionality is not supported for directory buckets.</p>
183 /// </note>
184 pub fn missing_meta(&self) -> ::std::option::Option<i32> {
185 self.missing_meta
186 }
187 /// <p>Version ID of the object.</p><note>
188 /// <p>This functionality is not supported for directory buckets.</p>
189 /// </note>
190 pub fn version_id(&self) -> ::std::option::Option<&str> {
191 self.version_id.as_deref()
192 }
193 /// <p>Specifies caching behavior along the request/reply chain.</p>
194 pub fn cache_control(&self) -> ::std::option::Option<&str> {
195 self.cache_control.as_deref()
196 }
197 /// <p>Specifies presentational information for the object.</p>
198 pub fn content_disposition(&self) -> ::std::option::Option<&str> {
199 self.content_disposition.as_deref()
200 }
201 /// <p>Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
202 pub fn content_encoding(&self) -> ::std::option::Option<&str> {
203 self.content_encoding.as_deref()
204 }
205 /// <p>The language the content is in.</p>
206 pub fn content_language(&self) -> ::std::option::Option<&str> {
207 self.content_language.as_deref()
208 }
209 /// <p>The portion of the object returned in the response.</p>
210 pub fn content_range(&self) -> ::std::option::Option<&str> {
211 self.content_range.as_deref()
212 }
213 /// <p>A standard MIME type describing the format of the object data.</p>
214 pub fn content_type(&self) -> ::std::option::Option<&str> {
215 self.content_type.as_deref()
216 }
217 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
218 /// <p>This functionality is not supported for directory buckets.</p>
219 /// </note>
220 pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
221 self.website_redirect_location.as_deref()
222 }
223 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p>
224 pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
225 self.server_side_encryption.as_ref()
226 }
227 /// <p>A map of metadata to store with the object in S3.</p>
228 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
229 self.metadata.as_ref()
230 }
231 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
232 /// <p>This functionality is not supported for directory buckets.</p>
233 /// </note>
234 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
235 self.sse_customer_algorithm.as_deref()
236 }
237 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
238 /// <p>This functionality is not supported for directory buckets.</p>
239 /// </note>
240 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
241 self.sse_customer_key_md5.as_deref()
242 }
243 /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
244 pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
245 self.ssekms_key_id.as_deref()
246 }
247 /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
248 pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
249 self.bucket_key_enabled
250 }
251 /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p><note>
252 /// <p><b>Directory buckets </b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
253 /// </note>
254 pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
255 self.storage_class.as_ref()
256 }
257 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
258 /// <p>This functionality is not supported for directory buckets.</p>
259 /// </note>
260 pub fn request_charged(&self) -> ::std::option::Option<&crate::types::RequestCharged> {
261 self.request_charged.as_ref()
262 }
263 /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p><note>
264 /// <p>This functionality is not supported for directory buckets.</p>
265 /// </note>
266 pub fn replication_status(&self) -> ::std::option::Option<&crate::types::ReplicationStatus> {
267 self.replication_status.as_ref()
268 }
269 /// <p>The count of parts this object has. This value is only returned if you specify <code>partNumber</code> in your request and the object was uploaded as a multipart upload.</p>
270 pub fn parts_count(&self) -> ::std::option::Option<i32> {
271 self.parts_count
272 }
273 /// <p>The number of tags, if any, on the object, when you have the relevant permission to read object tags.</p>
274 /// <p>You can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> to retrieve the tag set associated with an object.</p><note>
275 /// <p>This functionality is not supported for directory buckets.</p>
276 /// </note>
277 pub fn tag_count(&self) -> ::std::option::Option<i32> {
278 self.tag_count
279 }
280 /// <p>The Object Lock mode that's currently in place for this object.</p><note>
281 /// <p>This functionality is not supported for directory buckets.</p>
282 /// </note>
283 pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
284 self.object_lock_mode.as_ref()
285 }
286 /// <p>The date and time when this object's Object Lock will expire.</p><note>
287 /// <p>This functionality is not supported for directory buckets.</p>
288 /// </note>
289 pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
290 self.object_lock_retain_until_date.as_ref()
291 }
292 /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.</p><note>
293 /// <p>This functionality is not supported for directory buckets.</p>
294 /// </note>
295 pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
296 self.object_lock_legal_hold_status.as_ref()
297 }
298 /// <p>The date and time at which the object is no longer cacheable.</p>
299 #[deprecated(note = "Please use `expires_string` which contains the raw, unparsed value of this field.")]
300 pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
301 self.expires.as_ref()
302 }
303 /// <p>The date and time at which the object is no longer cacheable.</p>
304 pub fn expires_string(&self) -> ::std::option::Option<&str> {
305 self.expires_string.as_deref()
306 }
307}
308impl ::std::fmt::Debug for GetObjectOutput {
309 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
310 let mut formatter = f.debug_struct("GetObjectOutput");
311 formatter.field("body", &self.body);
312 formatter.field("delete_marker", &self.delete_marker);
313 formatter.field("accept_ranges", &self.accept_ranges);
314 formatter.field("expiration", &self.expiration);
315 formatter.field("restore", &self.restore);
316 formatter.field("last_modified", &self.last_modified);
317 formatter.field("content_length", &self.content_length);
318 formatter.field("e_tag", &self.e_tag);
319 formatter.field("checksum_crc32", &self.checksum_crc32);
320 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
321 formatter.field("checksum_sha1", &self.checksum_sha1);
322 formatter.field("checksum_sha256", &self.checksum_sha256);
323 formatter.field("missing_meta", &self.missing_meta);
324 formatter.field("version_id", &self.version_id);
325 formatter.field("cache_control", &self.cache_control);
326 formatter.field("content_disposition", &self.content_disposition);
327 formatter.field("content_encoding", &self.content_encoding);
328 formatter.field("content_language", &self.content_language);
329 formatter.field("content_range", &self.content_range);
330 formatter.field("content_type", &self.content_type);
331 formatter.field("website_redirect_location", &self.website_redirect_location);
332 formatter.field("server_side_encryption", &self.server_side_encryption);
333 formatter.field("metadata", &self.metadata);
334 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
335 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
336 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
337 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
338 formatter.field("storage_class", &self.storage_class);
339 formatter.field("request_charged", &self.request_charged);
340 formatter.field("replication_status", &self.replication_status);
341 formatter.field("parts_count", &self.parts_count);
342 formatter.field("tag_count", &self.tag_count);
343 formatter.field("object_lock_mode", &self.object_lock_mode);
344 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
345 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
346 formatter.field("expires", &self.expires);
347 formatter.field("expires_string", &self.expires_string);
348 formatter.field("_extended_request_id", &self._extended_request_id);
349 formatter.field("_request_id", &self._request_id);
350 formatter.finish()
351 }
352}
353impl crate::s3_request_id::RequestIdExt for GetObjectOutput {
354 fn extended_request_id(&self) -> Option<&str> {
355 self._extended_request_id.as_deref()
356 }
357}
358impl ::aws_types::request_id::RequestId for GetObjectOutput {
359 fn request_id(&self) -> Option<&str> {
360 self._request_id.as_deref()
361 }
362}
363impl GetObjectOutput {
364 /// Creates a new builder-style object to manufacture [`GetObjectOutput`](crate::operation::get_object::GetObjectOutput).
365 pub fn builder() -> crate::operation::get_object::builders::GetObjectOutputBuilder {
366 crate::operation::get_object::builders::GetObjectOutputBuilder::default()
367 }
368}
369
370/// A builder for [`GetObjectOutput`](crate::operation::get_object::GetObjectOutput).
371#[derive(::std::default::Default)]
372#[non_exhaustive]
373pub struct GetObjectOutputBuilder {
374 pub(crate) body: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
375 pub(crate) delete_marker: ::std::option::Option<bool>,
376 pub(crate) accept_ranges: ::std::option::Option<::std::string::String>,
377 pub(crate) expiration: ::std::option::Option<::std::string::String>,
378 pub(crate) restore: ::std::option::Option<::std::string::String>,
379 pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
380 pub(crate) content_length: ::std::option::Option<i64>,
381 pub(crate) e_tag: ::std::option::Option<::std::string::String>,
382 pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
383 pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
384 pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
385 pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
386 pub(crate) missing_meta: ::std::option::Option<i32>,
387 pub(crate) version_id: ::std::option::Option<::std::string::String>,
388 pub(crate) cache_control: ::std::option::Option<::std::string::String>,
389 pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
390 pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
391 pub(crate) content_language: ::std::option::Option<::std::string::String>,
392 pub(crate) content_range: ::std::option::Option<::std::string::String>,
393 pub(crate) content_type: ::std::option::Option<::std::string::String>,
394 pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
395 pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
396 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
397 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
398 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
399 pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
400 pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
401 pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
402 pub(crate) request_charged: ::std::option::Option<crate::types::RequestCharged>,
403 pub(crate) replication_status: ::std::option::Option<crate::types::ReplicationStatus>,
404 pub(crate) parts_count: ::std::option::Option<i32>,
405 pub(crate) tag_count: ::std::option::Option<i32>,
406 pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
407 pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
408 pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
409 pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
410 pub(crate) expires_string: ::std::option::Option<::std::string::String>,
411 _extended_request_id: Option<String>,
412 _request_id: Option<String>,
413}
414impl GetObjectOutputBuilder {
415 /// <p>Object data.</p>
416 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
417 self.body = ::std::option::Option::Some(input);
418 self
419 }
420 /// <p>Object data.</p>
421 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
422 self.body = input;
423 self
424 }
425 /// <p>Object data.</p>
426 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
427 &self.body
428 }
429 /// <p>Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p><note>
430 /// <ul>
431 /// <li>
432 /// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
433 /// <li>
434 /// <p>If the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
435 /// </ul>
436 /// </note>
437 pub fn delete_marker(mut self, input: bool) -> Self {
438 self.delete_marker = ::std::option::Option::Some(input);
439 self
440 }
441 /// <p>Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p><note>
442 /// <ul>
443 /// <li>
444 /// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
445 /// <li>
446 /// <p>If the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
447 /// </ul>
448 /// </note>
449 pub fn set_delete_marker(mut self, input: ::std::option::Option<bool>) -> Self {
450 self.delete_marker = input;
451 self
452 }
453 /// <p>Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.</p><note>
454 /// <ul>
455 /// <li>
456 /// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
457 /// <li>
458 /// <p>If the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
459 /// </ul>
460 /// </note>
461 pub fn get_delete_marker(&self) -> &::std::option::Option<bool> {
462 &self.delete_marker
463 }
464 /// <p>Indicates that a range of bytes was specified in the request.</p>
465 pub fn accept_ranges(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
466 self.accept_ranges = ::std::option::Option::Some(input.into());
467 self
468 }
469 /// <p>Indicates that a range of bytes was specified in the request.</p>
470 pub fn set_accept_ranges(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
471 self.accept_ranges = input;
472 self
473 }
474 /// <p>Indicates that a range of bytes was specified in the request.</p>
475 pub fn get_accept_ranges(&self) -> &::std::option::Option<::std::string::String> {
476 &self.accept_ranges
477 }
478 /// <p>If the object expiration is configured (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html"> <code>PutBucketLifecycleConfiguration</code> </a>), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs providing object expiration information. The value of the <code>rule-id</code> is URL-encoded.</p><note>
479 /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
480 /// </note>
481 pub fn expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
482 self.expiration = ::std::option::Option::Some(input.into());
483 self
484 }
485 /// <p>If the object expiration is configured (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html"> <code>PutBucketLifecycleConfiguration</code> </a>), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs providing object expiration information. The value of the <code>rule-id</code> is URL-encoded.</p><note>
486 /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
487 /// </note>
488 pub fn set_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
489 self.expiration = input;
490 self
491 }
492 /// <p>If the object expiration is configured (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html"> <code>PutBucketLifecycleConfiguration</code> </a>), the response includes this header. It includes the <code>expiry-date</code> and <code>rule-id</code> key-value pairs providing object expiration information. The value of the <code>rule-id</code> is URL-encoded.</p><note>
493 /// <p>Object expiration information is not returned in directory buckets and this header returns the value "<code>NotImplemented</code>" in all responses for directory buckets.</p>
494 /// </note>
495 pub fn get_expiration(&self) -> &::std::option::Option<::std::string::String> {
496 &self.expiration
497 }
498 /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p><note>
499 /// <p>This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
500 /// </note>
501 pub fn restore(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
502 self.restore = ::std::option::Option::Some(input.into());
503 self
504 }
505 /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p><note>
506 /// <p>This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
507 /// </note>
508 pub fn set_restore(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
509 self.restore = input;
510 self
511 }
512 /// <p>Provides information about object restoration action and expiration time of the restored object copy.</p><note>
513 /// <p>This functionality is not supported for directory buckets. Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
514 /// </note>
515 pub fn get_restore(&self) -> &::std::option::Option<::std::string::String> {
516 &self.restore
517 }
518 /// <p>Date and time when the object was last modified.</p>
519 /// <p><b>General purpose buckets </b> - When you specify a <code>versionId</code> of the object in your request, if the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p>
520 pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
521 self.last_modified = ::std::option::Option::Some(input);
522 self
523 }
524 /// <p>Date and time when the object was last modified.</p>
525 /// <p><b>General purpose buckets </b> - When you specify a <code>versionId</code> of the object in your request, if the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p>
526 pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
527 self.last_modified = input;
528 self
529 }
530 /// <p>Date and time when the object was last modified.</p>
531 /// <p><b>General purpose buckets </b> - When you specify a <code>versionId</code> of the object in your request, if the specified version in the request is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p>
532 pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
533 &self.last_modified
534 }
535 /// <p>Size of the body in bytes.</p>
536 pub fn content_length(mut self, input: i64) -> Self {
537 self.content_length = ::std::option::Option::Some(input);
538 self
539 }
540 /// <p>Size of the body in bytes.</p>
541 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
542 self.content_length = input;
543 self
544 }
545 /// <p>Size of the body in bytes.</p>
546 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
547 &self.content_length
548 }
549 /// <p>An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
550 pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
551 self.e_tag = ::std::option::Option::Some(input.into());
552 self
553 }
554 /// <p>An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
555 pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
556 self.e_tag = input;
557 self
558 }
559 /// <p>An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.</p>
560 pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
561 &self.e_tag
562 }
563 /// <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
564 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
565 self.checksum_crc32 = ::std::option::Option::Some(input.into());
566 self
567 }
568 /// <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
569 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
570 self.checksum_crc32 = input;
571 self
572 }
573 /// <p>The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
574 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
575 &self.checksum_crc32
576 }
577 /// <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
578 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
579 self.checksum_crc32_c = ::std::option::Option::Some(input.into());
580 self
581 }
582 /// <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
583 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
584 self.checksum_crc32_c = input;
585 self
586 }
587 /// <p>The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
588 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
589 &self.checksum_crc32_c
590 }
591 /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
592 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
593 self.checksum_sha1 = ::std::option::Option::Some(input.into());
594 self
595 }
596 /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
597 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
598 self.checksum_sha1 = input;
599 self
600 }
601 /// <p>The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
602 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
603 &self.checksum_sha1
604 }
605 /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
606 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
607 self.checksum_sha256 = ::std::option::Option::Some(input.into());
608 self
609 }
610 /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
611 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
612 self.checksum_sha256 = input;
613 self
614 }
615 /// <p>The base64-encoded, 256-bit SHA-256 digest of the object. This will only be present if it was uploaded with the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html"> Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
616 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
617 &self.checksum_sha256
618 }
619 /// <p>This is set to the number of metadata entries not returned in the headers that are prefixed with <code>x-amz-meta-</code>. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p><note>
620 /// <p>This functionality is not supported for directory buckets.</p>
621 /// </note>
622 pub fn missing_meta(mut self, input: i32) -> Self {
623 self.missing_meta = ::std::option::Option::Some(input);
624 self
625 }
626 /// <p>This is set to the number of metadata entries not returned in the headers that are prefixed with <code>x-amz-meta-</code>. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p><note>
627 /// <p>This functionality is not supported for directory buckets.</p>
628 /// </note>
629 pub fn set_missing_meta(mut self, input: ::std::option::Option<i32>) -> Self {
630 self.missing_meta = input;
631 self
632 }
633 /// <p>This is set to the number of metadata entries not returned in the headers that are prefixed with <code>x-amz-meta-</code>. This can happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.</p><note>
634 /// <p>This functionality is not supported for directory buckets.</p>
635 /// </note>
636 pub fn get_missing_meta(&self) -> &::std::option::Option<i32> {
637 &self.missing_meta
638 }
639 /// <p>Version ID of the object.</p><note>
640 /// <p>This functionality is not supported for directory buckets.</p>
641 /// </note>
642 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
643 self.version_id = ::std::option::Option::Some(input.into());
644 self
645 }
646 /// <p>Version ID of the object.</p><note>
647 /// <p>This functionality is not supported for directory buckets.</p>
648 /// </note>
649 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
650 self.version_id = input;
651 self
652 }
653 /// <p>Version ID of the object.</p><note>
654 /// <p>This functionality is not supported for directory buckets.</p>
655 /// </note>
656 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
657 &self.version_id
658 }
659 /// <p>Specifies caching behavior along the request/reply chain.</p>
660 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
661 self.cache_control = ::std::option::Option::Some(input.into());
662 self
663 }
664 /// <p>Specifies caching behavior along the request/reply chain.</p>
665 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
666 self.cache_control = input;
667 self
668 }
669 /// <p>Specifies caching behavior along the request/reply chain.</p>
670 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
671 &self.cache_control
672 }
673 /// <p>Specifies presentational information for the object.</p>
674 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
675 self.content_disposition = ::std::option::Option::Some(input.into());
676 self
677 }
678 /// <p>Specifies presentational information for the object.</p>
679 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
680 self.content_disposition = input;
681 self
682 }
683 /// <p>Specifies presentational information for the object.</p>
684 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
685 &self.content_disposition
686 }
687 /// <p>Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
688 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
689 self.content_encoding = ::std::option::Option::Some(input.into());
690 self
691 }
692 /// <p>Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
693 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
694 self.content_encoding = input;
695 self
696 }
697 /// <p>Indicates what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p>
698 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
699 &self.content_encoding
700 }
701 /// <p>The language the content is in.</p>
702 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
703 self.content_language = ::std::option::Option::Some(input.into());
704 self
705 }
706 /// <p>The language the content is in.</p>
707 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
708 self.content_language = input;
709 self
710 }
711 /// <p>The language the content is in.</p>
712 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
713 &self.content_language
714 }
715 /// <p>The portion of the object returned in the response.</p>
716 pub fn content_range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
717 self.content_range = ::std::option::Option::Some(input.into());
718 self
719 }
720 /// <p>The portion of the object returned in the response.</p>
721 pub fn set_content_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
722 self.content_range = input;
723 self
724 }
725 /// <p>The portion of the object returned in the response.</p>
726 pub fn get_content_range(&self) -> &::std::option::Option<::std::string::String> {
727 &self.content_range
728 }
729 /// <p>A standard MIME type describing the format of the object data.</p>
730 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
731 self.content_type = ::std::option::Option::Some(input.into());
732 self
733 }
734 /// <p>A standard MIME type describing the format of the object data.</p>
735 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
736 self.content_type = input;
737 self
738 }
739 /// <p>A standard MIME type describing the format of the object data.</p>
740 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
741 &self.content_type
742 }
743 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
744 /// <p>This functionality is not supported for directory buckets.</p>
745 /// </note>
746 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
747 self.website_redirect_location = ::std::option::Option::Some(input.into());
748 self
749 }
750 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
751 /// <p>This functionality is not supported for directory buckets.</p>
752 /// </note>
753 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
754 self.website_redirect_location = input;
755 self
756 }
757 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
758 /// <p>This functionality is not supported for directory buckets.</p>
759 /// </note>
760 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
761 &self.website_redirect_location
762 }
763 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p>
764 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
765 self.server_side_encryption = ::std::option::Option::Some(input);
766 self
767 }
768 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p>
769 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
770 self.server_side_encryption = input;
771 self
772 }
773 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3.</p>
774 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
775 &self.server_side_encryption
776 }
777 /// Adds a key-value pair to `metadata`.
778 ///
779 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
780 ///
781 /// <p>A map of metadata to store with the object in S3.</p>
782 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
783 let mut hash_map = self.metadata.unwrap_or_default();
784 hash_map.insert(k.into(), v.into());
785 self.metadata = ::std::option::Option::Some(hash_map);
786 self
787 }
788 /// <p>A map of metadata to store with the object in S3.</p>
789 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
790 self.metadata = input;
791 self
792 }
793 /// <p>A map of metadata to store with the object in S3.</p>
794 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
795 &self.metadata
796 }
797 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
798 /// <p>This functionality is not supported for directory buckets.</p>
799 /// </note>
800 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
801 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
802 self
803 }
804 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
805 /// <p>This functionality is not supported for directory buckets.</p>
806 /// </note>
807 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
808 self.sse_customer_algorithm = input;
809 self
810 }
811 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.</p><note>
812 /// <p>This functionality is not supported for directory buckets.</p>
813 /// </note>
814 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
815 &self.sse_customer_algorithm
816 }
817 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
818 /// <p>This functionality is not supported for directory buckets.</p>
819 /// </note>
820 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
821 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
822 self
823 }
824 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
825 /// <p>This functionality is not supported for directory buckets.</p>
826 /// </note>
827 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
828 self.sse_customer_key_md5 = input;
829 self
830 }
831 /// <p>If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.</p><note>
832 /// <p>This functionality is not supported for directory buckets.</p>
833 /// </note>
834 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
835 &self.sse_customer_key_md5
836 }
837 /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
838 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
839 self.ssekms_key_id = ::std::option::Option::Some(input.into());
840 self
841 }
842 /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
843 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
844 self.ssekms_key_id = input;
845 self
846 }
847 /// <p>If present, indicates the ID of the KMS key that was used for object encryption.</p>
848 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
849 &self.ssekms_key_id
850 }
851 /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
852 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
853 self.bucket_key_enabled = ::std::option::Option::Some(input);
854 self
855 }
856 /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
857 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
858 self.bucket_key_enabled = input;
859 self
860 }
861 /// <p>Indicates whether the object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).</p>
862 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
863 &self.bucket_key_enabled
864 }
865 /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p><note>
866 /// <p><b>Directory buckets </b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
867 /// </note>
868 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
869 self.storage_class = ::std::option::Option::Some(input);
870 self
871 }
872 /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p><note>
873 /// <p><b>Directory buckets </b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
874 /// </note>
875 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
876 self.storage_class = input;
877 self
878 }
879 /// <p>Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.</p><note>
880 /// <p><b>Directory buckets </b> - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.</p>
881 /// </note>
882 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
883 &self.storage_class
884 }
885 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
886 /// <p>This functionality is not supported for directory buckets.</p>
887 /// </note>
888 pub fn request_charged(mut self, input: crate::types::RequestCharged) -> Self {
889 self.request_charged = ::std::option::Option::Some(input);
890 self
891 }
892 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
893 /// <p>This functionality is not supported for directory buckets.</p>
894 /// </note>
895 pub fn set_request_charged(mut self, input: ::std::option::Option<crate::types::RequestCharged>) -> Self {
896 self.request_charged = input;
897 self
898 }
899 /// <p>If present, indicates that the requester was successfully charged for the request.</p><note>
900 /// <p>This functionality is not supported for directory buckets.</p>
901 /// </note>
902 pub fn get_request_charged(&self) -> &::std::option::Option<crate::types::RequestCharged> {
903 &self.request_charged
904 }
905 /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p><note>
906 /// <p>This functionality is not supported for directory buckets.</p>
907 /// </note>
908 pub fn replication_status(mut self, input: crate::types::ReplicationStatus) -> Self {
909 self.replication_status = ::std::option::Option::Some(input);
910 self
911 }
912 /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p><note>
913 /// <p>This functionality is not supported for directory buckets.</p>
914 /// </note>
915 pub fn set_replication_status(mut self, input: ::std::option::Option<crate::types::ReplicationStatus>) -> Self {
916 self.replication_status = input;
917 self
918 }
919 /// <p>Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.</p><note>
920 /// <p>This functionality is not supported for directory buckets.</p>
921 /// </note>
922 pub fn get_replication_status(&self) -> &::std::option::Option<crate::types::ReplicationStatus> {
923 &self.replication_status
924 }
925 /// <p>The count of parts this object has. This value is only returned if you specify <code>partNumber</code> in your request and the object was uploaded as a multipart upload.</p>
926 pub fn parts_count(mut self, input: i32) -> Self {
927 self.parts_count = ::std::option::Option::Some(input);
928 self
929 }
930 /// <p>The count of parts this object has. This value is only returned if you specify <code>partNumber</code> in your request and the object was uploaded as a multipart upload.</p>
931 pub fn set_parts_count(mut self, input: ::std::option::Option<i32>) -> Self {
932 self.parts_count = input;
933 self
934 }
935 /// <p>The count of parts this object has. This value is only returned if you specify <code>partNumber</code> in your request and the object was uploaded as a multipart upload.</p>
936 pub fn get_parts_count(&self) -> &::std::option::Option<i32> {
937 &self.parts_count
938 }
939 /// <p>The number of tags, if any, on the object, when you have the relevant permission to read object tags.</p>
940 /// <p>You can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> to retrieve the tag set associated with an object.</p><note>
941 /// <p>This functionality is not supported for directory buckets.</p>
942 /// </note>
943 pub fn tag_count(mut self, input: i32) -> Self {
944 self.tag_count = ::std::option::Option::Some(input);
945 self
946 }
947 /// <p>The number of tags, if any, on the object, when you have the relevant permission to read object tags.</p>
948 /// <p>You can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> to retrieve the tag set associated with an object.</p><note>
949 /// <p>This functionality is not supported for directory buckets.</p>
950 /// </note>
951 pub fn set_tag_count(mut self, input: ::std::option::Option<i32>) -> Self {
952 self.tag_count = input;
953 self
954 }
955 /// <p>The number of tags, if any, on the object, when you have the relevant permission to read object tags.</p>
956 /// <p>You can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html">GetObjectTagging</a> to retrieve the tag set associated with an object.</p><note>
957 /// <p>This functionality is not supported for directory buckets.</p>
958 /// </note>
959 pub fn get_tag_count(&self) -> &::std::option::Option<i32> {
960 &self.tag_count
961 }
962 /// <p>The Object Lock mode that's currently in place for this object.</p><note>
963 /// <p>This functionality is not supported for directory buckets.</p>
964 /// </note>
965 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
966 self.object_lock_mode = ::std::option::Option::Some(input);
967 self
968 }
969 /// <p>The Object Lock mode that's currently in place for this object.</p><note>
970 /// <p>This functionality is not supported for directory buckets.</p>
971 /// </note>
972 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
973 self.object_lock_mode = input;
974 self
975 }
976 /// <p>The Object Lock mode that's currently in place for this object.</p><note>
977 /// <p>This functionality is not supported for directory buckets.</p>
978 /// </note>
979 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
980 &self.object_lock_mode
981 }
982 /// <p>The date and time when this object's Object Lock will expire.</p><note>
983 /// <p>This functionality is not supported for directory buckets.</p>
984 /// </note>
985 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
986 self.object_lock_retain_until_date = ::std::option::Option::Some(input);
987 self
988 }
989 /// <p>The date and time when this object's Object Lock will expire.</p><note>
990 /// <p>This functionality is not supported for directory buckets.</p>
991 /// </note>
992 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
993 self.object_lock_retain_until_date = input;
994 self
995 }
996 /// <p>The date and time when this object's Object Lock will expire.</p><note>
997 /// <p>This functionality is not supported for directory buckets.</p>
998 /// </note>
999 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1000 &self.object_lock_retain_until_date
1001 }
1002 /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.</p><note>
1003 /// <p>This functionality is not supported for directory buckets.</p>
1004 /// </note>
1005 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1006 self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
1007 self
1008 }
1009 /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.</p><note>
1010 /// <p>This functionality is not supported for directory buckets.</p>
1011 /// </note>
1012 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1013 self.object_lock_legal_hold_status = input;
1014 self
1015 }
1016 /// <p>Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.</p><note>
1017 /// <p>This functionality is not supported for directory buckets.</p>
1018 /// </note>
1019 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1020 &self.object_lock_legal_hold_status
1021 }
1022 /// <p>The date and time at which the object is no longer cacheable.</p>
1023 #[deprecated(note = "Please use `expires_string` which contains the raw, unparsed value of this field.")]
1024 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1025 self.expires = ::std::option::Option::Some(input);
1026 self
1027 }
1028 /// <p>The date and time at which the object is no longer cacheable.</p>
1029 #[deprecated(note = "Please use `expires_string` which contains the raw, unparsed value of this field.")]
1030 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1031 self.expires = input;
1032 self
1033 }
1034 /// <p>The date and time at which the object is no longer cacheable.</p>
1035 #[deprecated(note = "Please use `expires_string` which contains the raw, unparsed value of this field.")]
1036 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1037 &self.expires
1038 }
1039 /// <p>The date and time at which the object is no longer cacheable.</p>
1040 pub fn expires_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1041 self.expires_string = ::std::option::Option::Some(input.into());
1042 self
1043 }
1044 /// <p>The date and time at which the object is no longer cacheable.</p>
1045 pub fn set_expires_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1046 self.expires_string = input;
1047 self
1048 }
1049 /// <p>The date and time at which the object is no longer cacheable.</p>
1050 pub fn get_expires_string(&self) -> &::std::option::Option<::std::string::String> {
1051 &self.expires_string
1052 }
1053 pub(crate) fn _extended_request_id(mut self, extended_request_id: impl Into<String>) -> Self {
1054 self._extended_request_id = Some(extended_request_id.into());
1055 self
1056 }
1057
1058 pub(crate) fn _set_extended_request_id(&mut self, extended_request_id: Option<String>) -> &mut Self {
1059 self._extended_request_id = extended_request_id;
1060 self
1061 }
1062 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
1063 self._request_id = Some(request_id.into());
1064 self
1065 }
1066
1067 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
1068 self._request_id = request_id;
1069 self
1070 }
1071 /// Consumes the builder and constructs a [`GetObjectOutput`](crate::operation::get_object::GetObjectOutput).
1072 pub fn build(self) -> crate::operation::get_object::GetObjectOutput {
1073 crate::operation::get_object::GetObjectOutput {
1074 body: self.body.unwrap_or_default(),
1075 delete_marker: self.delete_marker,
1076 accept_ranges: self.accept_ranges,
1077 expiration: self.expiration,
1078 restore: self.restore,
1079 last_modified: self.last_modified,
1080 content_length: self.content_length,
1081 e_tag: self.e_tag,
1082 checksum_crc32: self.checksum_crc32,
1083 checksum_crc32_c: self.checksum_crc32_c,
1084 checksum_sha1: self.checksum_sha1,
1085 checksum_sha256: self.checksum_sha256,
1086 missing_meta: self.missing_meta,
1087 version_id: self.version_id,
1088 cache_control: self.cache_control,
1089 content_disposition: self.content_disposition,
1090 content_encoding: self.content_encoding,
1091 content_language: self.content_language,
1092 content_range: self.content_range,
1093 content_type: self.content_type,
1094 website_redirect_location: self.website_redirect_location,
1095 server_side_encryption: self.server_side_encryption,
1096 metadata: self.metadata,
1097 sse_customer_algorithm: self.sse_customer_algorithm,
1098 sse_customer_key_md5: self.sse_customer_key_md5,
1099 ssekms_key_id: self.ssekms_key_id,
1100 bucket_key_enabled: self.bucket_key_enabled,
1101 storage_class: self.storage_class,
1102 request_charged: self.request_charged,
1103 replication_status: self.replication_status,
1104 parts_count: self.parts_count,
1105 tag_count: self.tag_count,
1106 object_lock_mode: self.object_lock_mode,
1107 object_lock_retain_until_date: self.object_lock_retain_until_date,
1108 object_lock_legal_hold_status: self.object_lock_legal_hold_status,
1109 expires: self.expires,
1110 expires_string: self.expires_string,
1111 _extended_request_id: self._extended_request_id,
1112 _request_id: self._request_id,
1113 }
1114 }
1115}
1116impl ::std::fmt::Debug for GetObjectOutputBuilder {
1117 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1118 let mut formatter = f.debug_struct("GetObjectOutputBuilder");
1119 formatter.field("body", &self.body);
1120 formatter.field("delete_marker", &self.delete_marker);
1121 formatter.field("accept_ranges", &self.accept_ranges);
1122 formatter.field("expiration", &self.expiration);
1123 formatter.field("restore", &self.restore);
1124 formatter.field("last_modified", &self.last_modified);
1125 formatter.field("content_length", &self.content_length);
1126 formatter.field("e_tag", &self.e_tag);
1127 formatter.field("checksum_crc32", &self.checksum_crc32);
1128 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
1129 formatter.field("checksum_sha1", &self.checksum_sha1);
1130 formatter.field("checksum_sha256", &self.checksum_sha256);
1131 formatter.field("missing_meta", &self.missing_meta);
1132 formatter.field("version_id", &self.version_id);
1133 formatter.field("cache_control", &self.cache_control);
1134 formatter.field("content_disposition", &self.content_disposition);
1135 formatter.field("content_encoding", &self.content_encoding);
1136 formatter.field("content_language", &self.content_language);
1137 formatter.field("content_range", &self.content_range);
1138 formatter.field("content_type", &self.content_type);
1139 formatter.field("website_redirect_location", &self.website_redirect_location);
1140 formatter.field("server_side_encryption", &self.server_side_encryption);
1141 formatter.field("metadata", &self.metadata);
1142 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
1143 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
1144 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
1145 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
1146 formatter.field("storage_class", &self.storage_class);
1147 formatter.field("request_charged", &self.request_charged);
1148 formatter.field("replication_status", &self.replication_status);
1149 formatter.field("parts_count", &self.parts_count);
1150 formatter.field("tag_count", &self.tag_count);
1151 formatter.field("object_lock_mode", &self.object_lock_mode);
1152 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
1153 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
1154 formatter.field("expires", &self.expires);
1155 formatter.field("expires_string", &self.expires_string);
1156 formatter.field("_extended_request_id", &self._extended_request_id);
1157 formatter.field("_request_id", &self._request_id);
1158 formatter.finish()
1159 }
1160}