Skip to main content

aws_sdk_s3/operation/put_object/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_object::_put_object_output::PutObjectOutputBuilder;
3
4pub use crate::operation::put_object::_put_object_input::PutObjectInputBuilder;
5
6impl crate::operation::put_object::builders::PutObjectInputBuilder {
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::put_object::PutObjectOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::put_object::PutObjectError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.put_object();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `PutObject`.
24///
25/// <important>
26/// <p>End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an <code>HTTP 405</code> (Method Not Allowed) error.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Ireland), and South America (São Paulo).</p>
28/// </important>
29/// <p>Adds an object to a bucket.</p><note>
30/// <ul>
31/// <li>
32/// <p>Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket. You cannot use <code>PutObject</code> to only update a single piece of metadata for an existing object. You must put the entire object with updated metadata if you want to update some values.</p></li>
33/// <li>
34/// <p>If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are disabled and no longer affect permissions. All objects written to the bucket by any account will be owned by the bucket owner.</p></li>
35/// <li>
36/// <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>
37/// </ul>
38/// </note>
39/// <p>Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:</p>
40/// <ul>
41/// <li>
42/// <p><b>S3 Object Lock</b> - To prevent objects from being deleted or overwritten, you can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html">Amazon S3 Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
43/// <p>This functionality is not supported for directory buckets.</p>
44/// </note></li>
45/// <li>
46/// <p><b>If-None-Match</b> - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a conflicting operation occurs during the upload, S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure, retry the upload.</p>
47/// <p>Expects the * character (asterisk).</p>
48/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Add preconditions to S3 operations with conditional requests</a> in the <i>Amazon S3 User Guide</i> or <a href="https://datatracker.ietf.org/doc/rfc7232/">RFC 7232</a>.</p><note>
49/// <p>This functionality is not supported for S3 on Outposts.</p>
50/// </note></li>
51/// <li>
52/// <p><b>S3 Versioning</b> - When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all versions of the objects. For each write request that is made to the same object, Amazon S3 automatically generates a unique version ID of that object being stored in Amazon S3. You can retrieve, replace, or delete any version of the object. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
53/// <p>This functionality is not supported for directory buckets.</p>
54/// </note></li>
55/// </ul>
56/// <dl>
57/// <dt>
58/// Permissions
59/// </dt>
60/// <dd>
61/// <ul>
62/// <li>
63/// <p><b>General purpose bucket permissions</b> - The following permissions are required in your policies when your <code>PutObject</code> request includes specific headers.</p>
64/// <ul>
65/// <li>
66/// <p><b> <code>s3:PutObject</code> </b> - To successfully complete the <code>PutObject</code> request, you must always have the <code>s3:PutObject</code> permission on a bucket to add an object to it.</p></li>
67/// <li>
68/// <p><b> <code>s3:PutObjectAcl</code> </b> - To successfully change the objects ACL of your <code>PutObject</code> request, you must have the <code>s3:PutObjectAcl</code>.</p></li>
69/// <li>
70/// <p><b> <code>s3:PutObjectTagging</code> </b> - To successfully set the tag-set with your <code>PutObject</code> request, you must have the <code>s3:PutObjectTagging</code>.</p></li>
71/// </ul></li>
72/// <li>
73/// <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>
74/// <p>If the object is encrypted with SSE-KMS, you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key.</p></li>
75/// </ul>
76/// </dd>
77/// <dt>
78/// Data integrity with Content-MD5
79/// </dt>
80/// <dd>
81/// <ul>
82/// <li>
83/// <p><b>General purpose bucket</b> - To ensure that data is not corrupted traversing the network, use the <code>Content-MD5</code> header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate the MD5 while putting the object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p></li>
84/// <li>
85/// <p><b>Directory bucket</b> - This functionality is not supported for directory buckets.</p></li>
86/// </ul>
87/// </dd>
88/// <dt>
89/// HTTP Host header syntax
90/// </dt>
91/// <dd>
92/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p>
93/// </dd>
94/// </dl>
95/// <dl>
96/// <dt>
97/// Errors
98/// </dt>
99/// <dd>
100/// <ul>
101/// <li>
102/// <p>You might receive an <code>InvalidRequest</code> error for several reasons. Depending on the reason for the error, you might receive one of the following messages:</p>
103/// <ul>
104/// <li>
105/// <p>Cannot specify both a write offset value and user-defined object metadata for existing objects.</p></li>
106/// <li>
107/// <p>Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.</p></li>
108/// <li>
109/// <p>Request body cannot be empty when 'write offset' is specified.</p></li>
110/// </ul></li>
111/// </ul>
112/// </dd>
113/// </dl>
114/// <p>For more information about related Amazon S3 APIs, see the following:</p>
115/// <ul>
116/// <li>
117/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a></p></li>
118/// <li>
119/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
120/// </ul><important>
121/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
122/// </important>
123#[derive(::std::fmt::Debug)]
124pub struct PutObjectFluentBuilder {
125    handle: ::std::sync::Arc<crate::client::Handle>,
126    inner: crate::operation::put_object::builders::PutObjectInputBuilder,
127    config_override: ::std::option::Option<crate::config::Builder>,
128}
129impl crate::client::customize::internal::CustomizableSend<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>
130    for PutObjectFluentBuilder
131{
132    fn send(
133        self,
134        config_override: crate::config::Builder,
135    ) -> crate::client::customize::internal::BoxFuture<
136        crate::client::customize::internal::SendResult<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>,
137    > {
138        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
139    }
140}
141impl PutObjectFluentBuilder {
142    /// Creates a new `PutObjectFluentBuilder`.
143    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
144        Self {
145            handle,
146            inner: ::std::default::Default::default(),
147            config_override: ::std::option::Option::None,
148        }
149    }
150    /// Access the PutObject as a reference.
151    pub fn as_input(&self) -> &crate::operation::put_object::builders::PutObjectInputBuilder {
152        &self.inner
153    }
154    /// Sends the request and returns the response.
155    ///
156    /// If an error occurs, an `SdkError` will be returned with additional details that
157    /// can be matched against.
158    ///
159    /// By default, any retryable failures will be retried twice. Retry behavior
160    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
161    /// set when configuring the client.
162    pub async fn send(
163        self,
164    ) -> ::std::result::Result<
165        crate::operation::put_object::PutObjectOutput,
166        ::aws_smithy_runtime_api::client::result::SdkError<
167            crate::operation::put_object::PutObjectError,
168            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
169        >,
170    > {
171        let input = self
172            .inner
173            .build()
174            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
175        let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
176            self.handle.runtime_plugins.clone(),
177            &self.handle.conf,
178            self.config_override,
179        );
180        crate::operation::put_object::PutObject::orchestrate(&runtime_plugins, input).await
181    }
182
183    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
184    pub fn customize(
185        self,
186    ) -> crate::client::customize::CustomizableOperation<
187        crate::operation::put_object::PutObjectOutput,
188        crate::operation::put_object::PutObjectError,
189        Self,
190    > {
191        crate::client::customize::CustomizableOperation::new(self)
192    }
193    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
194        self.set_config_override(::std::option::Option::Some(config_override.into()));
195        self
196    }
197
198    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
199        self.config_override = config_override;
200        self
201    }
202    ///
203    /// Creates a presigned request for this operation.
204    ///
205    /// The `presigning_config` provides additional presigning-specific config values, such as the
206    /// amount of time the request should be valid for after creation.
207    ///
208    /// Presigned requests can be given to other users or applications to access a resource or perform
209    /// an operation without having access to the AWS security credentials.
210    ///
211    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
212    /// the presigned request can only be valid for as long as the credentials used to create it are.
213    ///
214    #[allow(unused_mut)]
215    pub async fn presigned(
216        mut self,
217        presigning_config: crate::presigning::PresigningConfig,
218    ) -> ::std::result::Result<
219        crate::presigning::PresignedRequest,
220        ::aws_smithy_runtime_api::client::result::SdkError<
221            crate::operation::put_object::PutObjectError,
222            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
223        >,
224    > {
225        let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
226            self.handle.runtime_plugins.clone(),
227            &self.handle.conf,
228            self.config_override,
229        )
230        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
231            presigning_config,
232            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
233        ));
234
235        let input = self
236            .inner
237            .build()
238            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
239        let mut context = crate::operation::put_object::PutObject::orchestrate_with_stop_point(
240            &runtime_plugins,
241            input,
242            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
243        )
244        .await
245        .map_err(|err| {
246            err.map_service_error(|err| {
247                err.downcast::<crate::operation::put_object::PutObjectError>()
248                    .expect("correct error type")
249            })
250        })?;
251        let request = context.take_request().expect("request set before transmit");
252        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
253    }
254    /// <p>The canned ACL to apply to the object. 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>
255    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
256    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
257    /// <ul>
258    /// <li>
259    /// <p>This functionality is not supported for directory buckets.</p></li>
260    /// <li>
261    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
262    /// </ul>
263    /// </note>
264    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
265        self.inner = self.inner.acl(input);
266        self
267    }
268    /// <p>The canned ACL to apply to the object. 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>
269    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
270    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
271    /// <ul>
272    /// <li>
273    /// <p>This functionality is not supported for directory buckets.</p></li>
274    /// <li>
275    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
276    /// </ul>
277    /// </note>
278    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
279        self.inner = self.inner.set_acl(input);
280        self
281    }
282    /// <p>The canned ACL to apply to the object. 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>
283    /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
284    /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
285    /// <ul>
286    /// <li>
287    /// <p>This functionality is not supported for directory buckets.</p></li>
288    /// <li>
289    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
290    /// </ul>
291    /// </note>
292    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
293        self.inner.get_acl()
294    }
295    /// <p>Object data.</p>
296    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
297        self.inner = self.inner.body(input);
298        self
299    }
300    /// <p>Object data.</p>
301    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
302        self.inner = self.inner.set_body(input);
303        self
304    }
305    /// <p>Object data.</p>
306    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
307        self.inner.get_body()
308    }
309    /// <p>The bucket name to which the PUT action was initiated.</p>
310    /// <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>
311    /// <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>
312    /// <p>Object Lambda access points are not supported by directory buckets.</p>
313    /// </note>
314    /// <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>
315    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316        self.inner = self.inner.bucket(input.into());
317        self
318    }
319    /// <p>The bucket name to which the PUT action was initiated.</p>
320    /// <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>
321    /// <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>
322    /// <p>Object Lambda access points are not supported by directory buckets.</p>
323    /// </note>
324    /// <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>
325    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326        self.inner = self.inner.set_bucket(input);
327        self
328    }
329    /// <p>The bucket name to which the PUT action was initiated.</p>
330    /// <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>
331    /// <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>
332    /// <p>Object Lambda access points are not supported by directory buckets.</p>
333    /// </note>
334    /// <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>
335    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
336        self.inner.get_bucket()
337    }
338    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
339    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340        self.inner = self.inner.cache_control(input.into());
341        self
342    }
343    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
344    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345        self.inner = self.inner.set_cache_control(input);
346        self
347    }
348    /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
349    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
350        self.inner.get_cache_control()
351    }
352    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
353    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354        self.inner = self.inner.content_disposition(input.into());
355        self
356    }
357    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
358    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
359        self.inner = self.inner.set_content_disposition(input);
360        self
361    }
362    /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
363    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
364        self.inner.get_content_disposition()
365    }
366    /// <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. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
367    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368        self.inner = self.inner.content_encoding(input.into());
369        self
370    }
371    /// <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. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
372    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373        self.inner = self.inner.set_content_encoding(input);
374        self
375    }
376    /// <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. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
377    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
378        self.inner.get_content_encoding()
379    }
380    /// <p>The language the content is in.</p>
381    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382        self.inner = self.inner.content_language(input.into());
383        self
384    }
385    /// <p>The language the content is in.</p>
386    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
387        self.inner = self.inner.set_content_language(input);
388        self
389    }
390    /// <p>The language the content is in.</p>
391    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
392        self.inner.get_content_language()
393    }
394    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
395    pub fn content_length(mut self, input: i64) -> Self {
396        self.inner = self.inner.content_length(input);
397        self
398    }
399    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
400    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
401        self.inner = self.inner.set_content_length(input);
402        self
403    }
404    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
405    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
406        self.inner.get_content_length()
407    }
408    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
409    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
410    /// </note> <note>
411    /// <p>This functionality is not supported for directory buckets.</p>
412    /// </note>
413    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
414        self.inner = self.inner.content_md5(input.into());
415        self
416    }
417    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
418    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
419    /// </note> <note>
420    /// <p>This functionality is not supported for directory buckets.</p>
421    /// </note>
422    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
423        self.inner = self.inner.set_content_md5(input);
424        self
425    }
426    /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
427    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
428    /// </note> <note>
429    /// <p>This functionality is not supported for directory buckets.</p>
430    /// </note>
431    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
432        self.inner.get_content_md5()
433    }
434    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
435    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
436        self.inner = self.inner.content_type(input.into());
437        self
438    }
439    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
440    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
441        self.inner = self.inner.set_content_type(input);
442        self
443    }
444    /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
445    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
446        self.inner.get_content_type()
447    }
448    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
449    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
450    /// <ul>
451    /// <li>
452    /// <p><code>CRC32</code></p></li>
453    /// <li>
454    /// <p><code>CRC32C</code></p></li>
455    /// <li>
456    /// <p><code>CRC64NVME</code></p></li>
457    /// <li>
458    /// <p><code>SHA1</code></p></li>
459    /// <li>
460    /// <p><code>SHA256</code></p></li>
461    /// </ul>
462    /// <p>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>
463    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
464    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
465    /// </note>
466    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
467    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
468        self.inner = self.inner.checksum_algorithm(input);
469        self
470    }
471    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
472    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
473    /// <ul>
474    /// <li>
475    /// <p><code>CRC32</code></p></li>
476    /// <li>
477    /// <p><code>CRC32C</code></p></li>
478    /// <li>
479    /// <p><code>CRC64NVME</code></p></li>
480    /// <li>
481    /// <p><code>SHA1</code></p></li>
482    /// <li>
483    /// <p><code>SHA256</code></p></li>
484    /// </ul>
485    /// <p>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>
486    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
487    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
488    /// </note>
489    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
490    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
491        self.inner = self.inner.set_checksum_algorithm(input);
492        self
493    }
494    /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
495    /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
496    /// <ul>
497    /// <li>
498    /// <p><code>CRC32</code></p></li>
499    /// <li>
500    /// <p><code>CRC32C</code></p></li>
501    /// <li>
502    /// <p><code>CRC64NVME</code></p></li>
503    /// <li>
504    /// <p><code>SHA1</code></p></li>
505    /// <li>
506    /// <p><code>SHA256</code></p></li>
507    /// </ul>
508    /// <p>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>
509    /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
510    /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
511    /// </note>
512    /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
513    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
514        self.inner.get_checksum_algorithm()
515    }
516    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of 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>
517    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
518        self.inner = self.inner.checksum_crc32(input.into());
519        self
520    }
521    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of 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>
522    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
523        self.inner = self.inner.set_checksum_crc32(input);
524        self
525    }
526    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of 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>
527    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
528        self.inner.get_checksum_crc32()
529    }
530    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of 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>
531    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
532        self.inner = self.inner.checksum_crc32_c(input.into());
533        self
534    }
535    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of 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>
536    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
537        self.inner = self.inner.set_checksum_crc32_c(input);
538        self
539    }
540    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of 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>
541    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
542        self.inner.get_checksum_crc32_c()
543    }
544    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
545    pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
546        self.inner = self.inner.checksum_crc64_nvme(input.into());
547        self
548    }
549    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
550    pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
551        self.inner = self.inner.set_checksum_crc64_nvme(input);
552        self
553    }
554    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
555    pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
556        self.inner.get_checksum_crc64_nvme()
557    }
558    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of 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>
559    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
560        self.inner = self.inner.checksum_sha1(input.into());
561        self
562    }
563    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of 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>
564    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
565        self.inner = self.inner.set_checksum_sha1(input);
566        self
567    }
568    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of 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>
569    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
570        self.inner.get_checksum_sha1()
571    }
572    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of 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>
573    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
574        self.inner = self.inner.checksum_sha256(input.into());
575        self
576    }
577    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of 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>
578    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
579        self.inner = self.inner.set_checksum_sha256(input);
580        self
581    }
582    /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of 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>
583    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
584        self.inner.get_checksum_sha256()
585    }
586    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
587    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
588        self.inner = self.inner.expires(input);
589        self
590    }
591    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
592    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
593        self.inner = self.inner.set_expires(input);
594        self
595    }
596    /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
597    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
598        self.inner.get_expires()
599    }
600    /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
601    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
602    /// <p>Expects the ETag value as a string.</p>
603    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
604    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
605        self.inner = self.inner.if_match(input.into());
606        self
607    }
608    /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
609    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
610    /// <p>Expects the ETag value as a string.</p>
611    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
612    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
613        self.inner = self.inner.set_if_match(input);
614        self
615    }
616    /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
617    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
618    /// <p>Expects the ETag value as a string.</p>
619    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
620    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
621        self.inner.get_if_match()
622    }
623    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
624    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
625    /// <p>Expects the '*' (asterisk) character.</p>
626    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
627    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
628        self.inner = self.inner.if_none_match(input.into());
629        self
630    }
631    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
632    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
633    /// <p>Expects the '*' (asterisk) character.</p>
634    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
635    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
636        self.inner = self.inner.set_if_none_match(input);
637        self
638    }
639    /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
640    /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
641    /// <p>Expects the '*' (asterisk) character.</p>
642    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
643    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
644        self.inner.get_if_none_match()
645    }
646    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
647    /// <ul>
648    /// <li>
649    /// <p>This functionality is not supported for directory buckets.</p></li>
650    /// <li>
651    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
652    /// </ul>
653    /// </note>
654    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
655        self.inner = self.inner.grant_full_control(input.into());
656        self
657    }
658    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
659    /// <ul>
660    /// <li>
661    /// <p>This functionality is not supported for directory buckets.</p></li>
662    /// <li>
663    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
664    /// </ul>
665    /// </note>
666    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
667        self.inner = self.inner.set_grant_full_control(input);
668        self
669    }
670    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
671    /// <ul>
672    /// <li>
673    /// <p>This functionality is not supported for directory buckets.</p></li>
674    /// <li>
675    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
676    /// </ul>
677    /// </note>
678    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
679        self.inner.get_grant_full_control()
680    }
681    /// <p>Allows grantee to read the object data and its metadata.</p><note>
682    /// <ul>
683    /// <li>
684    /// <p>This functionality is not supported for directory buckets.</p></li>
685    /// <li>
686    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
687    /// </ul>
688    /// </note>
689    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
690        self.inner = self.inner.grant_read(input.into());
691        self
692    }
693    /// <p>Allows grantee to read the object data and its metadata.</p><note>
694    /// <ul>
695    /// <li>
696    /// <p>This functionality is not supported for directory buckets.</p></li>
697    /// <li>
698    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
699    /// </ul>
700    /// </note>
701    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
702        self.inner = self.inner.set_grant_read(input);
703        self
704    }
705    /// <p>Allows grantee to read the object data and its metadata.</p><note>
706    /// <ul>
707    /// <li>
708    /// <p>This functionality is not supported for directory buckets.</p></li>
709    /// <li>
710    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
711    /// </ul>
712    /// </note>
713    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
714        self.inner.get_grant_read()
715    }
716    /// <p>Allows grantee to read the object ACL.</p><note>
717    /// <ul>
718    /// <li>
719    /// <p>This functionality is not supported for directory buckets.</p></li>
720    /// <li>
721    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
722    /// </ul>
723    /// </note>
724    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
725        self.inner = self.inner.grant_read_acp(input.into());
726        self
727    }
728    /// <p>Allows grantee to read the object ACL.</p><note>
729    /// <ul>
730    /// <li>
731    /// <p>This functionality is not supported for directory buckets.</p></li>
732    /// <li>
733    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
734    /// </ul>
735    /// </note>
736    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
737        self.inner = self.inner.set_grant_read_acp(input);
738        self
739    }
740    /// <p>Allows grantee to read the object ACL.</p><note>
741    /// <ul>
742    /// <li>
743    /// <p>This functionality is not supported for directory buckets.</p></li>
744    /// <li>
745    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
746    /// </ul>
747    /// </note>
748    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
749        self.inner.get_grant_read_acp()
750    }
751    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
752    /// <ul>
753    /// <li>
754    /// <p>This functionality is not supported for directory buckets.</p></li>
755    /// <li>
756    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
757    /// </ul>
758    /// </note>
759    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
760        self.inner = self.inner.grant_write_acp(input.into());
761        self
762    }
763    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
764    /// <ul>
765    /// <li>
766    /// <p>This functionality is not supported for directory buckets.</p></li>
767    /// <li>
768    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
769    /// </ul>
770    /// </note>
771    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
772        self.inner = self.inner.set_grant_write_acp(input);
773        self
774    }
775    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
776    /// <ul>
777    /// <li>
778    /// <p>This functionality is not supported for directory buckets.</p></li>
779    /// <li>
780    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
781    /// </ul>
782    /// </note>
783    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
784        self.inner.get_grant_write_acp()
785    }
786    /// <p>Object key for which the PUT action was initiated.</p>
787    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
788        self.inner = self.inner.key(input.into());
789        self
790    }
791    /// <p>Object key for which the PUT action was initiated.</p>
792    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
793        self.inner = self.inner.set_key(input);
794        self
795    }
796    /// <p>Object key for which the PUT action was initiated.</p>
797    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
798        self.inner.get_key()
799    }
800    /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
801    /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
802    /// </note>
803    pub fn write_offset_bytes(mut self, input: i64) -> Self {
804        self.inner = self.inner.write_offset_bytes(input);
805        self
806    }
807    /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
808    /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
809    /// </note>
810    pub fn set_write_offset_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
811        self.inner = self.inner.set_write_offset_bytes(input);
812        self
813    }
814    /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
815    /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
816    /// </note>
817    pub fn get_write_offset_bytes(&self) -> &::std::option::Option<i64> {
818        self.inner.get_write_offset_bytes()
819    }
820    ///
821    /// Adds a key-value pair to `Metadata`.
822    ///
823    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
824    ///
825    /// <p>A map of metadata to store with the object in S3.</p>
826    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
827        self.inner = self.inner.metadata(k.into(), v.into());
828        self
829    }
830    /// <p>A map of metadata to store with the object in S3.</p>
831    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
832        self.inner = self.inner.set_metadata(input);
833        self
834    }
835    /// <p>A map of metadata to store with the object in S3.</p>
836    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
837        self.inner.get_metadata()
838    }
839    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
840    /// <ul>
841    /// <li>
842    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
843    /// <li>
844    /// <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>
845    /// <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>
846    /// <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>
847    /// </note></li>
848    /// <li>
849    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
850    /// </ul>
851    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
852        self.inner = self.inner.server_side_encryption(input);
853        self
854    }
855    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
856    /// <ul>
857    /// <li>
858    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
859    /// <li>
860    /// <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>
861    /// <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>
862    /// <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>
863    /// </note></li>
864    /// <li>
865    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
866    /// </ul>
867    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
868        self.inner = self.inner.set_server_side_encryption(input);
869        self
870    }
871    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
872    /// <ul>
873    /// <li>
874    /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
875    /// <li>
876    /// <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>
877    /// <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>
878    /// <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>
879    /// </note></li>
880    /// <li>
881    /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
882    /// </ul>
883    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
884        self.inner.get_server_side_encryption()
885    }
886    /// <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>
887    /// <ul>
888    /// <li>
889    /// <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>
890    /// <li>
891    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
892    /// </ul>
893    /// </note>
894    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
895        self.inner = self.inner.storage_class(input);
896        self
897    }
898    /// <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>
899    /// <ul>
900    /// <li>
901    /// <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>
902    /// <li>
903    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
904    /// </ul>
905    /// </note>
906    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
907        self.inner = self.inner.set_storage_class(input);
908        self
909    }
910    /// <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>
911    /// <ul>
912    /// <li>
913    /// <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>
914    /// <li>
915    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
916    /// </ul>
917    /// </note>
918    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
919        self.inner.get_storage_class()
920    }
921    /// <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. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
922    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
923    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
924    /// <p>In the following example, the request header sets the object redirect to another website:</p>
925    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
926    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
927    /// <p>This functionality is not supported for directory buckets.</p>
928    /// </note>
929    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
930        self.inner = self.inner.website_redirect_location(input.into());
931        self
932    }
933    /// <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. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
934    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
935    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
936    /// <p>In the following example, the request header sets the object redirect to another website:</p>
937    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
938    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
939    /// <p>This functionality is not supported for directory buckets.</p>
940    /// </note>
941    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
942        self.inner = self.inner.set_website_redirect_location(input);
943        self
944    }
945    /// <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. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
946    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
947    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
948    /// <p>In the following example, the request header sets the object redirect to another website:</p>
949    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
950    /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
951    /// <p>This functionality is not supported for directory buckets.</p>
952    /// </note>
953    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
954        self.inner.get_website_redirect_location()
955    }
956    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
957    /// <p>This functionality is not supported for directory buckets.</p>
958    /// </note>
959    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
960        self.inner = self.inner.sse_customer_algorithm(input.into());
961        self
962    }
963    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
964    /// <p>This functionality is not supported for directory buckets.</p>
965    /// </note>
966    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
967        self.inner = self.inner.set_sse_customer_algorithm(input);
968        self
969    }
970    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
971    /// <p>This functionality is not supported for directory buckets.</p>
972    /// </note>
973    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
974        self.inner.get_sse_customer_algorithm()
975    }
976    /// <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>
977    /// <p>This functionality is not supported for directory buckets.</p>
978    /// </note>
979    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
980        self.inner = self.inner.sse_customer_key(input.into());
981        self
982    }
983    /// <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>
984    /// <p>This functionality is not supported for directory buckets.</p>
985    /// </note>
986    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
987        self.inner = self.inner.set_sse_customer_key(input);
988        self
989    }
990    /// <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>
991    /// <p>This functionality is not supported for directory buckets.</p>
992    /// </note>
993    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
994        self.inner.get_sse_customer_key()
995    }
996    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
997    /// <p>This functionality is not supported for directory buckets.</p>
998    /// </note>
999    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1000        self.inner = self.inner.sse_customer_key_md5(input.into());
1001        self
1002    }
1003    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1004    /// <p>This functionality is not supported for directory buckets.</p>
1005    /// </note>
1006    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1007        self.inner = self.inner.set_sse_customer_key_md5(input);
1008        self
1009    }
1010    /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1011    /// <p>This functionality is not supported for directory buckets.</p>
1012    /// </note>
1013    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1014        self.inner.get_sse_customer_key_md5()
1015    }
1016    /// <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>
1017    /// <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>
1018    /// <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>
1019    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1020        self.inner = self.inner.ssekms_key_id(input.into());
1021        self
1022    }
1023    /// <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>
1024    /// <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>
1025    /// <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>
1026    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1027        self.inner = self.inner.set_ssekms_key_id(input);
1028        self
1029    }
1030    /// <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>
1031    /// <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>
1032    /// <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>
1033    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1034        self.inner.get_ssekms_key_id()
1035    }
1036    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1037    /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1038    /// <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>
1039    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1040        self.inner = self.inner.ssekms_encryption_context(input.into());
1041        self
1042    }
1043    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1044    /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1045    /// <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>
1046    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1047        self.inner = self.inner.set_ssekms_encryption_context(input);
1048        self
1049    }
1050    /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1051    /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1052    /// <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>
1053    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1054        self.inner.get_ssekms_encryption_context()
1055    }
1056    /// <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>
1057    /// <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>
1058    /// <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>
1059    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1060        self.inner = self.inner.bucket_key_enabled(input);
1061        self
1062    }
1063    /// <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>
1064    /// <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>
1065    /// <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>
1066    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1067        self.inner = self.inner.set_bucket_key_enabled(input);
1068        self
1069    }
1070    /// <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>
1071    /// <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>
1072    /// <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>
1073    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1074        self.inner.get_bucket_key_enabled()
1075    }
1076    /// <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 the corresponding charges. 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>
1077    /// <p>This functionality is not supported for directory buckets.</p>
1078    /// </note>
1079    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1080        self.inner = self.inner.request_payer(input);
1081        self
1082    }
1083    /// <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 the corresponding charges. 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>
1084    /// <p>This functionality is not supported for directory buckets.</p>
1085    /// </note>
1086    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1087        self.inner = self.inner.set_request_payer(input);
1088        self
1089    }
1090    /// <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 the corresponding charges. 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>
1091    /// <p>This functionality is not supported for directory buckets.</p>
1092    /// </note>
1093    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1094        self.inner.get_request_payer()
1095    }
1096    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1097    /// <p>This functionality is not supported for directory buckets.</p>
1098    /// </note>
1099    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1100        self.inner = self.inner.tagging(input.into());
1101        self
1102    }
1103    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1104    /// <p>This functionality is not supported for directory buckets.</p>
1105    /// </note>
1106    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1107        self.inner = self.inner.set_tagging(input);
1108        self
1109    }
1110    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1111    /// <p>This functionality is not supported for directory buckets.</p>
1112    /// </note>
1113    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1114        self.inner.get_tagging()
1115    }
1116    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1117    /// <p>This functionality is not supported for directory buckets.</p>
1118    /// </note>
1119    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1120        self.inner = self.inner.object_lock_mode(input);
1121        self
1122    }
1123    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1124    /// <p>This functionality is not supported for directory buckets.</p>
1125    /// </note>
1126    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1127        self.inner = self.inner.set_object_lock_mode(input);
1128        self
1129    }
1130    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1131    /// <p>This functionality is not supported for directory buckets.</p>
1132    /// </note>
1133    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1134        self.inner.get_object_lock_mode()
1135    }
1136    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1137    /// <p>This functionality is not supported for directory buckets.</p>
1138    /// </note>
1139    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1140        self.inner = self.inner.object_lock_retain_until_date(input);
1141        self
1142    }
1143    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1144    /// <p>This functionality is not supported for directory buckets.</p>
1145    /// </note>
1146    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1147        self.inner = self.inner.set_object_lock_retain_until_date(input);
1148        self
1149    }
1150    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1151    /// <p>This functionality is not supported for directory buckets.</p>
1152    /// </note>
1153    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1154        self.inner.get_object_lock_retain_until_date()
1155    }
1156    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1157    /// <p>This functionality is not supported for directory buckets.</p>
1158    /// </note>
1159    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1160        self.inner = self.inner.object_lock_legal_hold_status(input);
1161        self
1162    }
1163    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1164    /// <p>This functionality is not supported for directory buckets.</p>
1165    /// </note>
1166    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1167        self.inner = self.inner.set_object_lock_legal_hold_status(input);
1168        self
1169    }
1170    /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1171    /// <p>This functionality is not supported for directory buckets.</p>
1172    /// </note>
1173    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1174        self.inner.get_object_lock_legal_hold_status()
1175    }
1176    /// <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>
1177    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1178        self.inner = self.inner.expected_bucket_owner(input.into());
1179        self
1180    }
1181    /// <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>
1182    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1183        self.inner = self.inner.set_expected_bucket_owner(input);
1184        self
1185    }
1186    /// <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>
1187    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1188        self.inner.get_expected_bucket_owner()
1189    }
1190}
1191
1192impl crate::client::customize::internal::CustomizablePresigned<crate::operation::put_object::PutObjectError> for PutObjectFluentBuilder {
1193    fn presign(
1194        self,
1195        config_override: crate::config::Builder,
1196        presigning_config: crate::presigning::PresigningConfig,
1197    ) -> crate::client::customize::internal::BoxFuture<
1198        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::put_object::PutObjectError>,
1199    > {
1200        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
1201    }
1202}