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