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