126 126 | "com.amazonaws.s3.synthetic",
|
127 127 | "GetObjectAttributesInput",
|
128 128 | );
|
129 129 | static GETOBJECTATTRIBUTESINPUT_MEMBER_BUCKET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
130 130 | ::aws_smithy_schema::ShapeId::from_static(
|
131 131 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$Bucket",
|
132 132 | "com.amazonaws.s3.synthetic",
|
133 133 | "GetObjectAttributesInput",
|
134 134 | ),
|
135 135 | ::aws_smithy_schema::ShapeType::String,
|
136 - | "bucket",
|
136 + | "Bucket",
|
137 137 | 0,
|
138 138 | )
|
139 139 | .with_http_label();
|
140 140 | static GETOBJECTATTRIBUTESINPUT_MEMBER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
141 141 | ::aws_smithy_schema::ShapeId::from_static(
|
142 142 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$Key",
|
143 143 | "com.amazonaws.s3.synthetic",
|
144 144 | "GetObjectAttributesInput",
|
145 145 | ),
|
146 146 | ::aws_smithy_schema::ShapeType::String,
|
147 - | "key",
|
147 + | "Key",
|
148 148 | 1,
|
149 149 | )
|
150 150 | .with_http_label();
|
151 151 | static GETOBJECTATTRIBUTESINPUT_MEMBER_VERSION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
152 152 | ::aws_smithy_schema::ShapeId::from_static(
|
153 153 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$VersionId",
|
154 154 | "com.amazonaws.s3.synthetic",
|
155 155 | "GetObjectAttributesInput",
|
156 156 | ),
|
157 157 | ::aws_smithy_schema::ShapeType::String,
|
158 - | "version_id",
|
158 + | "VersionId",
|
159 159 | 2,
|
160 160 | )
|
161 161 | .with_http_query("versionId");
|
162 162 | static GETOBJECTATTRIBUTESINPUT_MEMBER_MAX_PARTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
163 163 | ::aws_smithy_schema::ShapeId::from_static(
|
164 164 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$MaxParts",
|
165 165 | "com.amazonaws.s3.synthetic",
|
166 166 | "GetObjectAttributesInput",
|
167 167 | ),
|
168 168 | ::aws_smithy_schema::ShapeType::Integer,
|
169 - | "max_parts",
|
169 + | "MaxParts",
|
170 170 | 3,
|
171 171 | )
|
172 172 | .with_http_header("x-amz-max-parts");
|
173 173 | static GETOBJECTATTRIBUTESINPUT_MEMBER_PART_NUMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
174 174 | ::aws_smithy_schema::ShapeId::from_static(
|
175 175 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$PartNumberMarker",
|
176 176 | "com.amazonaws.s3.synthetic",
|
177 177 | "GetObjectAttributesInput",
|
178 178 | ),
|
179 179 | ::aws_smithy_schema::ShapeType::String,
|
180 - | "part_number_marker",
|
180 + | "PartNumberMarker",
|
181 181 | 4,
|
182 182 | )
|
183 183 | .with_http_header("x-amz-part-number-marker");
|
184 184 | static GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_ALGORITHM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
185 185 | ::aws_smithy_schema::ShapeId::from_static(
|
186 186 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$SSECustomerAlgorithm",
|
187 187 | "com.amazonaws.s3.synthetic",
|
188 188 | "GetObjectAttributesInput",
|
189 189 | ),
|
190 190 | ::aws_smithy_schema::ShapeType::String,
|
191 - | "sse_customer_algorithm",
|
191 + | "SSECustomerAlgorithm",
|
192 192 | 5,
|
193 193 | )
|
194 194 | .with_http_header("x-amz-server-side-encryption-customer-algorithm");
|
195 195 | static GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
196 196 | ::aws_smithy_schema::ShapeId::from_static(
|
197 197 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$SSECustomerKey",
|
198 198 | "com.amazonaws.s3.synthetic",
|
199 199 | "GetObjectAttributesInput",
|
200 200 | ),
|
201 201 | ::aws_smithy_schema::ShapeType::String,
|
202 - | "sse_customer_key",
|
202 + | "SSECustomerKey",
|
203 203 | 6,
|
204 204 | )
|
205 205 | .with_http_header("x-amz-server-side-encryption-customer-key");
|
206 206 | static GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY_MD5: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
207 207 | ::aws_smithy_schema::ShapeId::from_static(
|
208 208 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$SSECustomerKeyMD5",
|
209 209 | "com.amazonaws.s3.synthetic",
|
210 210 | "GetObjectAttributesInput",
|
211 211 | ),
|
212 212 | ::aws_smithy_schema::ShapeType::String,
|
213 - | "sse_customer_key_md5",
|
213 + | "SSECustomerKeyMD5",
|
214 214 | 7,
|
215 215 | )
|
216 216 | .with_http_header("x-amz-server-side-encryption-customer-key-MD5");
|
217 217 | static GETOBJECTATTRIBUTESINPUT_MEMBER_REQUEST_PAYER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
218 218 | ::aws_smithy_schema::ShapeId::from_static(
|
219 219 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$RequestPayer",
|
220 220 | "com.amazonaws.s3.synthetic",
|
221 221 | "GetObjectAttributesInput",
|
222 222 | ),
|
223 223 | ::aws_smithy_schema::ShapeType::String,
|
224 - | "request_payer",
|
224 + | "RequestPayer",
|
225 225 | 8,
|
226 226 | )
|
227 227 | .with_http_header("x-amz-request-payer");
|
228 228 | static GETOBJECTATTRIBUTESINPUT_MEMBER_EXPECTED_BUCKET_OWNER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
229 229 | ::aws_smithy_schema::ShapeId::from_static(
|
230 230 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$ExpectedBucketOwner",
|
231 231 | "com.amazonaws.s3.synthetic",
|
232 232 | "GetObjectAttributesInput",
|
233 233 | ),
|
234 234 | ::aws_smithy_schema::ShapeType::String,
|
235 - | "expected_bucket_owner",
|
235 + | "ExpectedBucketOwner",
|
236 236 | 9,
|
237 237 | )
|
238 238 | .with_http_header("x-amz-expected-bucket-owner");
|
239 239 | static GETOBJECTATTRIBUTESINPUT_MEMBER_OBJECT_ATTRIBUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
240 240 | ::aws_smithy_schema::ShapeId::from_static(
|
241 241 | "com.amazonaws.s3.synthetic#GetObjectAttributesInput$ObjectAttributes",
|
242 242 | "com.amazonaws.s3.synthetic",
|
243 243 | "GetObjectAttributesInput",
|
244 244 | ),
|
245 245 | ::aws_smithy_schema::ShapeType::List,
|
246 - | "object_attributes",
|
246 + | "ObjectAttributes",
|
247 247 | 10,
|
248 248 | )
|
249 249 | .with_http_header("x-amz-object-attributes");
|
250 250 | static GETOBJECTATTRIBUTESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
251 251 | GETOBJECTATTRIBUTESINPUT_SCHEMA_ID,
|
252 252 | ::aws_smithy_schema::ShapeType::Structure,
|
253 253 | &[
|
254 254 | &GETOBJECTATTRIBUTESINPUT_MEMBER_BUCKET,
|
255 255 | &GETOBJECTATTRIBUTESINPUT_MEMBER_KEY,
|
256 256 | &GETOBJECTATTRIBUTESINPUT_MEMBER_VERSION_ID,
|
257 257 | &GETOBJECTATTRIBUTESINPUT_MEMBER_MAX_PARTS,
|
258 258 | &GETOBJECTATTRIBUTESINPUT_MEMBER_PART_NUMBER_MARKER,
|
259 259 | &GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_ALGORITHM,
|
260 260 | &GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY,
|
261 261 | &GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY_MD5,
|
262 262 | &GETOBJECTATTRIBUTESINPUT_MEMBER_REQUEST_PAYER,
|
263 263 | &GETOBJECTATTRIBUTESINPUT_MEMBER_EXPECTED_BUCKET_OWNER,
|
264 264 | &GETOBJECTATTRIBUTESINPUT_MEMBER_OBJECT_ATTRIBUTES,
|
265 265 | ],
|
266 - | );
|
266 + | )
|
267 + | .with_http(aws_smithy_schema::traits::HttpTrait::new("GET", "/{Key+}?attributes", None));
|
267 268 | impl GetObjectAttributesInput {
|
268 269 | /// The schema for this shape.
|
269 270 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETOBJECTATTRIBUTESINPUT_SCHEMA;
|
270 271 | }
|
271 272 | impl ::aws_smithy_schema::serde::SerializableStruct for GetObjectAttributesInput {
|
272 273 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
273 274 | fn serialize_members(
|
274 275 | &self,
|
275 276 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
276 277 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
277 278 | if let Some(ref val) = self.bucket {
|
278 279 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_BUCKET, val)?;
|
279 280 | }
|
280 281 | if let Some(ref val) = self.key {
|
281 282 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_KEY, val)?;
|
282 283 | }
|
283 284 | if let Some(ref val) = self.version_id {
|
284 285 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_VERSION_ID, val)?;
|
285 286 | }
|
286 287 | if let Some(ref val) = self.max_parts {
|
287 288 | ser.write_integer(&GETOBJECTATTRIBUTESINPUT_MEMBER_MAX_PARTS, *val)?;
|
288 289 | }
|
289 290 | if let Some(ref val) = self.part_number_marker {
|
290 291 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_PART_NUMBER_MARKER, val)?;
|
291 292 | }
|
292 293 | if let Some(ref val) = self.sse_customer_algorithm {
|
293 294 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_ALGORITHM, val)?;
|
294 295 | }
|
295 296 | if let Some(ref val) = self.sse_customer_key {
|
296 297 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY, val)?;
|
297 298 | }
|
298 299 | if let Some(ref val) = self.sse_customer_key_md5 {
|
299 300 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_SSE_CUSTOMER_KEY_MD5, val)?;
|
300 301 | }
|
301 302 | if let Some(ref val) = self.request_payer {
|
302 303 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_REQUEST_PAYER, val.as_str())?;
|
303 304 | }
|
304 305 | if let Some(ref val) = self.expected_bucket_owner {
|
305 306 | ser.write_string(&GETOBJECTATTRIBUTESINPUT_MEMBER_EXPECTED_BUCKET_OWNER, val)?;
|
306 307 | }
|
307 308 | if let Some(ref val) = self.object_attributes {
|
308 309 | ser.write_list(
|
309 310 | &GETOBJECTATTRIBUTESINPUT_MEMBER_OBJECT_ATTRIBUTES,
|
310 311 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
311 312 | for item in val {
|
312 313 | ser.write_string(&aws_smithy_schema::prelude::STRING, item.as_str())?;
|
313 314 | }
|
314 315 | Ok(())
|
315 316 | },
|
316 317 | )?;
|
317 318 | }
|
318 319 | Ok(())
|
319 320 | }
|
320 321 | }
|
321 322 | impl GetObjectAttributesInput {
|
322 323 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
323 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
324 - | deserializer: &mut D,
|
324 + | pub fn deserialize(
|
325 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
325 326 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
326 327 | #[allow(unused_variables, unused_mut)]
|
327 328 | let mut builder = Self::builder();
|
328 329 | #[allow(
|
329 330 | unused_variables,
|
330 331 | unreachable_code,
|
331 332 | clippy::single_match,
|
332 333 | clippy::match_single_binding,
|
333 334 | clippy::diverging_sub_expression
|
334 335 | )]
|
335 - | deserializer.read_struct(&GETOBJECTATTRIBUTESINPUT_SCHEMA, (), |_, member, deser| {
|
336 + | deserializer.read_struct(&GETOBJECTATTRIBUTESINPUT_SCHEMA, &mut |member, deser| {
|
336 337 | match member.member_index() {
|
337 338 | Some(0) => {
|
338 339 | builder.bucket = Some(deser.read_string(member)?);
|
339 340 | }
|
340 341 | Some(1) => {
|
341 342 | builder.key = Some(deser.read_string(member)?);
|
342 343 | }
|
343 344 | Some(2) => {
|
344 345 | builder.version_id = Some(deser.read_string(member)?);
|
345 346 | }
|
346 347 | Some(3) => {
|
347 348 | builder.max_parts = Some(deser.read_integer(member)?);
|
348 349 | }
|
349 350 | Some(4) => {
|
350 351 | builder.part_number_marker = Some(deser.read_string(member)?);
|
351 352 | }
|
352 353 | Some(5) => {
|
353 354 | builder.sse_customer_algorithm = Some(deser.read_string(member)?);
|
354 355 | }
|
355 356 | Some(6) => {
|
356 357 | builder.sse_customer_key = Some(deser.read_string(member)?);
|
357 358 | }
|
358 359 | Some(7) => {
|
359 360 | builder.sse_customer_key_md5 = Some(deser.read_string(member)?);
|
360 361 | }
|
361 362 | Some(8) => {
|
362 363 | builder.request_payer = Some(crate::types::RequestPayer::from(deser.read_string(member)?.as_str()));
|
363 364 | }
|
364 365 | Some(9) => {
|
365 366 | builder.expected_bucket_owner = Some(deser.read_string(member)?);
|
366 367 | }
|
367 368 | Some(10) => {
|
368 369 | builder.object_attributes = Some({
|
369 - | let container = if let Some(cap) = deser.container_size() {
|
370 - | Vec::with_capacity(cap)
|
371 - | } else {
|
372 - | Vec::new()
|
373 - | };
|
374 - | deser.read_list(member, container, |mut list, deser| {
|
375 - | list.push(crate::types::ObjectAttributes::from(deser.read_string(member)?.as_str()));
|
376 - | Ok(list)
|
377 - | })?
|
370 + | let mut container = Vec::new();
|
371 + | deser.read_list(member, &mut |deser| {
|
372 + | container.push(crate::types::ObjectAttributes::from(deser.read_string(member)?.as_str()));
|
373 + | Ok(())
|
374 + | })?;
|
375 + | container
|
378 376 | });
|
379 377 | }
|
380 378 | _ => {}
|
381 379 | }
|
382 380 | Ok(())
|
383 381 | })?;
|
382 + | builder.bucket = builder.bucket.or(Some(String::new()));
|
383 + | builder.key = builder.key.or(Some(String::new()));
|
384 + | builder.object_attributes = builder.object_attributes.or(Some(Vec::new()));
|
385 + | builder
|
386 + | .build()
|
387 + | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
388 + | }
|
389 + | }
|
390 + | impl GetObjectAttributesInput {
|
391 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
392 + | /// Header-bound members are read directly from headers, avoiding runtime
|
393 + | /// member iteration overhead. Body members are read via the deserializer.
|
394 + | pub fn deserialize_with_response(
|
395 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
396 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
397 + | _status: u16,
|
398 + | _body: &[u8],
|
399 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
400 + | #[allow(unused_variables, unused_mut)]
|
401 + | let mut builder = Self::builder();
|
402 + | if let Some(val) = headers.get("x-amz-max-parts") {
|
403 + | builder.max_parts = val.parse::<i32>().ok();
|
404 + | }
|
405 + | if let Some(val) = headers.get("x-amz-part-number-marker") {
|
406 + | builder.part_number_marker = Some(val.to_string());
|
407 + | }
|
408 + | if let Some(val) = headers.get("x-amz-server-side-encryption-customer-algorithm") {
|
409 + | builder.sse_customer_algorithm = Some(val.to_string());
|
410 + | }
|
411 + | if let Some(val) = headers.get("x-amz-server-side-encryption-customer-key") {
|
412 + | builder.sse_customer_key = Some(val.to_string());
|
413 + | }
|
414 + | if let Some(val) = headers.get("x-amz-server-side-encryption-customer-key-MD5") {
|
415 + | builder.sse_customer_key_md5 = Some(val.to_string());
|
416 + | }
|
417 + | if let Some(val) = headers.get("x-amz-request-payer") {
|
418 + | builder.request_payer = Some(crate::types::RequestPayer::from(val));
|
419 + | }
|
420 + | if let Some(val) = headers.get("x-amz-expected-bucket-owner") {
|
421 + | builder.expected_bucket_owner = Some(val.to_string());
|
422 + | }
|
423 + | if let Some(val) = headers.get("x-amz-object-attributes") {
|
424 + | builder.object_attributes = Some(val.split(',').map(|s| crate::types::ObjectAttributes::from(s.trim())).collect());
|
425 + | }
|
426 + | #[allow(
|
427 + | unused_variables,
|
428 + | unreachable_code,
|
429 + | clippy::single_match,
|
430 + | clippy::match_single_binding,
|
431 + | clippy::diverging_sub_expression
|
432 + | )]
|
433 + | deserializer.read_struct(&GETOBJECTATTRIBUTESINPUT_SCHEMA, &mut |member, deser| {
|
434 + | match member.member_index() {
|
435 + | Some(0) => {
|
436 + | builder.bucket = Some(deser.read_string(member)?);
|
437 + | }
|
438 + | Some(1) => {
|
439 + | builder.key = Some(deser.read_string(member)?);
|
440 + | }
|
441 + | Some(2) => {
|
442 + | builder.version_id = Some(deser.read_string(member)?);
|
443 + | }
|
444 + | Some(3) => { /* read from headers above */ }
|
445 + | Some(4) => { /* read from headers above */ }
|
446 + | Some(5) => { /* read from headers above */ }
|
447 + | Some(6) => { /* read from headers above */ }
|
448 + | Some(7) => { /* read from headers above */ }
|
449 + | Some(8) => { /* read from headers above */ }
|
450 + | Some(9) => { /* read from headers above */ }
|
451 + | Some(10) => { /* read from headers above */ }
|
452 + | _ => {}
|
453 + | }
|
454 + | Ok(())
|
455 + | })?;
|
384 456 | builder
|
385 457 | .build()
|
386 458 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
387 459 | }
|
388 460 | }
|
389 461 | impl GetObjectAttributesInput {
|
390 462 | /// Creates a new builder-style object to manufacture [`GetObjectAttributesInput`](crate::operation::get_object_attributes::GetObjectAttributesInput).
|
391 463 | pub fn builder() -> crate::operation::get_object_attributes::builders::GetObjectAttributesInputBuilder {
|
392 464 | crate::operation::get_object_attributes::builders::GetObjectAttributesInputBuilder::default()
|
393 465 | }
|