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>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>
8 /// <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>
9 /// <p>Access points and 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 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>
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}
34impl DeleteObjectInput {
35 /// <p>The bucket name of the bucket containing the object.</p>
36 /// <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>
37 /// <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>
38 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
39 /// </note>
40 /// <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>
41 pub fn bucket(&self) -> ::std::option::Option<&str> {
42 self.bucket.as_deref()
43 }
44 /// <p>Key name of the object to delete.</p>
45 pub fn key(&self) -> ::std::option::Option<&str> {
46 self.key.as_deref()
47 }
48 /// <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>
49 /// <p>This functionality is not supported for directory buckets.</p>
50 /// </note>
51 pub fn mfa(&self) -> ::std::option::Option<&str> {
52 self.mfa.as_deref()
53 }
54 /// <p>Version ID used to reference a specific version of the object.</p><note>
55 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
56 /// </note>
57 pub fn version_id(&self) -> ::std::option::Option<&str> {
58 self.version_id.as_deref()
59 }
60 /// <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>
61 /// <p>This functionality is not supported for directory buckets.</p>
62 /// </note>
63 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
64 self.request_payer.as_ref()
65 }
66 /// <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>
67 /// <p>This functionality is not supported for directory buckets.</p>
68 /// </note>
69 pub fn bypass_governance_retention(&self) -> ::std::option::Option<bool> {
70 self.bypass_governance_retention
71 }
72 /// <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>
73 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
74 self.expected_bucket_owner.as_deref()
75 }
76}
77impl DeleteObjectInput {
78 /// Creates a new builder-style object to manufacture [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
79 pub fn builder() -> crate::operation::delete_object::builders::DeleteObjectInputBuilder {
80 crate::operation::delete_object::builders::DeleteObjectInputBuilder::default()
81 }
82}
83
84/// A builder for [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct DeleteObjectInputBuilder {
88 pub(crate) bucket: ::std::option::Option<::std::string::String>,
89 pub(crate) key: ::std::option::Option<::std::string::String>,
90 pub(crate) mfa: ::std::option::Option<::std::string::String>,
91 pub(crate) version_id: ::std::option::Option<::std::string::String>,
92 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
93 pub(crate) bypass_governance_retention: ::std::option::Option<bool>,
94 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
95}
96impl DeleteObjectInputBuilder {
97 /// <p>The bucket name of the bucket containing the object.</p>
98 /// <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>
99 /// <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>
100 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
101 /// </note>
102 /// <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>
103 /// This field is required.
104 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.bucket = ::std::option::Option::Some(input.into());
106 self
107 }
108 /// <p>The bucket name of the bucket containing the object.</p>
109 /// <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>
110 /// <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>
111 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
112 /// </note>
113 /// <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>
114 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.bucket = input;
116 self
117 }
118 /// <p>The bucket name of the bucket containing the object.</p>
119 /// <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>
120 /// <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>
121 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
122 /// </note>
123 /// <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>
124 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
125 &self.bucket
126 }
127 /// <p>Key name of the object to delete.</p>
128 /// This field is required.
129 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.key = ::std::option::Option::Some(input.into());
131 self
132 }
133 /// <p>Key name of the object to delete.</p>
134 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.key = input;
136 self
137 }
138 /// <p>Key name of the object to delete.</p>
139 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
140 &self.key
141 }
142 /// <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>
143 /// <p>This functionality is not supported for directory buckets.</p>
144 /// </note>
145 pub fn mfa(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.mfa = ::std::option::Option::Some(input.into());
147 self
148 }
149 /// <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>
150 /// <p>This functionality is not supported for directory buckets.</p>
151 /// </note>
152 pub fn set_mfa(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.mfa = input;
154 self
155 }
156 /// <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>
157 /// <p>This functionality is not supported for directory buckets.</p>
158 /// </note>
159 pub fn get_mfa(&self) -> &::std::option::Option<::std::string::String> {
160 &self.mfa
161 }
162 /// <p>Version ID used to reference a specific version of the object.</p><note>
163 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
164 /// </note>
165 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166 self.version_id = ::std::option::Option::Some(input.into());
167 self
168 }
169 /// <p>Version ID used to reference a specific version of the object.</p><note>
170 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
171 /// </note>
172 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.version_id = input;
174 self
175 }
176 /// <p>Version ID used to reference a specific version of the object.</p><note>
177 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
178 /// </note>
179 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
180 &self.version_id
181 }
182 /// <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>
183 /// <p>This functionality is not supported for directory buckets.</p>
184 /// </note>
185 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
186 self.request_payer = ::std::option::Option::Some(input);
187 self
188 }
189 /// <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>
190 /// <p>This functionality is not supported for directory buckets.</p>
191 /// </note>
192 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
193 self.request_payer = input;
194 self
195 }
196 /// <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>
197 /// <p>This functionality is not supported for directory buckets.</p>
198 /// </note>
199 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
200 &self.request_payer
201 }
202 /// <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>
203 /// <p>This functionality is not supported for directory buckets.</p>
204 /// </note>
205 pub fn bypass_governance_retention(mut self, input: bool) -> Self {
206 self.bypass_governance_retention = ::std::option::Option::Some(input);
207 self
208 }
209 /// <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>
210 /// <p>This functionality is not supported for directory buckets.</p>
211 /// </note>
212 pub fn set_bypass_governance_retention(mut self, input: ::std::option::Option<bool>) -> Self {
213 self.bypass_governance_retention = input;
214 self
215 }
216 /// <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>
217 /// <p>This functionality is not supported for directory buckets.</p>
218 /// </note>
219 pub fn get_bypass_governance_retention(&self) -> &::std::option::Option<bool> {
220 &self.bypass_governance_retention
221 }
222 /// <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>
223 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
225 self
226 }
227 /// <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>
228 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229 self.expected_bucket_owner = input;
230 self
231 }
232 /// <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>
233 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
234 &self.expected_bucket_owner
235 }
236 /// Consumes the builder and constructs a [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
237 pub fn build(
238 self,
239 ) -> ::std::result::Result<crate::operation::delete_object::DeleteObjectInput, ::aws_smithy_types::error::operation::BuildError> {
240 ::std::result::Result::Ok(crate::operation::delete_object::DeleteObjectInput {
241 bucket: self.bucket,
242 key: self.key,
243 mfa: self.mfa,
244 version_id: self.version_id,
245 request_payer: self.request_payer,
246 bypass_governance_retention: self.bypass_governance_retention,
247 expected_bucket_owner: self.expected_bucket_owner,
248 })
249 }
250}