aws_sdk_s3/operation/delete_object/
_delete_object_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteObjectInput {
6    /// <p>The bucket name of the bucket containing the object.</p>
7    /// <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>
8    /// <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>
9    /// <p>Object Lambda access points are not supported by directory buckets.</p>
10    /// </note>
11    /// <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>
12    pub bucket: ::std::option::Option<::std::string::String>,
13    /// <p>Key name of the object to delete.</p>
14    pub key: ::std::option::Option<::std::string::String>,
15    /// <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>
16    /// <p>This functionality is not supported for directory buckets.</p>
17    /// </note>
18    pub mfa: ::std::option::Option<::std::string::String>,
19    /// <p>Version ID used to reference a specific version of the object.</p><note>
20    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
21    /// </note>
22    pub version_id: ::std::option::Option<::std::string::String>,
23    /// <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>
24    /// <p>This functionality is not supported for directory buckets.</p>
25    /// </note>
26    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
27    /// <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>
28    /// <p>This functionality is not supported for directory buckets.</p>
29    /// </note>
30    pub bypass_governance_retention: ::std::option::Option<bool>,
31    /// <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>
32    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
33    /// <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>
34    /// <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>
35    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
36    pub if_match: ::std::option::Option<::std::string::String>,
37    /// <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>
38    /// <p>This functionality is only supported for directory buckets.</p>
39    /// </note>
40    pub if_match_last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
41    /// <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>
42    /// <p>This functionality is only supported for directory buckets.</p>
43    /// </note> <important>
44    /// <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>
45    /// </important>
46    pub if_match_size: ::std::option::Option<i64>,
47}
48impl DeleteObjectInput {
49    /// <p>The bucket name of the bucket containing the object.</p>
50    /// <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>
51    /// <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>
52    /// <p>Object Lambda access points are not supported by directory buckets.</p>
53    /// </note>
54    /// <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>
55    pub fn bucket(&self) -> ::std::option::Option<&str> {
56        self.bucket.as_deref()
57    }
58    /// <p>Key name of the object to delete.</p>
59    pub fn key(&self) -> ::std::option::Option<&str> {
60        self.key.as_deref()
61    }
62    /// <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>
63    /// <p>This functionality is not supported for directory buckets.</p>
64    /// </note>
65    pub fn mfa(&self) -> ::std::option::Option<&str> {
66        self.mfa.as_deref()
67    }
68    /// <p>Version ID used to reference a specific version of the object.</p><note>
69    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
70    /// </note>
71    pub fn version_id(&self) -> ::std::option::Option<&str> {
72        self.version_id.as_deref()
73    }
74    /// <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>
75    /// <p>This functionality is not supported for directory buckets.</p>
76    /// </note>
77    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
78        self.request_payer.as_ref()
79    }
80    /// <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>
81    /// <p>This functionality is not supported for directory buckets.</p>
82    /// </note>
83    pub fn bypass_governance_retention(&self) -> ::std::option::Option<bool> {
84        self.bypass_governance_retention
85    }
86    /// <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>
87    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
88        self.expected_bucket_owner.as_deref()
89    }
90    /// <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>
91    /// <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>
92    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
93    pub fn if_match(&self) -> ::std::option::Option<&str> {
94        self.if_match.as_deref()
95    }
96    /// <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>
97    /// <p>This functionality is only supported for directory buckets.</p>
98    /// </note>
99    pub fn if_match_last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
100        self.if_match_last_modified_time.as_ref()
101    }
102    /// <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>
103    /// <p>This functionality is only supported for directory buckets.</p>
104    /// </note> <important>
105    /// <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>
106    /// </important>
107    pub fn if_match_size(&self) -> ::std::option::Option<i64> {
108        self.if_match_size
109    }
110}
111impl DeleteObjectInput {
112    /// Creates a new builder-style object to manufacture [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
113    pub fn builder() -> crate::operation::delete_object::builders::DeleteObjectInputBuilder {
114        crate::operation::delete_object::builders::DeleteObjectInputBuilder::default()
115    }
116}
117
118/// A builder for [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
119#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
120#[non_exhaustive]
121pub struct DeleteObjectInputBuilder {
122    pub(crate) bucket: ::std::option::Option<::std::string::String>,
123    pub(crate) key: ::std::option::Option<::std::string::String>,
124    pub(crate) mfa: ::std::option::Option<::std::string::String>,
125    pub(crate) version_id: ::std::option::Option<::std::string::String>,
126    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
127    pub(crate) bypass_governance_retention: ::std::option::Option<bool>,
128    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
129    pub(crate) if_match: ::std::option::Option<::std::string::String>,
130    pub(crate) if_match_last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
131    pub(crate) if_match_size: ::std::option::Option<i64>,
132}
133impl DeleteObjectInputBuilder {
134    /// <p>The bucket name of the bucket containing the object.</p>
135    /// <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>
136    /// <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>
137    /// <p>Object Lambda access points are not supported by directory buckets.</p>
138    /// </note>
139    /// <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>
140    /// This field is required.
141    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.bucket = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>The bucket name of the bucket containing the object.</p>
146    /// <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>
147    /// <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>
148    /// <p>Object Lambda access points are not supported by directory buckets.</p>
149    /// </note>
150    /// <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>
151    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.bucket = input;
153        self
154    }
155    /// <p>The bucket name of the bucket containing the object.</p>
156    /// <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>
157    /// <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>
158    /// <p>Object Lambda access points are not supported by directory buckets.</p>
159    /// </note>
160    /// <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>
161    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
162        &self.bucket
163    }
164    /// <p>Key name of the object to delete.</p>
165    /// This field is required.
166    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.key = ::std::option::Option::Some(input.into());
168        self
169    }
170    /// <p>Key name of the object to delete.</p>
171    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172        self.key = input;
173        self
174    }
175    /// <p>Key name of the object to delete.</p>
176    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
177        &self.key
178    }
179    /// <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>
180    /// <p>This functionality is not supported for directory buckets.</p>
181    /// </note>
182    pub fn mfa(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183        self.mfa = ::std::option::Option::Some(input.into());
184        self
185    }
186    /// <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>
187    /// <p>This functionality is not supported for directory buckets.</p>
188    /// </note>
189    pub fn set_mfa(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.mfa = input;
191        self
192    }
193    /// <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>
194    /// <p>This functionality is not supported for directory buckets.</p>
195    /// </note>
196    pub fn get_mfa(&self) -> &::std::option::Option<::std::string::String> {
197        &self.mfa
198    }
199    /// <p>Version ID used to reference a specific version of the object.</p><note>
200    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
201    /// </note>
202    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.version_id = ::std::option::Option::Some(input.into());
204        self
205    }
206    /// <p>Version ID used to reference a specific version of the object.</p><note>
207    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
208    /// </note>
209    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210        self.version_id = input;
211        self
212    }
213    /// <p>Version ID used to reference a specific version of the object.</p><note>
214    /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
215    /// </note>
216    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
217        &self.version_id
218    }
219    /// <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>
220    /// <p>This functionality is not supported for directory buckets.</p>
221    /// </note>
222    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
223        self.request_payer = ::std::option::Option::Some(input);
224        self
225    }
226    /// <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>
227    /// <p>This functionality is not supported for directory buckets.</p>
228    /// </note>
229    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
230        self.request_payer = input;
231        self
232    }
233    /// <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>
234    /// <p>This functionality is not supported for directory buckets.</p>
235    /// </note>
236    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
237        &self.request_payer
238    }
239    /// <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>
240    /// <p>This functionality is not supported for directory buckets.</p>
241    /// </note>
242    pub fn bypass_governance_retention(mut self, input: bool) -> Self {
243        self.bypass_governance_retention = ::std::option::Option::Some(input);
244        self
245    }
246    /// <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>
247    /// <p>This functionality is not supported for directory buckets.</p>
248    /// </note>
249    pub fn set_bypass_governance_retention(mut self, input: ::std::option::Option<bool>) -> Self {
250        self.bypass_governance_retention = input;
251        self
252    }
253    /// <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>
254    /// <p>This functionality is not supported for directory buckets.</p>
255    /// </note>
256    pub fn get_bypass_governance_retention(&self) -> &::std::option::Option<bool> {
257        &self.bypass_governance_retention
258    }
259    /// <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>
260    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
262        self
263    }
264    /// <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>
265    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266        self.expected_bucket_owner = input;
267        self
268    }
269    /// <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>
270    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
271        &self.expected_bucket_owner
272    }
273    /// <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>
274    /// <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>
275    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
276    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277        self.if_match = ::std::option::Option::Some(input.into());
278        self
279    }
280    /// <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>
281    /// <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>
282    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
283    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
284        self.if_match = input;
285        self
286    }
287    /// <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>
288    /// <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>
289    /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
290    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
291        &self.if_match
292    }
293    /// <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>
294    /// <p>This functionality is only supported for directory buckets.</p>
295    /// </note>
296    pub fn if_match_last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
297        self.if_match_last_modified_time = ::std::option::Option::Some(input);
298        self
299    }
300    /// <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>
301    /// <p>This functionality is only supported for directory buckets.</p>
302    /// </note>
303    pub fn set_if_match_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
304        self.if_match_last_modified_time = input;
305        self
306    }
307    /// <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>
308    /// <p>This functionality is only supported for directory buckets.</p>
309    /// </note>
310    pub fn get_if_match_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
311        &self.if_match_last_modified_time
312    }
313    /// <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>
314    /// <p>This functionality is only supported for directory buckets.</p>
315    /// </note> <important>
316    /// <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>
317    /// </important>
318    pub fn if_match_size(mut self, input: i64) -> Self {
319        self.if_match_size = ::std::option::Option::Some(input);
320        self
321    }
322    /// <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>
323    /// <p>This functionality is only supported for directory buckets.</p>
324    /// </note> <important>
325    /// <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>
326    /// </important>
327    pub fn set_if_match_size(mut self, input: ::std::option::Option<i64>) -> Self {
328        self.if_match_size = input;
329        self
330    }
331    /// <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>
332    /// <p>This functionality is only supported for directory buckets.</p>
333    /// </note> <important>
334    /// <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>
335    /// </important>
336    pub fn get_if_match_size(&self) -> &::std::option::Option<i64> {
337        &self.if_match_size
338    }
339    /// Consumes the builder and constructs a [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
340    pub fn build(
341        self,
342    ) -> ::std::result::Result<crate::operation::delete_object::DeleteObjectInput, ::aws_smithy_types::error::operation::BuildError> {
343        ::std::result::Result::Ok(crate::operation::delete_object::DeleteObjectInput {
344            bucket: self.bucket,
345            key: self.key,
346            mfa: self.mfa,
347            version_id: self.version_id,
348            request_payer: self.request_payer,
349            bypass_governance_retention: self.bypass_governance_retention,
350            expected_bucket_owner: self.expected_bucket_owner,
351            if_match: self.if_match,
352            if_match_last_modified_time: self.if_match_last_modified_time,
353            if_match_size: self.if_match_size,
354        })
355    }
356}