aws_sdk_s3/operation/head_object/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::head_object::_head_object_output::HeadObjectOutputBuilder;
3
4pub use crate::operation::head_object::_head_object_input::HeadObjectInputBuilder;
5
6impl crate::operation::head_object::builders::HeadObjectInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::head_object::HeadObjectOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::head_object::HeadObjectError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.head_object();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `HeadObject`.
24///
25/// <p>The <code>HEAD</code> operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.</p><note>
26/// <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an object. The response is identical to the <code>GET</code> response except that there is no response body. Because of this, if the <code>HEAD</code> request generates an error, it returns a generic code, such as <code>400 Bad Request</code>, <code>403 Forbidden</code>, <code>404 Not Found</code>, <code>405 Method Not Allowed</code>, <code>412 Precondition Failed</code>, or <code>304 Not Modified</code>. It's not possible to retrieve the exact exception of these error codes.</p>
27/// </note>
28/// <p>Request headers are limited to 8 KB in size. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html">Common Request Headers</a>.</p>
29/// <dl>
30/// <dt>
31/// Permissions
32/// </dt>
33/// <dd>
34/// <p></p>
35/// <ul>
36/// <li>
37/// <p><b>General purpose bucket permissions</b> - To use <code>HEAD</code>, you must have the <code>s3:GetObject</code> permission. You need the relevant read object (or version) permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition keys for Amazon S3</a> in the <i>Amazon S3 User Guide</i>. For more information about the permissions to S3 API operations by S3 resource types, see <a href="/AmazonS3/latest/userguide/using-with-s3-policy-actions.html">Required permissions for Amazon S3 API operations</a> in the <i>Amazon S3 User Guide</i>.</p>
38/// <p>If the object you request doesn't exist, the error that Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
39/// <ul>
40/// <li>
41/// <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 returns an HTTP status code <code>404 Not Found</code> error.</p></li>
42/// <li>
43/// <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code <code>403 Forbidden</code> error.</p></li>
44/// </ul></li>
45/// <li>
46/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p>
47/// <p>If you enable <code>x-amz-checksum-mode</code> in the request and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p></li>
48/// </ul>
49/// </dd>
50/// <dt>
51/// Encryption
52/// </dt>
53/// <dd>
54/// <note>
55/// <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for <code>HEAD</code> requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The <code>x-amz-server-side-encryption</code> header is used when you <code>PUT</code> an object to S3 and want to specify the encryption method. If you include this header in a <code>HEAD</code> request for an object that uses these types of keys, you’ll get an HTTP <code>400 Bad Request</code> error. It's because the encryption method can't be changed when you retrieve the object.</p>
56/// </note>
57/// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:</p>
58/// <ul>
59/// <li>
60/// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
61/// <li>
62/// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
63/// <li>
64/// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
65/// </ul>
66/// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
67/// <p><b>Directory bucket </b> - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
68/// </note>
69/// </dd>
70/// <dt>
71/// Versioning
72/// </dt>
73/// <dd>
74/// <ul>
75/// <li>
76/// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
77/// <li>
78/// <p>If the specified version is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
79/// </ul><note>
80/// <ul>
81/// <li>
82/// <p><b>Directory buckets</b> - Delete marker is not supported for directory buckets.</p></li>
83/// <li>
84/// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
85/// </ul>
86/// </note>
87/// </dd>
88/// <dt>
89/// HTTP Host header syntax
90/// </dt>
91/// <dd>
92/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p><note>
93/// <p>For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p>
94/// </note>
95/// </dd>
96/// </dl>
97/// <p>The following actions are related to <code>HeadObject</code>:</p>
98/// <ul>
99/// <li>
100/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
101/// <li>
102/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html">GetObjectAttributes</a></p></li>
103/// </ul>
104#[derive(::std::clone::Clone, ::std::fmt::Debug)]
105pub struct HeadObjectFluentBuilder {
106    handle: ::std::sync::Arc<crate::client::Handle>,
107    inner: crate::operation::head_object::builders::HeadObjectInputBuilder,
108    config_override: ::std::option::Option<crate::config::Builder>,
109}
110impl
111    crate::client::customize::internal::CustomizableSend<
112        crate::operation::head_object::HeadObjectOutput,
113        crate::operation::head_object::HeadObjectError,
114    > for HeadObjectFluentBuilder
115{
116    fn send(
117        self,
118        config_override: crate::config::Builder,
119    ) -> crate::client::customize::internal::BoxFuture<
120        crate::client::customize::internal::SendResult<
121            crate::operation::head_object::HeadObjectOutput,
122            crate::operation::head_object::HeadObjectError,
123        >,
124    > {
125        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
126    }
127}
128impl HeadObjectFluentBuilder {
129    /// Creates a new `HeadObjectFluentBuilder`.
130    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
131        Self {
132            handle,
133            inner: ::std::default::Default::default(),
134            config_override: ::std::option::Option::None,
135        }
136    }
137    /// Access the HeadObject as a reference.
138    pub fn as_input(&self) -> &crate::operation::head_object::builders::HeadObjectInputBuilder {
139        &self.inner
140    }
141    /// Sends the request and returns the response.
142    ///
143    /// If an error occurs, an `SdkError` will be returned with additional details that
144    /// can be matched against.
145    ///
146    /// By default, any retryable failures will be retried twice. Retry behavior
147    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
148    /// set when configuring the client.
149    pub async fn send(
150        self,
151    ) -> ::std::result::Result<
152        crate::operation::head_object::HeadObjectOutput,
153        ::aws_smithy_runtime_api::client::result::SdkError<
154            crate::operation::head_object::HeadObjectError,
155            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
156        >,
157    > {
158        let input = self
159            .inner
160            .build()
161            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
162        let runtime_plugins = crate::operation::head_object::HeadObject::operation_runtime_plugins(
163            self.handle.runtime_plugins.clone(),
164            &self.handle.conf,
165            self.config_override,
166        );
167        crate::operation::head_object::HeadObject::orchestrate(&runtime_plugins, input).await
168    }
169
170    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
171    pub fn customize(
172        self,
173    ) -> crate::client::customize::CustomizableOperation<
174        crate::operation::head_object::HeadObjectOutput,
175        crate::operation::head_object::HeadObjectError,
176        Self,
177    > {
178        crate::client::customize::CustomizableOperation::new(self)
179    }
180    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
181        self.set_config_override(::std::option::Option::Some(config_override.into()));
182        self
183    }
184
185    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
186        self.config_override = config_override;
187        self
188    }
189    ///
190    /// Creates a presigned request for this operation.
191    ///
192    /// The `presigning_config` provides additional presigning-specific config values, such as the
193    /// amount of time the request should be valid for after creation.
194    ///
195    /// Presigned requests can be given to other users or applications to access a resource or perform
196    /// an operation without having access to the AWS security credentials.
197    ///
198    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
199    /// the presigned request can only be valid for as long as the credentials used to create it are.
200    ///
201    #[allow(unused_mut)]
202    pub async fn presigned(
203        mut self,
204        presigning_config: crate::presigning::PresigningConfig,
205    ) -> ::std::result::Result<
206        crate::presigning::PresignedRequest,
207        ::aws_smithy_runtime_api::client::result::SdkError<
208            crate::operation::head_object::HeadObjectError,
209            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
210        >,
211    > {
212        let runtime_plugins = crate::operation::head_object::HeadObject::operation_runtime_plugins(
213            self.handle.runtime_plugins.clone(),
214            &self.handle.conf,
215            self.config_override,
216        )
217        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
218            presigning_config,
219            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
220        ));
221
222        let input = self
223            .inner
224            .build()
225            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
226        let mut context = crate::operation::head_object::HeadObject::orchestrate_with_stop_point(
227            &runtime_plugins,
228            input,
229            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
230        )
231        .await
232        .map_err(|err| {
233            err.map_service_error(|err| {
234                err.downcast::<crate::operation::head_object::HeadObjectError>()
235                    .expect("correct error type")
236            })
237        })?;
238        let request = context.take_request().expect("request set before transmit");
239        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
240    }
241    /// <p>The name of the bucket that contains the object.</p>
242    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
243    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
244    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
245    /// </note>
246    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
247    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248        self.inner = self.inner.bucket(input.into());
249        self
250    }
251    /// <p>The name of the bucket that contains the object.</p>
252    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
253    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
254    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
255    /// </note>
256    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
257    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258        self.inner = self.inner.set_bucket(input);
259        self
260    }
261    /// <p>The name of the bucket that contains the object.</p>
262    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
263    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
264    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
265    /// </note>
266    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
267    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
268        self.inner.get_bucket()
269    }
270    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
271    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
272    /// <ul>
273    /// <li>
274    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
275    /// <li>
276    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
277    /// </ul>
278    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
279    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
280    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.inner = self.inner.if_match(input.into());
282        self
283    }
284    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
285    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
286    /// <ul>
287    /// <li>
288    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
289    /// <li>
290    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
291    /// </ul>
292    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
293    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
294    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
295        self.inner = self.inner.set_if_match(input);
296        self
297    }
298    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
299    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
300    /// <ul>
301    /// <li>
302    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
303    /// <li>
304    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
305    /// </ul>
306    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
307    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
308    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
309        self.inner.get_if_match()
310    }
311    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
312    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
313    /// <ul>
314    /// <li>
315    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
316    /// <li>
317    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
318    /// </ul>
319    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
320    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
321    pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
322        self.inner = self.inner.if_modified_since(input);
323        self
324    }
325    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
326    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
327    /// <ul>
328    /// <li>
329    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
330    /// <li>
331    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
332    /// </ul>
333    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
334    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
335    pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
336        self.inner = self.inner.set_if_modified_since(input);
337        self
338    }
339    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
340    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
341    /// <ul>
342    /// <li>
343    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
344    /// <li>
345    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
346    /// </ul>
347    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
348    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
349    pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
350        self.inner.get_if_modified_since()
351    }
352    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
353    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
354    /// <ul>
355    /// <li>
356    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
357    /// <li>
358    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
359    /// </ul>
360    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
361    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
362    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
363        self.inner = self.inner.if_none_match(input.into());
364        self
365    }
366    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
367    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
368    /// <ul>
369    /// <li>
370    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
371    /// <li>
372    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
373    /// </ul>
374    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
375    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
376    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
377        self.inner = self.inner.set_if_none_match(input);
378        self
379    }
380    /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
381    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
382    /// <ul>
383    /// <li>
384    /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
385    /// <li>
386    /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
387    /// </ul>
388    /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
389    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
390    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
391        self.inner.get_if_none_match()
392    }
393    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
394    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
395    /// <ul>
396    /// <li>
397    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
398    /// <li>
399    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
400    /// </ul>
401    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
402    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
403    pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
404        self.inner = self.inner.if_unmodified_since(input);
405        self
406    }
407    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
408    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
409    /// <ul>
410    /// <li>
411    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
412    /// <li>
413    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
414    /// </ul>
415    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
416    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
417    pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
418        self.inner = self.inner.set_if_unmodified_since(input);
419        self
420    }
421    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
422    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
423    /// <ul>
424    /// <li>
425    /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
426    /// <li>
427    /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
428    /// </ul>
429    /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
430    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
431    pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
432        self.inner.get_if_unmodified_since()
433    }
434    /// <p>The object key.</p>
435    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
436        self.inner = self.inner.key(input.into());
437        self
438    }
439    /// <p>The object key.</p>
440    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
441        self.inner = self.inner.set_key(input);
442        self
443    }
444    /// <p>The object key.</p>
445    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
446        self.inner.get_key()
447    }
448    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
449    pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
450        self.inner = self.inner.range(input.into());
451        self
452    }
453    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
454    pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
455        self.inner = self.inner.set_range(input);
456        self
457    }
458    /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
459    pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
460        self.inner.get_range()
461    }
462    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
463    pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
464        self.inner = self.inner.response_cache_control(input.into());
465        self
466    }
467    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
468    pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
469        self.inner = self.inner.set_response_cache_control(input);
470        self
471    }
472    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
473    pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
474        self.inner.get_response_cache_control()
475    }
476    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
477    pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478        self.inner = self.inner.response_content_disposition(input.into());
479        self
480    }
481    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
482    pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
483        self.inner = self.inner.set_response_content_disposition(input);
484        self
485    }
486    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
487    pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
488        self.inner.get_response_content_disposition()
489    }
490    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
491    pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
492        self.inner = self.inner.response_content_encoding(input.into());
493        self
494    }
495    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
496    pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
497        self.inner = self.inner.set_response_content_encoding(input);
498        self
499    }
500    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
501    pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
502        self.inner.get_response_content_encoding()
503    }
504    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
505    pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
506        self.inner = self.inner.response_content_language(input.into());
507        self
508    }
509    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
510    pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
511        self.inner = self.inner.set_response_content_language(input);
512        self
513    }
514    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
515    pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
516        self.inner.get_response_content_language()
517    }
518    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
519    pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520        self.inner = self.inner.response_content_type(input.into());
521        self
522    }
523    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
524    pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525        self.inner = self.inner.set_response_content_type(input);
526        self
527    }
528    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
529    pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
530        self.inner.get_response_content_type()
531    }
532    /// <p>Sets the <code>Expires</code> header of the response.</p>
533    pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
534        self.inner = self.inner.response_expires(input);
535        self
536    }
537    /// <p>Sets the <code>Expires</code> header of the response.</p>
538    pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
539        self.inner = self.inner.set_response_expires(input);
540        self
541    }
542    /// <p>Sets the <code>Expires</code> header of the response.</p>
543    pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
544        self.inner.get_response_expires()
545    }
546    /// <p>Version ID used to reference a specific version of the object.</p><note>
547    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
548    /// </note>
549    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
550        self.inner = self.inner.version_id(input.into());
551        self
552    }
553    /// <p>Version ID used to reference a specific version of the object.</p><note>
554    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
555    /// </note>
556    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
557        self.inner = self.inner.set_version_id(input);
558        self
559    }
560    /// <p>Version ID used to reference a specific version of the object.</p><note>
561    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
562    /// </note>
563    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
564        self.inner.get_version_id()
565    }
566    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
567    /// <p>This functionality is not supported for directory buckets.</p>
568    /// </note>
569    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
570        self.inner = self.inner.sse_customer_algorithm(input.into());
571        self
572    }
573    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
574    /// <p>This functionality is not supported for directory buckets.</p>
575    /// </note>
576    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
577        self.inner = self.inner.set_sse_customer_algorithm(input);
578        self
579    }
580    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
581    /// <p>This functionality is not supported for directory buckets.</p>
582    /// </note>
583    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
584        self.inner.get_sse_customer_algorithm()
585    }
586    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
587    /// <p>This functionality is not supported for directory buckets.</p>
588    /// </note>
589    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
590        self.inner = self.inner.sse_customer_key(input.into());
591        self
592    }
593    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
594    /// <p>This functionality is not supported for directory buckets.</p>
595    /// </note>
596    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
597        self.inner = self.inner.set_sse_customer_key(input);
598        self
599    }
600    /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
601    /// <p>This functionality is not supported for directory buckets.</p>
602    /// </note>
603    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
604        self.inner.get_sse_customer_key()
605    }
606    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
607    /// <p>This functionality is not supported for directory buckets.</p>
608    /// </note>
609    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
610        self.inner = self.inner.sse_customer_key_md5(input.into());
611        self
612    }
613    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
614    /// <p>This functionality is not supported for directory buckets.</p>
615    /// </note>
616    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
617        self.inner = self.inner.set_sse_customer_key_md5(input);
618        self
619    }
620    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
621    /// <p>This functionality is not supported for directory buckets.</p>
622    /// </note>
623    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
624        self.inner.get_sse_customer_key_md5()
625    }
626    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
627    /// <p>This functionality is not supported for directory buckets.</p>
628    /// </note>
629    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
630        self.inner = self.inner.request_payer(input);
631        self
632    }
633    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
634    /// <p>This functionality is not supported for directory buckets.</p>
635    /// </note>
636    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
637        self.inner = self.inner.set_request_payer(input);
638        self
639    }
640    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
641    /// <p>This functionality is not supported for directory buckets.</p>
642    /// </note>
643    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
644        self.inner.get_request_payer()
645    }
646    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
647    pub fn part_number(mut self, input: i32) -> Self {
648        self.inner = self.inner.part_number(input);
649        self
650    }
651    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
652    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
653        self.inner = self.inner.set_part_number(input);
654        self
655    }
656    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
657    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
658        self.inner.get_part_number()
659    }
660    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
661    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
662        self.inner = self.inner.expected_bucket_owner(input.into());
663        self
664    }
665    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
666    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
667        self.inner = self.inner.set_expected_bucket_owner(input);
668        self
669    }
670    /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
671    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
672        self.inner.get_expected_bucket_owner()
673    }
674    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
675    /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
676    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
677    pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
678        self.inner = self.inner.checksum_mode(input);
679        self
680    }
681    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
682    /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
683    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
684    pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
685        self.inner = self.inner.set_checksum_mode(input);
686        self
687    }
688    /// <p>To retrieve the checksum, this parameter must be enabled.</p>
689    /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
690    /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
691    pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
692        self.inner.get_checksum_mode()
693    }
694}
695
696impl crate::client::customize::internal::CustomizablePresigned<crate::operation::head_object::HeadObjectError> for HeadObjectFluentBuilder {
697    fn presign(
698        self,
699        config_override: crate::config::Builder,
700        presigning_config: crate::presigning::PresigningConfig,
701    ) -> crate::client::customize::internal::BoxFuture<
702        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::head_object::HeadObjectError>,
703    > {
704        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
705    }
706}