244 244 | "timestamp",
|
245 245 | 9,
|
246 246 | );
|
247 247 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
248 248 | ::aws_smithy_schema::ShapeId::from_static(
|
249 249 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$enum",
|
250 250 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
251 251 | "SimpleStructOperationOutput",
|
252 252 | ),
|
253 253 | ::aws_smithy_schema::ShapeType::String,
|
254 - | "r##enum",
|
254 + | "enum",
|
255 255 | 10,
|
256 256 | );
|
257 257 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BLOB: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
258 258 | ::aws_smithy_schema::ShapeId::from_static(
|
259 259 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredBlob",
|
260 260 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
261 261 | "SimpleStructOperationOutput",
|
262 262 | ),
|
263 263 | ::aws_smithy_schema::ShapeType::Blob,
|
264 - | "required_blob",
|
264 + | "requiredBlob",
|
265 265 | 11,
|
266 266 | );
|
267 267 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BOOLEAN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
268 268 | ::aws_smithy_schema::ShapeId::from_static(
|
269 269 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredBoolean",
|
270 270 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
271 271 | "SimpleStructOperationOutput",
|
272 272 | ),
|
273 273 | ::aws_smithy_schema::ShapeType::Boolean,
|
274 - | "required_boolean",
|
274 + | "requiredBoolean",
|
275 275 | 12,
|
276 276 | );
|
277 277 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_STRING: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
278 278 | ::aws_smithy_schema::ShapeId::from_static(
|
279 279 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredString",
|
280 280 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
281 281 | "SimpleStructOperationOutput",
|
282 282 | ),
|
283 283 | ::aws_smithy_schema::ShapeType::String,
|
284 - | "required_string",
|
284 + | "requiredString",
|
285 285 | 13,
|
286 286 | );
|
287 287 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BYTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
288 288 | ::aws_smithy_schema::ShapeId::from_static(
|
289 289 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredByte",
|
290 290 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
291 291 | "SimpleStructOperationOutput",
|
292 292 | ),
|
293 293 | ::aws_smithy_schema::ShapeType::Byte,
|
294 - | "required_byte",
|
294 + | "requiredByte",
|
295 295 | 14,
|
296 296 | );
|
297 297 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_SHORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
298 298 | ::aws_smithy_schema::ShapeId::from_static(
|
299 299 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredShort",
|
300 300 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
301 301 | "SimpleStructOperationOutput",
|
302 302 | ),
|
303 303 | ::aws_smithy_schema::ShapeType::Short,
|
304 - | "required_short",
|
304 + | "requiredShort",
|
305 305 | 15,
|
306 306 | );
|
307 307 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_INTEGER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
308 308 | ::aws_smithy_schema::ShapeId::from_static(
|
309 309 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredInteger",
|
310 310 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
311 311 | "SimpleStructOperationOutput",
|
312 312 | ),
|
313 313 | ::aws_smithy_schema::ShapeType::Integer,
|
314 - | "required_integer",
|
314 + | "requiredInteger",
|
315 315 | 16,
|
316 316 | );
|
317 317 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_LONG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
318 318 | ::aws_smithy_schema::ShapeId::from_static(
|
319 319 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredLong",
|
320 320 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
321 321 | "SimpleStructOperationOutput",
|
322 322 | ),
|
323 323 | ::aws_smithy_schema::ShapeType::Long,
|
324 - | "required_long",
|
324 + | "requiredLong",
|
325 325 | 17,
|
326 326 | );
|
327 327 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_FLOAT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
328 328 | ::aws_smithy_schema::ShapeId::from_static(
|
329 329 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredFloat",
|
330 330 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
331 331 | "SimpleStructOperationOutput",
|
332 332 | ),
|
333 333 | ::aws_smithy_schema::ShapeType::Float,
|
334 - | "required_float",
|
334 + | "requiredFloat",
|
335 335 | 18,
|
336 336 | );
|
337 337 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_DOUBLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
338 338 | ::aws_smithy_schema::ShapeId::from_static(
|
339 339 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredDouble",
|
340 340 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
341 341 | "SimpleStructOperationOutput",
|
342 342 | ),
|
343 343 | ::aws_smithy_schema::ShapeType::Double,
|
344 - | "required_double",
|
344 + | "requiredDouble",
|
345 345 | 19,
|
346 346 | );
|
347 347 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_TIMESTAMP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
348 348 | ::aws_smithy_schema::ShapeId::from_static(
|
349 349 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredTimestamp",
|
350 350 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
351 351 | "SimpleStructOperationOutput",
|
352 352 | ),
|
353 353 | ::aws_smithy_schema::ShapeType::Timestamp,
|
354 - | "required_timestamp",
|
354 + | "requiredTimestamp",
|
355 355 | 20,
|
356 356 | );
|
357 357 | static SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_ENUM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
358 358 | ::aws_smithy_schema::ShapeId::from_static(
|
359 359 | "smithy.protocoltests.rpcv2Cbor.synthetic#SimpleStructOperationOutput$requiredEnum",
|
360 360 | "smithy.protocoltests.rpcv2Cbor.synthetic",
|
361 361 | "SimpleStructOperationOutput",
|
362 362 | ),
|
363 363 | ::aws_smithy_schema::ShapeType::String,
|
364 - | "required_enum",
|
364 + | "requiredEnum",
|
365 365 | 21,
|
366 366 | );
|
367 367 | static SIMPLESTRUCTOPERATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
368 368 | SIMPLESTRUCTOPERATIONOUTPUT_SCHEMA_ID,
|
369 369 | ::aws_smithy_schema::ShapeType::Structure,
|
370 370 | &[
|
371 371 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_BLOB,
|
372 372 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_BOOLEAN,
|
373 373 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_STRING,
|
374 374 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_BYTE,
|
375 375 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_SHORT,
|
376 376 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_INTEGER,
|
377 377 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_LONG,
|
378 378 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_FLOAT,
|
379 379 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_DOUBLE,
|
380 380 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_TIMESTAMP,
|
381 381 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_ENUM,
|
382 382 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BLOB,
|
383 383 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BOOLEAN,
|
384 384 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_STRING,
|
385 385 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_BYTE,
|
386 386 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_SHORT,
|
387 387 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_INTEGER,
|
388 388 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_LONG,
|
389 389 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_FLOAT,
|
390 390 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_DOUBLE,
|
391 391 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_TIMESTAMP,
|
392 392 | &SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_ENUM,
|
393 393 | ],
|
394 394 | );
|
477 477 | }
|
478 478 | {
|
479 479 | let val = &self.required_enum;
|
480 480 | ser.write_string(&SIMPLESTRUCTOPERATIONOUTPUT_MEMBER_REQUIRED_ENUM, val.as_str())?;
|
481 481 | }
|
482 482 | Ok(())
|
483 483 | }
|
484 484 | }
|
485 485 | impl SimpleStructOperationOutput {
|
486 486 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
487 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
488 - | deserializer: &mut D,
|
487 + | pub fn deserialize(
|
488 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
489 489 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
490 490 | #[allow(unused_variables, unused_mut)]
|
491 491 | let mut builder = Self::builder();
|
492 492 | #[allow(
|
493 493 | unused_variables,
|
494 494 | unreachable_code,
|
495 495 | clippy::single_match,
|
496 496 | clippy::match_single_binding,
|
497 497 | clippy::diverging_sub_expression
|
498 498 | )]
|
499 - | deserializer.read_struct(&SIMPLESTRUCTOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
|
499 + | deserializer.read_struct(&SIMPLESTRUCTOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
|
500 500 | match member.member_index() {
|
501 501 | Some(0) => {
|
502 502 | builder.blob = Some(deser.read_blob(member)?);
|
503 503 | }
|
504 504 | Some(1) => {
|
505 505 | builder.boolean = Some(deser.read_boolean(member)?);
|
506 506 | }
|
507 507 | Some(2) => {
|
508 508 | builder.string = Some(deser.read_string(member)?);
|
509 509 | }
|
561 561 | Some(20) => {
|
562 562 | builder.required_timestamp = Some(deser.read_timestamp(member)?);
|
563 563 | }
|
564 564 | Some(21) => {
|
565 565 | builder.required_enum = Some(crate::types::Suit::from(deser.read_string(member)?.as_str()));
|
566 566 | }
|
567 567 | _ => {}
|
568 568 | }
|
569 569 | Ok(())
|
570 570 | })?;
|
571 + | builder.required_blob = builder.required_blob.or(Some(::aws_smithy_types::Blob::new("")));
|
572 + | builder.required_boolean = builder.required_boolean.or(Some(false));
|
573 + | builder.required_string = builder.required_string.or(Some(String::new()));
|
574 + | builder.required_byte = builder.required_byte.or(Some(0i8));
|
575 + | builder.required_short = builder.required_short.or(Some(0i16));
|
576 + | builder.required_integer = builder.required_integer.or(Some(0i32));
|
577 + | builder.required_long = builder.required_long.or(Some(0i64));
|
578 + | builder.required_float = builder.required_float.or(Some(0.0f32));
|
579 + | builder.required_double = builder.required_double.or(Some(0.0f64));
|
580 + | builder.required_timestamp = builder.required_timestamp.or(Some(::aws_smithy_types::DateTime::from_secs(0)));
|
571 581 | builder
|
572 582 | .build()
|
573 583 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
574 584 | }
|
575 585 | }
|
586 + | impl SimpleStructOperationOutput {
|
587 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
588 + | pub fn deserialize_with_response(
|
589 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
590 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
591 + | _status: u16,
|
592 + | _body: &[u8],
|
593 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
594 + | Self::deserialize(deserializer)
|
595 + | }
|
596 + | }
|
576 597 | impl SimpleStructOperationOutput {
|
577 598 | /// Creates a new builder-style object to manufacture [`SimpleStructOperationOutput`](crate::operation::simple_struct_operation::SimpleStructOperationOutput).
|
578 599 | pub fn builder() -> crate::operation::simple_struct_operation::builders::SimpleStructOperationOutputBuilder {
|
579 600 | crate::operation::simple_struct_operation::builders::SimpleStructOperationOutputBuilder::default()
|
580 601 | }
|
581 602 | }
|
582 603 |
|
583 604 | /// A builder for [`SimpleStructOperationOutput`](crate::operation::simple_struct_operation::SimpleStructOperationOutput).
|
584 605 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
585 606 | #[non_exhaustive]
|
586 607 | pub struct SimpleStructOperationOutputBuilder {
|
587 608 | pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
588 609 | pub(crate) boolean: ::std::option::Option<bool>,
|
589 610 | pub(crate) string: ::std::option::Option<::std::string::String>,
|
590 611 | pub(crate) byte: ::std::option::Option<i8>,
|
591 612 | pub(crate) short: ::std::option::Option<i16>,
|
592 613 | pub(crate) integer: ::std::option::Option<i32>,
|
593 614 | pub(crate) long: ::std::option::Option<i64>,
|
594 615 | pub(crate) float: ::std::option::Option<f32>,
|
595 616 | pub(crate) double: ::std::option::Option<f64>,
|
596 617 | pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
597 618 | pub(crate) r#enum: ::std::option::Option<crate::types::Suit>,
|
598 619 | pub(crate) required_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
599 620 | pub(crate) required_boolean: ::std::option::Option<bool>,
|
600 621 | pub(crate) required_string: ::std::option::Option<::std::string::String>,
|
601 622 | pub(crate) required_byte: ::std::option::Option<i8>,
|
602 623 | pub(crate) required_short: ::std::option::Option<i16>,
|
603 624 | pub(crate) required_integer: ::std::option::Option<i32>,
|
604 625 | pub(crate) required_long: ::std::option::Option<i64>,
|
605 626 | pub(crate) required_float: ::std::option::Option<f32>,
|