91 91 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
92 92 | "RpcV2CborListsInput",
|
93 93 | );
|
94 94 | static RPCV2CBORLISTSINPUT_MEMBER_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
95 95 | ::aws_smithy_schema::ShapeId::from_static(
|
96 96 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$stringList",
|
97 97 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
98 98 | "RpcV2CborListsInput",
|
99 99 | ),
|
100 100 | ::aws_smithy_schema::ShapeType::List,
|
101 - | "string_list",
|
101 + | "stringList",
|
102 102 | 0,
|
103 103 | );
|
104 104 | static RPCV2CBORLISTSINPUT_MEMBER_STRING_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
105 105 | ::aws_smithy_schema::ShapeId::from_static(
|
106 106 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$stringSet",
|
107 107 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
108 108 | "RpcV2CborListsInput",
|
109 109 | ),
|
110 110 | ::aws_smithy_schema::ShapeType::List,
|
111 - | "string_set",
|
111 + | "stringSet",
|
112 112 | 1,
|
113 113 | );
|
114 114 | static RPCV2CBORLISTSINPUT_MEMBER_INTEGER_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
115 115 | ::aws_smithy_schema::ShapeId::from_static(
|
116 116 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$integerList",
|
117 117 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
118 118 | "RpcV2CborListsInput",
|
119 119 | ),
|
120 120 | ::aws_smithy_schema::ShapeType::List,
|
121 - | "integer_list",
|
121 + | "integerList",
|
122 122 | 2,
|
123 123 | );
|
124 124 | static RPCV2CBORLISTSINPUT_MEMBER_BOOLEAN_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
125 125 | ::aws_smithy_schema::ShapeId::from_static(
|
126 126 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$booleanList",
|
127 127 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
128 128 | "RpcV2CborListsInput",
|
129 129 | ),
|
130 130 | ::aws_smithy_schema::ShapeType::List,
|
131 - | "boolean_list",
|
131 + | "booleanList",
|
132 132 | 3,
|
133 133 | );
|
134 134 | static RPCV2CBORLISTSINPUT_MEMBER_TIMESTAMP_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
135 135 | ::aws_smithy_schema::ShapeId::from_static(
|
136 136 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$timestampList",
|
137 137 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
138 138 | "RpcV2CborListsInput",
|
139 139 | ),
|
140 140 | ::aws_smithy_schema::ShapeType::List,
|
141 - | "timestamp_list",
|
141 + | "timestampList",
|
142 142 | 4,
|
143 143 | );
|
144 144 | static RPCV2CBORLISTSINPUT_MEMBER_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
145 145 | ::aws_smithy_schema::ShapeId::from_static(
|
146 146 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$enumList",
|
147 147 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
148 148 | "RpcV2CborListsInput",
|
149 149 | ),
|
150 150 | ::aws_smithy_schema::ShapeType::List,
|
151 - | "enum_list",
|
151 + | "enumList",
|
152 152 | 5,
|
153 153 | );
|
154 154 | static RPCV2CBORLISTSINPUT_MEMBER_INT_ENUM_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
155 155 | ::aws_smithy_schema::ShapeId::from_static(
|
156 156 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$intEnumList",
|
157 157 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
158 158 | "RpcV2CborListsInput",
|
159 159 | ),
|
160 160 | ::aws_smithy_schema::ShapeType::List,
|
161 - | "int_enum_list",
|
161 + | "intEnumList",
|
162 162 | 6,
|
163 163 | );
|
164 164 | static RPCV2CBORLISTSINPUT_MEMBER_NESTED_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
165 165 | ::aws_smithy_schema::ShapeId::from_static(
|
166 166 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$nestedStringList",
|
167 167 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
168 168 | "RpcV2CborListsInput",
|
169 169 | ),
|
170 170 | ::aws_smithy_schema::ShapeType::List,
|
171 - | "nested_string_list",
|
171 + | "nestedStringList",
|
172 172 | 7,
|
173 173 | );
|
174 174 | static RPCV2CBORLISTSINPUT_MEMBER_STRUCTURE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
175 175 | ::aws_smithy_schema::ShapeId::from_static(
|
176 176 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$structureList",
|
177 177 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
178 178 | "RpcV2CborListsInput",
|
179 179 | ),
|
180 180 | ::aws_smithy_schema::ShapeType::List,
|
181 - | "structure_list",
|
181 + | "structureList",
|
182 182 | 8,
|
183 183 | );
|
184 184 | static RPCV2CBORLISTSINPUT_MEMBER_BLOB_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
185 185 | ::aws_smithy_schema::ShapeId::from_static(
|
186 186 | "smithy.protocoltests.rpcv2Cbor.synthetic#RpcV2CborListsInput$blobList",
|
187 187 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
188 188 | "RpcV2CborListsInput",
|
189 189 | ),
|
190 190 | ::aws_smithy_schema::ShapeType::List,
|
191 - | "blob_list",
|
191 + | "blobList",
|
192 192 | 9,
|
193 193 | );
|
194 194 | static RPCV2CBORLISTSINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
195 195 | RPCV2CBORLISTSINPUT_SCHEMA_ID,
|
196 196 | ::aws_smithy_schema::ShapeType::Structure,
|
197 197 | &[
|
198 198 | &RPCV2CBORLISTSINPUT_MEMBER_STRING_LIST,
|
199 199 | &RPCV2CBORLISTSINPUT_MEMBER_STRING_SET,
|
200 200 | &RPCV2CBORLISTSINPUT_MEMBER_INTEGER_LIST,
|
201 201 | &RPCV2CBORLISTSINPUT_MEMBER_BOOLEAN_LIST,
|
292 292 | }
|
293 293 | Ok(())
|
294 294 | },
|
295 295 | )?;
|
296 296 | }
|
297 297 | if let Some(ref val) = self.nested_string_list {
|
298 298 | ser.write_list(
|
299 299 | &RPCV2CBORLISTSINPUT_MEMBER_NESTED_STRING_LIST,
|
300 300 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
301 301 | for item in val {
|
302 - | todo!("schema: unsupported list element type");
|
302 + | ser.write_list(
|
303 + | &::aws_smithy_schema::prelude::DOCUMENT,
|
304 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
305 + | for item in item {
|
306 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
307 + | }
|
308 + | Ok(())
|
309 + | },
|
310 + | )?;
|
303 311 | }
|
304 312 | Ok(())
|
305 313 | },
|
306 314 | )?;
|
307 315 | }
|
308 316 | if let Some(ref val) = self.structure_list {
|
309 317 | ser.write_list(
|
310 318 | &RPCV2CBORLISTSINPUT_MEMBER_STRUCTURE_LIST,
|
311 319 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
312 320 | for item in val {
|
313 321 | ser.write_struct(crate::types::StructureListMember::SCHEMA, item)?;
|
314 322 | }
|
315 323 | Ok(())
|
316 324 | },
|
317 325 | )?;
|
318 326 | }
|
319 327 | if let Some(ref val) = self.blob_list {
|
320 328 | ser.write_list(
|
321 329 | &RPCV2CBORLISTSINPUT_MEMBER_BLOB_LIST,
|
322 330 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
323 331 | for item in val {
|
324 332 | ser.write_blob(&aws_smithy_schema::prelude::BLOB, item)?;
|
325 333 | }
|
326 334 | Ok(())
|
327 335 | },
|
328 336 | )?;
|
329 337 | }
|
330 338 | Ok(())
|
331 339 | }
|
332 340 | }
|
333 341 | impl RpcV2CborListsInput {
|
334 342 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
335 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
336 - | deserializer: &mut D,
|
343 + | pub fn deserialize(
|
344 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
337 345 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
338 346 | #[allow(unused_variables, unused_mut)]
|
339 347 | let mut builder = Self::builder();
|
340 348 | #[allow(
|
341 349 | unused_variables,
|
342 350 | unreachable_code,
|
343 351 | clippy::single_match,
|
344 352 | clippy::match_single_binding,
|
345 353 | clippy::diverging_sub_expression
|
346 354 | )]
|
347 - | deserializer.read_struct(&RPCV2CBORLISTSINPUT_SCHEMA, (), |_, member, deser| {
|
355 + | deserializer.read_struct(&RPCV2CBORLISTSINPUT_SCHEMA, &mut |member, deser| {
|
348 356 | match member.member_index() {
|
349 357 | Some(0) => {
|
350 - | builder.string_list = Some({
|
351 - | let container = if let Some(cap) = deser.container_size() {
|
352 - | Vec::with_capacity(cap)
|
353 - | } else {
|
354 - | Vec::new()
|
355 - | };
|
356 - | deser.read_list(member, container, |mut list, deser| {
|
357 - | list.push(deser.read_string(member)?);
|
358 - | Ok(list)
|
359 - | })?
|
360 - | });
|
358 + | builder.string_list = Some(deser.read_string_list(member)?);
|
361 359 | }
|
362 360 | Some(1) => {
|
363 - | builder.string_set = Some({
|
364 - | let container = if let Some(cap) = deser.container_size() {
|
365 - | Vec::with_capacity(cap)
|
366 - | } else {
|
367 - | Vec::new()
|
368 - | };
|
369 - | deser.read_list(member, container, |mut list, deser| {
|
370 - | list.push(deser.read_string(member)?);
|
371 - | Ok(list)
|
372 - | })?
|
373 - | });
|
361 + | builder.string_set = Some(deser.read_string_list(member)?);
|
374 362 | }
|
375 363 | Some(2) => {
|
376 - | builder.integer_list = Some({
|
377 - | let container = if let Some(cap) = deser.container_size() {
|
378 - | Vec::with_capacity(cap)
|
379 - | } else {
|
380 - | Vec::new()
|
381 - | };
|
382 - | deser.read_list(member, container, |mut list, deser| {
|
383 - | list.push(deser.read_integer(member)?);
|
384 - | Ok(list)
|
385 - | })?
|
386 - | });
|
364 + | builder.integer_list = Some(deser.read_integer_list(member)?);
|
387 365 | }
|
388 366 | Some(3) => {
|
389 367 | builder.boolean_list = Some({
|
390 - | let container = if let Some(cap) = deser.container_size() {
|
391 - | Vec::with_capacity(cap)
|
392 - | } else {
|
393 - | Vec::new()
|
394 - | };
|
395 - | deser.read_list(member, container, |mut list, deser| {
|
396 - | list.push(deser.read_boolean(member)?);
|
397 - | Ok(list)
|
398 - | })?
|
368 + | let mut container = Vec::new();
|
369 + | deser.read_list(member, &mut |deser| {
|
370 + | container.push(deser.read_boolean(member)?);
|
371 + | Ok(())
|
372 + | })?;
|
373 + | container
|
399 374 | });
|
400 375 | }
|
401 376 | Some(4) => {
|
402 377 | builder.timestamp_list = Some({
|
403 - | let container = if let Some(cap) = deser.container_size() {
|
404 - | Vec::with_capacity(cap)
|
405 - | } else {
|
406 - | Vec::new()
|
407 - | };
|
408 - | deser.read_list(member, container, |mut list, deser| {
|
409 - | list.push(deser.read_timestamp(member)?);
|
410 - | Ok(list)
|
411 - | })?
|
378 + | let mut container = Vec::new();
|
379 + | deser.read_list(member, &mut |deser| {
|
380 + | container.push(deser.read_timestamp(member)?);
|
381 + | Ok(())
|
382 + | })?;
|
383 + | container
|
412 384 | });
|
413 385 | }
|
414 386 | Some(5) => {
|
415 387 | builder.enum_list = Some({
|
416 - | let container = if let Some(cap) = deser.container_size() {
|
417 - | Vec::with_capacity(cap)
|
418 - | } else {
|
419 - | Vec::new()
|
420 - | };
|
421 - | deser.read_list(member, container, |mut list, deser| {
|
422 - | list.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
|
423 - | Ok(list)
|
424 - | })?
|
388 + | let mut container = Vec::new();
|
389 + | deser.read_list(member, &mut |deser| {
|
390 + | container.push(crate::types::FooEnum::from(deser.read_string(member)?.as_str()));
|
391 + | Ok(())
|
392 + | })?;
|
393 + | container
|
425 394 | });
|
426 395 | }
|
427 396 | Some(6) => {
|
428 - | builder.int_enum_list = Some({
|
429 - | let container = if let Some(cap) = deser.container_size() {
|
430 - | Vec::with_capacity(cap)
|
431 - | } else {
|
432 - | Vec::new()
|
433 - | };
|
434 - | deser.read_list(member, container, |mut list, deser| {
|
435 - | list.push(deser.read_integer(member)?);
|
436 - | Ok(list)
|
437 - | })?
|
438 - | });
|
397 + | builder.int_enum_list = Some(deser.read_integer_list(member)?);
|
439 398 | }
|
440 399 | Some(7) => {
|
441 400 | builder.nested_string_list = Some({
|
442 - | let container = if let Some(cap) = deser.container_size() {
|
443 - | Vec::with_capacity(cap)
|
444 - | } else {
|
445 - | Vec::new()
|
446 - | };
|
447 - | deser.read_list(member, container, |mut list, deser| {
|
448 - | list.push(todo!("deserialize nested aggregate"));
|
449 - | Ok(list)
|
450 - | })?
|
401 + | let mut container = Vec::new();
|
402 + | deser.read_list(member, &mut |deser| {
|
403 + | container.push({
|
404 + | let mut list = Vec::new();
|
405 + | deser.read_list(member, &mut |deser| {
|
406 + | list.push(deser.read_string(&::aws_smithy_schema::prelude::DOCUMENT)?);
|
407 + | Ok(())
|
408 + | })?;
|
409 + | list
|
410 + | });
|
411 + | Ok(())
|
412 + | })?;
|
413 + | container
|
451 414 | });
|
452 415 | }
|
453 416 | Some(8) => {
|
454 417 | builder.structure_list = Some({
|
455 - | let container = if let Some(cap) = deser.container_size() {
|
456 - | Vec::with_capacity(cap)
|
457 - | } else {
|
458 - | Vec::new()
|
459 - | };
|
460 - | deser.read_list(member, container, |mut list, deser| {
|
461 - | list.push(crate::types::StructureListMember::deserialize(deser)?);
|
462 - | Ok(list)
|
463 - | })?
|
418 + | let mut container = Vec::new();
|
419 + | deser.read_list(member, &mut |deser| {
|
420 + | container.push(crate::types::StructureListMember::deserialize(deser)?);
|
421 + | Ok(())
|
422 + | })?;
|
423 + | container
|
464 424 | });
|
465 425 | }
|
466 426 | Some(9) => {
|
467 - | builder.blob_list = Some({
|
468 - | let container = if let Some(cap) = deser.container_size() {
|
469 - | Vec::with_capacity(cap)
|
470 - | } else {
|
471 - | Vec::new()
|
472 - | };
|
473 - | deser.read_list(member, container, |mut list, deser| {
|
474 - | list.push(deser.read_blob(member)?);
|
475 - | Ok(list)
|
476 - | })?
|
477 - | });
|
427 + | builder.blob_list = Some(deser.read_blob_list(member)?);
|
478 428 | }
|
479 429 | _ => {}
|
480 430 | }
|
481 431 | Ok(())
|
482 432 | })?;
|
483 433 | builder
|
484 434 | .build()
|
485 435 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
486 436 | }
|
487 437 | }
|
438 + | impl RpcV2CborListsInput {
|
439 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
440 + | pub fn deserialize_with_response(
|
441 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
442 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
443 + | _status: u16,
|
444 + | _body: &[u8],
|
445 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
446 + | Self::deserialize(deserializer)
|
447 + | }
|
448 + | }
|
488 449 | impl RpcV2CborListsInput {
|
489 450 | /// Creates a new builder-style object to manufacture [`RpcV2CborListsInput`](crate::operation::rpc_v2_cbor_lists::RpcV2CborListsInput).
|
490 451 | pub fn builder() -> crate::operation::rpc_v2_cbor_lists::builders::RpcV2CborListsInputBuilder {
|
491 452 | crate::operation::rpc_v2_cbor_lists::builders::RpcV2CborListsInputBuilder::default()
|
492 453 | }
|
493 454 | }
|
494 455 |
|
495 456 | /// A builder for [`RpcV2CborListsInput`](crate::operation::rpc_v2_cbor_lists::RpcV2CborListsInput).
|
496 457 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
497 458 | #[non_exhaustive]
|