aws_sdk_s3/operation/create_multipart_upload/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_multipart_upload::_create_multipart_upload_output::CreateMultipartUploadOutputBuilder;
3
4pub use crate::operation::create_multipart_upload::_create_multipart_upload_input::CreateMultipartUploadInputBuilder;
5
6impl crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder {
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::create_multipart_upload::CreateMultipartUploadOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_multipart_upload::CreateMultipartUploadError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_multipart_upload();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateMultipartUpload`.
24///
25/// <important>
26/// <p>End of support notice: Beginning October 1, 2025, Amazon S3 will discontinue support for creating new Email Grantee Access Control Lists (ACL). Email Grantee ACLs created prior to this date will continue to work and remain accessible through the Amazon Web Services Management Console, Command Line Interface (CLI), SDKs, and REST API. However, you will no longer be able to create new Email Grantee ACLs.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region, Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
28/// </important>
29/// <p>This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide</i>.</p><note>
30/// <p>After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload.</p>
31/// </note>
32/// <p>If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration</a>.</p><note>
33/// <ul>
34/// <li>
35/// <p><b>Directory buckets </b> - S3 Lifecycle is not supported by directory buckets.</p></li>
36/// <li>
37/// <p><b>Directory buckets </b> - 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></li>
38/// </ul>
39/// </note>
40/// <dl>
41/// <dt>
42/// Request signing
43/// </dt>
44/// <dd>
45/// <p>For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 User Guide</i>.</p>
46/// </dd>
47/// <dt>
48/// Permissions
49/// </dt>
50/// <dd>
51/// <ul>
52/// <li>
53/// <p><b>General purpose bucket permissions</b> - To perform a multipart upload with encryption using an Key Management Service (KMS) KMS key, the requester must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey</code> actions on the key. The requester must also have permissions for the <code>kms:GenerateDataKey</code> action for the <code>CreateMultipartUpload</code> API. Then, the requester needs permissions for the <code>kms:Decrypt</code> action on the <code>UploadPart</code> and <code>UploadPartCopy</code> APIs. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with Amazon Web Services KMS</a> in the <i>Amazon S3 User Guide</i>.</p></li>
54/// <li>
55/// <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></li>
56/// </ul>
57/// </dd>
58/// <dt>
59/// Encryption
60/// </dt>
61/// <dd>
62/// <ul>
63/// <li>
64/// <p><b>General purpose buckets</b> - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. Amazon S3 automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a multipart upload, if you don't specify encryption information in your request, the encryption setting of the uploaded parts is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded parts. When you perform a CreateMultipartUpload operation, if you want to use a different type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the object with a different encryption key (such as an Amazon S3 managed key, a KMS key, or a customer-provided key). When the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If you choose to provide your own encryption key, the request headers you provide in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> requests must match the headers you used in the <code>CreateMultipartUpload</code> request.</p>
65/// <ul>
66/// <li>
67/// <p>Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (<code>aws/s3</code>) and KMS customer managed keys stored in Key Management Service (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, specify the following headers in the request.</p>
68/// <ul>
69/// <li>
70/// <p><code>x-amz-server-side-encryption</code></p></li>
71/// <li>
72/// <p><code>x-amz-server-side-encryption-aws-kms-key-id</code></p></li>
73/// <li>
74/// <p><code>x-amz-server-side-encryption-context</code></p></li>
75/// </ul><note>
76/// <ul>
77/// <li>
78/// <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don't provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code> key) in KMS to protect the data.</p></li>
79/// <li>
80/// <p>To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey*</code> actions on the key. These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with Amazon Web Services KMS</a> in the <i>Amazon S3 User Guide</i>.</p></li>
81/// <li>
82/// <p>If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key, then you must have these permissions on the key policy. If your IAM user or role is in a different account from the key, then you must have the permissions on both the key policy and your IAM user or role.</p></li>
83/// <li>
84/// <p>All <code>GET</code> and <code>PUT</code> requests for an object protected by KMS fail if you don't make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version 4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p></li>
85/// </ul>
86/// </note>
87/// <p>For more information about server-side encryption with KMS keys (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with KMS keys</a> in the <i>Amazon S3 User Guide</i>.</p></li>
88/// <li>
89/// <p>Use customer-provided encryption keys (SSE-C) – If you want to manage your own encryption keys, provide all the following headers in the request.</p>
90/// <ul>
91/// <li>
92/// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
93/// <li>
94/// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
95/// <li>
96/// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
97/// </ul>
98/// <p>For more information about server-side encryption with customer-provided encryption keys (SSE-C), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html"> Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)</a> in the <i>Amazon S3 User Guide</i>.</p></li>
99/// </ul></li>
100/// <li>
101/// <p><b>Directory buckets</b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. 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>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
102/// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
103/// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
104/// </note> <note>
105/// <p>For directory buckets, when you perform a <code>CreateMultipartUpload</code> operation and an <code>UploadPartCopy</code> operation, the request headers you provide in the <code>CreateMultipartUpload</code> request must match the default encryption configuration of the destination bucket.</p>
106/// </note></li>
107/// </ul>
108/// </dd>
109/// <dt>
110/// HTTP Host header syntax
111/// </dt>
112/// <dd>
113/// <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>
114/// </dd>
115/// </dl>
116/// <p>The following operations are related to <code>CreateMultipartUpload</code>:</p>
117/// <ul>
118/// <li>
119/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
120/// <li>
121/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
122/// <li>
123/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
124/// <li>
125/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
126/// <li>
127/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
128/// </ul>
129#[derive(::std::clone::Clone, ::std::fmt::Debug)]
130pub struct CreateMultipartUploadFluentBuilder {
131    handle: ::std::sync::Arc<crate::client::Handle>,
132    inner: crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder,
133    config_override: ::std::option::Option<crate::config::Builder>,
134}
135impl
136    crate::client::customize::internal::CustomizableSend<
137        crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
138        crate::operation::create_multipart_upload::CreateMultipartUploadError,
139    > for CreateMultipartUploadFluentBuilder
140{
141    fn send(
142        self,
143        config_override: crate::config::Builder,
144    ) -> crate::client::customize::internal::BoxFuture<
145        crate::client::customize::internal::SendResult<
146            crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
147            crate::operation::create_multipart_upload::CreateMultipartUploadError,
148        >,
149    > {
150        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
151    }
152}
153impl CreateMultipartUploadFluentBuilder {
154    /// Creates a new `CreateMultipartUploadFluentBuilder`.
155    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
156        Self {
157            handle,
158            inner: ::std::default::Default::default(),
159            config_override: ::std::option::Option::None,
160        }
161    }
162    /// Access the CreateMultipartUpload as a reference.
163    pub fn as_input(&self) -> &crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder {
164        &self.inner
165    }
166    /// Sends the request and returns the response.
167    ///
168    /// If an error occurs, an `SdkError` will be returned with additional details that
169    /// can be matched against.
170    ///
171    /// By default, any retryable failures will be retried twice. Retry behavior
172    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
173    /// set when configuring the client.
174    pub async fn send(
175        self,
176    ) -> ::std::result::Result<
177        crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
178        ::aws_smithy_runtime_api::client::result::SdkError<
179            crate::operation::create_multipart_upload::CreateMultipartUploadError,
180            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
181        >,
182    > {
183        let input = self
184            .inner
185            .build()
186            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
187        let runtime_plugins = crate::operation::create_multipart_upload::CreateMultipartUpload::operation_runtime_plugins(
188            self.handle.runtime_plugins.clone(),
189            &self.handle.conf,
190            self.config_override,
191        );
192        crate::operation::create_multipart_upload::CreateMultipartUpload::orchestrate(&runtime_plugins, input).await
193    }
194
195    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
196    pub fn customize(
197        self,
198    ) -> crate::client::customize::CustomizableOperation<
199        crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
200        crate::operation::create_multipart_upload::CreateMultipartUploadError,
201        Self,
202    > {
203        crate::client::customize::CustomizableOperation::new(self)
204    }
205    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
206        self.set_config_override(::std::option::Option::Some(config_override.into()));
207        self
208    }
209
210    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
211        self.config_override = config_override;
212        self
213    }
214    /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
215    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
216    /// <ul>
217    /// <li>
218    /// <p>This functionality is not supported for directory buckets.</p></li>
219    /// <li>
220    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
221    /// </ul>
222    /// </note>
223    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
224        self.inner = self.inner.acl(input);
225        self
226    }
227    /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
228    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
229    /// <ul>
230    /// <li>
231    /// <p>This functionality is not supported for directory buckets.</p></li>
232    /// <li>
233    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
234    /// </ul>
235    /// </note>
236    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
237        self.inner = self.inner.set_acl(input);
238        self
239    }
240    /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
241    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
242    /// <ul>
243    /// <li>
244    /// <p>This functionality is not supported for directory buckets.</p></li>
245    /// <li>
246    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
247    /// </ul>
248    /// </note>
249    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
250        self.inner.get_acl()
251    }
252    /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
253    /// <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>
254    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
255    /// <p>Object Lambda access points are not supported by directory buckets.</p>
256    /// </note>
257    /// <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>
258    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
259        self.inner = self.inner.bucket(input.into());
260        self
261    }
262    /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
263    /// <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>
264    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
265    /// <p>Object Lambda access points are not supported by directory buckets.</p>
266    /// </note>
267    /// <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>
268    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269        self.inner = self.inner.set_bucket(input);
270        self
271    }
272    /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
273    /// <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>
274    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
275    /// <p>Object Lambda access points are not supported by directory buckets.</p>
276    /// </note>
277    /// <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>
278    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
279        self.inner.get_bucket()
280    }
281    /// <p>Specifies caching behavior along the request/reply chain.</p>
282    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283        self.inner = self.inner.cache_control(input.into());
284        self
285    }
286    /// <p>Specifies caching behavior along the request/reply chain.</p>
287    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
288        self.inner = self.inner.set_cache_control(input);
289        self
290    }
291    /// <p>Specifies caching behavior along the request/reply chain.</p>
292    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
293        self.inner.get_cache_control()
294    }
295    /// <p>Specifies presentational information for the object.</p>
296    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297        self.inner = self.inner.content_disposition(input.into());
298        self
299    }
300    /// <p>Specifies presentational information for the object.</p>
301    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
302        self.inner = self.inner.set_content_disposition(input);
303        self
304    }
305    /// <p>Specifies presentational information for the object.</p>
306    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
307        self.inner.get_content_disposition()
308    }
309    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
310    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
311    /// </note>
312    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313        self.inner = self.inner.content_encoding(input.into());
314        self
315    }
316    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
317    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
318    /// </note>
319    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320        self.inner = self.inner.set_content_encoding(input);
321        self
322    }
323    /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
324    /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
325    /// </note>
326    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
327        self.inner.get_content_encoding()
328    }
329    /// <p>The language that the content is in.</p>
330    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331        self.inner = self.inner.content_language(input.into());
332        self
333    }
334    /// <p>The language that the content is in.</p>
335    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336        self.inner = self.inner.set_content_language(input);
337        self
338    }
339    /// <p>The language that the content is in.</p>
340    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
341        self.inner.get_content_language()
342    }
343    /// <p>A standard MIME type describing the format of the object data.</p>
344    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
345        self.inner = self.inner.content_type(input.into());
346        self
347    }
348    /// <p>A standard MIME type describing the format of the object data.</p>
349    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
350        self.inner = self.inner.set_content_type(input);
351        self
352    }
353    /// <p>A standard MIME type describing the format of the object data.</p>
354    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
355        self.inner.get_content_type()
356    }
357    /// <p>The date and time at which the object is no longer cacheable.</p>
358    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
359        self.inner = self.inner.expires(input);
360        self
361    }
362    /// <p>The date and time at which the object is no longer cacheable.</p>
363    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
364        self.inner = self.inner.set_expires(input);
365        self
366    }
367    /// <p>The date and time at which the object is no longer cacheable.</p>
368    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
369        self.inner.get_expires()
370    }
371    /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
372    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
373    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
374    /// <ul>
375    /// <li>
376    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
377    /// <li>
378    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
379    /// <li>
380    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
381    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
382    /// <ul>
383    /// <li>
384    /// <p>US East (N. Virginia)</p></li>
385    /// <li>
386    /// <p>US West (N. California)</p></li>
387    /// <li>
388    /// <p>US West (Oregon)</p></li>
389    /// <li>
390    /// <p>Asia Pacific (Singapore)</p></li>
391    /// <li>
392    /// <p>Asia Pacific (Sydney)</p></li>
393    /// <li>
394    /// <p>Asia Pacific (Tokyo)</p></li>
395    /// <li>
396    /// <p>Europe (Ireland)</p></li>
397    /// <li>
398    /// <p>South America (São Paulo)</p></li>
399    /// </ul>
400    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
401    /// </note></li>
402    /// </ul>
403    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
404    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
405    /// <ul>
406    /// <li>
407    /// <p>This functionality is not supported for directory buckets.</p></li>
408    /// <li>
409    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
410    /// </ul>
411    /// </note>
412    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
413        self.inner = self.inner.grant_full_control(input.into());
414        self
415    }
416    /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
417    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
418    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
419    /// <ul>
420    /// <li>
421    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
422    /// <li>
423    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
424    /// <li>
425    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
426    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
427    /// <ul>
428    /// <li>
429    /// <p>US East (N. Virginia)</p></li>
430    /// <li>
431    /// <p>US West (N. California)</p></li>
432    /// <li>
433    /// <p>US West (Oregon)</p></li>
434    /// <li>
435    /// <p>Asia Pacific (Singapore)</p></li>
436    /// <li>
437    /// <p>Asia Pacific (Sydney)</p></li>
438    /// <li>
439    /// <p>Asia Pacific (Tokyo)</p></li>
440    /// <li>
441    /// <p>Europe (Ireland)</p></li>
442    /// <li>
443    /// <p>South America (São Paulo)</p></li>
444    /// </ul>
445    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
446    /// </note></li>
447    /// </ul>
448    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
449    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
450    /// <ul>
451    /// <li>
452    /// <p>This functionality is not supported for directory buckets.</p></li>
453    /// <li>
454    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
455    /// </ul>
456    /// </note>
457    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
458        self.inner = self.inner.set_grant_full_control(input);
459        self
460    }
461    /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
462    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
463    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
464    /// <ul>
465    /// <li>
466    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
467    /// <li>
468    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
469    /// <li>
470    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
471    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
472    /// <ul>
473    /// <li>
474    /// <p>US East (N. Virginia)</p></li>
475    /// <li>
476    /// <p>US West (N. California)</p></li>
477    /// <li>
478    /// <p>US West (Oregon)</p></li>
479    /// <li>
480    /// <p>Asia Pacific (Singapore)</p></li>
481    /// <li>
482    /// <p>Asia Pacific (Sydney)</p></li>
483    /// <li>
484    /// <p>Asia Pacific (Tokyo)</p></li>
485    /// <li>
486    /// <p>Europe (Ireland)</p></li>
487    /// <li>
488    /// <p>South America (São Paulo)</p></li>
489    /// </ul>
490    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
491    /// </note></li>
492    /// </ul>
493    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
494    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
495    /// <ul>
496    /// <li>
497    /// <p>This functionality is not supported for directory buckets.</p></li>
498    /// <li>
499    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
500    /// </ul>
501    /// </note>
502    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
503        self.inner.get_grant_full_control()
504    }
505    /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
506    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
507    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
508    /// <ul>
509    /// <li>
510    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
511    /// <li>
512    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
513    /// <li>
514    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
515    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
516    /// <ul>
517    /// <li>
518    /// <p>US East (N. Virginia)</p></li>
519    /// <li>
520    /// <p>US West (N. California)</p></li>
521    /// <li>
522    /// <p>US West (Oregon)</p></li>
523    /// <li>
524    /// <p>Asia Pacific (Singapore)</p></li>
525    /// <li>
526    /// <p>Asia Pacific (Sydney)</p></li>
527    /// <li>
528    /// <p>Asia Pacific (Tokyo)</p></li>
529    /// <li>
530    /// <p>Europe (Ireland)</p></li>
531    /// <li>
532    /// <p>South America (São Paulo)</p></li>
533    /// </ul>
534    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
535    /// </note></li>
536    /// </ul>
537    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
538    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
539    /// <ul>
540    /// <li>
541    /// <p>This functionality is not supported for directory buckets.</p></li>
542    /// <li>
543    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
544    /// </ul>
545    /// </note>
546    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
547        self.inner = self.inner.grant_read(input.into());
548        self
549    }
550    /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
551    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
552    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
553    /// <ul>
554    /// <li>
555    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
556    /// <li>
557    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
558    /// <li>
559    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
560    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
561    /// <ul>
562    /// <li>
563    /// <p>US East (N. Virginia)</p></li>
564    /// <li>
565    /// <p>US West (N. California)</p></li>
566    /// <li>
567    /// <p>US West (Oregon)</p></li>
568    /// <li>
569    /// <p>Asia Pacific (Singapore)</p></li>
570    /// <li>
571    /// <p>Asia Pacific (Sydney)</p></li>
572    /// <li>
573    /// <p>Asia Pacific (Tokyo)</p></li>
574    /// <li>
575    /// <p>Europe (Ireland)</p></li>
576    /// <li>
577    /// <p>South America (São Paulo)</p></li>
578    /// </ul>
579    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
580    /// </note></li>
581    /// </ul>
582    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
583    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
584    /// <ul>
585    /// <li>
586    /// <p>This functionality is not supported for directory buckets.</p></li>
587    /// <li>
588    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
589    /// </ul>
590    /// </note>
591    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
592        self.inner = self.inner.set_grant_read(input);
593        self
594    }
595    /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
596    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
597    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
598    /// <ul>
599    /// <li>
600    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
601    /// <li>
602    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
603    /// <li>
604    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
605    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
606    /// <ul>
607    /// <li>
608    /// <p>US East (N. Virginia)</p></li>
609    /// <li>
610    /// <p>US West (N. California)</p></li>
611    /// <li>
612    /// <p>US West (Oregon)</p></li>
613    /// <li>
614    /// <p>Asia Pacific (Singapore)</p></li>
615    /// <li>
616    /// <p>Asia Pacific (Sydney)</p></li>
617    /// <li>
618    /// <p>Asia Pacific (Tokyo)</p></li>
619    /// <li>
620    /// <p>Europe (Ireland)</p></li>
621    /// <li>
622    /// <p>South America (São Paulo)</p></li>
623    /// </ul>
624    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
625    /// </note></li>
626    /// </ul>
627    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
628    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
629    /// <ul>
630    /// <li>
631    /// <p>This functionality is not supported for directory buckets.</p></li>
632    /// <li>
633    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
634    /// </ul>
635    /// </note>
636    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
637        self.inner.get_grant_read()
638    }
639    /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
640    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
641    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
642    /// <ul>
643    /// <li>
644    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
645    /// <li>
646    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
647    /// <li>
648    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
649    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
650    /// <ul>
651    /// <li>
652    /// <p>US East (N. Virginia)</p></li>
653    /// <li>
654    /// <p>US West (N. California)</p></li>
655    /// <li>
656    /// <p>US West (Oregon)</p></li>
657    /// <li>
658    /// <p>Asia Pacific (Singapore)</p></li>
659    /// <li>
660    /// <p>Asia Pacific (Sydney)</p></li>
661    /// <li>
662    /// <p>Asia Pacific (Tokyo)</p></li>
663    /// <li>
664    /// <p>Europe (Ireland)</p></li>
665    /// <li>
666    /// <p>South America (São Paulo)</p></li>
667    /// </ul>
668    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
669    /// </note></li>
670    /// </ul>
671    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
672    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
673    /// <ul>
674    /// <li>
675    /// <p>This functionality is not supported for directory buckets.</p></li>
676    /// <li>
677    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
678    /// </ul>
679    /// </note>
680    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
681        self.inner = self.inner.grant_read_acp(input.into());
682        self
683    }
684    /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
685    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
686    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
687    /// <ul>
688    /// <li>
689    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
690    /// <li>
691    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
692    /// <li>
693    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
694    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
695    /// <ul>
696    /// <li>
697    /// <p>US East (N. Virginia)</p></li>
698    /// <li>
699    /// <p>US West (N. California)</p></li>
700    /// <li>
701    /// <p>US West (Oregon)</p></li>
702    /// <li>
703    /// <p>Asia Pacific (Singapore)</p></li>
704    /// <li>
705    /// <p>Asia Pacific (Sydney)</p></li>
706    /// <li>
707    /// <p>Asia Pacific (Tokyo)</p></li>
708    /// <li>
709    /// <p>Europe (Ireland)</p></li>
710    /// <li>
711    /// <p>South America (São Paulo)</p></li>
712    /// </ul>
713    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
714    /// </note></li>
715    /// </ul>
716    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
717    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
718    /// <ul>
719    /// <li>
720    /// <p>This functionality is not supported for directory buckets.</p></li>
721    /// <li>
722    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
723    /// </ul>
724    /// </note>
725    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
726        self.inner = self.inner.set_grant_read_acp(input);
727        self
728    }
729    /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
730    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
731    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
732    /// <ul>
733    /// <li>
734    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
735    /// <li>
736    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
737    /// <li>
738    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
739    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
740    /// <ul>
741    /// <li>
742    /// <p>US East (N. Virginia)</p></li>
743    /// <li>
744    /// <p>US West (N. California)</p></li>
745    /// <li>
746    /// <p>US West (Oregon)</p></li>
747    /// <li>
748    /// <p>Asia Pacific (Singapore)</p></li>
749    /// <li>
750    /// <p>Asia Pacific (Sydney)</p></li>
751    /// <li>
752    /// <p>Asia Pacific (Tokyo)</p></li>
753    /// <li>
754    /// <p>Europe (Ireland)</p></li>
755    /// <li>
756    /// <p>South America (São Paulo)</p></li>
757    /// </ul>
758    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
759    /// </note></li>
760    /// </ul>
761    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
762    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
763    /// <ul>
764    /// <li>
765    /// <p>This functionality is not supported for directory buckets.</p></li>
766    /// <li>
767    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
768    /// </ul>
769    /// </note>
770    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
771        self.inner.get_grant_read_acp()
772    }
773    /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
774    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
775    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
776    /// <ul>
777    /// <li>
778    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
779    /// <li>
780    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
781    /// <li>
782    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
783    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
784    /// <ul>
785    /// <li>
786    /// <p>US East (N. Virginia)</p></li>
787    /// <li>
788    /// <p>US West (N. California)</p></li>
789    /// <li>
790    /// <p>US West (Oregon)</p></li>
791    /// <li>
792    /// <p>Asia Pacific (Singapore)</p></li>
793    /// <li>
794    /// <p>Asia Pacific (Sydney)</p></li>
795    /// <li>
796    /// <p>Asia Pacific (Tokyo)</p></li>
797    /// <li>
798    /// <p>Europe (Ireland)</p></li>
799    /// <li>
800    /// <p>South America (São Paulo)</p></li>
801    /// </ul>
802    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
803    /// </note></li>
804    /// </ul>
805    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
806    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
807    /// <ul>
808    /// <li>
809    /// <p>This functionality is not supported for directory buckets.</p></li>
810    /// <li>
811    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
812    /// </ul>
813    /// </note>
814    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
815        self.inner = self.inner.grant_write_acp(input.into());
816        self
817    }
818    /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
819    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
820    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
821    /// <ul>
822    /// <li>
823    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
824    /// <li>
825    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
826    /// <li>
827    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
828    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
829    /// <ul>
830    /// <li>
831    /// <p>US East (N. Virginia)</p></li>
832    /// <li>
833    /// <p>US West (N. California)</p></li>
834    /// <li>
835    /// <p>US West (Oregon)</p></li>
836    /// <li>
837    /// <p>Asia Pacific (Singapore)</p></li>
838    /// <li>
839    /// <p>Asia Pacific (Sydney)</p></li>
840    /// <li>
841    /// <p>Asia Pacific (Tokyo)</p></li>
842    /// <li>
843    /// <p>Europe (Ireland)</p></li>
844    /// <li>
845    /// <p>South America (São Paulo)</p></li>
846    /// </ul>
847    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
848    /// </note></li>
849    /// </ul>
850    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
851    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
852    /// <ul>
853    /// <li>
854    /// <p>This functionality is not supported for directory buckets.</p></li>
855    /// <li>
856    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
857    /// </ul>
858    /// </note>
859    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
860        self.inner = self.inner.set_grant_write_acp(input);
861        self
862    }
863    /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
864    /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
865    /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
866    /// <ul>
867    /// <li>
868    /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
869    /// <li>
870    /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
871    /// <li>
872    /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
873    /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
874    /// <ul>
875    /// <li>
876    /// <p>US East (N. Virginia)</p></li>
877    /// <li>
878    /// <p>US West (N. California)</p></li>
879    /// <li>
880    /// <p>US West (Oregon)</p></li>
881    /// <li>
882    /// <p>Asia Pacific (Singapore)</p></li>
883    /// <li>
884    /// <p>Asia Pacific (Sydney)</p></li>
885    /// <li>
886    /// <p>Asia Pacific (Tokyo)</p></li>
887    /// <li>
888    /// <p>Europe (Ireland)</p></li>
889    /// <li>
890    /// <p>South America (São Paulo)</p></li>
891    /// </ul>
892    /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
893    /// </note></li>
894    /// </ul>
895    /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
896    /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
897    /// <ul>
898    /// <li>
899    /// <p>This functionality is not supported for directory buckets.</p></li>
900    /// <li>
901    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
902    /// </ul>
903    /// </note>
904    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
905        self.inner.get_grant_write_acp()
906    }
907    /// <p>Object key for which the multipart upload is to be initiated.</p>
908    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
909        self.inner = self.inner.key(input.into());
910        self
911    }
912    /// <p>Object key for which the multipart upload is to be initiated.</p>
913    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
914        self.inner = self.inner.set_key(input);
915        self
916    }
917    /// <p>Object key for which the multipart upload is to be initiated.</p>
918    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
919        self.inner.get_key()
920    }
921    ///
922    /// Adds a key-value pair to `Metadata`.
923    ///
924    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
925    ///
926    /// <p>A map of metadata to store with the object in S3.</p>
927    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
928        self.inner = self.inner.metadata(k.into(), v.into());
929        self
930    }
931    /// <p>A map of metadata to store with the object in S3.</p>
932    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
933        self.inner = self.inner.set_metadata(input);
934        self
935    }
936    /// <p>A map of metadata to store with the object in S3.</p>
937    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
938        self.inner.get_metadata()
939    }
940    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
941    /// <ul>
942    /// <li>
943    /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. 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>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
944    /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
945    /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
946    /// </note></li>
947    /// </ul>
948    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
949        self.inner = self.inner.server_side_encryption(input);
950        self
951    }
952    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
953    /// <ul>
954    /// <li>
955    /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. 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>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
956    /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
957    /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
958    /// </note></li>
959    /// </ul>
960    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
961        self.inner = self.inner.set_server_side_encryption(input);
962        self
963    }
964    /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p>
965    /// <ul>
966    /// <li>
967    /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. 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>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
968    /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
969    /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
970    /// </note></li>
971    /// </ul>
972    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
973        self.inner.get_server_side_encryption()
974    }
975    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
976    /// <ul>
977    /// <li>
978    /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
979    /// <li>
980    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
981    /// </ul>
982    /// </note>
983    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
984        self.inner = self.inner.storage_class(input);
985        self
986    }
987    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
988    /// <ul>
989    /// <li>
990    /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
991    /// <li>
992    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
993    /// </ul>
994    /// </note>
995    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
996        self.inner = self.inner.set_storage_class(input);
997        self
998    }
999    /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1000    /// <ul>
1001    /// <li>
1002    /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
1003    /// <li>
1004    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1005    /// </ul>
1006    /// </note>
1007    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1008        self.inner.get_storage_class()
1009    }
1010    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
1011    /// <p>This functionality is not supported for directory buckets.</p>
1012    /// </note>
1013    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1014        self.inner = self.inner.website_redirect_location(input.into());
1015        self
1016    }
1017    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
1018    /// <p>This functionality is not supported for directory buckets.</p>
1019    /// </note>
1020    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1021        self.inner = self.inner.set_website_redirect_location(input);
1022        self
1023    }
1024    /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.</p><note>
1025    /// <p>This functionality is not supported for directory buckets.</p>
1026    /// </note>
1027    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1028        self.inner.get_website_redirect_location()
1029    }
1030    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1031    /// <p>This functionality is not supported for directory buckets.</p>
1032    /// </note>
1033    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1034        self.inner = self.inner.sse_customer_algorithm(input.into());
1035        self
1036    }
1037    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1038    /// <p>This functionality is not supported for directory buckets.</p>
1039    /// </note>
1040    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1041        self.inner = self.inner.set_sse_customer_algorithm(input);
1042        self
1043    }
1044    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1045    /// <p>This functionality is not supported for directory buckets.</p>
1046    /// </note>
1047    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1048        self.inner.get_sse_customer_algorithm()
1049    }
1050    /// <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>
1051    /// <p>This functionality is not supported for directory buckets.</p>
1052    /// </note>
1053    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1054        self.inner = self.inner.sse_customer_key(input.into());
1055        self
1056    }
1057    /// <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>
1058    /// <p>This functionality is not supported for directory buckets.</p>
1059    /// </note>
1060    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1061        self.inner = self.inner.set_sse_customer_key(input);
1062        self
1063    }
1064    /// <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>
1065    /// <p>This functionality is not supported for directory buckets.</p>
1066    /// </note>
1067    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1068        self.inner.get_sse_customer_key()
1069    }
1070    /// <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><note>
1071    /// <p>This functionality is not supported for directory buckets.</p>
1072    /// </note>
1073    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1074        self.inner = self.inner.sse_customer_key_md5(input.into());
1075        self
1076    }
1077    /// <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><note>
1078    /// <p>This functionality is not supported for directory buckets.</p>
1079    /// </note>
1080    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1081        self.inner = self.inner.set_sse_customer_key_md5(input);
1082        self
1083    }
1084    /// <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><note>
1085    /// <p>This functionality is not supported for directory buckets.</p>
1086    /// </note>
1087    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1088        self.inner.get_sse_customer_key_md5()
1089    }
1090    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1091    /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1092    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1093    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1094        self.inner = self.inner.ssekms_key_id(input.into());
1095        self
1096    }
1097    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1098    /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1099    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1100    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1101        self.inner = self.inner.set_ssekms_key_id(input);
1102        self
1103    }
1104    /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1105    /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1106    /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1107    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1108        self.inner.get_ssekms_key_id()
1109    }
1110    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1111    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1112    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1113        self.inner = self.inner.ssekms_encryption_context(input.into());
1114        self
1115    }
1116    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1117    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1118    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1119        self.inner = self.inner.set_ssekms_encryption_context(input);
1120        self
1121    }
1122    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1123    /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1124    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1125        self.inner.get_ssekms_encryption_context()
1126    }
1127    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).</p>
1128    /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1129    /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1130    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1131        self.inner = self.inner.bucket_key_enabled(input);
1132        self
1133    }
1134    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).</p>
1135    /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1136    /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1137    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1138        self.inner = self.inner.set_bucket_key_enabled(input);
1139        self
1140    }
1141    /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS).</p>
1142    /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1143    /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1144    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1145        self.inner.get_bucket_key_enabled()
1146    }
1147    /// <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>
1148    /// <p>This functionality is not supported for directory buckets.</p>
1149    /// </note>
1150    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1151        self.inner = self.inner.request_payer(input);
1152        self
1153    }
1154    /// <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>
1155    /// <p>This functionality is not supported for directory buckets.</p>
1156    /// </note>
1157    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1158        self.inner = self.inner.set_request_payer(input);
1159        self
1160    }
1161    /// <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>
1162    /// <p>This functionality is not supported for directory buckets.</p>
1163    /// </note>
1164    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1165        self.inner.get_request_payer()
1166    }
1167    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1168    /// <p>This functionality is not supported for directory buckets.</p>
1169    /// </note>
1170    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1171        self.inner = self.inner.tagging(input.into());
1172        self
1173    }
1174    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1175    /// <p>This functionality is not supported for directory buckets.</p>
1176    /// </note>
1177    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1178        self.inner = self.inner.set_tagging(input);
1179        self
1180    }
1181    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1182    /// <p>This functionality is not supported for directory buckets.</p>
1183    /// </note>
1184    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1185        self.inner.get_tagging()
1186    }
1187    /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1188    /// <p>This functionality is not supported for directory buckets.</p>
1189    /// </note>
1190    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1191        self.inner = self.inner.object_lock_mode(input);
1192        self
1193    }
1194    /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1195    /// <p>This functionality is not supported for directory buckets.</p>
1196    /// </note>
1197    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1198        self.inner = self.inner.set_object_lock_mode(input);
1199        self
1200    }
1201    /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1202    /// <p>This functionality is not supported for directory buckets.</p>
1203    /// </note>
1204    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1205        self.inner.get_object_lock_mode()
1206    }
1207    /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1208    /// <p>This functionality is not supported for directory buckets.</p>
1209    /// </note>
1210    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1211        self.inner = self.inner.object_lock_retain_until_date(input);
1212        self
1213    }
1214    /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1215    /// <p>This functionality is not supported for directory buckets.</p>
1216    /// </note>
1217    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1218        self.inner = self.inner.set_object_lock_retain_until_date(input);
1219        self
1220    }
1221    /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1222    /// <p>This functionality is not supported for directory buckets.</p>
1223    /// </note>
1224    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1225        self.inner.get_object_lock_retain_until_date()
1226    }
1227    /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1228    /// <p>This functionality is not supported for directory buckets.</p>
1229    /// </note>
1230    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1231        self.inner = self.inner.object_lock_legal_hold_status(input);
1232        self
1233    }
1234    /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1235    /// <p>This functionality is not supported for directory buckets.</p>
1236    /// </note>
1237    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1238        self.inner = self.inner.set_object_lock_legal_hold_status(input);
1239        self
1240    }
1241    /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1242    /// <p>This functionality is not supported for directory buckets.</p>
1243    /// </note>
1244    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1245        self.inner.get_object_lock_legal_hold_status()
1246    }
1247    /// <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>
1248    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1249        self.inner = self.inner.expected_bucket_owner(input.into());
1250        self
1251    }
1252    /// <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>
1253    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1254        self.inner = self.inner.set_expected_bucket_owner(input);
1255        self
1256    }
1257    /// <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>
1258    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1259        self.inner.get_expected_bucket_owner()
1260    }
1261    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1262    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
1263        self.inner = self.inner.checksum_algorithm(input);
1264        self
1265    }
1266    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1267    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
1268        self.inner = self.inner.set_checksum_algorithm(input);
1269        self
1270    }
1271    /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1272    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
1273        self.inner.get_checksum_algorithm()
1274    }
1275    /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1276    pub fn checksum_type(mut self, input: crate::types::ChecksumType) -> Self {
1277        self.inner = self.inner.checksum_type(input);
1278        self
1279    }
1280    /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1281    pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
1282        self.inner = self.inner.set_checksum_type(input);
1283        self
1284    }
1285    /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1286    pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
1287        self.inner.get_checksum_type()
1288    }
1289}