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/// <p>Adds an object to a bucket.</p><note>
26/// <ul>
27/// <li>
28/// <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>
29/// <li>
30/// <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>
31/// <li>
32/// <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>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the <i>Amazon S3 User Guide</i>.</p></li>
33/// </ul>
34/// </note>
35/// <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>
36/// <ul>
37/// <li>
38/// <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>
39/// <p>This functionality is not supported for directory buckets.</p>
40/// </note></li>
41/// <li>
42/// <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>
43/// <p>This functionality is not supported for directory buckets.</p>
44/// </note></li>
45/// </ul>
46/// <dl>
47/// <dt>
48/// Permissions
49/// </dt>
50/// <dd>
51/// <ul>
52/// <li>
53/// <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>
54/// <ul>
55/// <li>
56/// <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>
57/// <li>
58/// <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>
59/// <li>
60/// <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>
61/// </ul></li>
62/// <li>
63/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p></li>
64/// </ul>
65/// </dd>
66/// <dt>
67/// Data integrity with Content-MD5
68/// </dt>
69/// <dd>
70/// <ul>
71/// <li>
72/// <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>
73/// <li>
74/// <p><b>Directory bucket</b> - This functionality is not supported for directory buckets.</p></li>
75/// </ul>
76/// </dd>
77/// <dt>
78/// HTTP Host header syntax
79/// </dt>
80/// <dd>
81/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
82/// </dd>
83/// </dl>
84/// <p>For more information about related Amazon S3 APIs, see the following:</p>
85/// <ul>
86/// <li>
87/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a></p></li>
88/// <li>
89/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
90/// </ul>
91#[derive(::std::fmt::Debug)]
92pub struct PutObjectFluentBuilder {
93    handle: ::std::sync::Arc<crate::client::Handle>,
94    inner: crate::operation::put_object::builders::PutObjectInputBuilder,
95    config_override: ::std::option::Option<crate::config::Builder>,
96}
97impl crate::client::customize::internal::CustomizableSend<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>
98    for PutObjectFluentBuilder
99{
100    fn send(
101        self,
102        config_override: crate::config::Builder,
103    ) -> crate::client::customize::internal::BoxFuture<
104        crate::client::customize::internal::SendResult<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>,
105    > {
106        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
107    }
108}
109impl PutObjectFluentBuilder {
110    /// Creates a new `PutObjectFluentBuilder`.
111    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
112        Self {
113            handle,
114            inner: ::std::default::Default::default(),
115            config_override: ::std::option::Option::None,
116        }
117    }
118    /// Access the PutObject as a reference.
119    pub fn as_input(&self) -> &crate::operation::put_object::builders::PutObjectInputBuilder {
120        &self.inner
121    }
122    /// Sends the request and returns the response.
123    ///
124    /// If an error occurs, an `SdkError` will be returned with additional details that
125    /// can be matched against.
126    ///
127    /// By default, any retryable failures will be retried twice. Retry behavior
128    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
129    /// set when configuring the client.
130    pub async fn send(
131        self,
132    ) -> ::std::result::Result<
133        crate::operation::put_object::PutObjectOutput,
134        ::aws_smithy_runtime_api::client::result::SdkError<
135            crate::operation::put_object::PutObjectError,
136            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
137        >,
138    > {
139        let input = self
140            .inner
141            .build()
142            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
143        let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
144            self.handle.runtime_plugins.clone(),
145            &self.handle.conf,
146            self.config_override,
147        );
148        crate::operation::put_object::PutObject::orchestrate(&runtime_plugins, input).await
149    }
150
151    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
152    pub fn customize(
153        self,
154    ) -> crate::client::customize::CustomizableOperation<
155        crate::operation::put_object::PutObjectOutput,
156        crate::operation::put_object::PutObjectError,
157        Self,
158    > {
159        crate::client::customize::CustomizableOperation::new(self)
160    }
161    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
162        self.set_config_override(::std::option::Option::Some(config_override.into()));
163        self
164    }
165
166    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
167        self.config_override = config_override;
168        self
169    }
170    ///
171    /// Creates a presigned request for this operation.
172    ///
173    /// The `presigning_config` provides additional presigning-specific config values, such as the
174    /// amount of time the request should be valid for after creation.
175    ///
176    /// Presigned requests can be given to other users or applications to access a resource or perform
177    /// an operation without having access to the AWS security credentials.
178    ///
179    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
180    /// the presigned request can only be valid for as long as the credentials used to create it are.
181    ///
182    #[allow(unused_mut)]
183    pub async fn presigned(
184        mut self,
185        presigning_config: crate::presigning::PresigningConfig,
186    ) -> ::std::result::Result<
187        crate::presigning::PresignedRequest,
188        ::aws_smithy_runtime_api::client::result::SdkError<
189            crate::operation::put_object::PutObjectError,
190            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
191        >,
192    > {
193        let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
194            self.handle.runtime_plugins.clone(),
195            &self.handle.conf,
196            self.config_override,
197        )
198        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
199            presigning_config,
200            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
201        ));
202
203        let input = self
204            .inner
205            .build()
206            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
207        let mut context = crate::operation::put_object::PutObject::orchestrate_with_stop_point(
208            &runtime_plugins,
209            input,
210            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
211        )
212        .await
213        .map_err(|err| {
214            err.map_service_error(|err| {
215                err.downcast::<crate::operation::put_object::PutObjectError>()
216                    .expect("correct error type")
217            })
218        })?;
219        let request = context.take_request().expect("request set before transmit");
220        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
221    }
222    /// <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>
223    /// <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>
224    /// <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>
225    /// <ul>
226    /// <li>
227    /// <p>This functionality is not supported for directory buckets.</p></li>
228    /// <li>
229    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
230    /// </ul>
231    /// </note>
232    pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
233        self.inner = self.inner.acl(input);
234        self
235    }
236    /// <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>
237    /// <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>
238    /// <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>
239    /// <ul>
240    /// <li>
241    /// <p>This functionality is not supported for directory buckets.</p></li>
242    /// <li>
243    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
244    /// </ul>
245    /// </note>
246    pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
247        self.inner = self.inner.set_acl(input);
248        self
249    }
250    /// <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>
251    /// <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>
252    /// <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>
253    /// <ul>
254    /// <li>
255    /// <p>This functionality is not supported for directory buckets.</p></li>
256    /// <li>
257    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
258    /// </ul>
259    /// </note>
260    pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
261        self.inner.get_acl()
262    }
263    /// <p>Object data.</p>
264    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
265        self.inner = self.inner.body(input);
266        self
267    }
268    /// <p>Object data.</p>
269    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
270        self.inner = self.inner.set_body(input);
271        self
272    }
273    /// <p>Object data.</p>
274    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
275        self.inner.get_body()
276    }
277    /// <p>The bucket name to which the PUT action was initiated.</p>
278    /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
279    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
280    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
281    /// </note>
282    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
283    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284        self.inner = self.inner.bucket(input.into());
285        self
286    }
287    /// <p>The bucket name to which the PUT action was initiated.</p>
288    /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
289    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
290    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
291    /// </note>
292    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
293    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294        self.inner = self.inner.set_bucket(input);
295        self
296    }
297    /// <p>The bucket name to which the PUT action was initiated.</p>
298    /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
299    /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
300    /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
301    /// </note>
302    /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
303    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
304        self.inner.get_bucket()
305    }
306    /// <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>
307    pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308        self.inner = self.inner.cache_control(input.into());
309        self
310    }
311    /// <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>
312    pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313        self.inner = self.inner.set_cache_control(input);
314        self
315    }
316    /// <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>
317    pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
318        self.inner.get_cache_control()
319    }
320    /// <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>
321    pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322        self.inner = self.inner.content_disposition(input.into());
323        self
324    }
325    /// <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>
326    pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327        self.inner = self.inner.set_content_disposition(input);
328        self
329    }
330    /// <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>
331    pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
332        self.inner.get_content_disposition()
333    }
334    /// <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>
335    pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336        self.inner = self.inner.content_encoding(input.into());
337        self
338    }
339    /// <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>
340    pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341        self.inner = self.inner.set_content_encoding(input);
342        self
343    }
344    /// <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>
345    pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
346        self.inner.get_content_encoding()
347    }
348    /// <p>The language the content is in.</p>
349    pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350        self.inner = self.inner.content_language(input.into());
351        self
352    }
353    /// <p>The language the content is in.</p>
354    pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
355        self.inner = self.inner.set_content_language(input);
356        self
357    }
358    /// <p>The language the content is in.</p>
359    pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
360        self.inner.get_content_language()
361    }
362    /// <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>
363    pub fn content_length(mut self, input: i64) -> Self {
364        self.inner = self.inner.content_length(input);
365        self
366    }
367    /// <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>
368    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
369        self.inner = self.inner.set_content_length(input);
370        self
371    }
372    /// <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>
373    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
374        self.inner.get_content_length()
375    }
376    /// <p>The base64-encoded 128-bit MD5 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>
377    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
378    /// </note> <note>
379    /// <p>This functionality is not supported for directory buckets.</p>
380    /// </note>
381    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382        self.inner = self.inner.content_md5(input.into());
383        self
384    }
385    /// <p>The base64-encoded 128-bit MD5 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>
386    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
387    /// </note> <note>
388    /// <p>This functionality is not supported for directory buckets.</p>
389    /// </note>
390    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
391        self.inner = self.inner.set_content_md5(input);
392        self
393    }
394    /// <p>The base64-encoded 128-bit MD5 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>
395    /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
396    /// </note> <note>
397    /// <p>This functionality is not supported for directory buckets.</p>
398    /// </note>
399    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
400        self.inner.get_content_md5()
401    }
402    /// <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>
403    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404        self.inner = self.inner.content_type(input.into());
405        self
406    }
407    /// <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>
408    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409        self.inner = self.inner.set_content_type(input);
410        self
411    }
412    /// <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>
413    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
414        self.inner.get_content_type()
415    }
416    /// <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>
417    /// <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>
418    /// <ul>
419    /// <li>
420    /// <p>CRC32</p></li>
421    /// <li>
422    /// <p>CRC32C</p></li>
423    /// <li>
424    /// <p>SHA1</p></li>
425    /// <li>
426    /// <p>SHA256</p></li>
427    /// </ul>
428    /// <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>
429    /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
430    /// <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>
431    /// </note>
432    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
433        self.inner = self.inner.checksum_algorithm(input);
434        self
435    }
436    /// <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>
437    /// <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>
438    /// <ul>
439    /// <li>
440    /// <p>CRC32</p></li>
441    /// <li>
442    /// <p>CRC32C</p></li>
443    /// <li>
444    /// <p>SHA1</p></li>
445    /// <li>
446    /// <p>SHA256</p></li>
447    /// </ul>
448    /// <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>
449    /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
450    /// <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>
451    /// </note>
452    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
453        self.inner = self.inner.set_checksum_algorithm(input);
454        self
455    }
456    /// <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>
457    /// <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>
458    /// <ul>
459    /// <li>
460    /// <p>CRC32</p></li>
461    /// <li>
462    /// <p>CRC32C</p></li>
463    /// <li>
464    /// <p>SHA1</p></li>
465    /// <li>
466    /// <p>SHA256</p></li>
467    /// </ul>
468    /// <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>
469    /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
470    /// <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>
471    /// </note>
472    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
473        self.inner.get_checksum_algorithm()
474    }
475    /// <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 CRC32 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>
476    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
477        self.inner = self.inner.checksum_crc32(input.into());
478        self
479    }
480    /// <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 CRC32 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>
481    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
482        self.inner = self.inner.set_checksum_crc32(input);
483        self
484    }
485    /// <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 CRC32 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>
486    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
487        self.inner.get_checksum_crc32()
488    }
489    /// <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 CRC32C 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>
490    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
491        self.inner = self.inner.checksum_crc32_c(input.into());
492        self
493    }
494    /// <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 CRC32C 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>
495    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
496        self.inner = self.inner.set_checksum_crc32_c(input);
497        self
498    }
499    /// <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 CRC32C 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>
500    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
501        self.inner.get_checksum_crc32_c()
502    }
503    /// <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 SHA-1 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>
504    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
505        self.inner = self.inner.checksum_sha1(input.into());
506        self
507    }
508    /// <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 SHA-1 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>
509    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
510        self.inner = self.inner.set_checksum_sha1(input);
511        self
512    }
513    /// <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 SHA-1 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>
514    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
515        self.inner.get_checksum_sha1()
516    }
517    /// <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 SHA-256 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>
518    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
519        self.inner = self.inner.checksum_sha256(input.into());
520        self
521    }
522    /// <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 SHA-256 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>
523    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
524        self.inner = self.inner.set_checksum_sha256(input);
525        self
526    }
527    /// <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 SHA-256 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>
528    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
529        self.inner.get_checksum_sha256()
530    }
531    /// <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>
532    pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
533        self.inner = self.inner.expires(input);
534        self
535    }
536    /// <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>
537    pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
538        self.inner = self.inner.set_expires(input);
539        self
540    }
541    /// <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>
542    pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
543        self.inner.get_expires()
544    }
545    /// <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>
546    /// <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>
547    /// <p>Expects the '*' (asterisk) character.</p>
548    /// <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>
549    pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
550        self.inner = self.inner.if_none_match(input.into());
551        self
552    }
553    /// <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>
554    /// <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>
555    /// <p>Expects the '*' (asterisk) character.</p>
556    /// <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>
557    pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
558        self.inner = self.inner.set_if_none_match(input);
559        self
560    }
561    /// <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>
562    /// <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>
563    /// <p>Expects the '*' (asterisk) character.</p>
564    /// <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>
565    pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
566        self.inner.get_if_none_match()
567    }
568    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
569    /// <ul>
570    /// <li>
571    /// <p>This functionality is not supported for directory buckets.</p></li>
572    /// <li>
573    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
574    /// </ul>
575    /// </note>
576    pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
577        self.inner = self.inner.grant_full_control(input.into());
578        self
579    }
580    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
581    /// <ul>
582    /// <li>
583    /// <p>This functionality is not supported for directory buckets.</p></li>
584    /// <li>
585    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
586    /// </ul>
587    /// </note>
588    pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
589        self.inner = self.inner.set_grant_full_control(input);
590        self
591    }
592    /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
593    /// <ul>
594    /// <li>
595    /// <p>This functionality is not supported for directory buckets.</p></li>
596    /// <li>
597    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
598    /// </ul>
599    /// </note>
600    pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
601        self.inner.get_grant_full_control()
602    }
603    /// <p>Allows grantee to read the object data and its metadata.</p><note>
604    /// <ul>
605    /// <li>
606    /// <p>This functionality is not supported for directory buckets.</p></li>
607    /// <li>
608    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
609    /// </ul>
610    /// </note>
611    pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
612        self.inner = self.inner.grant_read(input.into());
613        self
614    }
615    /// <p>Allows grantee to read the object data and its metadata.</p><note>
616    /// <ul>
617    /// <li>
618    /// <p>This functionality is not supported for directory buckets.</p></li>
619    /// <li>
620    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
621    /// </ul>
622    /// </note>
623    pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
624        self.inner = self.inner.set_grant_read(input);
625        self
626    }
627    /// <p>Allows grantee to read the object data and its metadata.</p><note>
628    /// <ul>
629    /// <li>
630    /// <p>This functionality is not supported for directory buckets.</p></li>
631    /// <li>
632    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
633    /// </ul>
634    /// </note>
635    pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
636        self.inner.get_grant_read()
637    }
638    /// <p>Allows grantee to read the object ACL.</p><note>
639    /// <ul>
640    /// <li>
641    /// <p>This functionality is not supported for directory buckets.</p></li>
642    /// <li>
643    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
644    /// </ul>
645    /// </note>
646    pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
647        self.inner = self.inner.grant_read_acp(input.into());
648        self
649    }
650    /// <p>Allows grantee to read the object ACL.</p><note>
651    /// <ul>
652    /// <li>
653    /// <p>This functionality is not supported for directory buckets.</p></li>
654    /// <li>
655    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
656    /// </ul>
657    /// </note>
658    pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
659        self.inner = self.inner.set_grant_read_acp(input);
660        self
661    }
662    /// <p>Allows grantee to read the object ACL.</p><note>
663    /// <ul>
664    /// <li>
665    /// <p>This functionality is not supported for directory buckets.</p></li>
666    /// <li>
667    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
668    /// </ul>
669    /// </note>
670    pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
671        self.inner.get_grant_read_acp()
672    }
673    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
674    /// <ul>
675    /// <li>
676    /// <p>This functionality is not supported for directory buckets.</p></li>
677    /// <li>
678    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
679    /// </ul>
680    /// </note>
681    pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
682        self.inner = self.inner.grant_write_acp(input.into());
683        self
684    }
685    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
686    /// <ul>
687    /// <li>
688    /// <p>This functionality is not supported for directory buckets.</p></li>
689    /// <li>
690    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
691    /// </ul>
692    /// </note>
693    pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
694        self.inner = self.inner.set_grant_write_acp(input);
695        self
696    }
697    /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
698    /// <ul>
699    /// <li>
700    /// <p>This functionality is not supported for directory buckets.</p></li>
701    /// <li>
702    /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
703    /// </ul>
704    /// </note>
705    pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
706        self.inner.get_grant_write_acp()
707    }
708    /// <p>Object key for which the PUT action was initiated.</p>
709    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
710        self.inner = self.inner.key(input.into());
711        self
712    }
713    /// <p>Object key for which the PUT action was initiated.</p>
714    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
715        self.inner = self.inner.set_key(input);
716        self
717    }
718    /// <p>Object key for which the PUT action was initiated.</p>
719    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
720        self.inner.get_key()
721    }
722    ///
723    /// Adds a key-value pair to `Metadata`.
724    ///
725    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
726    ///
727    /// <p>A map of metadata to store with the object in S3.</p>
728    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
729        self.inner = self.inner.metadata(k.into(), v.into());
730        self
731    }
732    /// <p>A map of metadata to store with the object in S3.</p>
733    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
734        self.inner = self.inner.set_metadata(input);
735        self
736    }
737    /// <p>A map of metadata to store with the object in S3.</p>
738    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
739        self.inner.get_metadata()
740    }
741    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
742    /// <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>
743    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
744    pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
745        self.inner = self.inner.server_side_encryption(input);
746        self
747    }
748    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
749    /// <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>
750    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
751    pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
752        self.inner = self.inner.set_server_side_encryption(input);
753        self
754    }
755    /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
756    /// <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>
757    /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
758    pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
759        self.inner.get_server_side_encryption()
760    }
761    /// <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>
762    /// <ul>
763    /// <li>
764    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
765    /// <li>
766    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
767    /// </ul>
768    /// </note>
769    pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
770        self.inner = self.inner.storage_class(input);
771        self
772    }
773    /// <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>
774    /// <ul>
775    /// <li>
776    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
777    /// <li>
778    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
779    /// </ul>
780    /// </note>
781    pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
782        self.inner = self.inner.set_storage_class(input);
783        self
784    }
785    /// <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>
786    /// <ul>
787    /// <li>
788    /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
789    /// <li>
790    /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
791    /// </ul>
792    /// </note>
793    pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
794        self.inner.get_storage_class()
795    }
796    /// <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>
797    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
798    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
799    /// <p>In the following example, the request header sets the object redirect to another website:</p>
800    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
801    /// <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>
802    /// <p>This functionality is not supported for directory buckets.</p>
803    /// </note>
804    pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
805        self.inner = self.inner.website_redirect_location(input.into());
806        self
807    }
808    /// <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>
809    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
810    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
811    /// <p>In the following example, the request header sets the object redirect to another website:</p>
812    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
813    /// <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>
814    /// <p>This functionality is not supported for directory buckets.</p>
815    /// </note>
816    pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
817        self.inner = self.inner.set_website_redirect_location(input);
818        self
819    }
820    /// <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>
821    /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
822    /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
823    /// <p>In the following example, the request header sets the object redirect to another website:</p>
824    /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
825    /// <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>
826    /// <p>This functionality is not supported for directory buckets.</p>
827    /// </note>
828    pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
829        self.inner.get_website_redirect_location()
830    }
831    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
832    /// <p>This functionality is not supported for directory buckets.</p>
833    /// </note>
834    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
835        self.inner = self.inner.sse_customer_algorithm(input.into());
836        self
837    }
838    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
839    /// <p>This functionality is not supported for directory buckets.</p>
840    /// </note>
841    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
842        self.inner = self.inner.set_sse_customer_algorithm(input);
843        self
844    }
845    /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
846    /// <p>This functionality is not supported for directory buckets.</p>
847    /// </note>
848    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
849        self.inner.get_sse_customer_algorithm()
850    }
851    /// <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>
852    /// <p>This functionality is not supported for directory buckets.</p>
853    /// </note>
854    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
855        self.inner = self.inner.sse_customer_key(input.into());
856        self
857    }
858    /// <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>
859    /// <p>This functionality is not supported for directory buckets.</p>
860    /// </note>
861    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
862        self.inner = self.inner.set_sse_customer_key(input);
863        self
864    }
865    /// <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>
866    /// <p>This functionality is not supported for directory buckets.</p>
867    /// </note>
868    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
869        self.inner.get_sse_customer_key()
870    }
871    /// <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>
872    /// <p>This functionality is not supported for directory buckets.</p>
873    /// </note>
874    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
875        self.inner = self.inner.sse_customer_key_md5(input.into());
876        self
877    }
878    /// <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>
879    /// <p>This functionality is not supported for directory buckets.</p>
880    /// </note>
881    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
882        self.inner = self.inner.set_sse_customer_key_md5(input);
883        self
884    }
885    /// <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>
886    /// <p>This functionality is not supported for directory buckets.</p>
887    /// </note>
888    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
889        self.inner.get_sse_customer_key_md5()
890    }
891    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. 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. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
892    /// <p>This functionality is not supported for directory buckets.</p>
893    /// </note>
894    pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
895        self.inner = self.inner.ssekms_key_id(input.into());
896        self
897    }
898    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. 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. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
899    /// <p>This functionality is not supported for directory buckets.</p>
900    /// </note>
901    pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
902        self.inner = self.inner.set_ssekms_key_id(input);
903        self
904    }
905    /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. 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. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
906    /// <p>This functionality is not supported for directory buckets.</p>
907    /// </note>
908    pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
909        self.inner.get_ssekms_key_id()
910    }
911    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context 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> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
912    /// <p>This functionality is not supported for directory buckets.</p>
913    /// </note>
914    pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
915        self.inner = self.inner.ssekms_encryption_context(input.into());
916        self
917    }
918    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context 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> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
919    /// <p>This functionality is not supported for directory buckets.</p>
920    /// </note>
921    pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
922        self.inner = self.inner.set_ssekms_encryption_context(input);
923        self
924    }
925    /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context 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> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
926    /// <p>This functionality is not supported for directory buckets.</p>
927    /// </note>
928    pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
929        self.inner.get_ssekms_encryption_context()
930    }
931    /// <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). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
932    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
933    /// <p>This functionality is not supported for directory buckets.</p>
934    /// </note>
935    pub fn bucket_key_enabled(mut self, input: bool) -> Self {
936        self.inner = self.inner.bucket_key_enabled(input);
937        self
938    }
939    /// <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). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
940    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
941    /// <p>This functionality is not supported for directory buckets.</p>
942    /// </note>
943    pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
944        self.inner = self.inner.set_bucket_key_enabled(input);
945        self
946    }
947    /// <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). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
948    /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
949    /// <p>This functionality is not supported for directory buckets.</p>
950    /// </note>
951    pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
952        self.inner.get_bucket_key_enabled()
953    }
954    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
955    /// <p>This functionality is not supported for directory buckets.</p>
956    /// </note>
957    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
958        self.inner = self.inner.request_payer(input);
959        self
960    }
961    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
962    /// <p>This functionality is not supported for directory buckets.</p>
963    /// </note>
964    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
965        self.inner = self.inner.set_request_payer(input);
966        self
967    }
968    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
969    /// <p>This functionality is not supported for directory buckets.</p>
970    /// </note>
971    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
972        self.inner.get_request_payer()
973    }
974    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
975    /// <p>This functionality is not supported for directory buckets.</p>
976    /// </note>
977    pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
978        self.inner = self.inner.tagging(input.into());
979        self
980    }
981    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
982    /// <p>This functionality is not supported for directory buckets.</p>
983    /// </note>
984    pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
985        self.inner = self.inner.set_tagging(input);
986        self
987    }
988    /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
989    /// <p>This functionality is not supported for directory buckets.</p>
990    /// </note>
991    pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
992        self.inner.get_tagging()
993    }
994    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
995    /// <p>This functionality is not supported for directory buckets.</p>
996    /// </note>
997    pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
998        self.inner = self.inner.object_lock_mode(input);
999        self
1000    }
1001    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1002    /// <p>This functionality is not supported for directory buckets.</p>
1003    /// </note>
1004    pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1005        self.inner = self.inner.set_object_lock_mode(input);
1006        self
1007    }
1008    /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1009    /// <p>This functionality is not supported for directory buckets.</p>
1010    /// </note>
1011    pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1012        self.inner.get_object_lock_mode()
1013    }
1014    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1015    /// <p>This functionality is not supported for directory buckets.</p>
1016    /// </note>
1017    pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1018        self.inner = self.inner.object_lock_retain_until_date(input);
1019        self
1020    }
1021    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1022    /// <p>This functionality is not supported for directory buckets.</p>
1023    /// </note>
1024    pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1025        self.inner = self.inner.set_object_lock_retain_until_date(input);
1026        self
1027    }
1028    /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1029    /// <p>This functionality is not supported for directory buckets.</p>
1030    /// </note>
1031    pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1032        self.inner.get_object_lock_retain_until_date()
1033    }
1034    /// <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>
1035    /// <p>This functionality is not supported for directory buckets.</p>
1036    /// </note>
1037    pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1038        self.inner = self.inner.object_lock_legal_hold_status(input);
1039        self
1040    }
1041    /// <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>
1042    /// <p>This functionality is not supported for directory buckets.</p>
1043    /// </note>
1044    pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1045        self.inner = self.inner.set_object_lock_legal_hold_status(input);
1046        self
1047    }
1048    /// <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>
1049    /// <p>This functionality is not supported for directory buckets.</p>
1050    /// </note>
1051    pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1052        self.inner.get_object_lock_legal_hold_status()
1053    }
1054    /// <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>
1055    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1056        self.inner = self.inner.expected_bucket_owner(input.into());
1057        self
1058    }
1059    /// <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>
1060    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1061        self.inner = self.inner.set_expected_bucket_owner(input);
1062        self
1063    }
1064    /// <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>
1065    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1066        self.inner.get_expected_bucket_owner()
1067    }
1068}
1069
1070impl crate::client::customize::internal::CustomizablePresigned<crate::operation::put_object::PutObjectError> for PutObjectFluentBuilder {
1071    fn presign(
1072        self,
1073        config_override: crate::config::Builder,
1074        presigning_config: crate::presigning::PresigningConfig,
1075    ) -> crate::client::customize::internal::BoxFuture<
1076        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::put_object::PutObjectError>,
1077    > {
1078        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
1079    }
1080}