121 121 | "com.amazonaws.s3.synthetic",
|
122 122 | "PutObjectAclInput",
|
123 123 | );
|
124 124 | static PUTOBJECTACLINPUT_MEMBER_ACL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
125 125 | ::aws_smithy_schema::ShapeId::from_static(
|
126 126 | "com.amazonaws.s3.synthetic#PutObjectAclInput$ACL",
|
127 127 | "com.amazonaws.s3.synthetic",
|
128 128 | "PutObjectAclInput",
|
129 129 | ),
|
130 130 | ::aws_smithy_schema::ShapeType::String,
|
131 - | "acl",
|
131 + | "ACL",
|
132 132 | 0,
|
133 133 | )
|
134 134 | .with_http_header("x-amz-acl");
|
135 135 | static PUTOBJECTACLINPUT_MEMBER_ACCESS_CONTROL_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
136 136 | ::aws_smithy_schema::ShapeId::from_static(
|
137 137 | "com.amazonaws.s3.synthetic#PutObjectAclInput$AccessControlPolicy",
|
138 138 | "com.amazonaws.s3.synthetic",
|
139 139 | "PutObjectAclInput",
|
140 140 | ),
|
141 141 | ::aws_smithy_schema::ShapeType::Structure,
|
142 - | "access_control_policy",
|
142 + | "AccessControlPolicy",
|
143 143 | 1,
|
144 144 | )
|
145 145 | .with_xml_name("AccessControlPolicy")
|
146 146 | .with_http_payload();
|
147 147 | static PUTOBJECTACLINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
148 148 | ::aws_smithy_schema::ShapeId::from_static(
|
149 149 | "com.amazonaws.s3.synthetic#PutObjectAclInput$Bucket",
|
150 150 | "com.amazonaws.s3.synthetic",
|
151 151 | "PutObjectAclInput",
|
152 152 | ),
|
153 153 | ::aws_smithy_schema::ShapeType::String,
|
154 - | "bucket",
|
154 + | "Bucket",
|
155 155 | 2,
|
156 156 | )
|
157 157 | .with_http_label();
|
158 158 | static PUTOBJECTACLINPUT_MEMBER_CONTENT_MD5: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
159 159 | ::aws_smithy_schema::ShapeId::from_static(
|
160 160 | "com.amazonaws.s3.synthetic#PutObjectAclInput$ContentMD5",
|
161 161 | "com.amazonaws.s3.synthetic",
|
162 162 | "PutObjectAclInput",
|
163 163 | ),
|
164 164 | ::aws_smithy_schema::ShapeType::String,
|
165 - | "content_md5",
|
165 + | "ContentMD5",
|
166 166 | 3,
|
167 167 | )
|
168 168 | .with_http_header("Content-MD5");
|
169 169 | static PUTOBJECTACLINPUT_MEMBER_CHECKSUM_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
170 170 | ::aws_smithy_schema::ShapeId::from_static(
|
171 171 | "com.amazonaws.s3.synthetic#PutObjectAclInput$ChecksumAlgorithm",
|
172 172 | "com.amazonaws.s3.synthetic",
|
173 173 | "PutObjectAclInput",
|
174 174 | ),
|
175 175 | ::aws_smithy_schema::ShapeType::String,
|
176 - | "checksum_algorithm",
|
176 + | "ChecksumAlgorithm",
|
177 177 | 4,
|
178 178 | )
|
179 179 | .with_http_header("x-amz-sdk-checksum-algorithm");
|
180 180 | static PUTOBJECTACLINPUT_MEMBER_GRANT_FULL_CONTROL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
181 181 | ::aws_smithy_schema::ShapeId::from_static(
|
182 182 | "com.amazonaws.s3.synthetic#PutObjectAclInput$GrantFullControl",
|
183 183 | "com.amazonaws.s3.synthetic",
|
184 184 | "PutObjectAclInput",
|
185 185 | ),
|
186 186 | ::aws_smithy_schema::ShapeType::String,
|
187 - | "grant_full_control",
|
187 + | "GrantFullControl",
|
188 188 | 5,
|
189 189 | )
|
190 190 | .with_http_header("x-amz-grant-full-control");
|
191 191 | static PUTOBJECTACLINPUT_MEMBER_GRANT_READ: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
192 192 | ::aws_smithy_schema::ShapeId::from_static(
|
193 193 | "com.amazonaws.s3.synthetic#PutObjectAclInput$GrantRead",
|
194 194 | "com.amazonaws.s3.synthetic",
|
195 195 | "PutObjectAclInput",
|
196 196 | ),
|
197 197 | ::aws_smithy_schema::ShapeType::String,
|
198 - | "grant_read",
|
198 + | "GrantRead",
|
199 199 | 6,
|
200 200 | )
|
201 201 | .with_http_header("x-amz-grant-read");
|
202 202 | static PUTOBJECTACLINPUT_MEMBER_GRANT_READ_ACP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
203 203 | ::aws_smithy_schema::ShapeId::from_static(
|
204 204 | "com.amazonaws.s3.synthetic#PutObjectAclInput$GrantReadACP",
|
205 205 | "com.amazonaws.s3.synthetic",
|
206 206 | "PutObjectAclInput",
|
207 207 | ),
|
208 208 | ::aws_smithy_schema::ShapeType::String,
|
209 - | "grant_read_acp",
|
209 + | "GrantReadACP",
|
210 210 | 7,
|
211 211 | )
|
212 212 | .with_http_header("x-amz-grant-read-acp");
|
213 213 | static PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
214 214 | ::aws_smithy_schema::ShapeId::from_static(
|
215 215 | "com.amazonaws.s3.synthetic#PutObjectAclInput$GrantWrite",
|
216 216 | "com.amazonaws.s3.synthetic",
|
217 217 | "PutObjectAclInput",
|
218 218 | ),
|
219 219 | ::aws_smithy_schema::ShapeType::String,
|
220 - | "grant_write",
|
220 + | "GrantWrite",
|
221 221 | 8,
|
222 222 | )
|
223 223 | .with_http_header("x-amz-grant-write");
|
224 224 | static PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE_ACP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
225 225 | ::aws_smithy_schema::ShapeId::from_static(
|
226 226 | "com.amazonaws.s3.synthetic#PutObjectAclInput$GrantWriteACP",
|
227 227 | "com.amazonaws.s3.synthetic",
|
228 228 | "PutObjectAclInput",
|
229 229 | ),
|
230 230 | ::aws_smithy_schema::ShapeType::String,
|
231 - | "grant_write_acp",
|
231 + | "GrantWriteACP",
|
232 232 | 9,
|
233 233 | )
|
234 234 | .with_http_header("x-amz-grant-write-acp");
|
235 235 | static PUTOBJECTACLINPUT_MEMBER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
236 236 | ::aws_smithy_schema::ShapeId::from_static(
|
237 237 | "com.amazonaws.s3.synthetic#PutObjectAclInput$Key",
|
238 238 | "com.amazonaws.s3.synthetic",
|
239 239 | "PutObjectAclInput",
|
240 240 | ),
|
241 241 | ::aws_smithy_schema::ShapeType::String,
|
242 - | "key",
|
242 + | "Key",
|
243 243 | 10,
|
244 244 | )
|
245 245 | .with_http_label();
|
246 246 | static PUTOBJECTACLINPUT_MEMBER_REQUEST_PAYER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
247 247 | ::aws_smithy_schema::ShapeId::from_static(
|
248 248 | "com.amazonaws.s3.synthetic#PutObjectAclInput$RequestPayer",
|
249 249 | "com.amazonaws.s3.synthetic",
|
250 250 | "PutObjectAclInput",
|
251 251 | ),
|
252 252 | ::aws_smithy_schema::ShapeType::String,
|
253 - | "request_payer",
|
253 + | "RequestPayer",
|
254 254 | 11,
|
255 255 | )
|
256 256 | .with_http_header("x-amz-request-payer");
|
257 257 | static PUTOBJECTACLINPUT_MEMBER_VERSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
258 258 | ::aws_smithy_schema::ShapeId::from_static(
|
259 259 | "com.amazonaws.s3.synthetic#PutObjectAclInput$VersionId",
|
260 260 | "com.amazonaws.s3.synthetic",
|
261 261 | "PutObjectAclInput",
|
262 262 | ),
|
263 263 | ::aws_smithy_schema::ShapeType::String,
|
264 - | "version_id",
|
264 + | "VersionId",
|
265 265 | 12,
|
266 266 | )
|
267 267 | .with_http_query("versionId");
|
268 268 | static PUTOBJECTACLINPUT_MEMBER_EXPECTED_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
269 269 | ::aws_smithy_schema::ShapeId::from_static(
|
270 270 | "com.amazonaws.s3.synthetic#PutObjectAclInput$ExpectedBucketOwner",
|
271 271 | "com.amazonaws.s3.synthetic",
|
272 272 | "PutObjectAclInput",
|
273 273 | ),
|
274 274 | ::aws_smithy_schema::ShapeType::String,
|
275 - | "expected_bucket_owner",
|
275 + | "ExpectedBucketOwner",
|
276 276 | 13,
|
277 277 | )
|
278 278 | .with_http_header("x-amz-expected-bucket-owner");
|
279 279 | static PUTOBJECTACLINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
280 280 | PUTOBJECTACLINPUT_SCHEMA_ID,
|
281 281 | ::aws_smithy_schema::ShapeType::Structure,
|
282 282 | &[
|
283 283 | &PUTOBJECTACLINPUT_MEMBER_ACL,
|
284 284 | &PUTOBJECTACLINPUT_MEMBER_ACCESS_CONTROL_POLICY,
|
285 285 | &PUTOBJECTACLINPUT_MEMBER_BUCKET,
|
286 286 | &PUTOBJECTACLINPUT_MEMBER_CONTENT_MD5,
|
287 287 | &PUTOBJECTACLINPUT_MEMBER_CHECKSUM_ALGORITHM,
|
288 288 | &PUTOBJECTACLINPUT_MEMBER_GRANT_FULL_CONTROL,
|
289 289 | &PUTOBJECTACLINPUT_MEMBER_GRANT_READ,
|
290 290 | &PUTOBJECTACLINPUT_MEMBER_GRANT_READ_ACP,
|
291 291 | &PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE,
|
292 292 | &PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE_ACP,
|
293 293 | &PUTOBJECTACLINPUT_MEMBER_KEY,
|
294 294 | &PUTOBJECTACLINPUT_MEMBER_REQUEST_PAYER,
|
295 295 | &PUTOBJECTACLINPUT_MEMBER_VERSION_ID,
|
296 296 | &PUTOBJECTACLINPUT_MEMBER_EXPECTED_BUCKET_OWNER,
|
297 297 | ],
|
298 - | );
|
298 + | )
|
299 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("PUT", "/{Key+}?acl", None));
|
299 300 | impl PutObjectAclInput {
|
300 301 | /// The schema for this shape.
|
301 302 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &PUTOBJECTACLINPUT_SCHEMA;
|
302 303 | }
|
303 304 | impl ::aws_smithy_schema::serde::SerializableStruct for PutObjectAclInput {
|
304 305 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
305 306 | fn serialize_members(
|
306 307 | &self,
|
307 308 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
308 309 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
309 310 | if let Some(ref val) = self.acl {
|
310 311 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_ACL, val.as_str())?;
|
311 312 | }
|
312 313 | if let Some(ref val) = self.access_control_policy {
|
313 314 | ser.write_struct(&PUTOBJECTACLINPUT_MEMBER_ACCESS_CONTROL_POLICY, val)?;
|
314 315 | }
|
315 316 | if let Some(ref val) = self.bucket {
|
316 317 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_BUCKET, val)?;
|
317 318 | }
|
318 319 | if let Some(ref val) = self.content_md5 {
|
319 320 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_CONTENT_MD5, val)?;
|
320 321 | }
|
321 322 | if let Some(ref val) = self.checksum_algorithm {
|
322 323 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_CHECKSUM_ALGORITHM, val.as_str())?;
|
323 324 | }
|
324 325 | if let Some(ref val) = self.grant_full_control {
|
325 326 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_GRANT_FULL_CONTROL, val)?;
|
326 327 | }
|
327 328 | if let Some(ref val) = self.grant_read {
|
328 329 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_GRANT_READ, val)?;
|
329 330 | }
|
330 331 | if let Some(ref val) = self.grant_read_acp {
|
331 332 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_GRANT_READ_ACP, val)?;
|
332 333 | }
|
333 334 | if let Some(ref val) = self.grant_write {
|
334 335 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE, val)?;
|
335 336 | }
|
336 337 | if let Some(ref val) = self.grant_write_acp {
|
337 338 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_GRANT_WRITE_ACP, val)?;
|
338 339 | }
|
339 340 | if let Some(ref val) = self.key {
|
340 341 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_KEY, val)?;
|
341 342 | }
|
342 343 | if let Some(ref val) = self.request_payer {
|
343 344 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_REQUEST_PAYER, val.as_str())?;
|
344 345 | }
|
345 346 | if let Some(ref val) = self.version_id {
|
346 347 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_VERSION_ID, val)?;
|
347 348 | }
|
348 349 | if let Some(ref val) = self.expected_bucket_owner {
|
349 350 | ser.write_string(&PUTOBJECTACLINPUT_MEMBER_EXPECTED_BUCKET_OWNER, val)?;
|
350 351 | }
|
351 352 | Ok(())
|
352 353 | }
|
353 354 | }
|
354 355 | impl PutObjectAclInput {
|
355 356 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
356 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
357 - | deserializer: &mut D,
|
357 + | pub fn deserialize(
|
358 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
358 359 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
359 360 | #[allow(unused_variables, unused_mut)]
|
360 361 | let mut builder = Self::builder();
|
361 362 | #[allow(
|
362 363 | unused_variables,
|
363 364 | unreachable_code,
|
364 365 | clippy::single_match,
|
365 366 | clippy::match_single_binding,
|
366 367 | clippy::diverging_sub_expression
|
367 368 | )]
|
368 - | deserializer.read_struct(&PUTOBJECTACLINPUT_SCHEMA, (), |_, member, deser| {
|
369 + | deserializer.read_struct(&PUTOBJECTACLINPUT_SCHEMA, &mut |member, deser| {
|
369 370 | match member.member_index() {
|
370 371 | Some(0) => {
|
371 372 | builder.acl = Some(crate::types::ObjectCannedAcl::from(deser.read_string(member)?.as_str()));
|
372 373 | }
|
373 374 | Some(1) => {
|
374 375 | builder.access_control_policy = Some(crate::types::AccessControlPolicy::deserialize(deser)?);
|
375 376 | }
|
376 377 | Some(2) => {
|
377 378 | builder.bucket = Some(deser.read_string(member)?);
|
378 379 | }
|
379 380 | Some(3) => {
|
380 381 | builder.content_md5 = Some(deser.read_string(member)?);
|
381 382 | }
|
382 383 | Some(4) => {
|
383 384 | builder.checksum_algorithm = Some(crate::types::ChecksumAlgorithm::from(deser.read_string(member)?.as_str()));
|
384 385 | }
|
385 386 | Some(5) => {
|
386 387 | builder.grant_full_control = Some(deser.read_string(member)?);
|
387 388 | }
|
388 389 | Some(6) => {
|
389 390 | builder.grant_read = Some(deser.read_string(member)?);
|
390 391 | }
|
391 392 | Some(7) => {
|
392 393 | builder.grant_read_acp = Some(deser.read_string(member)?);
|
393 394 | }
|
394 395 | Some(8) => {
|
395 396 | builder.grant_write = Some(deser.read_string(member)?);
|
396 397 | }
|
397 398 | Some(9) => {
|
398 399 | builder.grant_write_acp = Some(deser.read_string(member)?);
|
399 400 | }
|
400 401 | Some(10) => {
|
401 402 | builder.key = Some(deser.read_string(member)?);
|
402 403 | }
|
403 404 | Some(11) => {
|
404 405 | builder.request_payer = Some(crate::types::RequestPayer::from(deser.read_string(member)?.as_str()));
|
405 406 | }
|
406 407 | Some(12) => {
|
407 408 | builder.version_id = Some(deser.read_string(member)?);
|
408 409 | }
|
409 410 | Some(13) => {
|
410 411 | builder.expected_bucket_owner = Some(deser.read_string(member)?);
|
411 412 | }
|
412 413 | _ => {}
|
413 414 | }
|
414 415 | Ok(())
|
415 416 | })?;
|
417 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
418 + | builder.key = builder.key.or(Some(String::new()));
|
419 + | builder
|
420 + | .build()
|
421 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
422 + | }
|
423 + | }
|
424 + | impl PutObjectAclInput {
|
425 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
426 + | /// Header-bound members are read directly from headers, avoiding runtime
|
427 + | /// member iteration overhead. Body members are read via the deserializer.
|
428 + | pub fn deserialize_with_response(
|
429 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
430 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
431 + | _status: u16,
|
432 + | body: &[u8],
|
433 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
434 + | #[allow(unused_variables, unused_mut)]
|
435 + | let mut builder = Self::builder();
|
436 + | if let Some(val) = headers.get("x-amz-acl") {
|
437 + | builder.acl = Some(crate::types::ObjectCannedAcl::from(val));
|
438 + | }
|
439 + | if let Some(val) = headers.get("Content-MD5") {
|
440 + | builder.content_md5 = Some(val.to_string());
|
441 + | }
|
442 + | if let Some(val) = headers.get("x-amz-sdk-checksum-algorithm") {
|
443 + | builder.checksum_algorithm = Some(crate::types::ChecksumAlgorithm::from(val));
|
444 + | }
|
445 + | if let Some(val) = headers.get("x-amz-grant-full-control") {
|
446 + | builder.grant_full_control = Some(val.to_string());
|
447 + | }
|
448 + | if let Some(val) = headers.get("x-amz-grant-read") {
|
449 + | builder.grant_read = Some(val.to_string());
|
450 + | }
|
451 + | if let Some(val) = headers.get("x-amz-grant-read-acp") {
|
452 + | builder.grant_read_acp = Some(val.to_string());
|
453 + | }
|
454 + | if let Some(val) = headers.get("x-amz-grant-write") {
|
455 + | builder.grant_write = Some(val.to_string());
|
456 + | }
|
457 + | if let Some(val) = headers.get("x-amz-grant-write-acp") {
|
458 + | builder.grant_write_acp = Some(val.to_string());
|
459 + | }
|
460 + | if let Some(val) = headers.get("x-amz-request-payer") {
|
461 + | builder.request_payer = Some(crate::types::RequestPayer::from(val));
|
462 + | }
|
463 + | if let Some(val) = headers.get("x-amz-expected-bucket-owner") {
|
464 + | builder.expected_bucket_owner = Some(val.to_string());
|
465 + | }
|
466 + | if !body.is_empty() {
|
467 + | builder.access_control_policy = Some(crate::types::AccessControlPolicy::deserialize(deserializer)?);
|
468 + | }
|
416 469 | builder
|
417 470 | .build()
|
418 471 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
419 472 | }
|
420 473 | }
|
421 474 | impl PutObjectAclInput {
|
422 475 | /// Creates a new builder-style object to manufacture [`PutObjectAclInput`](crate::operation::put_object_acl::PutObjectAclInput).
|
423 476 | pub fn builder() -> crate::operation::put_object_acl::builders::PutObjectAclInputBuilder {
|
424 477 | crate::operation::put_object_acl::builders::PutObjectAclInputBuilder::default()
|
425 478 | }
|