113 113 | "com.amazonaws.s3.synthetic",
|
114 114 | "DeleteObjectInput",
|
115 115 | );
|
116 116 | static DELETEOBJECTINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
117 117 | ::aws_smithy_schema::ShapeId::from_static(
|
118 118 | "com.amazonaws.s3.synthetic#DeleteObjectInput$Bucket",
|
119 119 | "com.amazonaws.s3.synthetic",
|
120 120 | "DeleteObjectInput",
|
121 121 | ),
|
122 122 | ::aws_smithy_schema::ShapeType::String,
|
123 - | "bucket",
|
123 + | "Bucket",
|
124 124 | 0,
|
125 125 | )
|
126 126 | .with_http_label();
|
127 127 | static DELETEOBJECTINPUT_MEMBER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
128 128 | ::aws_smithy_schema::ShapeId::from_static(
|
129 129 | "com.amazonaws.s3.synthetic#DeleteObjectInput$Key",
|
130 130 | "com.amazonaws.s3.synthetic",
|
131 131 | "DeleteObjectInput",
|
132 132 | ),
|
133 133 | ::aws_smithy_schema::ShapeType::String,
|
134 - | "key",
|
134 + | "Key",
|
135 135 | 1,
|
136 136 | )
|
137 137 | .with_http_label();
|
138 138 | static DELETEOBJECTINPUT_MEMBER_MFA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
139 139 | ::aws_smithy_schema::ShapeId::from_static(
|
140 140 | "com.amazonaws.s3.synthetic#DeleteObjectInput$MFA",
|
141 141 | "com.amazonaws.s3.synthetic",
|
142 142 | "DeleteObjectInput",
|
143 143 | ),
|
144 144 | ::aws_smithy_schema::ShapeType::String,
|
145 - | "mfa",
|
145 + | "MFA",
|
146 146 | 2,
|
147 147 | )
|
148 148 | .with_http_header("x-amz-mfa");
|
149 149 | static DELETEOBJECTINPUT_MEMBER_VERSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
150 150 | ::aws_smithy_schema::ShapeId::from_static(
|
151 151 | "com.amazonaws.s3.synthetic#DeleteObjectInput$VersionId",
|
152 152 | "com.amazonaws.s3.synthetic",
|
153 153 | "DeleteObjectInput",
|
154 154 | ),
|
155 155 | ::aws_smithy_schema::ShapeType::String,
|
156 - | "version_id",
|
156 + | "VersionId",
|
157 157 | 3,
|
158 158 | )
|
159 159 | .with_http_query("versionId");
|
160 160 | static DELETEOBJECTINPUT_MEMBER_REQUEST_PAYER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
161 161 | ::aws_smithy_schema::ShapeId::from_static(
|
162 162 | "com.amazonaws.s3.synthetic#DeleteObjectInput$RequestPayer",
|
163 163 | "com.amazonaws.s3.synthetic",
|
164 164 | "DeleteObjectInput",
|
165 165 | ),
|
166 166 | ::aws_smithy_schema::ShapeType::String,
|
167 - | "request_payer",
|
167 + | "RequestPayer",
|
168 168 | 4,
|
169 169 | )
|
170 170 | .with_http_header("x-amz-request-payer");
|
171 171 | static DELETEOBJECTINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
172 172 | ::aws_smithy_schema::ShapeId::from_static(
|
173 173 | "com.amazonaws.s3.synthetic#DeleteObjectInput$BypassGovernanceRetention",
|
174 174 | "com.amazonaws.s3.synthetic",
|
175 175 | "DeleteObjectInput",
|
176 176 | ),
|
177 177 | ::aws_smithy_schema::ShapeType::Boolean,
|
178 - | "bypass_governance_retention",
|
178 + | "BypassGovernanceRetention",
|
179 179 | 5,
|
180 180 | )
|
181 181 | .with_http_header("x-amz-bypass-governance-retention");
|
182 182 | static DELETEOBJECTINPUT_MEMBER_EXPECTED_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
183 183 | ::aws_smithy_schema::ShapeId::from_static(
|
184 184 | "com.amazonaws.s3.synthetic#DeleteObjectInput$ExpectedBucketOwner",
|
185 185 | "com.amazonaws.s3.synthetic",
|
186 186 | "DeleteObjectInput",
|
187 187 | ),
|
188 188 | ::aws_smithy_schema::ShapeType::String,
|
189 - | "expected_bucket_owner",
|
189 + | "ExpectedBucketOwner",
|
190 190 | 6,
|
191 191 | )
|
192 192 | .with_http_header("x-amz-expected-bucket-owner");
|
193 193 | static DELETEOBJECTINPUT_MEMBER_IF_MATCH: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
194 194 | ::aws_smithy_schema::ShapeId::from_static(
|
195 195 | "com.amazonaws.s3.synthetic#DeleteObjectInput$IfMatch",
|
196 196 | "com.amazonaws.s3.synthetic",
|
197 197 | "DeleteObjectInput",
|
198 198 | ),
|
199 199 | ::aws_smithy_schema::ShapeType::String,
|
200 - | "if_match",
|
200 + | "IfMatch",
|
201 201 | 7,
|
202 202 | )
|
203 203 | .with_http_header("If-Match");
|
204 204 | static DELETEOBJECTINPUT_MEMBER_IF_MATCH_LAST_MODIFIED_TIME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
205 205 | ::aws_smithy_schema::ShapeId::from_static(
|
206 206 | "com.amazonaws.s3.synthetic#DeleteObjectInput$IfMatchLastModifiedTime",
|
207 207 | "com.amazonaws.s3.synthetic",
|
208 208 | "DeleteObjectInput",
|
209 209 | ),
|
210 210 | ::aws_smithy_schema::ShapeType::Timestamp,
|
211 - | "if_match_last_modified_time",
|
211 + | "IfMatchLastModifiedTime",
|
212 212 | 8,
|
213 213 | )
|
214 - | .with_http_header("x-amz-if-match-last-modified-time");
|
214 + | .with_http_header("x-amz-if-match-last-modified-time")
|
215 + | .with_timestamp_format(aws_smithy_schema::traits::TimestampFormat::HttpDate);
|
215 216 | static DELETEOBJECTINPUT_MEMBER_IF_MATCH_SIZE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
216 217 | ::aws_smithy_schema::ShapeId::from_static(
|
217 218 | "com.amazonaws.s3.synthetic#DeleteObjectInput$IfMatchSize",
|
218 219 | "com.amazonaws.s3.synthetic",
|
219 220 | "DeleteObjectInput",
|
220 221 | ),
|
221 222 | ::aws_smithy_schema::ShapeType::Long,
|
222 - | "if_match_size",
|
223 + | "IfMatchSize",
|
223 224 | 9,
|
224 225 | )
|
225 226 | .with_http_header("x-amz-if-match-size");
|
226 227 | static DELETEOBJECTINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
227 228 | DELETEOBJECTINPUT_SCHEMA_ID,
|
228 229 | ::aws_smithy_schema::ShapeType::Structure,
|
229 230 | &[
|
230 231 | &DELETEOBJECTINPUT_MEMBER_BUCKET,
|
231 232 | &DELETEOBJECTINPUT_MEMBER_KEY,
|
232 233 | &DELETEOBJECTINPUT_MEMBER_MFA,
|
233 234 | &DELETEOBJECTINPUT_MEMBER_VERSION_ID,
|
234 235 | &DELETEOBJECTINPUT_MEMBER_REQUEST_PAYER,
|
235 236 | &DELETEOBJECTINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION,
|
236 237 | &DELETEOBJECTINPUT_MEMBER_EXPECTED_BUCKET_OWNER,
|
237 238 | &DELETEOBJECTINPUT_MEMBER_IF_MATCH,
|
238 239 | &DELETEOBJECTINPUT_MEMBER_IF_MATCH_LAST_MODIFIED_TIME,
|
239 240 | &DELETEOBJECTINPUT_MEMBER_IF_MATCH_SIZE,
|
240 241 | ],
|
241 - | );
|
242 + | )
|
243 + | .with_http(aws_smithy_schema::traits::HttpTrait::new(
|
244 + | "DELETE",
|
245 + | "/{Key+}?x-id=DeleteObject",
|
246 + | Some(204),
|
247 + | ));
|
242 248 | impl DeleteObjectInput {
|
243 249 | /// The schema for this shape.
|
244 250 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &DELETEOBJECTINPUT_SCHEMA;
|
245 251 | }
|
246 252 | impl ::aws_smithy_schema::serde::SerializableStruct for DeleteObjectInput {
|
247 253 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
248 254 | fn serialize_members(
|
249 255 | &self,
|
250 256 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
251 257 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
252 258 | if let Some(ref val) = self.bucket {
|
253 259 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_BUCKET, val)?;
|
254 260 | }
|
255 261 | if let Some(ref val) = self.key {
|
256 262 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_KEY, val)?;
|
257 263 | }
|
258 264 | if let Some(ref val) = self.mfa {
|
259 265 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_MFA, val)?;
|
260 266 | }
|
261 267 | if let Some(ref val) = self.version_id {
|
262 268 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_VERSION_ID, val)?;
|
263 269 | }
|
264 270 | if let Some(ref val) = self.request_payer {
|
265 271 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_REQUEST_PAYER, val.as_str())?;
|
266 272 | }
|
267 273 | if let Some(ref val) = self.bypass_governance_retention {
|
268 274 | ser.write_boolean(&DELETEOBJECTINPUT_MEMBER_BYPASS_GOVERNANCE_RETENTION, *val)?;
|
269 275 | }
|
270 276 | if let Some(ref val) = self.expected_bucket_owner {
|
271 277 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_EXPECTED_BUCKET_OWNER, val)?;
|
272 278 | }
|
273 279 | if let Some(ref val) = self.if_match {
|
274 280 | ser.write_string(&DELETEOBJECTINPUT_MEMBER_IF_MATCH, val)?;
|
275 281 | }
|
276 282 | if let Some(ref val) = self.if_match_last_modified_time {
|
277 283 | ser.write_timestamp(&DELETEOBJECTINPUT_MEMBER_IF_MATCH_LAST_MODIFIED_TIME, val)?;
|
278 284 | }
|
279 285 | if let Some(ref val) = self.if_match_size {
|
280 286 | ser.write_long(&DELETEOBJECTINPUT_MEMBER_IF_MATCH_SIZE, *val)?;
|
281 287 | }
|
282 288 | Ok(())
|
283 289 | }
|
284 290 | }
|
285 291 | impl DeleteObjectInput {
|
286 292 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
287 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
288 - | deserializer: &mut D,
|
293 + | pub fn deserialize(
|
294 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
289 295 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
290 296 | #[allow(unused_variables, unused_mut)]
|
291 297 | let mut builder = Self::builder();
|
292 298 | #[allow(
|
293 299 | unused_variables,
|
294 300 | unreachable_code,
|
295 301 | clippy::single_match,
|
296 302 | clippy::match_single_binding,
|
297 303 | clippy::diverging_sub_expression
|
298 304 | )]
|
299 - | deserializer.read_struct(&DELETEOBJECTINPUT_SCHEMA, (), |_, member, deser| {
|
305 + | deserializer.read_struct(&DELETEOBJECTINPUT_SCHEMA, &mut |member, deser| {
|
300 306 | match member.member_index() {
|
301 307 | Some(0) => {
|
302 308 | builder.bucket = Some(deser.read_string(member)?);
|
303 309 | }
|
304 310 | Some(1) => {
|
305 311 | builder.key = Some(deser.read_string(member)?);
|
306 312 | }
|
307 313 | Some(2) => {
|
308 314 | builder.mfa = Some(deser.read_string(member)?);
|
309 315 | }
|
310 316 | Some(3) => {
|
311 317 | builder.version_id = Some(deser.read_string(member)?);
|
312 318 | }
|
313 319 | Some(4) => {
|
314 320 | builder.request_payer = Some(crate::types::RequestPayer::from(deser.read_string(member)?.as_str()));
|
315 321 | }
|
316 322 | Some(5) => {
|
317 323 | builder.bypass_governance_retention = Some(deser.read_boolean(member)?);
|
318 324 | }
|
319 325 | Some(6) => {
|
320 326 | builder.expected_bucket_owner = Some(deser.read_string(member)?);
|
321 327 | }
|
322 328 | Some(7) => {
|
323 329 | builder.if_match = Some(deser.read_string(member)?);
|
324 330 | }
|
325 331 | Some(8) => {
|
326 332 | builder.if_match_last_modified_time = Some(deser.read_timestamp(member)?);
|
327 333 | }
|
328 334 | Some(9) => {
|
329 335 | builder.if_match_size = Some(deser.read_long(member)?);
|
330 336 | }
|
331 337 | _ => {}
|
332 338 | }
|
333 339 | Ok(())
|
334 340 | })?;
|
341 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
342 + | builder.key = builder.key.or(Some(String::new()));
|
343 + | builder
|
344 + | .build()
|
345 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
346 + | }
|
347 + | }
|
348 + | impl DeleteObjectInput {
|
349 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
350 + | /// Header-bound members are read directly from headers, avoiding runtime
|
351 + | /// member iteration overhead. Body members are read via the deserializer.
|
352 + | pub fn deserialize_with_response(
|
353 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
354 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
355 + | _status: u16,
|
356 + | _body: &[u8],
|
357 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
358 + | #[allow(unused_variables, unused_mut)]
|
359 + | let mut builder = Self::builder();
|
360 + | if let Some(val) = headers.get("x-amz-mfa") {
|
361 + | builder.mfa = Some(val.to_string());
|
362 + | }
|
363 + | if let Some(val) = headers.get("x-amz-request-payer") {
|
364 + | builder.request_payer = Some(crate::types::RequestPayer::from(val));
|
365 + | }
|
366 + | if let Some(val) = headers.get("x-amz-bypass-governance-retention") {
|
367 + | builder.bypass_governance_retention = val.parse::<bool>().ok();
|
368 + | }
|
369 + | if let Some(val) = headers.get("x-amz-expected-bucket-owner") {
|
370 + | builder.expected_bucket_owner = Some(val.to_string());
|
371 + | }
|
372 + | if let Some(val) = headers.get("If-Match") {
|
373 + | builder.if_match = Some(val.to_string());
|
374 + | }
|
375 + | if let Some(val) = headers.get("x-amz-if-match-last-modified-time") {
|
376 + | builder.if_match_last_modified_time = ::aws_smithy_types::DateTime::from_str(val, ::aws_smithy_types::date_time::Format::HttpDate).ok();
|
377 + | }
|
378 + | if let Some(val) = headers.get("x-amz-if-match-size") {
|
379 + | builder.if_match_size = val.parse::<i64>().ok();
|
380 + | }
|
381 + | #[allow(
|
382 + | unused_variables,
|
383 + | unreachable_code,
|
384 + | clippy::single_match,
|
385 + | clippy::match_single_binding,
|
386 + | clippy::diverging_sub_expression
|
387 + | )]
|
388 + | deserializer.read_struct(&DELETEOBJECTINPUT_SCHEMA, &mut |member, deser| {
|
389 + | match member.member_index() {
|
390 + | Some(0) => {
|
391 + | builder.bucket = Some(deser.read_string(member)?);
|
392 + | }
|
393 + | Some(1) => {
|
394 + | builder.key = Some(deser.read_string(member)?);
|
395 + | }
|
396 + | Some(2) => { /* read from headers above */ }
|
397 + | Some(3) => {
|
398 + | builder.version_id = Some(deser.read_string(member)?);
|
399 + | }
|
400 + | Some(4) => { /* read from headers above */ }
|
401 + | Some(5) => { /* read from headers above */ }
|
402 + | Some(6) => { /* read from headers above */ }
|
403 + | Some(7) => { /* read from headers above */ }
|
404 + | Some(8) => { /* read from headers above */ }
|
405 + | Some(9) => { /* read from headers above */ }
|
406 + | _ => {}
|
407 + | }
|
408 + | Ok(())
|
409 + | })?;
|
335 410 | builder
|
336 411 | .build()
|
337 412 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
338 413 | }
|
339 414 | }
|
340 415 | impl DeleteObjectInput {
|
341 416 | /// Creates a new builder-style object to manufacture [`DeleteObjectInput`](crate::operation::delete_object::DeleteObjectInput).
|
342 417 | pub fn builder() -> crate::operation::delete_object::builders::DeleteObjectInputBuilder {
|
343 418 | crate::operation::delete_object::builders::DeleteObjectInputBuilder::default()
|
344 419 | }
|