aws_sdk_s3/operation/delete_object/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_object::_delete_object_output::DeleteObjectOutputBuilder;
3
4pub use crate::operation::delete_object::_delete_object_input::DeleteObjectInputBuilder;
5
6impl crate::operation::delete_object::builders::DeleteObjectInputBuilder {
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::delete_object::DeleteObjectOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_object::DeleteObjectError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_object();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteObject`.
24///
25/// <p>Removes an object from a bucket. The behavior depends on the bucket's versioning state:</p>
26/// <ul>
27/// <li>
28/// <p>If bucket versioning is not enabled, the operation permanently deletes the object.</p></li>
29/// <li>
30/// <p>If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s <code>versionId</code> in the request. For more information about versioning-enabled buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html">Deleting object versions from a versioning-enabled bucket</a>.</p></li>
31/// <li>
32/// <p>If bucket versioning is suspended, the operation removes the object that has a null <code>versionId</code>, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null <code>versionId</code>, and all versions of the object have a <code>versionId</code>, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a <code>versionId</code>, you must include the object’s <code>versionId</code> in the request. For more information about versioning-suspended buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html">Deleting objects from versioning-suspended buckets</a>.</p></li>
33/// </ul><note>
34/// <ul>
35/// <li>
36/// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
37/// <li>
38/// <p><b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p></li>
39/// </ul>
40/// </note>
41/// <p>To remove a specific version, you must use the <code>versionId</code> query parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header <code>x-amz-delete-marker</code> to true.</p>
42/// <p>If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the <code>x-amz-mfa</code> request header in the DELETE <code>versionId</code> request. Requests that include <code>x-amz-mfa</code> must use HTTPS. For more information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA Delete</a> in the <i>Amazon S3 User Guide</i>. To see sample requests that use versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample Request</a>.</p><note>
43/// <p><b>Directory buckets</b> - MFA delete is not supported by directory buckets.</p>
44/// </note>
45/// <p>You can delete objects by explicitly calling DELETE Object or calling (<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>, and <code>s3:PutLifeCycleConfiguration</code> actions.</p><note>
46/// <p><b>Directory buckets</b> - S3 Lifecycle is not supported by directory buckets.</p>
47/// </note>
48/// <dl>
49/// <dt>
50/// Permissions
51/// </dt>
52/// <dd>
53/// <ul>
54/// <li>
55/// <p><b>General purpose bucket permissions</b> - The following permissions are required in your policies when your <code>DeleteObjects</code> request includes specific headers.</p>
56/// <ul>
57/// <li>
58/// <p><b> <code>s3:DeleteObject</code> </b> - To delete an object from a bucket, you must always have the <code>s3:DeleteObject</code> permission.</p></li>
59/// <li>
60/// <p><b> <code>s3:DeleteObjectVersion</code> </b> - To delete a specific version of an object from a versioning-enabled bucket, you must have the <code>s3:DeleteObjectVersion</code> permission.</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/// HTTP Host header syntax
68/// </dt>
69/// <dd>
70/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p>
71/// </dd>
72/// </dl>
73/// <p>The following action is related to <code>DeleteObject</code>:</p>
74/// <ul>
75/// <li>
76/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
77/// </ul><important>
78/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
79/// </important> <note>
80/// <p>The <code>If-Match</code> header is supported for both general purpose and directory buckets. <code>IfMatchLastModifiedTime</code> and <code>IfMatchSize</code> is only supported for directory buckets.</p>
81/// </note>
82#[derive(::std::clone::Clone, ::std::fmt::Debug)]
83pub struct DeleteObjectFluentBuilder {
84    handle: ::std::sync::Arc<crate::client::Handle>,
85    inner: crate::operation::delete_object::builders::DeleteObjectInputBuilder,
86    config_override: ::std::option::Option<crate::config::Builder>,
87}
88impl
89    crate::client::customize::internal::CustomizableSend<
90        crate::operation::delete_object::DeleteObjectOutput,
91        crate::operation::delete_object::DeleteObjectError,
92    > for DeleteObjectFluentBuilder
93{
94    fn send(
95        self,
96        config_override: crate::config::Builder,
97    ) -> crate::client::customize::internal::BoxFuture<
98        crate::client::customize::internal::SendResult<
99            crate::operation::delete_object::DeleteObjectOutput,
100            crate::operation::delete_object::DeleteObjectError,
101        >,
102    > {
103        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
104    }
105}
106impl DeleteObjectFluentBuilder {
107    /// Creates a new `DeleteObjectFluentBuilder`.
108    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
109        Self {
110            handle,
111            inner: ::std::default::Default::default(),
112            config_override: ::std::option::Option::None,
113        }
114    }
115    /// Access the DeleteObject as a reference.
116    pub fn as_input(&self) -> &crate::operation::delete_object::builders::DeleteObjectInputBuilder {
117        &self.inner
118    }
119    /// Sends the request and returns the response.
120    ///
121    /// If an error occurs, an `SdkError` will be returned with additional details that
122    /// can be matched against.
123    ///
124    /// By default, any retryable failures will be retried twice. Retry behavior
125    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
126    /// set when configuring the client.
127    pub async fn send(
128        self,
129    ) -> ::std::result::Result<
130        crate::operation::delete_object::DeleteObjectOutput,
131        ::aws_smithy_runtime_api::client::result::SdkError<
132            crate::operation::delete_object::DeleteObjectError,
133            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
134        >,
135    > {
136        let input = self
137            .inner
138            .build()
139            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
140        let runtime_plugins = crate::operation::delete_object::DeleteObject::operation_runtime_plugins(
141            self.handle.runtime_plugins.clone(),
142            &self.handle.conf,
143            self.config_override,
144        );
145        crate::operation::delete_object::DeleteObject::orchestrate(&runtime_plugins, input).await
146    }
147
148    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
149    pub fn customize(
150        self,
151    ) -> crate::client::customize::CustomizableOperation<
152        crate::operation::delete_object::DeleteObjectOutput,
153        crate::operation::delete_object::DeleteObjectError,
154        Self,
155    > {
156        crate::client::customize::CustomizableOperation::new(self)
157    }
158    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
159        self.set_config_override(::std::option::Option::Some(config_override.into()));
160        self
161    }
162
163    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
164        self.config_override = config_override;
165        self
166    }
167    ///
168    /// Creates a presigned request for this operation.
169    ///
170    /// The `presigning_config` provides additional presigning-specific config values, such as the
171    /// amount of time the request should be valid for after creation.
172    ///
173    /// Presigned requests can be given to other users or applications to access a resource or perform
174    /// an operation without having access to the AWS security credentials.
175    ///
176    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
177    /// the presigned request can only be valid for as long as the credentials used to create it are.
178    ///
179    #[allow(unused_mut)]
180    pub async fn presigned(
181        mut self,
182        presigning_config: crate::presigning::PresigningConfig,
183    ) -> ::std::result::Result<
184        crate::presigning::PresignedRequest,
185        ::aws_smithy_runtime_api::client::result::SdkError<
186            crate::operation::delete_object::DeleteObjectError,
187            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
188        >,
189    > {
190        let runtime_plugins = crate::operation::delete_object::DeleteObject::operation_runtime_plugins(
191            self.handle.runtime_plugins.clone(),
192            &self.handle.conf,
193            self.config_override,
194        )
195        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
196            presigning_config,
197            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
198        ));
199
200        let input = self
201            .inner
202            .build()
203            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
204        let mut context = crate::operation::delete_object::DeleteObject::orchestrate_with_stop_point(
205            &runtime_plugins,
206            input,
207            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
208        )
209        .await
210        .map_err(|err| {
211            err.map_service_error(|err| {
212                err.downcast::<crate::operation::delete_object::DeleteObjectError>()
213                    .expect("correct error type")
214            })
215        })?;
216        let request = context.take_request().expect("request set before transmit");
217        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
218    }
219    /// <p>The bucket name of the bucket containing the object.</p>
220    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
221    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
222    /// <p>Object Lambda access points are not supported by directory buckets.</p>
223    /// </note>
224    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
225    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226        self.inner = self.inner.bucket(input.into());
227        self
228    }
229    /// <p>The bucket name of the bucket containing the object.</p>
230    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
231    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
232    /// <p>Object Lambda access points are not supported by directory buckets.</p>
233    /// </note>
234    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
235    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
236        self.inner = self.inner.set_bucket(input);
237        self
238    }
239    /// <p>The bucket name of the bucket containing the object.</p>
240    /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
241    /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
242    /// <p>Object Lambda access points are not supported by directory buckets.</p>
243    /// </note>
244    /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
245    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
246        self.inner.get_bucket()
247    }
248    /// <p>Key name of the object to delete.</p>
249    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250        self.inner = self.inner.key(input.into());
251        self
252    }
253    /// <p>Key name of the object to delete.</p>
254    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.inner = self.inner.set_key(input);
256        self
257    }
258    /// <p>Key name of the object to delete.</p>
259    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
260        self.inner.get_key()
261    }
262    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.</p><note>
263    /// <p>This functionality is not supported for directory buckets.</p>
264    /// </note>
265    pub fn mfa(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266        self.inner = self.inner.mfa(input.into());
267        self
268    }
269    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.</p><note>
270    /// <p>This functionality is not supported for directory buckets.</p>
271    /// </note>
272    pub fn set_mfa(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.inner = self.inner.set_mfa(input);
274        self
275    }
276    /// <p>The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.</p><note>
277    /// <p>This functionality is not supported for directory buckets.</p>
278    /// </note>
279    pub fn get_mfa(&self) -> &::std::option::Option<::std::string::String> {
280        self.inner.get_mfa()
281    }
282    /// <p>Version ID used to reference a specific version of the object.</p><note>
283    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
284    /// </note>
285    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
286        self.inner = self.inner.version_id(input.into());
287        self
288    }
289    /// <p>Version ID used to reference a specific version of the object.</p><note>
290    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
291    /// </note>
292    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
293        self.inner = self.inner.set_version_id(input);
294        self
295    }
296    /// <p>Version ID used to reference a specific version of the object.</p><note>
297    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
298    /// </note>
299    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
300        self.inner.get_version_id()
301    }
302    /// <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>
303    /// <p>This functionality is not supported for directory buckets.</p>
304    /// </note>
305    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
306        self.inner = self.inner.request_payer(input);
307        self
308    }
309    /// <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>
310    /// <p>This functionality is not supported for directory buckets.</p>
311    /// </note>
312    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
313        self.inner = self.inner.set_request_payer(input);
314        self
315    }
316    /// <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>
317    /// <p>This functionality is not supported for directory buckets.</p>
318    /// </note>
319    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
320        self.inner.get_request_payer()
321    }
322    /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
323    /// <p>This functionality is not supported for directory buckets.</p>
324    /// </note>
325    pub fn bypass_governance_retention(mut self, input: bool) -> Self {
326        self.inner = self.inner.bypass_governance_retention(input);
327        self
328    }
329    /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
330    /// <p>This functionality is not supported for directory buckets.</p>
331    /// </note>
332    pub fn set_bypass_governance_retention(mut self, input: ::std::option::Option<bool>) -> Self {
333        self.inner = self.inner.set_bypass_governance_retention(input);
334        self
335    }
336    /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
337    /// <p>This functionality is not supported for directory buckets.</p>
338    /// </note>
339    pub fn get_bypass_governance_retention(&self) -> &::std::option::Option<bool> {
340        self.inner.get_bypass_governance_retention()
341    }
342    /// <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>
343    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
344        self.inner = self.inner.expected_bucket_owner(input.into());
345        self
346    }
347    /// <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>
348    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349        self.inner = self.inner.set_expected_bucket_owner(input);
350        self
351    }
352    /// <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>
353    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
354        self.inner.get_expected_bucket_owner()
355    }
356    /// <p>Deletes the object if the ETag (entity tag) value provided during the delete operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
357    /// <p>Expects the ETag value as a string. <code>If-Match</code> does accept a string value of an '*' (asterisk) character to denote a match of any ETag.</p>
358    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
359    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360        self.inner = self.inner.if_match(input.into());
361        self
362    }
363    /// <p>Deletes the object if the ETag (entity tag) value provided during the delete operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
364    /// <p>Expects the ETag value as a string. <code>If-Match</code> does accept a string value of an '*' (asterisk) character to denote a match of any ETag.</p>
365    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
366    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367        self.inner = self.inner.set_if_match(input);
368        self
369    }
370    /// <p>Deletes the object if the ETag (entity tag) value provided during the delete operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
371    /// <p>Expects the ETag value as a string. <code>If-Match</code> does accept a string value of an '*' (asterisk) character to denote a match of any ETag.</p>
372    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
373    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
374        self.inner.get_if_match()
375    }
376    /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
377    /// <p>This functionality is only supported for directory buckets.</p>
378    /// </note>
379    pub fn if_match_last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
380        self.inner = self.inner.if_match_last_modified_time(input);
381        self
382    }
383    /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
384    /// <p>This functionality is only supported for directory buckets.</p>
385    /// </note>
386    pub fn set_if_match_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
387        self.inner = self.inner.set_if_match_last_modified_time(input);
388        self
389    }
390    /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
391    /// <p>This functionality is only supported for directory buckets.</p>
392    /// </note>
393    pub fn get_if_match_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
394        self.inner.get_if_match_last_modified_time()
395    }
396    /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
397    /// <p>This functionality is only supported for directory buckets.</p>
398    /// </note> <important>
399    /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
400    /// </important>
401    pub fn if_match_size(mut self, input: i64) -> Self {
402        self.inner = self.inner.if_match_size(input);
403        self
404    }
405    /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
406    /// <p>This functionality is only supported for directory buckets.</p>
407    /// </note> <important>
408    /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
409    /// </important>
410    pub fn set_if_match_size(mut self, input: ::std::option::Option<i64>) -> Self {
411        self.inner = self.inner.set_if_match_size(input);
412        self
413    }
414    /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
415    /// <p>This functionality is only supported for directory buckets.</p>
416    /// </note> <important>
417    /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
418    /// </important>
419    pub fn get_if_match_size(&self) -> &::std::option::Option<i64> {
420        self.inner.get_if_match_size()
421    }
422}
423
424impl crate::client::customize::internal::CustomizablePresigned<crate::operation::delete_object::DeleteObjectError> for DeleteObjectFluentBuilder {
425    fn presign(
426        self,
427        config_override: crate::config::Builder,
428        presigning_config: crate::presigning::PresigningConfig,
429    ) -> crate::client::customize::internal::BoxFuture<
430        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::delete_object::DeleteObjectError>,
431    > {
432        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
433    }
434}