113 113 | }
|
114 114 | static INNERMOSTSHAPE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
115 115 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape", "aws.protocoltests.misc", "InnermostShape");
|
116 116 | static INNERMOSTSHAPE_MEMBER_A_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
117 117 | ::aws_smithy_schema::ShapeId::from_static(
|
118 118 | "aws.protocoltests.misc#InnermostShape$aString",
|
119 119 | "aws.protocoltests.misc",
|
120 120 | "InnermostShape",
|
121 121 | ),
|
122 122 | ::aws_smithy_schema::ShapeType::String,
|
123 - | "a_string",
|
123 + | "aString",
|
124 124 | 0,
|
125 125 | );
|
126 126 | static INNERMOSTSHAPE_MEMBER_A_BOOLEAN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
127 127 | ::aws_smithy_schema::ShapeId::from_static(
|
128 128 | "aws.protocoltests.misc#InnermostShape$aBoolean",
|
129 129 | "aws.protocoltests.misc",
|
130 130 | "InnermostShape",
|
131 131 | ),
|
132 132 | ::aws_smithy_schema::ShapeType::Boolean,
|
133 - | "a_boolean",
|
133 + | "aBoolean",
|
134 134 | 1,
|
135 135 | );
|
136 136 | static INNERMOSTSHAPE_MEMBER_A_BYTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
137 137 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aByte", "aws.protocoltests.misc", "InnermostShape"),
|
138 138 | ::aws_smithy_schema::ShapeType::Byte,
|
139 - | "a_byte",
|
139 + | "aByte",
|
140 140 | 2,
|
141 141 | );
|
142 142 | static INNERMOSTSHAPE_MEMBER_A_SHORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
143 143 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aShort", "aws.protocoltests.misc", "InnermostShape"),
|
144 144 | ::aws_smithy_schema::ShapeType::Short,
|
145 - | "a_short",
|
145 + | "aShort",
|
146 146 | 3,
|
147 147 | );
|
148 148 | static INNERMOSTSHAPE_MEMBER_AN_INT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
149 149 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$anInt", "aws.protocoltests.misc", "InnermostShape"),
|
150 150 | ::aws_smithy_schema::ShapeType::Integer,
|
151 - | "an_int",
|
151 + | "anInt",
|
152 152 | 4,
|
153 153 | );
|
154 154 | static INNERMOSTSHAPE_MEMBER_A_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
155 155 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aLong", "aws.protocoltests.misc", "InnermostShape"),
|
156 156 | ::aws_smithy_schema::ShapeType::Long,
|
157 - | "a_long",
|
157 + | "aLong",
|
158 158 | 5,
|
159 159 | );
|
160 160 | static INNERMOSTSHAPE_MEMBER_A_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
161 161 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aFloat", "aws.protocoltests.misc", "InnermostShape"),
|
162 162 | ::aws_smithy_schema::ShapeType::Float,
|
163 - | "a_float",
|
163 + | "aFloat",
|
164 164 | 6,
|
165 165 | );
|
166 166 | static INNERMOSTSHAPE_MEMBER_A_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
167 167 | ::aws_smithy_schema::ShapeId::from_static(
|
168 168 | "aws.protocoltests.misc#InnermostShape$aDouble",
|
169 169 | "aws.protocoltests.misc",
|
170 170 | "InnermostShape",
|
171 171 | ),
|
172 172 | ::aws_smithy_schema::ShapeType::Double,
|
173 - | "a_double",
|
173 + | "aDouble",
|
174 174 | 7,
|
175 175 | );
|
176 176 | static INNERMOSTSHAPE_MEMBER_A_BIG_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
177 177 | ::aws_smithy_schema::ShapeId::from_static(
|
178 178 | "aws.protocoltests.misc#InnermostShape$aBigInteger",
|
179 179 | "aws.protocoltests.misc",
|
180 180 | "InnermostShape",
|
181 181 | ),
|
182 182 | ::aws_smithy_schema::ShapeType::BigInteger,
|
183 - | "a_big_integer",
|
183 + | "aBigInteger",
|
184 184 | 8,
|
185 185 | );
|
186 186 | static INNERMOSTSHAPE_MEMBER_A_BIG_DECIMAL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
187 187 | ::aws_smithy_schema::ShapeId::from_static(
|
188 188 | "aws.protocoltests.misc#InnermostShape$aBigDecimal",
|
189 189 | "aws.protocoltests.misc",
|
190 190 | "InnermostShape",
|
191 191 | ),
|
192 192 | ::aws_smithy_schema::ShapeType::BigDecimal,
|
193 - | "a_big_decimal",
|
193 + | "aBigDecimal",
|
194 194 | 9,
|
195 195 | );
|
196 196 | static INNERMOSTSHAPE_MEMBER_A_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
197 197 | ::aws_smithy_schema::ShapeId::from_static(
|
198 198 | "aws.protocoltests.misc#InnermostShape$aTimestamp",
|
199 199 | "aws.protocoltests.misc",
|
200 200 | "InnermostShape",
|
201 201 | ),
|
202 202 | ::aws_smithy_schema::ShapeType::Timestamp,
|
203 - | "a_timestamp",
|
203 + | "aTimestamp",
|
204 204 | 10,
|
205 205 | );
|
206 206 | static INNERMOSTSHAPE_MEMBER_A_DOCUMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
207 207 | ::aws_smithy_schema::ShapeId::from_static(
|
208 208 | "aws.protocoltests.misc#InnermostShape$aDocument",
|
209 209 | "aws.protocoltests.misc",
|
210 210 | "InnermostShape",
|
211 211 | ),
|
212 212 | ::aws_smithy_schema::ShapeType::Timestamp,
|
213 - | "a_document",
|
213 + | "aDocument",
|
214 214 | 11,
|
215 215 | );
|
216 216 | static INNERMOSTSHAPE_MEMBER_A_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
217 217 | ::aws_smithy_schema::ShapeId::from_static(
|
218 218 | "aws.protocoltests.misc#InnermostShape$aStringList",
|
219 219 | "aws.protocoltests.misc",
|
220 220 | "InnermostShape",
|
221 221 | ),
|
222 222 | ::aws_smithy_schema::ShapeType::List,
|
223 - | "a_string_list",
|
223 + | "aStringList",
|
224 224 | 12,
|
225 225 | );
|
226 226 | static INNERMOSTSHAPE_MEMBER_A_STRING_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
227 227 | ::aws_smithy_schema::ShapeId::from_static(
|
228 228 | "aws.protocoltests.misc#InnermostShape$aStringMap",
|
229 229 | "aws.protocoltests.misc",
|
230 230 | "InnermostShape",
|
231 231 | ),
|
232 232 | ::aws_smithy_schema::ShapeType::Map,
|
233 - | "a_string_map",
|
233 + | "aStringMap",
|
234 234 | 13,
|
235 235 | );
|
236 236 | static INNERMOSTSHAPE_MEMBER_A_STRING_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
237 237 | ::aws_smithy_schema::ShapeId::from_static(
|
238 238 | "aws.protocoltests.misc#InnermostShape$aStringSet",
|
239 239 | "aws.protocoltests.misc",
|
240 240 | "InnermostShape",
|
241 241 | ),
|
242 242 | ::aws_smithy_schema::ShapeType::List,
|
243 - | "a_string_set",
|
243 + | "aStringSet",
|
244 244 | 14,
|
245 245 | );
|
246 246 | static INNERMOSTSHAPE_MEMBER_A_BLOB: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
247 247 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aBlob", "aws.protocoltests.misc", "InnermostShape"),
|
248 248 | ::aws_smithy_schema::ShapeType::Blob,
|
249 - | "a_blob",
|
249 + | "aBlob",
|
250 250 | 15,
|
251 251 | );
|
252 252 | static INNERMOSTSHAPE_MEMBER_A_UNION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
253 253 | ::aws_smithy_schema::ShapeId::from_static("aws.protocoltests.misc#InnermostShape$aUnion", "aws.protocoltests.misc", "InnermostShape"),
|
254 254 | ::aws_smithy_schema::ShapeType::Union,
|
255 - | "a_union",
|
255 + | "aUnion",
|
256 256 | 16,
|
257 257 | );
|
258 258 | static INNERMOSTSHAPE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
259 259 | INNERMOSTSHAPE_SCHEMA_ID,
|
260 260 | ::aws_smithy_schema::ShapeType::Structure,
|
261 261 | &[
|
262 262 | &INNERMOSTSHAPE_MEMBER_A_STRING,
|
263 263 | &INNERMOSTSHAPE_MEMBER_A_BOOLEAN,
|
264 264 | &INNERMOSTSHAPE_MEMBER_A_BYTE,
|
265 265 | &INNERMOSTSHAPE_MEMBER_A_SHORT,
|
375 375 | Ok(())
|
376 376 | },
|
377 377 | )?;
|
378 378 | }
|
379 379 | {
|
380 380 | let val = &self.a_blob;
|
381 381 | ser.write_blob(&INNERMOSTSHAPE_MEMBER_A_BLOB, val)?;
|
382 382 | }
|
383 383 | {
|
384 384 | let val = &self.a_union;
|
385 - | ser.write_null(&INNERMOSTSHAPE_MEMBER_A_UNION)?;
|
385 + | ser.write_struct(&INNERMOSTSHAPE_MEMBER_A_UNION, val)?;
|
386 386 | }
|
387 387 | Ok(())
|
388 388 | }
|
389 389 | }
|
390 390 | impl InnermostShape {
|
391 391 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
392 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
393 - | deserializer: &mut D,
|
392 + | pub fn deserialize(
|
393 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
394 394 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
395 395 | #[allow(unused_variables, unused_mut)]
|
396 396 | let mut builder = Self::builder();
|
397 397 | #[allow(
|
398 398 | unused_variables,
|
399 399 | unreachable_code,
|
400 400 | clippy::single_match,
|
401 401 | clippy::match_single_binding,
|
402 402 | clippy::diverging_sub_expression
|
403 403 | )]
|
404 - | deserializer.read_struct(&INNERMOSTSHAPE_SCHEMA, (), |_, member, deser| {
|
404 + | deserializer.read_struct(&INNERMOSTSHAPE_SCHEMA, &mut |member, deser| {
|
405 405 | match member.member_index() {
|
406 406 | Some(0) => {
|
407 407 | builder.a_string = Some(deser.read_string(member)?);
|
408 408 | }
|
409 409 | Some(1) => {
|
410 410 | builder.a_boolean = Some(deser.read_boolean(member)?);
|
411 411 | }
|
412 412 | Some(2) => {
|
413 413 | builder.a_byte = Some(deser.read_byte(member)?);
|
414 414 | }
|
415 415 | Some(3) => {
|
416 416 | builder.a_short = Some(deser.read_short(member)?);
|
417 417 | }
|
418 418 | Some(4) => {
|
419 419 | builder.an_int = Some(deser.read_integer(member)?);
|
420 420 | }
|
421 421 | Some(5) => {
|
422 422 | builder.a_long = Some(deser.read_long(member)?);
|
423 423 | }
|
424 424 | Some(6) => {
|
425 425 | builder.a_float = Some(deser.read_float(member)?);
|
426 426 | }
|
427 427 | Some(7) => {
|
428 428 | builder.a_double = Some(deser.read_double(member)?);
|
429 429 | }
|
430 430 | Some(8) => {
|
431 431 | builder.a_big_integer = Some(deser.read_big_integer(member)?);
|
432 432 | }
|
433 433 | Some(9) => {
|
434 434 | builder.a_big_decimal = Some(deser.read_big_decimal(member)?);
|
435 435 | }
|
436 436 | Some(10) => {
|
437 437 | builder.a_timestamp = Some(deser.read_timestamp(member)?);
|
438 438 | }
|
439 439 | Some(11) => {
|
440 440 | builder.a_document = Some(deser.read_timestamp(member)?);
|
441 441 | }
|
442 442 | Some(12) => {
|
443 - | builder.a_string_list = Some({
|
444 - | let container = if let Some(cap) = deser.container_size() {
|
445 - | Vec::with_capacity(cap)
|
446 - | } else {
|
447 - | Vec::new()
|
448 - | };
|
449 - | deser.read_list(member, container, |mut list, deser| {
|
450 - | list.push(deser.read_string(member)?);
|
451 - | Ok(list)
|
452 - | })?
|
453 - | });
|
443 + | builder.a_string_list = Some(deser.read_string_list(member)?);
|
454 444 | }
|
455 445 | Some(13) => {
|
456 446 | builder.a_string_map = Some({
|
457 - | let container = if let Some(cap) = deser.container_size() {
|
458 - | std::collections::HashMap::with_capacity(cap)
|
459 - | } else {
|
460 - | std::collections::HashMap::new()
|
461 - | };
|
462 - | deser.read_map(member, container, |mut map, key, deser| {
|
463 - | map.insert(key, deser.read_timestamp(member)?);
|
464 - | Ok(map)
|
465 - | })?
|
447 + | let mut container = std::collections::HashMap::new();
|
448 + | deser.read_map(member, &mut |key, deser| {
|
449 + | container.insert(key, deser.read_timestamp(member)?);
|
450 + | Ok(())
|
451 + | })?;
|
452 + | container
|
466 453 | });
|
467 454 | }
|
468 455 | Some(14) => {
|
469 - | builder.a_string_set = Some({
|
470 - | let container = if let Some(cap) = deser.container_size() {
|
471 - | Vec::with_capacity(cap)
|
472 - | } else {
|
473 - | Vec::new()
|
474 - | };
|
475 - | deser.read_list(member, container, |mut list, deser| {
|
476 - | list.push(deser.read_string(member)?);
|
477 - | Ok(list)
|
478 - | })?
|
479 - | });
|
456 + | builder.a_string_set = Some(deser.read_string_list(member)?);
|
480 457 | }
|
481 458 | Some(15) => {
|
482 459 | builder.a_blob = Some(deser.read_blob(member)?);
|
483 460 | }
|
484 461 | Some(16) => {
|
485 - | builder.a_union = Some({
|
486 - | let _ = member;
|
487 - | todo!("deserialize aggregate")
|
488 - | });
|
462 + | builder.a_union = Some(crate::types::AUnion::deserialize(deser)?);
|
489 463 | }
|
490 464 | _ => {}
|
491 465 | }
|
492 466 | Ok(())
|
493 467 | })?;
|
468 + | builder.a_string = builder.a_string.or(Some(String::new()));
|
469 + | builder.a_boolean = builder.a_boolean.or(Some(false));
|
470 + | builder.a_byte = builder.a_byte.or(Some(0i8));
|
471 + | builder.a_short = builder.a_short.or(Some(0i16));
|
472 + | builder.an_int = builder.an_int.or(Some(0i32));
|
473 + | builder.a_long = builder.a_long.or(Some(0i64));
|
474 + | builder.a_float = builder.a_float.or(Some(0.0f32));
|
475 + | builder.a_double = builder.a_double.or(Some(0.0f64));
|
476 + | builder.a_timestamp = builder.a_timestamp.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
|
477 + | builder.a_document = builder.a_document.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
|
478 + | builder.a_string_list = builder.a_string_list.or(Some(Vec::new()));
|
479 + | builder.a_string_map = builder.a_string_map.or(Some(::std::collections::HashMap::new()));
|
480 + | builder.a_string_set = builder.a_string_set.or(Some(Vec::new()));
|
481 + | builder.a_blob = builder.a_blob.or(Some(::aws_smithy_types::Blob::new("")));
|
494 482 | builder
|
495 483 | .build()
|
496 484 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
497 485 | }
|
498 486 | }
|
487 + | impl InnermostShape {
|
488 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
489 + | pub fn deserialize_with_response(
|
490 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
491 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
492 + | _status: u16,
|
493 + | _body: &[u8],
|
494 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
495 + | Self::deserialize(deserializer)
|
496 + | }
|
497 + | }
|
499 498 | impl InnermostShape {
|
500 499 | /// Creates a new builder-style object to manufacture [`InnermostShape`](crate::types::InnermostShape).
|
501 500 | pub fn builder() -> crate::types::builders::InnermostShapeBuilder {
|
502 501 | crate::types::builders::InnermostShapeBuilder::default()
|
503 502 | }
|
504 503 | }
|
505 504 |
|
506 505 | /// A builder for [`InnermostShape`](crate::types::InnermostShape).
|
507 506 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
508 507 | #[non_exhaustive]
|
509 508 | pub struct InnermostShapeBuilder {
|
510 509 | pub(crate) a_string: ::std::option::Option<::std::string::String>,
|
511 510 | pub(crate) a_boolean: ::std::option::Option<bool>,
|
512 511 | pub(crate) a_byte: ::std::option::Option<i8>,
|
513 512 | pub(crate) a_short: ::std::option::Option<i16>,
|
514 513 | pub(crate) an_int: ::std::option::Option<i32>,
|
515 514 | pub(crate) a_long: ::std::option::Option<i64>,
|
516 515 | pub(crate) a_float: ::std::option::Option<f32>,
|
517 516 | pub(crate) a_double: ::std::option::Option<f64>,
|
518 517 | pub(crate) a_big_integer: ::std::option::Option<::aws_smithy_types::BigInteger>,
|
519 518 | pub(crate) a_big_decimal: ::std::option::Option<::aws_smithy_types::BigDecimal>,
|
520 519 | pub(crate) a_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
521 520 | pub(crate) a_document: ::std::option::Option<::aws_smithy_types::DateTime>,
|
522 521 | pub(crate) a_string_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
523 522 | pub(crate) a_string_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>>,
|
524 523 | pub(crate) a_string_set: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
525 524 | pub(crate) a_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
526 525 | pub(crate) a_union: ::std::option::Option<crate::types::AUnion>,
|
527 526 | }
|
528 527 | impl InnermostShapeBuilder {
|