aws_sdk_s3/operation/get_object/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_object::_get_object_output::GetObjectOutputBuilder;
3
4pub use crate::operation::get_object::_get_object_input::GetObjectInputBuilder;
5
6impl crate::operation::get_object::builders::GetObjectInputBuilder {
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::get_object::GetObjectOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_object::GetObjectError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_object();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetObject`.
24///
25/// <p>Retrieves an object from Amazon S3.</p>
26/// <p>In the <code>GetObject</code> request, specify the full key name for the object.</p>
27/// <p><b>General purpose buckets</b> - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code>, specify the object key name as <code>/photos/2006/February/sample.jpg</code>. For a path-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>examplebucket</code>, specify the object key name as <code>/examplebucket/photos/2006/February/sample.jpg</code>. For more information about request types, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket">HTTP Host Header Bucket Specification</a> in the <i>Amazon S3 User Guide</i>.</p>
28/// <p><b>Directory buckets</b> - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>amzn-s3-demo-bucket--usw2-az1--x-s3</code>, specify the object key name as <code>/photos/2006/February/sample.jpg</code>. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket-name</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>
29/// <dl>
30/// <dt>
31/// Permissions
32/// </dt>
33/// <dd>
34/// <ul>
35/// <li>
36/// <p><b>General purpose bucket permissions</b> - You must have the required permissions in a policy. To use <code>GetObject</code>, you must have the <code>READ</code> access to the object (or version). If you grant <code>READ</code> access to the anonymous user, the <code>GetObject</code> operation returns the object without using an authorization header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying permissions in a policy</a> in the <i>Amazon S3 User Guide</i>.</p>
37/// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p>
38/// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p>
39/// <p>If the object that you request doesn’t exist, the error that Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
40/// <ul>
41/// <li>
42/// <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>
43/// <li>
44/// <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code <code>403 Access Denied</code> error.</p></li>
45/// </ul></li>
46/// <li>
47/// <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>
48/// <p>If the object is encrypted using SSE-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.</p></li>
49/// </ul>
50/// </dd>
51/// <dt>
52/// Storage classes
53/// </dt>
54/// <dd>
55/// <p>If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. Otherwise, this operation returns an <code>InvalidObjectState</code> error. For information about restoring archived objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
56/// <p><b>Directory buckets </b> - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p>
57/// </dd>
58/// <dt>
59/// Encryption
60/// </dt>
61/// <dd>
62/// <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for the <code>GetObject</code> requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your <code>GetObject</code> requests for the object that uses these types of keys, you’ll get an HTTP <code>400 Bad Request</code> error.</p>
63/// <p><b>Directory buckets</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>
64/// </dd>
65/// <dt>
66/// Overriding response header values through the request
67/// </dt>
68/// <dd>
69/// <p>There are times when you want to override certain response header values of a <code>GetObject</code> response. For example, you might override the <code>Content-Disposition</code> response header value through your <code>GetObject</code> request.</p>
70/// <p>You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code <code>200 OK</code> is returned. The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object.</p>
71/// <p>The response headers that you can override for the <code>GetObject</code> response are <code>Cache-Control</code>, <code>Content-Disposition</code>, <code>Content-Encoding</code>, <code>Content-Language</code>, <code>Content-Type</code>, and <code>Expires</code>.</p>
72/// <p>To override values for a set of response headers in the <code>GetObject</code> response, you can use the following query parameters in the request.</p>
73/// <ul>
74/// <li>
75/// <p><code>response-cache-control</code></p></li>
76/// <li>
77/// <p><code>response-content-disposition</code></p></li>
78/// <li>
79/// <p><code>response-content-encoding</code></p></li>
80/// <li>
81/// <p><code>response-content-language</code></p></li>
82/// <li>
83/// <p><code>response-content-type</code></p></li>
84/// <li>
85/// <p><code>response-expires</code></p></li>
86/// </ul><note>
87/// <p>When you use these parameters, you must sign the request by using either an Authorization header or a presigned URL. These parameters cannot be used with an unsigned (anonymous) request.</p>
88/// </note>
89/// </dd>
90/// <dt>
91/// HTTP Host header syntax
92/// </dt>
93/// <dd>
94/// <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>
95/// </dd>
96/// </dl>
97/// <p>The following operations are related to <code>GetObject</code>:</p>
98/// <ul>
99/// <li>
100/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a></p></li>
101/// <li>
102/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</a></p></li>
103/// </ul>
104#[derive(::std::clone::Clone, ::std::fmt::Debug)]
105pub struct GetObjectFluentBuilder {
106    handle: ::std::sync::Arc<crate::client::Handle>,
107    inner: crate::operation::get_object::builders::GetObjectInputBuilder,
108    config_override: ::std::option::Option<crate::config::Builder>,
109}
110impl crate::client::customize::internal::CustomizableSend<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>
111    for GetObjectFluentBuilder
112{
113    fn send(
114        self,
115        config_override: crate::config::Builder,
116    ) -> crate::client::customize::internal::BoxFuture<
117        crate::client::customize::internal::SendResult<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>,
118    > {
119        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
120    }
121}
122impl GetObjectFluentBuilder {
123    /// Creates a new `GetObjectFluentBuilder`.
124    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
125        Self {
126            handle,
127            inner: ::std::default::Default::default(),
128            config_override: ::std::option::Option::None,
129        }
130    }
131    /// Access the GetObject as a reference.
132    pub fn as_input(&self) -> &crate::operation::get_object::builders::GetObjectInputBuilder {
133        &self.inner
134    }
135    /// Sends the request and returns the response.
136    ///
137    /// If an error occurs, an `SdkError` will be returned with additional details that
138    /// can be matched against.
139    ///
140    /// By default, any retryable failures will be retried twice. Retry behavior
141    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
142    /// set when configuring the client.
143    pub async fn send(
144        self,
145    ) -> ::std::result::Result<
146        crate::operation::get_object::GetObjectOutput,
147        ::aws_smithy_runtime_api::client::result::SdkError<
148            crate::operation::get_object::GetObjectError,
149            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
150        >,
151    > {
152        let input = self
153            .inner
154            .build()
155            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
156        let runtime_plugins = crate::operation::get_object::GetObject::operation_runtime_plugins(
157            self.handle.runtime_plugins.clone(),
158            &self.handle.conf,
159            self.config_override,
160        );
161        crate::operation::get_object::GetObject::orchestrate(&runtime_plugins, input).await
162    }
163
164    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
165    pub fn customize(
166        self,
167    ) -> crate::client::customize::CustomizableOperation<
168        crate::operation::get_object::GetObjectOutput,
169        crate::operation::get_object::GetObjectError,
170        Self,
171    > {
172        crate::client::customize::CustomizableOperation::new(self)
173    }
174    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
175        self.set_config_override(::std::option::Option::Some(config_override.into()));
176        self
177    }
178
179    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
180        self.config_override = config_override;
181        self
182    }
183    ///
184    /// Creates a presigned request for this operation.
185    ///
186    /// The `presigning_config` provides additional presigning-specific config values, such as the
187    /// amount of time the request should be valid for after creation.
188    ///
189    /// Presigned requests can be given to other users or applications to access a resource or perform
190    /// an operation without having access to the AWS security credentials.
191    ///
192    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
193    /// the presigned request can only be valid for as long as the credentials used to create it are.
194    ///
195    #[allow(unused_mut)]
196    pub async fn presigned(
197        mut self,
198        presigning_config: crate::presigning::PresigningConfig,
199    ) -> ::std::result::Result<
200        crate::presigning::PresignedRequest,
201        ::aws_smithy_runtime_api::client::result::SdkError<
202            crate::operation::get_object::GetObjectError,
203            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
204        >,
205    > {
206        let runtime_plugins = crate::operation::get_object::GetObject::operation_runtime_plugins(
207            self.handle.runtime_plugins.clone(),
208            &self.handle.conf,
209            self.config_override,
210        )
211        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
212            presigning_config,
213            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
214        ));
215
216        let input = self
217            .inner
218            .build()
219            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
220        let mut context = crate::operation::get_object::GetObject::orchestrate_with_stop_point(
221            &runtime_plugins,
222            input,
223            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
224        )
225        .await
226        .map_err(|err| {
227            err.map_service_error(|err| {
228                err.downcast::<crate::operation::get_object::GetObjectError>()
229                    .expect("correct error type")
230            })
231        })?;
232        let request = context.take_request().expect("request set before transmit");
233        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
234    }
235    /// <p>The bucket name containing the object.</p>
236    /// <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>
237    /// <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>
238    /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
239    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
240    /// </note>
241    /// <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>
242    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.inner = self.inner.bucket(input.into());
244        self
245    }
246    /// <p>The bucket name containing the object.</p>
247    /// <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>
248    /// <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>
249    /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
250    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
251    /// </note>
252    /// <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>
253    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254        self.inner = self.inner.set_bucket(input);
255        self
256    }
257    /// <p>The bucket name containing the object.</p>
258    /// <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>
259    /// <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>
260    /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
261    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
262    /// </note>
263    /// <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>
264    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
265        self.inner.get_bucket()
266    }
267    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
268    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
269    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
270    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271        self.inner = self.inner.if_match(input.into());
272        self
273    }
274    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
275    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
276    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
277    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278        self.inner = self.inner.set_if_match(input);
279        self
280    }
281    /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
282    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
283    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
284    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
285        self.inner.get_if_match()
286    }
287    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
288    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
289    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
290    pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
291        self.inner = self.inner.if_modified_since(input);
292        self
293    }
294    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
295    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
296    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
297    pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
298        self.inner = self.inner.set_if_modified_since(input);
299        self
300    }
301    /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
302    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
303    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
304    pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
305        self.inner.get_if_modified_since()
306    }
307    /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
308    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
309    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
310    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
311        self.inner = self.inner.if_none_match(input.into());
312        self
313    }
314    /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
315    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
316    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
317    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
318        self.inner = self.inner.set_if_none_match(input);
319        self
320    }
321    /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
322    /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
323    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
324    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
325        self.inner.get_if_none_match()
326    }
327    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
328    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
329    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
330    pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
331        self.inner = self.inner.if_unmodified_since(input);
332        self
333    }
334    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
335    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
336    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
337    pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
338        self.inner = self.inner.set_if_unmodified_since(input);
339        self
340    }
341    /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
342    /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
343    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
344    pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
345        self.inner.get_if_unmodified_since()
346    }
347    /// <p>Key of the object to get.</p>
348    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
349        self.inner = self.inner.key(input.into());
350        self
351    }
352    /// <p>Key of the object to get.</p>
353    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
354        self.inner = self.inner.set_key(input);
355        self
356    }
357    /// <p>Key of the object to get.</p>
358    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
359        self.inner.get_key()
360    }
361    /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
362    /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
363    /// </note>
364    pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365        self.inner = self.inner.range(input.into());
366        self
367    }
368    /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
369    /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
370    /// </note>
371    pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372        self.inner = self.inner.set_range(input);
373        self
374    }
375    /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
376    /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
377    /// </note>
378    pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
379        self.inner.get_range()
380    }
381    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
382    pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383        self.inner = self.inner.response_cache_control(input.into());
384        self
385    }
386    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
387    pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.inner = self.inner.set_response_cache_control(input);
389        self
390    }
391    /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
392    pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
393        self.inner.get_response_cache_control()
394    }
395    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
396    pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
397        self.inner = self.inner.response_content_disposition(input.into());
398        self
399    }
400    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
401    pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
402        self.inner = self.inner.set_response_content_disposition(input);
403        self
404    }
405    /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
406    pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
407        self.inner.get_response_content_disposition()
408    }
409    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
410    pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
411        self.inner = self.inner.response_content_encoding(input.into());
412        self
413    }
414    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
415    pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
416        self.inner = self.inner.set_response_content_encoding(input);
417        self
418    }
419    /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
420    pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
421        self.inner.get_response_content_encoding()
422    }
423    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
424    pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
425        self.inner = self.inner.response_content_language(input.into());
426        self
427    }
428    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
429    pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
430        self.inner = self.inner.set_response_content_language(input);
431        self
432    }
433    /// <p>Sets the <code>Content-Language</code> header of the response.</p>
434    pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
435        self.inner.get_response_content_language()
436    }
437    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
438    pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
439        self.inner = self.inner.response_content_type(input.into());
440        self
441    }
442    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
443    pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
444        self.inner = self.inner.set_response_content_type(input);
445        self
446    }
447    /// <p>Sets the <code>Content-Type</code> header of the response.</p>
448    pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
449        self.inner.get_response_content_type()
450    }
451    /// <p>Sets the <code>Expires</code> header of the response.</p>
452    pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
453        self.inner = self.inner.response_expires(input);
454        self
455    }
456    /// <p>Sets the <code>Expires</code> header of the response.</p>
457    pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
458        self.inner = self.inner.set_response_expires(input);
459        self
460    }
461    /// <p>Sets the <code>Expires</code> header of the response.</p>
462    pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
463        self.inner.get_response_expires()
464    }
465    /// <p>Version ID used to reference a specific version of the object.</p>
466    /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
467    /// <ul>
468    /// <li>
469    /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
470    /// <li>
471    /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
472    /// <li>
473    /// <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>
474    /// </ul>
475    /// </note>
476    /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
477    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
478        self.inner = self.inner.version_id(input.into());
479        self
480    }
481    /// <p>Version ID used to reference a specific version of the object.</p>
482    /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
483    /// <ul>
484    /// <li>
485    /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
486    /// <li>
487    /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
488    /// <li>
489    /// <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>
490    /// </ul>
491    /// </note>
492    /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
493    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
494        self.inner = self.inner.set_version_id(input);
495        self
496    }
497    /// <p>Version ID used to reference a specific version of the object.</p>
498    /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
499    /// <ul>
500    /// <li>
501    /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
502    /// <li>
503    /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
504    /// <li>
505    /// <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>
506    /// </ul>
507    /// </note>
508    /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
509    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
510        self.inner.get_version_id()
511    }
512    /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
513    /// <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 GET the object, you must use the following headers:</p>
514    /// <ul>
515    /// <li>
516    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
517    /// <li>
518    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
519    /// <li>
520    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
521    /// </ul>
522    /// <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>
523    /// <p>This functionality is not supported for directory buckets.</p>
524    /// </note>
525    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
526        self.inner = self.inner.sse_customer_algorithm(input.into());
527        self
528    }
529    /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
530    /// <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 GET the object, you must use the following headers:</p>
531    /// <ul>
532    /// <li>
533    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
534    /// <li>
535    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
536    /// <li>
537    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
538    /// </ul>
539    /// <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>
540    /// <p>This functionality is not supported for directory buckets.</p>
541    /// </note>
542    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
543        self.inner = self.inner.set_sse_customer_algorithm(input);
544        self
545    }
546    /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
547    /// <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 GET the object, you must use the following headers:</p>
548    /// <ul>
549    /// <li>
550    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
551    /// <li>
552    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
553    /// <li>
554    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
555    /// </ul>
556    /// <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>
557    /// <p>This functionality is not supported for directory buckets.</p>
558    /// </note>
559    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
560        self.inner.get_sse_customer_algorithm()
561    }
562    /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
563    /// <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 GET the object, you must use the following headers:</p>
564    /// <ul>
565    /// <li>
566    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
567    /// <li>
568    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
569    /// <li>
570    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
571    /// </ul>
572    /// <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>
573    /// <p>This functionality is not supported for directory buckets.</p>
574    /// </note>
575    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
576        self.inner = self.inner.sse_customer_key(input.into());
577        self
578    }
579    /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
580    /// <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 GET the object, you must use the following headers:</p>
581    /// <ul>
582    /// <li>
583    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
584    /// <li>
585    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
586    /// <li>
587    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
588    /// </ul>
589    /// <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>
590    /// <p>This functionality is not supported for directory buckets.</p>
591    /// </note>
592    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
593        self.inner = self.inner.set_sse_customer_key(input);
594        self
595    }
596    /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
597    /// <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 GET the object, you must use the following headers:</p>
598    /// <ul>
599    /// <li>
600    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
601    /// <li>
602    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
603    /// <li>
604    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
605    /// </ul>
606    /// <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>
607    /// <p>This functionality is not supported for directory buckets.</p>
608    /// </note>
609    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
610        self.inner.get_sse_customer_key()
611    }
612    /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
613    /// <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 GET the object, you must use the following headers:</p>
614    /// <ul>
615    /// <li>
616    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
617    /// <li>
618    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
619    /// <li>
620    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
621    /// </ul>
622    /// <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>
623    /// <p>This functionality is not supported for directory buckets.</p>
624    /// </note>
625    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
626        self.inner = self.inner.sse_customer_key_md5(input.into());
627        self
628    }
629    /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
630    /// <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 GET the object, you must use the following headers:</p>
631    /// <ul>
632    /// <li>
633    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
634    /// <li>
635    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
636    /// <li>
637    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
638    /// </ul>
639    /// <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>
640    /// <p>This functionality is not supported for directory buckets.</p>
641    /// </note>
642    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
643        self.inner = self.inner.set_sse_customer_key_md5(input);
644        self
645    }
646    /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
647    /// <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 GET the object, you must use the following headers:</p>
648    /// <ul>
649    /// <li>
650    /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
651    /// <li>
652    /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
653    /// <li>
654    /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
655    /// </ul>
656    /// <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>
657    /// <p>This functionality is not supported for directory buckets.</p>
658    /// </note>
659    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
660        self.inner.get_sse_customer_key_md5()
661    }
662    /// <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>
663    /// <p>This functionality is not supported for directory buckets.</p>
664    /// </note>
665    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
666        self.inner = self.inner.request_payer(input);
667        self
668    }
669    /// <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>
670    /// <p>This functionality is not supported for directory buckets.</p>
671    /// </note>
672    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
673        self.inner = self.inner.set_request_payer(input);
674        self
675    }
676    /// <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>
677    /// <p>This functionality is not supported for directory buckets.</p>
678    /// </note>
679    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
680        self.inner.get_request_payer()
681    }
682    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
683    pub fn part_number(mut self, input: i32) -> Self {
684        self.inner = self.inner.part_number(input);
685        self
686    }
687    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
688    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
689        self.inner = self.inner.set_part_number(input);
690        self
691    }
692    /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
693    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
694        self.inner.get_part_number()
695    }
696    /// <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>
697    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
698        self.inner = self.inner.expected_bucket_owner(input.into());
699        self
700    }
701    /// <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>
702    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
703        self.inner = self.inner.set_expected_bucket_owner(input);
704        self
705    }
706    /// <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>
707    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
708        self.inner.get_expected_bucket_owner()
709    }
710    /// <p>To retrieve the checksum, this mode must be enabled.</p>
711    pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
712        self.inner = self.inner.checksum_mode(input);
713        self
714    }
715    /// <p>To retrieve the checksum, this mode must be enabled.</p>
716    pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
717        self.inner = self.inner.set_checksum_mode(input);
718        self
719    }
720    /// <p>To retrieve the checksum, this mode must be enabled.</p>
721    pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
722        self.inner.get_checksum_mode()
723    }
724}
725
726impl crate::client::customize::internal::CustomizablePresigned<crate::operation::get_object::GetObjectError> for GetObjectFluentBuilder {
727    fn presign(
728        self,
729        config_override: crate::config::Builder,
730        presigning_config: crate::presigning::PresigningConfig,
731    ) -> crate::client::customize::internal::BoxFuture<
732        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::get_object::GetObjectError>,
733    > {
734        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
735    }
736}