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