349 359 | /// Creates a new builder-style object to manufacture [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
350 360 | pub fn builder() -> crate::input::json_enums_input::Builder {
|
351 361 | crate::input::json_enums_input::Builder::default()
|
352 362 | }
|
353 363 | }
|
354 364 | impl crate::constrained::Constrained for crate::input::JsonEnumsInput {
|
355 365 | type Unconstrained = crate::input::json_enums_input::Builder;
|
356 366 | }
|
357 367 |
|
358 368 | #[allow(missing_docs)] // documentation missing in model
|
359 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
360 - | pub struct PutAndGetInlineDocumentsInput {
|
369 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
370 + | pub struct JsonIntEnumsInput {
|
361 371 | #[allow(missing_docs)] // documentation missing in model
|
362 - | pub inline_document: ::std::option::Option<::aws_smithy_types::Document>,
|
363 - | }
|
364 - | impl PutAndGetInlineDocumentsInput {
|
372 + | pub int_enum1: ::std::option::Option<i32>,
|
365 373 | #[allow(missing_docs)] // documentation missing in model
|
366 - | pub fn inline_document(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
|
367 - | self.inline_document.as_ref()
|
368 - | }
|
369 - | }
|
370 - | impl PutAndGetInlineDocumentsInput {
|
371 - | /// Creates a new builder-style object to manufacture [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
372 - | pub fn builder() -> crate::input::put_and_get_inline_documents_input::Builder {
|
373 - | crate::input::put_and_get_inline_documents_input::Builder::default()
|
374 - | }
|
375 - | }
|
376 - | impl crate::constrained::Constrained for crate::input::PutAndGetInlineDocumentsInput {
|
377 - | type Unconstrained = crate::input::put_and_get_inline_documents_input::Builder;
|
378 - | }
|
379 - |
|
380 - | #[allow(missing_docs)] // documentation missing in model
|
381 - | #[derive(
|
382 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
383 - | )]
|
384 - | pub struct OperationWithOptionalInputOutputInput {
|
374 + | pub int_enum2: ::std::option::Option<i32>,
|
385 375 | #[allow(missing_docs)] // documentation missing in model
|
386 - | pub value: ::std::option::Option<::std::string::String>,
|
376 + | pub int_enum3: ::std::option::Option<i32>,
|
377 + | #[allow(missing_docs)] // documentation missing in model
|
378 + | pub int_enum_list: ::std::option::Option<::std::vec::Vec<i32>>,
|
379 + | #[allow(missing_docs)] // documentation missing in model
|
380 + | pub int_enum_set: ::std::option::Option<crate::model::IntegerEnumSet>,
|
381 + | #[allow(missing_docs)] // documentation missing in model
|
382 + | pub int_enum_map:
|
383 + | ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
387 384 | }
|
388 - | impl OperationWithOptionalInputOutputInput {
|
385 + | impl JsonIntEnumsInput {
|
389 386 | #[allow(missing_docs)] // documentation missing in model
|
390 - | pub fn value(&self) -> ::std::option::Option<&str> {
|
391 - | self.value.as_deref()
|
387 + | pub fn int_enum1(&self) -> ::std::option::Option<i32> {
|
388 + | self.int_enum1
|
392 389 | }
|
393 - | }
|
394 - | impl OperationWithOptionalInputOutputInput {
|
395 - | /// Creates a new builder-style object to manufacture [`OperationWithOptionalInputOutputInput`](crate::input::OperationWithOptionalInputOutputInput).
|
396 - | pub fn builder() -> crate::input::operation_with_optional_input_output_input::Builder {
|
397 - | crate::input::operation_with_optional_input_output_input::Builder::default()
|
390 + | #[allow(missing_docs)] // documentation missing in model
|
391 + | pub fn int_enum2(&self) -> ::std::option::Option<i32> {
|
392 + | self.int_enum2
|
398 393 | }
|
399 - | }
|
400 - | impl crate::constrained::Constrained for crate::input::OperationWithOptionalInputOutputInput {
|
401 - | type Unconstrained = crate::input::operation_with_optional_input_output_input::Builder;
|
402 - | }
|
403 - |
|
404 - | #[allow(missing_docs)] // documentation missing in model
|
405 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
406 - | pub struct SimpleScalarPropertiesInput {
|
407 394 | #[allow(missing_docs)] // documentation missing in model
|
408 - | pub float_value: ::std::option::Option<f32>,
|
395 + | pub fn int_enum3(&self) -> ::std::option::Option<i32> {
|
396 + | self.int_enum3
|
397 + | }
|
409 398 | #[allow(missing_docs)] // documentation missing in model
|
410 - | pub double_value: ::std::option::Option<f64>,
|
411 - | }
|
412 - | impl SimpleScalarPropertiesInput {
|
399 + | pub fn int_enum_list(&self) -> ::std::option::Option<&[i32]> {
|
400 + | self.int_enum_list.as_deref()
|
401 + | }
|
413 402 | #[allow(missing_docs)] // documentation missing in model
|
414 - | pub fn float_value(&self) -> ::std::option::Option<f32> {
|
415 - | self.float_value
|
403 + | pub fn int_enum_set(&self) -> ::std::option::Option<&crate::model::IntegerEnumSet> {
|
404 + | self.int_enum_set.as_ref()
|
416 405 | }
|
417 406 | #[allow(missing_docs)] // documentation missing in model
|
418 - | pub fn double_value(&self) -> ::std::option::Option<f64> {
|
419 - | self.double_value
|
407 + | pub fn int_enum_map(
|
408 + | &self,
|
409 + | ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, i32>> {
|
410 + | self.int_enum_map.as_ref()
|
420 411 | }
|
421 412 | }
|
422 - | impl SimpleScalarPropertiesInput {
|
423 - | /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
424 - | pub fn builder() -> crate::input::simple_scalar_properties_input::Builder {
|
425 - | crate::input::simple_scalar_properties_input::Builder::default()
|
413 + | impl JsonIntEnumsInput {
|
414 + | /// Creates a new builder-style object to manufacture [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
415 + | pub fn builder() -> crate::input::json_int_enums_input::Builder {
|
416 + | crate::input::json_int_enums_input::Builder::default()
|
426 417 | }
|
427 418 | }
|
428 - | impl crate::constrained::Constrained for crate::input::SimpleScalarPropertiesInput {
|
429 - | type Unconstrained = crate::input::simple_scalar_properties_input::Builder;
|
419 + | impl crate::constrained::Constrained for crate::input::JsonIntEnumsInput {
|
420 + | type Unconstrained = crate::input::json_int_enums_input::Builder;
|
430 421 | }
|
431 422 |
|
432 423 | #[allow(missing_docs)] // documentation missing in model
|
433 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
434 - | pub struct KitchenSinkOperationInput {
|
435 - | #[allow(missing_docs)] // documentation missing in model
|
436 - | pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
437 - | #[allow(missing_docs)] // documentation missing in model
|
438 - | pub boolean: ::std::option::Option<bool>,
|
439 - | #[allow(missing_docs)] // documentation missing in model
|
440 - | pub double: ::std::option::Option<f64>,
|
441 - | #[allow(missing_docs)] // documentation missing in model
|
442 - | pub empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
|
443 - | #[allow(missing_docs)] // documentation missing in model
|
444 - | pub float: ::std::option::Option<f32>,
|
445 - | #[allow(missing_docs)] // documentation missing in model
|
446 - | pub httpdate_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
447 - | #[allow(missing_docs)] // documentation missing in model
|
448 - | pub integer: ::std::option::Option<i32>,
|
449 - | #[allow(missing_docs)] // documentation missing in model
|
450 - | pub iso8601_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
451 - | #[allow(missing_docs)] // documentation missing in model
|
452 - | pub json_value: ::std::option::Option<::std::string::String>,
|
453 - | #[allow(missing_docs)] // documentation missing in model
|
454 - | pub list_of_lists:
|
455 - | ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
456 - | #[allow(missing_docs)] // documentation missing in model
|
457 - | pub list_of_maps_of_strings: ::std::option::Option<
|
458 - | ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
|
459 - | >,
|
460 - | #[allow(missing_docs)] // documentation missing in model
|
461 - | pub list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
424 + | #[derive(
|
425 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
426 + | )]
|
427 + | pub struct NullOperationInput {
|
462 428 | #[allow(missing_docs)] // documentation missing in model
|
463 - | pub list_of_structs: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
429 + | pub string: ::std::option::Option<::std::string::String>,
|
430 + | }
|
431 + | impl NullOperationInput {
|
464 432 | #[allow(missing_docs)] // documentation missing in model
|
465 - | pub long: ::std::option::Option<i64>,
|
433 + | pub fn string(&self) -> ::std::option::Option<&str> {
|
434 + | self.string.as_deref()
|
435 + | }
|
436 + | }
|
437 + | impl NullOperationInput {
|
438 + | /// Creates a new builder-style object to manufacture [`NullOperationInput`](crate::input::NullOperationInput).
|
439 + | pub fn builder() -> crate::input::null_operation_input::Builder {
|
440 + | crate::input::null_operation_input::Builder::default()
|
441 + | }
|
442 + | }
|
443 + | impl crate::constrained::Constrained for crate::input::NullOperationInput {
|
444 + | type Unconstrained = crate::input::null_operation_input::Builder;
|
445 + | }
|
446 + |
|
447 + | #[allow(missing_docs)] // documentation missing in model
|
448 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
449 + | pub struct SparseNullsOperationInput {
|
466 450 | #[allow(missing_docs)] // documentation missing in model
|
467 - | pub map_of_lists_of_strings: ::std::option::Option<
|
468 - | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
469 - | >,
|
451 + | pub sparse_string_list:
|
452 + | ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
|
470 453 | #[allow(missing_docs)] // documentation missing in model
|
471 - | pub map_of_maps: ::std::option::Option<
|
454 + | pub sparse_string_map: ::std::option::Option<
|
472 455 | ::std::collections::HashMap<
|
473 456 | ::std::string::String,
|
474 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
457 + | ::std::option::Option<::std::string::String>,
|
475 458 | >,
|
476 459 | >,
|
477 - | #[allow(missing_docs)] // documentation missing in model
|
478 - | pub map_of_strings: ::std::option::Option<
|
479 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
480 - | >,
|
481 - | #[allow(missing_docs)] // documentation missing in model
|
482 - | pub map_of_structs: ::std::option::Option<
|
483 - | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
484 - | >,
|
485 - | #[allow(missing_docs)] // documentation missing in model
|
486 - | pub recursive_list: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
|
487 - | #[allow(missing_docs)] // documentation missing in model
|
488 - | pub recursive_map: ::std::option::Option<
|
489 - | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
490 - | >,
|
491 - | #[allow(missing_docs)] // documentation missing in model
|
492 - | pub recursive_struct: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
|
493 - | #[allow(missing_docs)] // documentation missing in model
|
494 - | pub simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
|
495 - | #[allow(missing_docs)] // documentation missing in model
|
496 - | pub string: ::std::option::Option<::std::string::String>,
|
497 - | #[allow(missing_docs)] // documentation missing in model
|
498 - | pub struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
|
499 - | #[allow(missing_docs)] // documentation missing in model
|
500 - | pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
501 - | #[allow(missing_docs)] // documentation missing in model
|
502 - | pub unix_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
503 460 | }
|
504 - | impl KitchenSinkOperationInput {
|
505 - | #[allow(missing_docs)] // documentation missing in model
|
506 - | pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
507 - | self.blob.as_ref()
|
508 - | }
|
509 - | #[allow(missing_docs)] // documentation missing in model
|
510 - | pub fn boolean(&self) -> ::std::option::Option<bool> {
|
511 - | self.boolean
|
512 - | }
|
513 - | #[allow(missing_docs)] // documentation missing in model
|
514 - | pub fn double(&self) -> ::std::option::Option<f64> {
|
515 - | self.double
|
516 - | }
|
517 - | #[allow(missing_docs)] // documentation missing in model
|
518 - | pub fn empty_struct(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
|
519 - | self.empty_struct.as_ref()
|
520 - | }
|
521 - | #[allow(missing_docs)] // documentation missing in model
|
522 - | pub fn float(&self) -> ::std::option::Option<f32> {
|
523 - | self.float
|
524 - | }
|
525 - | #[allow(missing_docs)] // documentation missing in model
|
526 - | pub fn httpdate_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
527 - | self.httpdate_timestamp.as_ref()
|
528 - | }
|
529 - | #[allow(missing_docs)] // documentation missing in model
|
530 - | pub fn integer(&self) -> ::std::option::Option<i32> {
|
531 - | self.integer
|
532 - | }
|
533 - | #[allow(missing_docs)] // documentation missing in model
|
534 - | pub fn iso8601_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
535 - | self.iso8601_timestamp.as_ref()
|
536 - | }
|
537 - | #[allow(missing_docs)] // documentation missing in model
|
538 - | pub fn json_value(&self) -> ::std::option::Option<&str> {
|
539 - | self.json_value.as_deref()
|
540 - | }
|
541 - | #[allow(missing_docs)] // documentation missing in model
|
542 - | pub fn list_of_lists(
|
543 - | &self,
|
544 - | ) -> ::std::option::Option<&[::std::vec::Vec<::std::string::String>]> {
|
545 - | self.list_of_lists.as_deref()
|
546 - | }
|
547 - | #[allow(missing_docs)] // documentation missing in model
|
548 - | pub fn list_of_maps_of_strings(
|
549 - | &self,
|
550 - | ) -> ::std::option::Option<
|
551 - | &[::std::collections::HashMap<::std::string::String, ::std::string::String>],
|
552 - | > {
|
553 - | self.list_of_maps_of_strings.as_deref()
|
554 - | }
|
555 - | #[allow(missing_docs)] // documentation missing in model
|
556 - | pub fn list_of_strings(&self) -> ::std::option::Option<&[::std::string::String]> {
|
557 - | self.list_of_strings.as_deref()
|
558 - | }
|
559 - | #[allow(missing_docs)] // documentation missing in model
|
560 - | pub fn list_of_structs(&self) -> ::std::option::Option<&[crate::model::SimpleStruct]> {
|
561 - | self.list_of_structs.as_deref()
|
562 - | }
|
563 - | #[allow(missing_docs)] // documentation missing in model
|
564 - | pub fn long(&self) -> ::std::option::Option<i64> {
|
565 - | self.long
|
566 - | }
|
461 + | impl SparseNullsOperationInput {
|
567 462 | #[allow(missing_docs)] // documentation missing in model
|
568 - | pub fn map_of_lists_of_strings(
|
463 + | pub fn sparse_string_list(
|
569 464 | &self,
|
570 - | ) -> ::std::option::Option<
|
571 - | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
572 - | > {
|
573 - | self.map_of_lists_of_strings.as_ref()
|
465 + | ) -> ::std::option::Option<&[::std::option::Option<::std::string::String>]> {
|
466 + | self.sparse_string_list.as_deref()
|
574 467 | }
|
575 468 | #[allow(missing_docs)] // documentation missing in model
|
576 - | pub fn map_of_maps(
|
469 + | pub fn sparse_string_map(
|
577 470 | &self,
|
578 471 | ) -> ::std::option::Option<
|
579 472 | &::std::collections::HashMap<
|
580 473 | ::std::string::String,
|
581 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
474 + | ::std::option::Option<::std::string::String>,
|
582 475 | >,
|
583 476 | > {
|
584 - | self.map_of_maps.as_ref()
|
585 - | }
|
586 - | #[allow(missing_docs)] // documentation missing in model
|
587 - | pub fn map_of_strings(
|
588 - | &self,
|
589 - | ) -> ::std::option::Option<
|
590 - | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
591 - | > {
|
592 - | self.map_of_strings.as_ref()
|
477 + | self.sparse_string_map.as_ref()
|
593 478 | }
|
594 - | #[allow(missing_docs)] // documentation missing in model
|
595 - | pub fn map_of_structs(
|
596 - | &self,
|
597 - | ) -> ::std::option::Option<
|
598 - | &::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
599 - | > {
|
600 - | self.map_of_structs.as_ref()
|
479 + | }
|
480 + | impl SparseNullsOperationInput {
|
481 + | /// Creates a new builder-style object to manufacture [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
482 + | pub fn builder() -> crate::input::sparse_nulls_operation_input::Builder {
|
483 + | crate::input::sparse_nulls_operation_input::Builder::default()
|
601 484 | }
|
602 - | #[allow(missing_docs)] // documentation missing in model
|
603 - | pub fn recursive_list(&self) -> ::std::option::Option<&[crate::model::KitchenSink]> {
|
604 - | self.recursive_list.as_deref()
|
485 + | }
|
486 + | impl crate::constrained::Constrained for crate::input::SparseNullsOperationInput {
|
487 + | type Unconstrained = crate::input::sparse_nulls_operation_input::Builder;
|
488 + | }
|
489 + |
|
490 + | #[allow(missing_docs)] // documentation missing in model
|
491 + | #[derive(
|
492 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
493 + | )]
|
494 + | pub struct GreetingWithErrorsInput {}
|
495 + | impl GreetingWithErrorsInput {
|
496 + | /// Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
497 + | pub fn builder() -> crate::input::greeting_with_errors_input::Builder {
|
498 + | crate::input::greeting_with_errors_input::Builder::default()
|
605 499 | }
|
606 - | #[allow(missing_docs)] // documentation missing in model
|
607 - | pub fn recursive_map(
|
608 - | &self,
|
609 - | ) -> ::std::option::Option<
|
610 - | &::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
611 - | > {
|
612 - | self.recursive_map.as_ref()
|
613 - | }
|
614 - | #[allow(missing_docs)] // documentation missing in model
|
615 - | pub fn recursive_struct(&self) -> ::std::option::Option<&crate::model::KitchenSink> {
|
616 - | self.recursive_struct.as_deref()
|
617 - | }
|
618 - | #[allow(missing_docs)] // documentation missing in model
|
619 - | pub fn simple_struct(&self) -> ::std::option::Option<&crate::model::SimpleStruct> {
|
620 - | self.simple_struct.as_ref()
|
621 - | }
|
622 - | #[allow(missing_docs)] // documentation missing in model
|
623 - | pub fn string(&self) -> ::std::option::Option<&str> {
|
624 - | self.string.as_deref()
|
625 - | }
|
626 - | #[allow(missing_docs)] // documentation missing in model
|
627 - | pub fn struct_with_json_name(
|
628 - | &self,
|
629 - | ) -> ::std::option::Option<&crate::model::StructWithJsonName> {
|
630 - | self.struct_with_json_name.as_ref()
|
631 - | }
|
632 - | #[allow(missing_docs)] // documentation missing in model
|
633 - | pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
634 - | self.timestamp.as_ref()
|
635 - | }
|
636 - | #[allow(missing_docs)] // documentation missing in model
|
637 - | pub fn unix_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
638 - | self.unix_timestamp.as_ref()
|
500 + | }
|
501 + | impl crate::constrained::Constrained for crate::input::GreetingWithErrorsInput {
|
502 + | type Unconstrained = crate::input::greeting_with_errors_input::Builder;
|
503 + | }
|
504 + |
|
505 + | /// A shared structure that contains a single union member.
|
506 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
507 + | pub struct JsonUnionsInput {
|
508 + | /// A union with a representative set of types for members.
|
509 + | pub contents: ::std::option::Option<crate::model::MyUnion>,
|
510 + | }
|
511 + | impl JsonUnionsInput {
|
512 + | /// A union with a representative set of types for members.
|
513 + | pub fn contents(&self) -> ::std::option::Option<&crate::model::MyUnion> {
|
514 + | self.contents.as_ref()
|
639 515 | }
|
640 516 | }
|
641 - | impl KitchenSinkOperationInput {
|
642 - | /// Creates a new builder-style object to manufacture [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
643 - | pub fn builder() -> crate::input::kitchen_sink_operation_input::Builder {
|
644 - | crate::input::kitchen_sink_operation_input::Builder::default()
|
517 + | impl JsonUnionsInput {
|
518 + | /// Creates a new builder-style object to manufacture [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
519 + | pub fn builder() -> crate::input::json_unions_input::Builder {
|
520 + | crate::input::json_unions_input::Builder::default()
|
645 521 | }
|
646 522 | }
|
647 - | impl crate::constrained::Constrained for crate::input::KitchenSinkOperationInput {
|
648 - | type Unconstrained = crate::input::kitchen_sink_operation_input::Builder;
|
523 + | impl crate::constrained::Constrained for crate::input::JsonUnionsInput {
|
524 + | type Unconstrained = crate::input::json_unions_input::Builder;
|
649 525 | }
|
650 526 |
|
651 527 | #[allow(missing_docs)] // documentation missing in model
|
652 528 | #[derive(
|
653 529 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
654 530 | )]
|
655 - | pub struct EmptyOperationInput {}
|
656 - | impl EmptyOperationInput {
|
657 - | /// Creates a new builder-style object to manufacture [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
658 - | pub fn builder() -> crate::input::empty_operation_input::Builder {
|
659 - | crate::input::empty_operation_input::Builder::default()
|
660 - | }
|
661 - | }
|
662 - | impl crate::constrained::Constrained for crate::input::EmptyOperationInput {
|
663 - | type Unconstrained = crate::input::empty_operation_input::Builder;
|
664 - | }
|
665 - | /// See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
666 - | pub mod content_type_parameters_input {
|
667 - |
|
668 - | impl ::std::convert::From<Builder> for crate::input::ContentTypeParametersInput {
|
669 - | fn from(builder: Builder) -> Self {
|
670 - | builder.build()
|
671 - | }
|
672 - | }
|
673 - | /// A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
674 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
675 - | pub struct Builder {
|
676 - | pub(crate) value: ::std::option::Option<i32>,
|
677 - | }
|
678 - | impl Builder {
|
679 - | #[allow(missing_docs)] // documentation missing in model
|
680 - | pub fn value(mut self, input: ::std::option::Option<i32>) -> Self {
|
681 - | self.value = input;
|
682 - | self
|
683 - | }
|
684 - | #[allow(missing_docs)] // documentation missing in model
|
685 - | pub(crate) fn set_value(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
686 - | self.value = input.map(|v| v.into());
|
687 - | self
|
688 - | }
|
689 - | /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
690 - | pub fn build(self) -> crate::input::ContentTypeParametersInput {
|
691 - | self.build_enforcing_all_constraints()
|
692 - | }
|
693 - | fn build_enforcing_all_constraints(self) -> crate::input::ContentTypeParametersInput {
|
694 - | crate::input::ContentTypeParametersInput { value: self.value }
|
695 - | }
|
696 - | }
|
697 - | }
|
698 - | /// See [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
699 - | pub mod put_with_content_encoding_input {
|
700 - |
|
701 - | impl ::std::convert::From<Builder> for crate::input::PutWithContentEncodingInput {
|
702 - | fn from(builder: Builder) -> Self {
|
703 - | builder.build()
|
704 - | }
|
705 - | }
|
706 - | /// A builder for [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
707 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
708 - | pub struct Builder {
|
709 - | pub(crate) encoding: ::std::option::Option<::std::string::String>,
|
710 - | pub(crate) data: ::std::option::Option<::std::string::String>,
|
711 - | }
|
712 - | impl Builder {
|
713 - | #[allow(missing_docs)] // documentation missing in model
|
714 - | pub fn encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
715 - | self.encoding = input;
|
716 - | self
|
717 - | }
|
718 - | #[allow(missing_docs)] // documentation missing in model
|
719 - | pub(crate) fn set_encoding(
|
720 - | mut self,
|
721 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
722 - | ) -> Self {
|
723 - | self.encoding = input.map(|v| v.into());
|
724 - | self
|
725 - | }
|
726 - | #[allow(missing_docs)] // documentation missing in model
|
727 - | pub fn data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
728 - | self.data = input;
|
729 - | self
|
730 - | }
|
731 - | #[allow(missing_docs)] // documentation missing in model
|
732 - | pub(crate) fn set_data(
|
733 - | mut self,
|
734 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
735 - | ) -> Self {
|
736 - | self.data = input.map(|v| v.into());
|
737 - | self
|
738 - | }
|
739 - | /// Consumes the builder and constructs a [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
740 - | pub fn build(self) -> crate::input::PutWithContentEncodingInput {
|
741 - | self.build_enforcing_all_constraints()
|
742 - | }
|
743 - | fn build_enforcing_all_constraints(self) -> crate::input::PutWithContentEncodingInput {
|
744 - | crate::input::PutWithContentEncodingInput {
|
745 - | encoding: self.encoding,
|
746 - | data: self.data,
|
747 - | }
|
748 - | }
|
531 + | pub struct EndpointOperationInput {}
|
532 + | impl EndpointOperationInput {
|
533 + | /// Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
534 + | pub fn builder() -> crate::input::endpoint_operation_input::Builder {
|
535 + | crate::input::endpoint_operation_input::Builder::default()
|
749 536 | }
|
750 537 | }
|
751 - | /// See [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
752 - | pub mod fractional_seconds_input {
|
753 - |
|
754 - | impl ::std::convert::From<Builder> for crate::input::FractionalSecondsInput {
|
755 - | fn from(builder: Builder) -> Self {
|
756 - | builder.build()
|
757 - | }
|
758 - | }
|
759 - | /// A builder for [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
760 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
761 - | pub struct Builder {}
|
762 - | impl Builder {
|
763 - | /// Consumes the builder and constructs a [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
764 - | pub fn build(self) -> crate::input::FractionalSecondsInput {
|
765 - | self.build_enforcing_all_constraints()
|
766 - | }
|
767 - | fn build_enforcing_all_constraints(self) -> crate::input::FractionalSecondsInput {
|
768 - | crate::input::FractionalSecondsInput {}
|
769 - | }
|
770 - | }
|
538 + | impl crate::constrained::Constrained for crate::input::EndpointOperationInput {
|
539 + | type Unconstrained = crate::input::endpoint_operation_input::Builder;
|
771 540 | }
|
772 - | /// See [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
773 - | pub mod datetime_offsets_input {
|
774 541 |
|
775 - | impl ::std::convert::From<Builder> for crate::input::DatetimeOffsetsInput {
|
776 - | fn from(builder: Builder) -> Self {
|
777 - | builder.build()
|
778 - | }
|
779 - | }
|
780 - | /// A builder for [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
781 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
782 - | pub struct Builder {}
|
783 - | impl Builder {
|
784 - | /// Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
785 - | pub fn build(self) -> crate::input::DatetimeOffsetsInput {
|
786 - | self.build_enforcing_all_constraints()
|
787 - | }
|
788 - | fn build_enforcing_all_constraints(self) -> crate::input::DatetimeOffsetsInput {
|
789 - | crate::input::DatetimeOffsetsInput {}
|
790 - | }
|
791 - | }
|
542 + | #[allow(missing_docs)] // documentation missing in model
|
543 + | #[derive(
|
544 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
545 + | )]
|
546 + | pub struct EndpointWithHostLabelOperationInput {
|
547 + | #[allow(missing_docs)] // documentation missing in model
|
548 + | pub label: ::std::string::String,
|
792 549 | }
|
793 - | /// See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
794 - | pub mod host_with_path_operation_input {
|
795 - |
|
796 - | impl ::std::convert::From<Builder> for crate::input::HostWithPathOperationInput {
|
797 - | fn from(builder: Builder) -> Self {
|
798 - | builder.build()
|
799 - | }
|
800 - | }
|
801 - | /// A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
802 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
803 - | pub struct Builder {}
|
804 - | impl Builder {
|
805 - | /// Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
806 - | pub fn build(self) -> crate::input::HostWithPathOperationInput {
|
807 - | self.build_enforcing_all_constraints()
|
808 - | }
|
809 - | fn build_enforcing_all_constraints(self) -> crate::input::HostWithPathOperationInput {
|
810 - | crate::input::HostWithPathOperationInput {}
|
811 - | }
|
550 + | impl EndpointWithHostLabelOperationInput {
|
551 + | #[allow(missing_docs)] // documentation missing in model
|
552 + | pub fn label(&self) -> &str {
|
553 + | use std::ops::Deref;
|
554 + | self.label.deref()
|
812 555 | }
|
813 556 | }
|
814 - | /// See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
815 - | pub mod endpoint_with_host_label_operation_input {
|
816 - |
|
817 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
818 - | /// Holds one variant for each of the ways the builder can fail.
|
819 - | #[non_exhaustive]
|
820 - | #[allow(clippy::enum_variant_names)]
|
821 - | pub enum ConstraintViolation {
|
822 - | /// `label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
823 - | MissingLabel,
|
824 - | }
|
825 - | impl ::std::fmt::Display for ConstraintViolation {
|
826 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
827 - | match self {
|
828 - | ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
829 - | }
|
830 - | }
|
831 - | }
|
832 - | impl ::std::error::Error for ConstraintViolation {}
|
833 - | impl ConstraintViolation {
|
834 - | pub(crate) fn as_validation_exception_field(
|
835 - | self,
|
836 - | path: ::std::string::String,
|
837 - | ) -> crate::model::ValidationExceptionField {
|
838 - | match self {
|
839 - | ConstraintViolation::MissingLabel => crate::model::ValidationExceptionField {
|
840 - | message: format!(
|
841 - | "Value at '{}/label' failed to satisfy constraint: Member must not be null",
|
842 - | path
|
843 - | ),
|
844 - | path: path + "/label",
|
845 - | },
|
846 - | }
|
847 - | }
|
848 - | }
|
849 - | impl ::std::convert::From<ConstraintViolation>
|
850 - | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
851 - | {
|
852 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
853 - | let first_validation_exception_field =
|
854 - | constraint_violation.as_validation_exception_field("".to_owned());
|
855 - | let validation_exception = crate::error::ValidationException {
|
856 - | message: format!(
|
857 - | "1 validation error detected. {}",
|
858 - | &first_validation_exception_field.message
|
859 - | ),
|
860 - | field_list: Some(vec![first_validation_exception_field]),
|
861 - | };
|
862 - | Self::ConstraintViolation(
|
863 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
864 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
865 - | )
|
866 - | }
|
867 - | }
|
868 - | impl ::std::convert::From<Builder>
|
869 - | for crate::constrained::MaybeConstrained<crate::input::EndpointWithHostLabelOperationInput>
|
870 - | {
|
871 - | fn from(builder: Builder) -> Self {
|
872 - | Self::Unconstrained(builder)
|
873 - | }
|
874 - | }
|
875 - | impl ::std::convert::TryFrom<Builder> for crate::input::EndpointWithHostLabelOperationInput {
|
876 - | type Error = ConstraintViolation;
|
877 - |
|
878 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
879 - | builder.build()
|
880 - | }
|
881 - | }
|
882 - | /// A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
883 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
884 - | pub struct Builder {
|
885 - | pub(crate) label: ::std::option::Option<::std::string::String>,
|
886 - | }
|
887 - | impl Builder {
|
888 - | #[allow(missing_docs)] // documentation missing in model
|
889 - | pub fn label(mut self, input: ::std::string::String) -> Self {
|
890 - | self.label = Some(input);
|
891 - | self
|
892 - | }
|
893 - | #[allow(missing_docs)] // documentation missing in model
|
894 - | pub(crate) fn set_label(
|
895 - | mut self,
|
896 - | input: impl ::std::convert::Into<::std::string::String>,
|
897 - | ) -> Self {
|
898 - | self.label = Some(input.into());
|
899 - | self
|
900 - | }
|
901 - | /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
902 - | ///
|
903 - | /// The builder fails to construct a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) if a [`ConstraintViolation`] occurs.
|
904 - | ///
|
905 - | pub fn build(
|
906 - | self,
|
907 - | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
908 - | {
|
909 - | self.build_enforcing_all_constraints()
|
910 - | }
|
911 - | fn build_enforcing_all_constraints(
|
912 - | self,
|
913 - | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
914 - | {
|
915 - | Ok(crate::input::EndpointWithHostLabelOperationInput {
|
916 - | label: self.label.ok_or(ConstraintViolation::MissingLabel)?,
|
917 - | })
|
918 - | }
|
557 + | impl EndpointWithHostLabelOperationInput {
|
558 + | /// Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
559 + | pub fn builder() -> crate::input::endpoint_with_host_label_operation_input::Builder {
|
560 + | crate::input::endpoint_with_host_label_operation_input::Builder::default()
|
919 561 | }
|
920 562 | }
|
921 - | /// See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
922 - | pub mod endpoint_operation_input {
|
563 + | impl crate::constrained::Constrained for crate::input::EndpointWithHostLabelOperationInput {
|
564 + | type Unconstrained = crate::input::endpoint_with_host_label_operation_input::Builder;
|
565 + | }
|
923 566 |
|
924 - | impl ::std::convert::From<Builder> for crate::input::EndpointOperationInput {
|
925 - | fn from(builder: Builder) -> Self {
|
926 - | builder.build()
|
927 - | }
|
928 - | }
|
929 - | /// A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
930 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
931 - | pub struct Builder {}
|
932 - | impl Builder {
|
933 - | /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
934 - | pub fn build(self) -> crate::input::EndpointOperationInput {
|
935 - | self.build_enforcing_all_constraints()
|
936 - | }
|
937 - | fn build_enforcing_all_constraints(self) -> crate::input::EndpointOperationInput {
|
938 - | crate::input::EndpointOperationInput {}
|
939 - | }
|
567 + | #[allow(missing_docs)] // documentation missing in model
|
568 + | #[derive(
|
569 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
570 + | )]
|
571 + | pub struct HostWithPathOperationInput {}
|
572 + | impl HostWithPathOperationInput {
|
573 + | /// Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
574 + | pub fn builder() -> crate::input::host_with_path_operation_input::Builder {
|
575 + | crate::input::host_with_path_operation_input::Builder::default()
|
940 576 | }
|
941 577 | }
|
942 - | /// See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
943 - | pub mod json_unions_input {
|
578 + | impl crate::constrained::Constrained for crate::input::HostWithPathOperationInput {
|
579 + | type Unconstrained = crate::input::host_with_path_operation_input::Builder;
|
580 + | }
|
944 581 |
|
945 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
946 - | /// Holds one variant for each of the ways the builder can fail.
|
947 - | #[non_exhaustive]
|
948 - | #[allow(clippy::enum_variant_names)]
|
949 - | pub enum ConstraintViolation {
|
950 - | /// Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
951 - | #[doc(hidden)]
|
952 - | Contents(crate::model::my_union::ConstraintViolation),
|
582 + | #[allow(missing_docs)] // documentation missing in model
|
583 + | #[derive(
|
584 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
585 + | )]
|
586 + | pub struct DatetimeOffsetsInput {}
|
587 + | impl DatetimeOffsetsInput {
|
588 + | /// Creates a new builder-style object to manufacture [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
589 + | pub fn builder() -> crate::input::datetime_offsets_input::Builder {
|
590 + | crate::input::datetime_offsets_input::Builder::default()
|
953 591 | }
|
954 - | impl ::std::fmt::Display for ConstraintViolation {
|
955 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
956 - | match self {
|
957 - | ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
958 - | }
|
959 - | }
|
592 + | }
|
593 + | impl crate::constrained::Constrained for crate::input::DatetimeOffsetsInput {
|
594 + | type Unconstrained = crate::input::datetime_offsets_input::Builder;
|
595 + | }
|
596 + |
|
597 + | #[allow(missing_docs)] // documentation missing in model
|
598 + | #[derive(
|
599 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
600 + | )]
|
601 + | pub struct FractionalSecondsInput {}
|
602 + | impl FractionalSecondsInput {
|
603 + | /// Creates a new builder-style object to manufacture [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
604 + | pub fn builder() -> crate::input::fractional_seconds_input::Builder {
|
605 + | crate::input::fractional_seconds_input::Builder::default()
|
960 606 | }
|
961 - | impl ::std::error::Error for ConstraintViolation {}
|
962 - | impl ConstraintViolation {
|
963 - | pub(crate) fn as_validation_exception_field(
|
964 - | self,
|
965 - | path: ::std::string::String,
|
966 - | ) -> crate::model::ValidationExceptionField {
|
967 - | match self {
|
968 - | ConstraintViolation::Contents(inner) => {
|
969 - | inner.as_validation_exception_field(path + "/contents")
|
970 - | }
|
971 - | }
|
972 - | }
|
607 + | }
|
608 + | impl crate::constrained::Constrained for crate::input::FractionalSecondsInput {
|
609 + | type Unconstrained = crate::input::fractional_seconds_input::Builder;
|
610 + | }
|
611 + |
|
612 + | #[allow(missing_docs)] // documentation missing in model
|
613 + | #[derive(
|
614 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
615 + | )]
|
616 + | pub struct PutWithContentEncodingInput {
|
617 + | #[allow(missing_docs)] // documentation missing in model
|
618 + | pub encoding: ::std::option::Option<::std::string::String>,
|
619 + | #[allow(missing_docs)] // documentation missing in model
|
620 + | pub data: ::std::option::Option<::std::string::String>,
|
621 + | }
|
622 + | impl PutWithContentEncodingInput {
|
623 + | #[allow(missing_docs)] // documentation missing in model
|
624 + | pub fn encoding(&self) -> ::std::option::Option<&str> {
|
625 + | self.encoding.as_deref()
|
973 626 | }
|
974 - | impl ::std::convert::From<ConstraintViolation>
|
975 - | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
976 - | {
|
977 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
978 - | let first_validation_exception_field =
|
979 - | constraint_violation.as_validation_exception_field("".to_owned());
|
980 - | let validation_exception = crate::error::ValidationException {
|
981 - | message: format!(
|
982 - | "1 validation error detected. {}",
|
983 - | &first_validation_exception_field.message
|
984 - | ),
|
985 - | field_list: Some(vec![first_validation_exception_field]),
|
986 - | };
|
987 - | Self::ConstraintViolation(
|
988 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
989 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
990 - | )
|
991 - | }
|
627 + | #[allow(missing_docs)] // documentation missing in model
|
628 + | pub fn data(&self) -> ::std::option::Option<&str> {
|
629 + | self.data.as_deref()
|
992 630 | }
|
993 - | impl ::std::convert::From<Builder>
|
994 - | for crate::constrained::MaybeConstrained<crate::input::JsonUnionsInput>
|
995 - | {
|
996 - | fn from(builder: Builder) -> Self {
|
997 - | Self::Unconstrained(builder)
|
998 - | }
|
631 + | }
|
632 + | impl PutWithContentEncodingInput {
|
633 + | /// Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
634 + | pub fn builder() -> crate::input::put_with_content_encoding_input::Builder {
|
635 + | crate::input::put_with_content_encoding_input::Builder::default()
|
999 636 | }
|
1000 - | impl ::std::convert::TryFrom<Builder> for crate::input::JsonUnionsInput {
|
1001 - | type Error = ConstraintViolation;
|
637 + | }
|
638 + | impl crate::constrained::Constrained for crate::input::PutWithContentEncodingInput {
|
639 + | type Unconstrained = crate::input::put_with_content_encoding_input::Builder;
|
640 + | }
|
1002 641 |
|
1003 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1004 - | builder.build()
|
1005 - | }
|
1006 - | }
|
1007 - | /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1008 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1009 - | pub struct Builder {
|
1010 - | pub(crate) contents:
|
1011 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
642 + | #[allow(missing_docs)] // documentation missing in model
|
643 + | #[derive(
|
644 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
645 + | )]
|
646 + | pub struct ContentTypeParametersInput {
|
647 + | #[allow(missing_docs)] // documentation missing in model
|
648 + | pub value: ::std::option::Option<i32>,
|
649 + | }
|
650 + | impl ContentTypeParametersInput {
|
651 + | #[allow(missing_docs)] // documentation missing in model
|
652 + | pub fn value(&self) -> ::std::option::Option<i32> {
|
653 + | self.value
|
1012 654 | }
|
1013 - | impl Builder {
|
1014 - | /// A union with a representative set of types for members.
|
1015 - | pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
|
1016 - | self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1017 - | self
|
1018 - | }
|
1019 - | /// A union with a representative set of types for members.
|
1020 - | pub(crate) fn set_contents(
|
1021 - | mut self,
|
1022 - | input: Option<
|
1023 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
1024 - | >,
|
1025 - | ) -> Self {
|
1026 - | self.contents = input.map(|v| v.into());
|
1027 - | self
|
1028 - | }
|
1029 - | /// Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1030 - | ///
|
1031 - | /// The builder fails to construct a [`JsonUnionsInput`](crate::input::JsonUnionsInput) if a [`ConstraintViolation`] occurs.
|
1032 - | ///
|
1033 - | pub fn build(self) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
1034 - | self.build_enforcing_all_constraints()
|
1035 - | }
|
1036 - | fn build_enforcing_all_constraints(
|
1037 - | self,
|
1038 - | ) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
1039 - | Ok(crate::input::JsonUnionsInput {
|
1040 - | contents: self
|
1041 - | .contents
|
1042 - | .map(|v| match v {
|
1043 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1044 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1045 - | })
|
1046 - | .map(|res| res.map_err(ConstraintViolation::Contents))
|
1047 - | .transpose()?,
|
1048 - | })
|
1049 - | }
|
655 + | }
|
656 + | impl ContentTypeParametersInput {
|
657 + | /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
658 + | pub fn builder() -> crate::input::content_type_parameters_input::Builder {
|
659 + | crate::input::content_type_parameters_input::Builder::default()
|
1050 660 | }
|
1051 661 | }
|
1052 - | /// See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1053 - | pub mod greeting_with_errors_input {
|
662 + | impl crate::constrained::Constrained for crate::input::ContentTypeParametersInput {
|
663 + | type Unconstrained = crate::input::content_type_parameters_input::Builder;
|
664 + | }
|
665 + | /// See [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
666 + | pub mod empty_operation_input {
|
1054 667 |
|
1055 - | impl ::std::convert::From<Builder> for crate::input::GreetingWithErrorsInput {
|
668 + | impl ::std::convert::From<Builder> for crate::input::EmptyOperationInput {
|
1056 669 | fn from(builder: Builder) -> Self {
|
1057 670 | builder.build()
|
1058 671 | }
|
1059 672 | }
|
1060 - | /// A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
673 + | /// A builder for [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
1061 674 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1062 675 | pub struct Builder {}
|
1063 676 | impl Builder {
|
1064 - | /// Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1065 - | pub fn build(self) -> crate::input::GreetingWithErrorsInput {
|
677 + | /// Consumes the builder and constructs a [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
678 + | pub fn build(self) -> crate::input::EmptyOperationInput {
|
1066 679 | self.build_enforcing_all_constraints()
|
1067 680 | }
|
1068 - | fn build_enforcing_all_constraints(self) -> crate::input::GreetingWithErrorsInput {
|
1069 - | crate::input::GreetingWithErrorsInput {}
|
681 + | fn build_enforcing_all_constraints(self) -> crate::input::EmptyOperationInput {
|
682 + | crate::input::EmptyOperationInput {}
|
1070 683 | }
|
1071 684 | }
|
1072 685 | }
|
1073 - | /// See [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
1074 - | pub mod sparse_nulls_operation_input {
|
686 + | /// See [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
687 + | pub mod kitchen_sink_operation_input {
|
1075 688 |
|
1076 - | impl ::std::convert::From<Builder> for crate::input::SparseNullsOperationInput {
|
689 + | impl ::std::convert::From<Builder> for crate::input::KitchenSinkOperationInput {
|
1077 690 | fn from(builder: Builder) -> Self {
|
1078 691 | builder.build()
|
1079 692 | }
|
1080 693 | }
|
1081 - | /// A builder for [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
694 + | /// A builder for [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
1082 695 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1083 696 | pub struct Builder {
|
1084 - | pub(crate) sparse_string_list:
|
1085 - | ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
|
1086 - | pub(crate) sparse_string_map: ::std::option::Option<
|
697 + | pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
698 + | pub(crate) boolean: ::std::option::Option<bool>,
|
699 + | pub(crate) double: ::std::option::Option<f64>,
|
700 + | pub(crate) empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
|
701 + | pub(crate) float: ::std::option::Option<f32>,
|
702 + | pub(crate) httpdate_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
703 + | pub(crate) integer: ::std::option::Option<i32>,
|
704 + | pub(crate) iso8601_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
705 + | pub(crate) json_value: ::std::option::Option<::std::string::String>,
|
706 + | pub(crate) list_of_lists:
|
707 + | ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
708 + | pub(crate) list_of_maps_of_strings: ::std::option::Option<
|
709 + | ::std::vec::Vec<
|
710 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
711 + | >,
|
712 + | >,
|
713 + | pub(crate) list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
714 + | pub(crate) list_of_structs:
|
715 + | ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
716 + | pub(crate) long: ::std::option::Option<i64>,
|
717 + | pub(crate) map_of_lists_of_strings: ::std::option::Option<
|
1087 718 | ::std::collections::HashMap<
|
1088 719 | ::std::string::String,
|
1089 - | ::std::option::Option<::std::string::String>,
|
720 + | ::std::vec::Vec<::std::string::String>,
|
721 + | >,
|
722 + | >,
|
723 + | pub(crate) map_of_maps: ::std::option::Option<
|
724 + | ::std::collections::HashMap<
|
725 + | ::std::string::String,
|
726 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1090 727 | >,
|
1091 728 | >,
|
729 + | pub(crate) map_of_strings: ::std::option::Option<
|
730 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
731 + | >,
|
732 + | pub(crate) map_of_structs: ::std::option::Option<
|
733 + | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
734 + | >,
|
735 + | pub(crate) recursive_list:
|
736 + | ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
|
737 + | pub(crate) recursive_map: ::std::option::Option<
|
738 + | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
739 + | >,
|
740 + | pub(crate) recursive_struct:
|
741 + | ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
|
742 + | pub(crate) simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
|
743 + | pub(crate) string: ::std::option::Option<::std::string::String>,
|
744 + | pub(crate) struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
|
745 + | pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
746 + | pub(crate) unix_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1092 747 | }
|
1093 748 | impl Builder {
|
1094 749 | #[allow(missing_docs)] // documentation missing in model
|
1095 - | pub fn sparse_string_list(
|
750 + | pub fn blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
751 + | self.blob = input;
|
752 + | self
|
753 + | }
|
754 + | #[allow(missing_docs)] // documentation missing in model
|
755 + | pub(crate) fn set_blob(
|
1096 756 | mut self,
|
1097 - | input: ::std::option::Option<
|
1098 - | ::std::vec::Vec<::std::option::Option<::std::string::String>>,
|
1099 - | >,
|
757 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
1100 758 | ) -> Self {
|
1101 - | self.sparse_string_list = input;
|
759 + | self.blob = input.map(|v| v.into());
|
1102 760 | self
|
1103 761 | }
|
1104 762 | #[allow(missing_docs)] // documentation missing in model
|
1105 - | pub(crate) fn set_sparse_string_list(
|
763 + | pub fn boolean(mut self, input: ::std::option::Option<bool>) -> Self {
|
764 + | self.boolean = input;
|
765 + | self
|
766 + | }
|
767 + | #[allow(missing_docs)] // documentation missing in model
|
768 + | pub(crate) fn set_boolean(
|
1106 769 | mut self,
|
1107 - | input: Option<
|
1108 - | impl ::std::convert::Into<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
|
1109 - | >,
|
770 + | input: Option<impl ::std::convert::Into<bool>>,
|
1110 771 | ) -> Self {
|
1111 - | self.sparse_string_list = input.map(|v| v.into());
|
772 + | self.boolean = input.map(|v| v.into());
|
1112 773 | self
|
1113 774 | }
|
1114 775 | #[allow(missing_docs)] // documentation missing in model
|
1115 - | pub fn sparse_string_map(
|
776 + | pub fn double(mut self, input: ::std::option::Option<f64>) -> Self {
|
777 + | self.double = input;
|
778 + | self
|
779 + | }
|
780 + | #[allow(missing_docs)] // documentation missing in model
|
781 + | pub(crate) fn set_double(mut self, input: Option<impl ::std::convert::Into<f64>>) -> Self {
|
782 + | self.double = input.map(|v| v.into());
|
783 + | self
|
784 + | }
|
785 + | #[allow(missing_docs)] // documentation missing in model
|
786 + | pub fn empty_struct(
|
1116 787 | mut self,
|
1117 - | input: ::std::option::Option<
|
1118 - | ::std::collections::HashMap<
|
1119 - | ::std::string::String,
|
1120 - | ::std::option::Option<::std::string::String>,
|
1121 - | >,
|
1122 - | >,
|
788 + | input: ::std::option::Option<crate::model::EmptyStruct>,
|
1123 789 | ) -> Self {
|
1124 - | self.sparse_string_map = input;
|
790 + | self.empty_struct = input;
|
1125 791 | self
|
1126 792 | }
|
1127 793 | #[allow(missing_docs)] // documentation missing in model
|
1128 - | pub(crate) fn set_sparse_string_map(
|
794 + | pub(crate) fn set_empty_struct(
|
1129 795 | mut self,
|
1130 - | input: Option<
|
1131 - | impl ::std::convert::Into<
|
1132 - | ::std::collections::HashMap<
|
1133 - | ::std::string::String,
|
1134 - | ::std::option::Option<::std::string::String>,
|
1135 - | >,
|
1136 - | >,
|
1137 - | >,
|
796 + | input: Option<impl ::std::convert::Into<crate::model::EmptyStruct>>,
|
1138 797 | ) -> Self {
|
1139 - | self.sparse_string_map = input.map(|v| v.into());
|
798 + | self.empty_struct = input.map(|v| v.into());
|
1140 799 | self
|
1141 800 | }
|
1142 - | /// Consumes the builder and constructs a [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
1143 - | pub fn build(self) -> crate::input::SparseNullsOperationInput {
|
1144 - | self.build_enforcing_all_constraints()
|
1145 - | }
|
1146 - | fn build_enforcing_all_constraints(self) -> crate::input::SparseNullsOperationInput {
|
1147 - | crate::input::SparseNullsOperationInput {
|
1148 - | sparse_string_list: self.sparse_string_list,
|
1149 - | sparse_string_map: self.sparse_string_map,
|
1150 - | }
|
1151 - | }
|
1152 - | }
|
1153 - | }
|
1154 - | /// See [`NullOperationInput`](crate::input::NullOperationInput).
|
1155 - | pub mod null_operation_input {
|
1156 - |
|
1157 - | impl ::std::convert::From<Builder> for crate::input::NullOperationInput {
|
1158 - | fn from(builder: Builder) -> Self {
|
1159 - | builder.build()
|
801 + | #[allow(missing_docs)] // documentation missing in model
|
802 + | pub fn float(mut self, input: ::std::option::Option<f32>) -> Self {
|
803 + | self.float = input;
|
804 + | self
|
1160 805 | }
|
1161 - | }
|
1162 - | /// A builder for [`NullOperationInput`](crate::input::NullOperationInput).
|
1163 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1164 - | pub struct Builder {
|
1165 - | pub(crate) string: ::std::option::Option<::std::string::String>,
|
1166 - | }
|
1167 - | impl Builder {
|
1168 806 | #[allow(missing_docs)] // documentation missing in model
|
1169 - | pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1170 - | self.string = input;
|
807 + | pub(crate) fn set_float(mut self, input: Option<impl ::std::convert::Into<f32>>) -> Self {
|
808 + | self.float = input.map(|v| v.into());
|
1171 809 | self
|
1172 810 | }
|
1173 811 | #[allow(missing_docs)] // documentation missing in model
|
1174 - | pub(crate) fn set_string(
|
812 + | pub fn httpdate_timestamp(
|
1175 813 | mut self,
|
1176 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
814 + | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1177 815 | ) -> Self {
|
1178 - | self.string = input.map(|v| v.into());
|
816 + | self.httpdate_timestamp = input;
|
1179 817 | self
|
1180 818 | }
|
1181 - | /// Consumes the builder and constructs a [`NullOperationInput`](crate::input::NullOperationInput).
|
1182 - | pub fn build(self) -> crate::input::NullOperationInput {
|
1183 - | self.build_enforcing_all_constraints()
|
1184 - | }
|
1185 - | fn build_enforcing_all_constraints(self) -> crate::input::NullOperationInput {
|
1186 - | crate::input::NullOperationInput {
|
1187 - | string: self.string,
|
1188 - | }
|
819 + | #[allow(missing_docs)] // documentation missing in model
|
820 + | pub(crate) fn set_httpdate_timestamp(
|
821 + | mut self,
|
822 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
823 + | ) -> Self {
|
824 + | self.httpdate_timestamp = input.map(|v| v.into());
|
825 + | self
|
1189 826 | }
|
1190 - | }
|
1191 - | }
|
1192 - | /// See [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1193 - | pub mod json_int_enums_input {
|
1194 - |
|
1195 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1196 - | /// Holds one variant for each of the ways the builder can fail.
|
1197 - | #[non_exhaustive]
|
1198 - | #[allow(clippy::enum_variant_names)]
|
1199 - | pub enum ConstraintViolation {
|
1200 - | /// Constraint violation occurred building member `int_enum_set` when building `JsonIntEnumsInput`.
|
1201 - | #[doc(hidden)]
|
1202 - | IntEnumSet(crate::model::integer_enum_set::ConstraintViolation),
|
1203 - | }
|
1204 - | impl ::std::fmt::Display for ConstraintViolation {
|
1205 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1206 - | match self {
|
1207 - | ConstraintViolation::IntEnumSet(_) => write!(f, "constraint violation occurred building member `int_enum_set` when building `JsonIntEnumsInput`"),
|
1208 - | }
|
827 + | #[allow(missing_docs)] // documentation missing in model
|
828 + | pub fn integer(mut self, input: ::std::option::Option<i32>) -> Self {
|
829 + | self.integer = input;
|
830 + | self
|
1209 831 | }
|
1210 - | }
|
1211 - | impl ::std::error::Error for ConstraintViolation {}
|
1212 - | impl ConstraintViolation {
|
1213 - | pub(crate) fn as_validation_exception_field(
|
1214 - | self,
|
1215 - | path: ::std::string::String,
|
1216 - | ) -> crate::model::ValidationExceptionField {
|
1217 - | match self {
|
1218 - | ConstraintViolation::IntEnumSet(inner) => {
|
1219 - | inner.as_validation_exception_field(path + "/intEnumSet")
|
1220 - | }
|
1221 - | }
|
832 + | #[allow(missing_docs)] // documentation missing in model
|
833 + | pub(crate) fn set_integer(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
834 + | self.integer = input.map(|v| v.into());
|
835 + | self
|
1222 836 | }
|
1223 - | }
|
1224 - | impl ::std::convert::From<ConstraintViolation>
|
1225 - | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1226 - | {
|
1227 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1228 - | let first_validation_exception_field =
|
1229 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1230 - | let validation_exception = crate::error::ValidationException {
|
1231 - | message: format!(
|
1232 - | "1 validation error detected. {}",
|
1233 - | &first_validation_exception_field.message
|
1234 - | ),
|
1235 - | field_list: Some(vec![first_validation_exception_field]),
|
1236 - | };
|
1237 - | Self::ConstraintViolation(
|
1238 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1239 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1240 - | )
|
837 + | #[allow(missing_docs)] // documentation missing in model
|
838 + | pub fn iso8601_timestamp(
|
839 + | mut self,
|
840 + | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
841 + | ) -> Self {
|
842 + | self.iso8601_timestamp = input;
|
843 + | self
|
1241 844 | }
|
1242 - | }
|
1243 - | impl ::std::convert::From<Builder>
|
1244 - | for crate::constrained::MaybeConstrained<crate::input::JsonIntEnumsInput>
|
1245 - | {
|
1246 - | fn from(builder: Builder) -> Self {
|
1247 - | Self::Unconstrained(builder)
|
845 + | #[allow(missing_docs)] // documentation missing in model
|
846 + | pub(crate) fn set_iso8601_timestamp(
|
847 + | mut self,
|
848 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
849 + | ) -> Self {
|
850 + | self.iso8601_timestamp = input.map(|v| v.into());
|
851 + | self
|
1248 852 | }
|
1249 - | }
|
1250 - | impl ::std::convert::TryFrom<Builder> for crate::input::JsonIntEnumsInput {
|
1251 - | type Error = ConstraintViolation;
|
1252 - |
|
1253 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1254 - | builder.build()
|
853 + | #[allow(missing_docs)] // documentation missing in model
|
854 + | pub fn json_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
855 + | self.json_value = input;
|
856 + | self
|
1255 857 | }
|
1256 - | }
|
1257 - | /// A builder for [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1258 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1259 - | pub struct Builder {
|
1260 - | pub(crate) int_enum1: ::std::option::Option<i32>,
|
1261 - | pub(crate) int_enum2: ::std::option::Option<i32>,
|
1262 - | pub(crate) int_enum3: ::std::option::Option<i32>,
|
1263 - | pub(crate) int_enum_list: ::std::option::Option<::std::vec::Vec<i32>>,
|
1264 - | pub(crate) int_enum_set: ::std::option::Option<
|
1265 - | crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>,
|
1266 - | >,
|
1267 - | pub(crate) int_enum_map:
|
1268 - | ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
1269 - | }
|
1270 - | impl Builder {
|
1271 858 | #[allow(missing_docs)] // documentation missing in model
|
1272 - | pub fn int_enum1(mut self, input: ::std::option::Option<i32>) -> Self {
|
1273 - | self.int_enum1 = input;
|
859 + | pub(crate) fn set_json_value(
|
860 + | mut self,
|
861 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
862 + | ) -> Self {
|
863 + | self.json_value = input.map(|v| v.into());
|
1274 864 | self
|
1275 865 | }
|
1276 866 | #[allow(missing_docs)] // documentation missing in model
|
1277 - | pub(crate) fn set_int_enum1(
|
867 + | pub fn list_of_lists(
|
1278 868 | mut self,
|
1279 - | input: Option<impl ::std::convert::Into<i32>>,
|
869 + | input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
1280 870 | ) -> Self {
|
1281 - | self.int_enum1 = input.map(|v| v.into());
|
871 + | self.list_of_lists = input;
|
1282 872 | self
|
1283 873 | }
|
1284 874 | #[allow(missing_docs)] // documentation missing in model
|
1285 - | pub fn int_enum2(mut self, input: ::std::option::Option<i32>) -> Self {
|
1286 - | self.int_enum2 = input;
|
875 + | pub(crate) fn set_list_of_lists(
|
876 + | mut self,
|
877 + | input: Option<
|
878 + | impl ::std::convert::Into<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
879 + | >,
|
880 + | ) -> Self {
|
881 + | self.list_of_lists = input.map(|v| v.into());
|
1287 882 | self
|
1288 883 | }
|
1289 884 | #[allow(missing_docs)] // documentation missing in model
|
1290 - | pub(crate) fn set_int_enum2(
|
885 + | pub fn list_of_maps_of_strings(
|
1291 886 | mut self,
|
1292 - | input: Option<impl ::std::convert::Into<i32>>,
|
887 + | input: ::std::option::Option<
|
888 + | ::std::vec::Vec<
|
889 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
890 + | >,
|
891 + | >,
|
1293 892 | ) -> Self {
|
1294 - | self.int_enum2 = input.map(|v| v.into());
|
893 + | self.list_of_maps_of_strings = input;
|
1295 894 | self
|
1296 895 | }
|
1297 896 | #[allow(missing_docs)] // documentation missing in model
|
1298 - | pub fn int_enum3(mut self, input: ::std::option::Option<i32>) -> Self {
|
1299 - | self.int_enum3 = input;
|
897 + | pub(crate) fn set_list_of_maps_of_strings(
|
898 + | mut self,
|
899 + | input: Option<
|
900 + | impl ::std::convert::Into<
|
901 + | ::std::vec::Vec<
|
902 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
903 + | >,
|
904 + | >,
|
905 + | >,
|
906 + | ) -> Self {
|
907 + | self.list_of_maps_of_strings = input.map(|v| v.into());
|
1300 908 | self
|
1301 909 | }
|
1302 910 | #[allow(missing_docs)] // documentation missing in model
|
1303 - | pub(crate) fn set_int_enum3(
|
911 + | pub fn list_of_strings(
|
1304 912 | mut self,
|
1305 - | input: Option<impl ::std::convert::Into<i32>>,
|
913 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
1306 914 | ) -> Self {
|
1307 - | self.int_enum3 = input.map(|v| v.into());
|
915 + | self.list_of_strings = input;
|
1308 916 | self
|
1309 917 | }
|
1310 918 | #[allow(missing_docs)] // documentation missing in model
|
1311 - | pub fn int_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
|
1312 - | self.int_enum_list = input;
|
919 + | pub(crate) fn set_list_of_strings(
|
920 + | mut self,
|
921 + | input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
|
922 + | ) -> Self {
|
923 + | self.list_of_strings = input.map(|v| v.into());
|
1313 924 | self
|
1314 925 | }
|
1315 926 | #[allow(missing_docs)] // documentation missing in model
|
1316 - | pub(crate) fn set_int_enum_list(
|
927 + | pub fn list_of_structs(
|
1317 928 | mut self,
|
1318 - | input: Option<impl ::std::convert::Into<::std::vec::Vec<i32>>>,
|
929 + | input: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
1319 930 | ) -> Self {
|
1320 - | self.int_enum_list = input.map(|v| v.into());
|
931 + | self.list_of_structs = input;
|
1321 932 | self
|
1322 933 | }
|
1323 934 | #[allow(missing_docs)] // documentation missing in model
|
1324 - | pub fn int_enum_set(
|
935 + | pub(crate) fn set_list_of_structs(
|
1325 936 | mut self,
|
1326 - | input: ::std::option::Option<crate::model::IntegerEnumSet>,
|
937 + | input: Option<impl ::std::convert::Into<::std::vec::Vec<crate::model::SimpleStruct>>>,
|
1327 938 | ) -> Self {
|
1328 - | self.int_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
|
939 + | self.list_of_structs = input.map(|v| v.into());
|
1329 940 | self
|
1330 941 | }
|
1331 942 | #[allow(missing_docs)] // documentation missing in model
|
1332 - | pub(crate) fn set_int_enum_set(
|
1333 - | mut self,
|
1334 - | input: Option<
|
1335 - | impl ::std::convert::Into<
|
1336 - | crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>,
|
1337 - | >,
|
1338 - | >,
|
1339 - | ) -> Self {
|
1340 - | self.int_enum_set = input.map(|v| v.into());
|
943 + | pub fn long(mut self, input: ::std::option::Option<i64>) -> Self {
|
944 + | self.long = input;
|
1341 945 | self
|
1342 946 | }
|
1343 947 | #[allow(missing_docs)] // documentation missing in model
|
1344 - | pub fn int_enum_map(
|
948 + | pub(crate) fn set_long(mut self, input: Option<impl ::std::convert::Into<i64>>) -> Self {
|
949 + | self.long = input.map(|v| v.into());
|
950 + | self
|
951 + | }
|
952 + | #[allow(missing_docs)] // documentation missing in model
|
953 + | pub fn map_of_lists_of_strings(
|
1345 954 | mut self,
|
1346 - | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
955 + | input: ::std::option::Option<
|
956 + | ::std::collections::HashMap<
|
957 + | ::std::string::String,
|
958 + | ::std::vec::Vec<::std::string::String>,
|
959 + | >,
|
960 + | >,
|
1347 961 | ) -> Self {
|
1348 - | self.int_enum_map = input;
|
962 + | self.map_of_lists_of_strings = input;
|
1349 963 | self
|
1350 964 | }
|
1351 965 | #[allow(missing_docs)] // documentation missing in model
|
1352 - | pub(crate) fn set_int_enum_map(
|
966 + | pub(crate) fn set_map_of_lists_of_strings(
|
1353 967 | mut self,
|
1354 968 | input: Option<
|
1355 - | impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, i32>>,
|
969 + | impl ::std::convert::Into<
|
970 + | ::std::collections::HashMap<
|
971 + | ::std::string::String,
|
972 + | ::std::vec::Vec<::std::string::String>,
|
973 + | >,
|
974 + | >,
|
1356 975 | >,
|
1357 976 | ) -> Self {
|
1358 - | self.int_enum_map = input.map(|v| v.into());
|
977 + | self.map_of_lists_of_strings = input.map(|v| v.into());
|
1359 978 | self
|
1360 979 | }
|
1361 - | /// Consumes the builder and constructs a [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1362 - | ///
|
1363 - | /// The builder fails to construct a [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput) if a [`ConstraintViolation`] occurs.
|
1364 - | ///
|
1365 - | pub fn build(self) -> Result<crate::input::JsonIntEnumsInput, ConstraintViolation> {
|
1366 - | self.build_enforcing_all_constraints()
|
1367 - | }
|
1368 - | fn build_enforcing_all_constraints(
|
1369 - | self,
|
1370 - | ) -> Result<crate::input::JsonIntEnumsInput, ConstraintViolation> {
|
1371 - | Ok(crate::input::JsonIntEnumsInput {
|
1372 - | int_enum1: self.int_enum1,
|
1373 - | int_enum2: self.int_enum2,
|
1374 - | int_enum3: self.int_enum3,
|
1375 - | int_enum_list: self.int_enum_list,
|
1376 - | int_enum_set: self
|
1377 - | .int_enum_set
|
1378 - | .map(|v| match v {
|
1379 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1380 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1381 - | })
|
1382 - | .map(|res| res.map_err(ConstraintViolation::IntEnumSet))
|
1383 - | .transpose()?,
|
1384 - | int_enum_map: self.int_enum_map,
|
1385 - | })
|
1386 - | }
|
1387 - | }
|
1388 - | }
|
1389 - | /// See [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1390 - | pub mod json_enums_input {
|
1391 - |
|
1392 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1393 - | /// Holds one variant for each of the ways the builder can fail.
|
1394 - | #[non_exhaustive]
|
1395 - | #[allow(clippy::enum_variant_names)]
|
1396 - | pub enum ConstraintViolation {
|
1397 - | /// Constraint violation occurred building member `foo_enum1` when building `JsonEnumsInput`.
|
1398 - | #[doc(hidden)]
|
1399 - | FooEnum1(crate::model::foo_enum::ConstraintViolation),
|
1400 - | /// Constraint violation occurred building member `foo_enum2` when building `JsonEnumsInput`.
|
1401 - | #[doc(hidden)]
|
1402 - | FooEnum2(crate::model::foo_enum::ConstraintViolation),
|
1403 - | /// Constraint violation occurred building member `foo_enum3` when building `JsonEnumsInput`.
|
1404 - | #[doc(hidden)]
|
1405 - | FooEnum3(crate::model::foo_enum::ConstraintViolation),
|
1406 - | /// Constraint violation occurred building member `foo_enum_list` when building `JsonEnumsInput`.
|
1407 - | #[doc(hidden)]
|
1408 - | FooEnumList(crate::model::foo_enum_list::ConstraintViolation),
|
1409 - | /// Constraint violation occurred building member `foo_enum_set` when building `JsonEnumsInput`.
|
1410 - | #[doc(hidden)]
|
1411 - | FooEnumSet(crate::model::foo_enum_set::ConstraintViolation),
|
1412 - | /// Constraint violation occurred building member `foo_enum_map` when building `JsonEnumsInput`.
|
1413 - | #[doc(hidden)]
|
1414 - | FooEnumMap(crate::model::foo_enum_map::ConstraintViolation),
|
1415 - | }
|
1416 - | impl ::std::fmt::Display for ConstraintViolation {
|
1417 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1418 - | match self {
|
1419 - | ConstraintViolation::FooEnum1(_) => write!(f, "constraint violation occurred building member `foo_enum1` when building `JsonEnumsInput`"),
|
1420 - | ConstraintViolation::FooEnum2(_) => write!(f, "constraint violation occurred building member `foo_enum2` when building `JsonEnumsInput`"),
|
1421 - | ConstraintViolation::FooEnum3(_) => write!(f, "constraint violation occurred building member `foo_enum3` when building `JsonEnumsInput`"),
|
1422 - | ConstraintViolation::FooEnumList(_) => write!(f, "constraint violation occurred building member `foo_enum_list` when building `JsonEnumsInput`"),
|
1423 - | ConstraintViolation::FooEnumSet(_) => write!(f, "constraint violation occurred building member `foo_enum_set` when building `JsonEnumsInput`"),
|
1424 - | ConstraintViolation::FooEnumMap(_) => write!(f, "constraint violation occurred building member `foo_enum_map` when building `JsonEnumsInput`"),
|
1425 - | }
|
1426 - | }
|
1427 - | }
|
1428 - | impl ::std::error::Error for ConstraintViolation {}
|
1429 - | impl ConstraintViolation {
|
1430 - | pub(crate) fn as_validation_exception_field(
|
1431 - | self,
|
1432 - | path: ::std::string::String,
|
1433 - | ) -> crate::model::ValidationExceptionField {
|
1434 - | match self {
|
1435 - | ConstraintViolation::FooEnum1(inner) => {
|
1436 - | inner.as_validation_exception_field(path + "/fooEnum1")
|
1437 - | }
|
1438 - | ConstraintViolation::FooEnum2(inner) => {
|
1439 - | inner.as_validation_exception_field(path + "/fooEnum2")
|
1440 - | }
|
1441 - | ConstraintViolation::FooEnum3(inner) => {
|
1442 - | inner.as_validation_exception_field(path + "/fooEnum3")
|
1443 - | }
|
1444 - | ConstraintViolation::FooEnumList(inner) => {
|
1445 - | inner.as_validation_exception_field(path + "/fooEnumList")
|
1446 - | }
|
1447 - | ConstraintViolation::FooEnumSet(inner) => {
|
1448 - | inner.as_validation_exception_field(path + "/fooEnumSet")
|
1449 - | }
|
1450 - | ConstraintViolation::FooEnumMap(inner) => {
|
1451 - | inner.as_validation_exception_field(path + "/fooEnumMap")
|
1452 - | }
|
1453 - | }
|
1454 - | }
|
1455 - | }
|
1456 - | impl ::std::convert::From<ConstraintViolation>
|
1457 - | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1458 - | {
|
1459 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1460 - | let first_validation_exception_field =
|
1461 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1462 - | let validation_exception = crate::error::ValidationException {
|
1463 - | message: format!(
|
1464 - | "1 validation error detected. {}",
|
1465 - | &first_validation_exception_field.message
|
1466 - | ),
|
1467 - | field_list: Some(vec![first_validation_exception_field]),
|
1468 - | };
|
1469 - | Self::ConstraintViolation(
|
1470 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1471 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1472 - | )
|
1473 - | }
|
1474 - | }
|
1475 - | impl ::std::convert::From<Builder>
|
1476 - | for crate::constrained::MaybeConstrained<crate::input::JsonEnumsInput>
|
1477 - | {
|
1478 - | fn from(builder: Builder) -> Self {
|
1479 - | Self::Unconstrained(builder)
|
1480 - | }
|
1481 - | }
|
1482 - | impl ::std::convert::TryFrom<Builder> for crate::input::JsonEnumsInput {
|
1483 - | type Error = ConstraintViolation;
|
1484 - |
|
1485 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1486 - | builder.build()
|
1487 - | }
|
1488 - | }
|
1489 - | /// A builder for [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1490 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1491 - | pub struct Builder {
|
1492 - | pub(crate) foo_enum1:
|
1493 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1494 - | pub(crate) foo_enum2:
|
1495 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1496 - | pub(crate) foo_enum3:
|
1497 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1498 - | pub(crate) foo_enum_list: ::std::option::Option<
|
1499 - | crate::constrained::MaybeConstrained<
|
1500 - | crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
|
1501 - | >,
|
1502 - | >,
|
1503 - | pub(crate) foo_enum_set:
|
1504 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnumSet>>,
|
1505 - | pub(crate) foo_enum_map: ::std::option::Option<
|
1506 - | crate::constrained::MaybeConstrained<
|
1507 - | crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
|
1508 - | >,
|
1509 - | >,
|
1510 - | }
|
1511 - | impl Builder {
|
1512 980 | #[allow(missing_docs)] // documentation missing in model
|
1513 - | pub fn foo_enum1(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1514 - | self.foo_enum1 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
981 + | pub fn map_of_maps(
|
982 + | mut self,
|
983 + | input: ::std::option::Option<
|
984 + | ::std::collections::HashMap<
|
985 + | ::std::string::String,
|
986 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
987 + | >,
|
988 + | >,
|
989 + | ) -> Self {
|
990 + | self.map_of_maps = input;
|
1515 991 | self
|
1516 992 | }
|
1517 993 | #[allow(missing_docs)] // documentation missing in model
|
1518 - | pub(crate) fn set_foo_enum1(
|
994 + | pub(crate) fn set_map_of_maps(
|
1519 995 | mut self,
|
1520 996 | input: Option<
|
1521 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
997 + | impl ::std::convert::Into<
|
998 + | ::std::collections::HashMap<
|
999 + | ::std::string::String,
|
1000 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1001 + | >,
|
1002 + | >,
|
1522 1003 | >,
|
1523 1004 | ) -> Self {
|
1524 - | self.foo_enum1 = input.map(|v| v.into());
|
1005 + | self.map_of_maps = input.map(|v| v.into());
|
1525 1006 | self
|
1526 1007 | }
|
1527 1008 | #[allow(missing_docs)] // documentation missing in model
|
1528 - | pub fn foo_enum2(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1529 - | self.foo_enum2 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1009 + | pub fn map_of_strings(
|
1010 + | mut self,
|
1011 + | input: ::std::option::Option<
|
1012 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1013 + | >,
|
1014 + | ) -> Self {
|
1015 + | self.map_of_strings = input;
|
1530 1016 | self
|
1531 1017 | }
|
1532 1018 | #[allow(missing_docs)] // documentation missing in model
|
1533 - | pub(crate) fn set_foo_enum2(
|
1019 + | pub(crate) fn set_map_of_strings(
|
1534 1020 | mut self,
|
1535 1021 | input: Option<
|
1536 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1022 + | impl ::std::convert::Into<
|
1023 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1024 + | >,
|
1537 1025 | >,
|
1538 1026 | ) -> Self {
|
1539 - | self.foo_enum2 = input.map(|v| v.into());
|
1027 + | self.map_of_strings = input.map(|v| v.into());
|
1540 1028 | self
|
1541 1029 | }
|
1542 1030 | #[allow(missing_docs)] // documentation missing in model
|
1543 - | pub fn foo_enum3(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1544 - | self.foo_enum3 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1031 + | pub fn map_of_structs(
|
1032 + | mut self,
|
1033 + | input: ::std::option::Option<
|
1034 + | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
1035 + | >,
|
1036 + | ) -> Self {
|
1037 + | self.map_of_structs = input;
|
1545 1038 | self
|
1546 1039 | }
|
1547 1040 | #[allow(missing_docs)] // documentation missing in model
|
1548 - | pub(crate) fn set_foo_enum3(
|
1041 + | pub(crate) fn set_map_of_structs(
|
1549 1042 | mut self,
|
1550 1043 | input: Option<
|
1551 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1044 + | impl ::std::convert::Into<
|
1045 + | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
1046 + | >,
|
1552 1047 | >,
|
1553 1048 | ) -> Self {
|
1554 - | self.foo_enum3 = input.map(|v| v.into());
|
1049 + | self.map_of_structs = input.map(|v| v.into());
|
1555 1050 | self
|
1556 1051 | }
|
1557 1052 | #[allow(missing_docs)] // documentation missing in model
|
1558 - | pub fn foo_enum_list(
|
1053 + | pub fn recursive_list(
|
1559 1054 | mut self,
|
1560 - | input: ::std::option::Option<::std::vec::Vec<crate::model::FooEnum>>,
|
1055 + | input: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
|
1561 1056 | ) -> Self {
|
1562 - | self.foo_enum_list =
|
1563 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1057 + | self.recursive_list = input;
|
1564 1058 | self
|
1565 1059 | }
|
1566 1060 | #[allow(missing_docs)] // documentation missing in model
|
1567 - | pub(crate) fn set_foo_enum_list(
|
1061 + | pub(crate) fn set_recursive_list(
|
1568 1062 | mut self,
|
1569 - | input: Option<
|
1570 - | impl ::std::convert::Into<
|
1571 - | crate::constrained::MaybeConstrained<
|
1572 - | crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
|
1573 - | >,
|
1574 - | >,
|
1575 - | >,
|
1063 + | input: Option<impl ::std::convert::Into<::std::vec::Vec<crate::model::KitchenSink>>>,
|
1576 1064 | ) -> Self {
|
1577 - | self.foo_enum_list = input.map(|v| v.into());
|
1065 + | self.recursive_list = input.map(|v| v.into());
|
1578 1066 | self
|
1579 1067 | }
|
1580 1068 | #[allow(missing_docs)] // documentation missing in model
|
1581 - | pub fn foo_enum_set(
|
1069 + | pub fn recursive_map(
|
1582 1070 | mut self,
|
1583 - | input: ::std::option::Option<crate::model::FooEnumSet>,
|
1071 + | input: ::std::option::Option<
|
1072 + | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
1073 + | >,
|
1584 1074 | ) -> Self {
|
1585 - | self.foo_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1075 + | self.recursive_map = input;
|
1586 1076 | self
|
1587 1077 | }
|
1588 1078 | #[allow(missing_docs)] // documentation missing in model
|
1589 - | pub(crate) fn set_foo_enum_set(
|
1079 + | pub(crate) fn set_recursive_map(
|
1590 1080 | mut self,
|
1591 1081 | input: Option<
|
1592 1082 | impl ::std::convert::Into<
|
1593 - | crate::constrained::MaybeConstrained<crate::model::FooEnumSet>,
|
1083 + | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
1594 1084 | >,
|
1595 1085 | >,
|
1596 1086 | ) -> Self {
|
1597 - | self.foo_enum_set = input.map(|v| v.into());
|
1087 + | self.recursive_map = input.map(|v| v.into());
|
1598 1088 | self
|
1599 1089 | }
|
1600 1090 | #[allow(missing_docs)] // documentation missing in model
|
1601 - | pub fn foo_enum_map(
|
1091 + | pub fn recursive_struct(
|
1602 1092 | mut self,
|
1603 - | input: ::std::option::Option<
|
1604 - | ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
|
1605 - | >,
|
1093 + | input: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
|
1606 1094 | ) -> Self {
|
1607 - | self.foo_enum_map =
|
1608 - | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1095 + | self.recursive_struct = input;
|
1609 1096 | self
|
1610 1097 | }
|
1611 1098 | #[allow(missing_docs)] // documentation missing in model
|
1612 - | pub(crate) fn set_foo_enum_map(
|
1099 + | pub(crate) fn set_recursive_struct(
|
1613 1100 | mut self,
|
1614 - | input: Option<
|
1615 - | impl ::std::convert::Into<
|
1616 - | crate::constrained::MaybeConstrained<
|
1617 - | crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
|
1618 - | >,
|
1619 - | >,
|
1620 - | >,
|
1101 + | input: Option<impl ::std::convert::Into<::std::boxed::Box<crate::model::KitchenSink>>>,
|
1621 1102 | ) -> Self {
|
1622 - | self.foo_enum_map = input.map(|v| v.into());
|
1103 + | self.recursive_struct = input.map(|v| v.into());
|
1623 1104 | self
|
1624 1105 | }
|
1625 - | /// Consumes the builder and constructs a [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1626 - | ///
|
1627 - | /// The builder fails to construct a [`JsonEnumsInput`](crate::input::JsonEnumsInput) if a [`ConstraintViolation`] occurs.
|
1628 - | ///
|
1629 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1630 - | pub fn build(self) -> Result<crate::input::JsonEnumsInput, ConstraintViolation> {
|
1106 + | #[allow(missing_docs)] // documentation missing in model
|
1107 + | pub fn simple_struct(
|
1108 + | mut self,
|
1109 + | input: ::std::option::Option<crate::model::SimpleStruct>,
|
1110 + | ) -> Self {
|
1111 + | self.simple_struct = input;
|
1112 + | self
|
1113 + | }
|
1114 + | #[allow(missing_docs)] // documentation missing in model
|
1115 + | pub(crate) fn set_simple_struct(
|
1116 + | mut self,
|
1117 + | input: Option<impl ::std::convert::Into<crate::model::SimpleStruct>>,
|
1118 + | ) -> Self {
|
1119 + | self.simple_struct = input.map(|v| v.into());
|
1120 + | self
|
1121 + | }
|
1122 + | #[allow(missing_docs)] // documentation missing in model
|
1123 + | pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1124 + | self.string = input;
|
1125 + | self
|
1126 + | }
|
1127 + | #[allow(missing_docs)] // documentation missing in model
|
1128 + | pub(crate) fn set_string(
|
1129 + | mut self,
|
1130 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1131 + | ) -> Self {
|
1132 + | self.string = input.map(|v| v.into());
|
1133 + | self
|
1134 + | }
|
1135 + | #[allow(missing_docs)] // documentation missing in model
|
1136 + | pub fn struct_with_json_name(
|
1137 + | mut self,
|
1138 + | input: ::std::option::Option<crate::model::StructWithJsonName>,
|
1139 + | ) -> Self {
|
1140 + | self.struct_with_json_name = input;
|
1141 + | self
|
1142 + | }
|
1143 + | #[allow(missing_docs)] // documentation missing in model
|
1144 + | pub(crate) fn set_struct_with_json_name(
|
1145 + | mut self,
|
1146 + | input: Option<impl ::std::convert::Into<crate::model::StructWithJsonName>>,
|
1147 + | ) -> Self {
|
1148 + | self.struct_with_json_name = input.map(|v| v.into());
|
1149 + | self
|
1150 + | }
|
1151 + | #[allow(missing_docs)] // documentation missing in model
|
1152 + | pub fn timestamp(
|
1153 + | mut self,
|
1154 + | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1155 + | ) -> Self {
|
1156 + | self.timestamp = input;
|
1157 + | self
|
1158 + | }
|
1159 + | #[allow(missing_docs)] // documentation missing in model
|
1160 + | pub(crate) fn set_timestamp(
|
1161 + | mut self,
|
1162 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
1163 + | ) -> Self {
|
1164 + | self.timestamp = input.map(|v| v.into());
|
1165 + | self
|
1166 + | }
|
1167 + | #[allow(missing_docs)] // documentation missing in model
|
1168 + | pub fn unix_timestamp(
|
1169 + | mut self,
|
1170 + | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1171 + | ) -> Self {
|
1172 + | self.unix_timestamp = input;
|
1173 + | self
|
1174 + | }
|
1175 + | #[allow(missing_docs)] // documentation missing in model
|
1176 + | pub(crate) fn set_unix_timestamp(
|
1177 + | mut self,
|
1178 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
1179 + | ) -> Self {
|
1180 + | self.unix_timestamp = input.map(|v| v.into());
|
1181 + | self
|
1182 + | }
|
1183 + | /// Consumes the builder and constructs a [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
1184 + | pub fn build(self) -> crate::input::KitchenSinkOperationInput {
|
1631 1185 | self.build_enforcing_all_constraints()
|
1632 1186 | }
|
1633 - | fn build_enforcing_all_constraints(
|
1634 - | self,
|
1635 - | ) -> Result<crate::input::JsonEnumsInput, ConstraintViolation> {
|
1636 - | Ok(crate::input::JsonEnumsInput {
|
1637 - | foo_enum1: self
|
1638 - | .foo_enum1
|
1639 - | .map(|v| match v {
|
1640 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1641 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1642 - | })
|
1643 - | .map(|res| res.map_err(ConstraintViolation::FooEnum1))
|
1644 - | .transpose()?,
|
1645 - | foo_enum2: self
|
1646 - | .foo_enum2
|
1647 - | .map(|v| match v {
|
1648 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1649 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1650 - | })
|
1651 - | .map(|res| res.map_err(ConstraintViolation::FooEnum2))
|
1652 - | .transpose()?,
|
1653 - | foo_enum3: self
|
1654 - | .foo_enum3
|
1655 - | .map(|v| match v {
|
1656 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1657 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1658 - | })
|
1659 - | .map(|res| res.map_err(ConstraintViolation::FooEnum3))
|
1660 - | .transpose()?,
|
1661 - | foo_enum_list: self
|
1662 - | .foo_enum_list
|
1663 - | .map(|v| match v {
|
1664 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1665 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1666 - | })
|
1667 - | .map(|res| {
|
1668 - | res.map(|v| v.into())
|
1669 - | .map_err(ConstraintViolation::FooEnumList)
|
1670 - | })
|
1671 - | .transpose()?,
|
1672 - | foo_enum_set: self
|
1673 - | .foo_enum_set
|
1674 - | .map(|v| match v {
|
1675 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1676 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1677 - | })
|
1678 - | .map(|res| res.map_err(ConstraintViolation::FooEnumSet))
|
1679 - | .transpose()?,
|
1680 - | foo_enum_map: self
|
1681 - | .foo_enum_map
|
1682 - | .map(|v| match v {
|
1683 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1684 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1685 - | })
|
1686 - | .map(|res| {
|
1687 - | res.map(|v| v.into())
|
1688 - | .map_err(ConstraintViolation::FooEnumMap)
|
1689 - | })
|
1690 - | .transpose()?,
|
1691 - | })
|
1187 + | fn build_enforcing_all_constraints(self) -> crate::input::KitchenSinkOperationInput {
|
1188 + | crate::input::KitchenSinkOperationInput {
|
1189 + | blob: self.blob,
|
1190 + | boolean: self.boolean,
|
1191 + | double: self.double,
|
1192 + | empty_struct: self.empty_struct,
|
1193 + | float: self.float,
|
1194 + | httpdate_timestamp: self.httpdate_timestamp,
|
1195 + | integer: self.integer,
|
1196 + | iso8601_timestamp: self.iso8601_timestamp,
|
1197 + | json_value: self.json_value,
|
1198 + | list_of_lists: self.list_of_lists,
|
1199 + | list_of_maps_of_strings: self.list_of_maps_of_strings,
|
1200 + | list_of_strings: self.list_of_strings,
|
1201 + | list_of_structs: self.list_of_structs,
|
1202 + | long: self.long,
|
1203 + | map_of_lists_of_strings: self.map_of_lists_of_strings,
|
1204 + | map_of_maps: self.map_of_maps,
|
1205 + | map_of_strings: self.map_of_strings,
|
1206 + | map_of_structs: self.map_of_structs,
|
1207 + | recursive_list: self.recursive_list,
|
1208 + | recursive_map: self.recursive_map,
|
1209 + | recursive_struct: self.recursive_struct,
|
1210 + | simple_struct: self.simple_struct,
|
1211 + | string: self.string,
|
1212 + | struct_with_json_name: self.struct_with_json_name,
|
1213 + | timestamp: self.timestamp,
|
1214 + | unix_timestamp: self.unix_timestamp,
|
1215 + | }
|
1692 1216 | }
|
1693 1217 | }
|
1694 1218 | }
|
1695 - | /// See [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1696 - | pub mod put_and_get_inline_documents_input {
|
1219 + | /// See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1220 + | pub mod simple_scalar_properties_input {
|
1697 1221 |
|
1698 - | impl ::std::convert::From<Builder> for crate::input::PutAndGetInlineDocumentsInput {
|
1222 + | impl ::std::convert::From<Builder> for crate::input::SimpleScalarPropertiesInput {
|
1699 1223 | fn from(builder: Builder) -> Self {
|
1700 1224 | builder.build()
|
1701 1225 | }
|
1702 1226 | }
|
1703 - | /// A builder for [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1227 + | /// A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1704 1228 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1705 1229 | pub struct Builder {
|
1706 - | pub(crate) inline_document: ::std::option::Option<::aws_smithy_types::Document>,
|
1230 + | pub(crate) float_value: ::std::option::Option<f32>,
|
1231 + | pub(crate) double_value: ::std::option::Option<f64>,
|
1707 1232 | }
|
1708 1233 | impl Builder {
|
1709 1234 | #[allow(missing_docs)] // documentation missing in model
|
1710 - | pub fn inline_document(
|
1235 + | pub fn float_value(mut self, input: ::std::option::Option<f32>) -> Self {
|
1236 + | self.float_value = input;
|
1237 + | self
|
1238 + | }
|
1239 + | #[allow(missing_docs)] // documentation missing in model
|
1240 + | pub(crate) fn set_float_value(
|
1711 1241 | mut self,
|
1712 - | input: ::std::option::Option<::aws_smithy_types::Document>,
|
1242 + | input: Option<impl ::std::convert::Into<f32>>,
|
1713 1243 | ) -> Self {
|
1714 - | self.inline_document = input;
|
1244 + | self.float_value = input.map(|v| v.into());
|
1715 1245 | self
|
1716 1246 | }
|
1717 1247 | #[allow(missing_docs)] // documentation missing in model
|
1718 - | pub(crate) fn set_inline_document(
|
1248 + | pub fn double_value(mut self, input: ::std::option::Option<f64>) -> Self {
|
1249 + | self.double_value = input;
|
1250 + | self
|
1251 + | }
|
1252 + | #[allow(missing_docs)] // documentation missing in model
|
1253 + | pub(crate) fn set_double_value(
|
1719 1254 | mut self,
|
1720 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
|
1255 + | input: Option<impl ::std::convert::Into<f64>>,
|
1721 1256 | ) -> Self {
|
1722 - | self.inline_document = input.map(|v| v.into());
|
1257 + | self.double_value = input.map(|v| v.into());
|
1723 1258 | self
|
1724 1259 | }
|
1725 - | /// Consumes the builder and constructs a [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1726 - | pub fn build(self) -> crate::input::PutAndGetInlineDocumentsInput {
|
1260 + | /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1261 + | pub fn build(self) -> crate::input::SimpleScalarPropertiesInput {
|
1727 1262 | self.build_enforcing_all_constraints()
|
1728 1263 | }
|
1729 - | fn build_enforcing_all_constraints(self) -> crate::input::PutAndGetInlineDocumentsInput {
|
1730 - | crate::input::PutAndGetInlineDocumentsInput {
|
1731 - | inline_document: self.inline_document,
|
1264 + | fn build_enforcing_all_constraints(self) -> crate::input::SimpleScalarPropertiesInput {
|
1265 + | crate::input::SimpleScalarPropertiesInput {
|
1266 + | float_value: self.float_value,
|
1267 + | double_value: self.double_value,
|
1732 1268 | }
|
1733 1269 | }
|
1734 1270 | }
|
1735 1271 | }
|
1736 1272 | /// See [`OperationWithOptionalInputOutputInput`](crate::input::OperationWithOptionalInputOutputInput).
|
1737 1273 | pub mod operation_with_optional_input_output_input {
|
1738 1274 |
|
1739 1275 | impl ::std::convert::From<Builder> for crate::input::OperationWithOptionalInputOutputInput {
|
1740 1276 | fn from(builder: Builder) -> Self {
|
1741 1277 | builder.build()
|
1742 1278 | }
|
1743 1279 | }
|
1744 1280 | /// A builder for [`OperationWithOptionalInputOutputInput`](crate::input::OperationWithOptionalInputOutputInput).
|
1745 1281 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1746 1282 | pub struct Builder {
|
1747 1283 | pub(crate) value: ::std::option::Option<::std::string::String>,
|
1748 1284 | }
|
1749 1285 | impl Builder {
|
1750 1286 | #[allow(missing_docs)] // documentation missing in model
|
1751 1287 | pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1752 1288 | self.value = input;
|
1753 1289 | self
|
1754 1290 | }
|
1755 1291 | #[allow(missing_docs)] // documentation missing in model
|
1756 1292 | pub(crate) fn set_value(
|
1757 1293 | mut self,
|
1758 1294 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1759 1295 | ) -> Self {
|
1760 1296 | self.value = input.map(|v| v.into());
|
1761 1297 | self
|
1762 1298 | }
|
1763 1299 | /// Consumes the builder and constructs a [`OperationWithOptionalInputOutputInput`](crate::input::OperationWithOptionalInputOutputInput).
|
1764 1300 | pub fn build(self) -> crate::input::OperationWithOptionalInputOutputInput {
|
1765 1301 | self.build_enforcing_all_constraints()
|
1766 1302 | }
|
1767 1303 | fn build_enforcing_all_constraints(
|
1768 1304 | self,
|
1769 1305 | ) -> crate::input::OperationWithOptionalInputOutputInput {
|
1770 1306 | crate::input::OperationWithOptionalInputOutputInput { value: self.value }
|
1771 1307 | }
|
1772 1308 | }
|
1773 1309 | }
|
1774 - | /// See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1775 - | pub mod simple_scalar_properties_input {
|
1310 + | /// See [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1311 + | pub mod put_and_get_inline_documents_input {
|
1776 1312 |
|
1777 - | impl ::std::convert::From<Builder> for crate::input::SimpleScalarPropertiesInput {
|
1313 + | impl ::std::convert::From<Builder> for crate::input::PutAndGetInlineDocumentsInput {
|
1778 1314 | fn from(builder: Builder) -> Self {
|
1779 1315 | builder.build()
|
1780 1316 | }
|
1781 1317 | }
|
1782 - | /// A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1318 + | /// A builder for [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1783 1319 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1784 1320 | pub struct Builder {
|
1785 - | pub(crate) float_value: ::std::option::Option<f32>,
|
1786 - | pub(crate) double_value: ::std::option::Option<f64>,
|
1321 + | pub(crate) inline_document: ::std::option::Option<::aws_smithy_types::Document>,
|
1787 1322 | }
|
1788 1323 | impl Builder {
|
1789 1324 | #[allow(missing_docs)] // documentation missing in model
|
1790 - | pub fn float_value(mut self, input: ::std::option::Option<f32>) -> Self {
|
1791 - | self.float_value = input;
|
1792 - | self
|
1793 - | }
|
1794 - | #[allow(missing_docs)] // documentation missing in model
|
1795 - | pub(crate) fn set_float_value(
|
1325 + | pub fn inline_document(
|
1796 1326 | mut self,
|
1797 - | input: Option<impl ::std::convert::Into<f32>>,
|
1327 + | input: ::std::option::Option<::aws_smithy_types::Document>,
|
1798 1328 | ) -> Self {
|
1799 - | self.float_value = input.map(|v| v.into());
|
1800 - | self
|
1801 - | }
|
1802 - | #[allow(missing_docs)] // documentation missing in model
|
1803 - | pub fn double_value(mut self, input: ::std::option::Option<f64>) -> Self {
|
1804 - | self.double_value = input;
|
1329 + | self.inline_document = input;
|
1805 1330 | self
|
1806 1331 | }
|
1807 1332 | #[allow(missing_docs)] // documentation missing in model
|
1808 - | pub(crate) fn set_double_value(
|
1333 + | pub(crate) fn set_inline_document(
|
1809 1334 | mut self,
|
1810 - | input: Option<impl ::std::convert::Into<f64>>,
|
1335 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
|
1811 1336 | ) -> Self {
|
1812 - | self.double_value = input.map(|v| v.into());
|
1337 + | self.inline_document = input.map(|v| v.into());
|
1813 1338 | self
|
1814 1339 | }
|
1815 - | /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1816 - | pub fn build(self) -> crate::input::SimpleScalarPropertiesInput {
|
1340 + | /// Consumes the builder and constructs a [`PutAndGetInlineDocumentsInput`](crate::input::PutAndGetInlineDocumentsInput).
|
1341 + | pub fn build(self) -> crate::input::PutAndGetInlineDocumentsInput {
|
1817 1342 | self.build_enforcing_all_constraints()
|
1818 1343 | }
|
1819 - | fn build_enforcing_all_constraints(self) -> crate::input::SimpleScalarPropertiesInput {
|
1820 - | crate::input::SimpleScalarPropertiesInput {
|
1821 - | float_value: self.float_value,
|
1822 - | double_value: self.double_value,
|
1344 + | fn build_enforcing_all_constraints(self) -> crate::input::PutAndGetInlineDocumentsInput {
|
1345 + | crate::input::PutAndGetInlineDocumentsInput {
|
1346 + | inline_document: self.inline_document,
|
1823 1347 | }
|
1824 1348 | }
|
1825 1349 | }
|
1826 1350 | }
|
1827 - | /// See [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
1828 - | pub mod kitchen_sink_operation_input {
|
1351 + | /// See [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1352 + | pub mod json_enums_input {
|
1829 1353 |
|
1830 - | impl ::std::convert::From<Builder> for crate::input::KitchenSinkOperationInput {
|
1354 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1355 + | /// Holds one variant for each of the ways the builder can fail.
|
1356 + | #[non_exhaustive]
|
1357 + | #[allow(clippy::enum_variant_names)]
|
1358 + | pub enum ConstraintViolation {
|
1359 + | /// Constraint violation occurred building member `foo_enum1` when building `JsonEnumsInput`.
|
1360 + | #[doc(hidden)]
|
1361 + | FooEnum1(crate::model::foo_enum::ConstraintViolation),
|
1362 + | /// Constraint violation occurred building member `foo_enum2` when building `JsonEnumsInput`.
|
1363 + | #[doc(hidden)]
|
1364 + | FooEnum2(crate::model::foo_enum::ConstraintViolation),
|
1365 + | /// Constraint violation occurred building member `foo_enum3` when building `JsonEnumsInput`.
|
1366 + | #[doc(hidden)]
|
1367 + | FooEnum3(crate::model::foo_enum::ConstraintViolation),
|
1368 + | /// Constraint violation occurred building member `foo_enum_list` when building `JsonEnumsInput`.
|
1369 + | #[doc(hidden)]
|
1370 + | FooEnumList(crate::model::foo_enum_list::ConstraintViolation),
|
1371 + | /// Constraint violation occurred building member `foo_enum_set` when building `JsonEnumsInput`.
|
1372 + | #[doc(hidden)]
|
1373 + | FooEnumSet(crate::model::foo_enum_set::ConstraintViolation),
|
1374 + | /// Constraint violation occurred building member `foo_enum_map` when building `JsonEnumsInput`.
|
1375 + | #[doc(hidden)]
|
1376 + | FooEnumMap(crate::model::foo_enum_map::ConstraintViolation),
|
1377 + | }
|
1378 + | impl ::std::fmt::Display for ConstraintViolation {
|
1379 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1380 + | match self {
|
1381 + | ConstraintViolation::FooEnum1(_) => write!(f, "constraint violation occurred building member `foo_enum1` when building `JsonEnumsInput`"),
|
1382 + | ConstraintViolation::FooEnum2(_) => write!(f, "constraint violation occurred building member `foo_enum2` when building `JsonEnumsInput`"),
|
1383 + | ConstraintViolation::FooEnum3(_) => write!(f, "constraint violation occurred building member `foo_enum3` when building `JsonEnumsInput`"),
|
1384 + | ConstraintViolation::FooEnumList(_) => write!(f, "constraint violation occurred building member `foo_enum_list` when building `JsonEnumsInput`"),
|
1385 + | ConstraintViolation::FooEnumSet(_) => write!(f, "constraint violation occurred building member `foo_enum_set` when building `JsonEnumsInput`"),
|
1386 + | ConstraintViolation::FooEnumMap(_) => write!(f, "constraint violation occurred building member `foo_enum_map` when building `JsonEnumsInput`"),
|
1387 + | }
|
1388 + | }
|
1389 + | }
|
1390 + | impl ::std::error::Error for ConstraintViolation {}
|
1391 + | impl ConstraintViolation {
|
1392 + | pub(crate) fn as_validation_exception_field(
|
1393 + | self,
|
1394 + | path: ::std::string::String,
|
1395 + | ) -> crate::model::ValidationExceptionField {
|
1396 + | match self {
|
1397 + | ConstraintViolation::FooEnum1(inner) => {
|
1398 + | inner.as_validation_exception_field(path + "/fooEnum1")
|
1399 + | }
|
1400 + | ConstraintViolation::FooEnum2(inner) => {
|
1401 + | inner.as_validation_exception_field(path + "/fooEnum2")
|
1402 + | }
|
1403 + | ConstraintViolation::FooEnum3(inner) => {
|
1404 + | inner.as_validation_exception_field(path + "/fooEnum3")
|
1405 + | }
|
1406 + | ConstraintViolation::FooEnumList(inner) => {
|
1407 + | inner.as_validation_exception_field(path + "/fooEnumList")
|
1408 + | }
|
1409 + | ConstraintViolation::FooEnumSet(inner) => {
|
1410 + | inner.as_validation_exception_field(path + "/fooEnumSet")
|
1411 + | }
|
1412 + | ConstraintViolation::FooEnumMap(inner) => {
|
1413 + | inner.as_validation_exception_field(path + "/fooEnumMap")
|
1414 + | }
|
1415 + | }
|
1416 + | }
|
1417 + | }
|
1418 + | impl ::std::convert::From<ConstraintViolation>
|
1419 + | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1420 + | {
|
1421 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1422 + | let first_validation_exception_field =
|
1423 + | constraint_violation.as_validation_exception_field("".to_owned());
|
1424 + | let validation_exception = crate::error::ValidationException {
|
1425 + | message: format!(
|
1426 + | "1 validation error detected. {}",
|
1427 + | &first_validation_exception_field.message
|
1428 + | ),
|
1429 + | field_list: Some(vec![first_validation_exception_field]),
|
1430 + | };
|
1431 + | Self::ConstraintViolation(
|
1432 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1433 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1434 + | )
|
1435 + | }
|
1436 + | }
|
1437 + | impl ::std::convert::From<Builder>
|
1438 + | for crate::constrained::MaybeConstrained<crate::input::JsonEnumsInput>
|
1439 + | {
|
1831 1440 | fn from(builder: Builder) -> Self {
|
1441 + | Self::Unconstrained(builder)
|
1442 + | }
|
1443 + | }
|
1444 + | impl ::std::convert::TryFrom<Builder> for crate::input::JsonEnumsInput {
|
1445 + | type Error = ConstraintViolation;
|
1446 + |
|
1447 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1832 1448 | builder.build()
|
1833 1449 | }
|
1834 1450 | }
|
1835 - | /// A builder for [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
1451 + | /// A builder for [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1836 1452 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1837 1453 | pub struct Builder {
|
1838 - | pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
1839 - | pub(crate) boolean: ::std::option::Option<bool>,
|
1840 - | pub(crate) double: ::std::option::Option<f64>,
|
1841 - | pub(crate) empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
|
1842 - | pub(crate) float: ::std::option::Option<f32>,
|
1843 - | pub(crate) httpdate_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1844 - | pub(crate) integer: ::std::option::Option<i32>,
|
1845 - | pub(crate) iso8601_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1846 - | pub(crate) json_value: ::std::option::Option<::std::string::String>,
|
1847 - | pub(crate) list_of_lists:
|
1848 - | ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
1849 - | pub(crate) list_of_maps_of_strings: ::std::option::Option<
|
1850 - | ::std::vec::Vec<
|
1851 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1852 - | >,
|
1853 - | >,
|
1854 - | pub(crate) list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
1855 - | pub(crate) list_of_structs:
|
1856 - | ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
1857 - | pub(crate) long: ::std::option::Option<i64>,
|
1858 - | pub(crate) map_of_lists_of_strings: ::std::option::Option<
|
1859 - | ::std::collections::HashMap<
|
1860 - | ::std::string::String,
|
1861 - | ::std::vec::Vec<::std::string::String>,
|
1862 - | >,
|
1863 - | >,
|
1864 - | pub(crate) map_of_maps: ::std::option::Option<
|
1865 - | ::std::collections::HashMap<
|
1866 - | ::std::string::String,
|
1867 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1868 - | >,
|
1869 - | >,
|
1870 - | pub(crate) map_of_strings: ::std::option::Option<
|
1871 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1872 - | >,
|
1873 - | pub(crate) map_of_structs: ::std::option::Option<
|
1874 - | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
1875 - | >,
|
1876 - | pub(crate) recursive_list:
|
1877 - | ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
|
1878 - | pub(crate) recursive_map: ::std::option::Option<
|
1879 - | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
1454 + | pub(crate) foo_enum1:
|
1455 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1456 + | pub(crate) foo_enum2:
|
1457 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1458 + | pub(crate) foo_enum3:
|
1459 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1460 + | pub(crate) foo_enum_list: ::std::option::Option<
|
1461 + | crate::constrained::MaybeConstrained<
|
1462 + | crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
|
1463 + | >,
|
1464 + | >,
|
1465 + | pub(crate) foo_enum_set:
|
1466 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::FooEnumSet>>,
|
1467 + | pub(crate) foo_enum_map: ::std::option::Option<
|
1468 + | crate::constrained::MaybeConstrained<
|
1469 + | crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
|
1470 + | >,
|
1880 1471 | >,
|
1881 - | pub(crate) recursive_struct:
|
1882 - | ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
|
1883 - | pub(crate) simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
|
1884 - | pub(crate) string: ::std::option::Option<::std::string::String>,
|
1885 - | pub(crate) struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
|
1886 - | pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1887 - | pub(crate) unix_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1888 1472 | }
|
1889 1473 | impl Builder {
|
1890 1474 | #[allow(missing_docs)] // documentation missing in model
|
1891 - | pub fn blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
1892 - | self.blob = input;
|
1475 + | pub fn foo_enum1(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1476 + | self.foo_enum1 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1893 1477 | self
|
1894 1478 | }
|
1895 1479 | #[allow(missing_docs)] // documentation missing in model
|
1896 - | pub(crate) fn set_blob(
|
1480 + | pub(crate) fn set_foo_enum1(
|
1897 1481 | mut self,
|
1898 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
1482 + | input: Option<
|
1483 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1484 + | >,
|
1899 1485 | ) -> Self {
|
1900 - | self.blob = input.map(|v| v.into());
|
1486 + | self.foo_enum1 = input.map(|v| v.into());
|
1901 1487 | self
|
1902 1488 | }
|
1903 1489 | #[allow(missing_docs)] // documentation missing in model
|
1904 - | pub fn boolean(mut self, input: ::std::option::Option<bool>) -> Self {
|
1905 - | self.boolean = input;
|
1490 + | pub fn foo_enum2(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1491 + | self.foo_enum2 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1906 1492 | self
|
1907 1493 | }
|
1908 1494 | #[allow(missing_docs)] // documentation missing in model
|
1909 - | pub(crate) fn set_boolean(
|
1495 + | pub(crate) fn set_foo_enum2(
|
1910 1496 | mut self,
|
1911 - | input: Option<impl ::std::convert::Into<bool>>,
|
1497 + | input: Option<
|
1498 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1499 + | >,
|
1912 1500 | ) -> Self {
|
1913 - | self.boolean = input.map(|v| v.into());
|
1501 + | self.foo_enum2 = input.map(|v| v.into());
|
1914 1502 | self
|
1915 1503 | }
|
1916 1504 | #[allow(missing_docs)] // documentation missing in model
|
1917 - | pub fn double(mut self, input: ::std::option::Option<f64>) -> Self {
|
1918 - | self.double = input;
|
1505 + | pub fn foo_enum3(mut self, input: ::std::option::Option<crate::model::FooEnum>) -> Self {
|
1506 + | self.foo_enum3 = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1919 1507 | self
|
1920 1508 | }
|
1921 1509 | #[allow(missing_docs)] // documentation missing in model
|
1922 - | pub(crate) fn set_double(mut self, input: Option<impl ::std::convert::Into<f64>>) -> Self {
|
1923 - | self.double = input.map(|v| v.into());
|
1510 + | pub(crate) fn set_foo_enum3(
|
1511 + | mut self,
|
1512 + | input: Option<
|
1513 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::FooEnum>>,
|
1514 + | >,
|
1515 + | ) -> Self {
|
1516 + | self.foo_enum3 = input.map(|v| v.into());
|
1924 1517 | self
|
1925 1518 | }
|
1926 1519 | #[allow(missing_docs)] // documentation missing in model
|
1927 - | pub fn empty_struct(
|
1520 + | pub fn foo_enum_list(
|
1928 1521 | mut self,
|
1929 - | input: ::std::option::Option<crate::model::EmptyStruct>,
|
1522 + | input: ::std::option::Option<::std::vec::Vec<crate::model::FooEnum>>,
|
1930 1523 | ) -> Self {
|
1931 - | self.empty_struct = input;
|
1524 + | self.foo_enum_list =
|
1525 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1932 1526 | self
|
1933 1527 | }
|
1934 1528 | #[allow(missing_docs)] // documentation missing in model
|
1935 - | pub(crate) fn set_empty_struct(
|
1529 + | pub(crate) fn set_foo_enum_list(
|
1936 1530 | mut self,
|
1937 - | input: Option<impl ::std::convert::Into<crate::model::EmptyStruct>>,
|
1531 + | input: Option<
|
1532 + | impl ::std::convert::Into<
|
1533 + | crate::constrained::MaybeConstrained<
|
1534 + | crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
|
1535 + | >,
|
1536 + | >,
|
1537 + | >,
|
1938 1538 | ) -> Self {
|
1939 - | self.empty_struct = input.map(|v| v.into());
|
1539 + | self.foo_enum_list = input.map(|v| v.into());
|
1940 1540 | self
|
1941 1541 | }
|
1942 1542 | #[allow(missing_docs)] // documentation missing in model
|
1943 - | pub fn float(mut self, input: ::std::option::Option<f32>) -> Self {
|
1944 - | self.float = input;
|
1543 + | pub fn foo_enum_set(
|
1544 + | mut self,
|
1545 + | input: ::std::option::Option<crate::model::FooEnumSet>,
|
1546 + | ) -> Self {
|
1547 + | self.foo_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1945 1548 | self
|
1946 1549 | }
|
1947 1550 | #[allow(missing_docs)] // documentation missing in model
|
1948 - | pub(crate) fn set_float(mut self, input: Option<impl ::std::convert::Into<f32>>) -> Self {
|
1949 - | self.float = input.map(|v| v.into());
|
1551 + | pub(crate) fn set_foo_enum_set(
|
1552 + | mut self,
|
1553 + | input: Option<
|
1554 + | impl ::std::convert::Into<
|
1555 + | crate::constrained::MaybeConstrained<crate::model::FooEnumSet>,
|
1556 + | >,
|
1557 + | >,
|
1558 + | ) -> Self {
|
1559 + | self.foo_enum_set = input.map(|v| v.into());
|
1560 + | self
|
1561 + | }
|
1562 + | #[allow(missing_docs)] // documentation missing in model
|
1563 + | pub fn foo_enum_map(
|
1564 + | mut self,
|
1565 + | input: ::std::option::Option<
|
1566 + | ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
|
1567 + | >,
|
1568 + | ) -> Self {
|
1569 + | self.foo_enum_map =
|
1570 + | input.map(|v| crate::constrained::MaybeConstrained::Constrained((v).into()));
|
1571 + | self
|
1572 + | }
|
1573 + | #[allow(missing_docs)] // documentation missing in model
|
1574 + | pub(crate) fn set_foo_enum_map(
|
1575 + | mut self,
|
1576 + | input: Option<
|
1577 + | impl ::std::convert::Into<
|
1578 + | crate::constrained::MaybeConstrained<
|
1579 + | crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
|
1580 + | >,
|
1581 + | >,
|
1582 + | >,
|
1583 + | ) -> Self {
|
1584 + | self.foo_enum_map = input.map(|v| v.into());
|
1950 1585 | self
|
1951 1586 | }
|
1587 + | /// Consumes the builder and constructs a [`JsonEnumsInput`](crate::input::JsonEnumsInput).
|
1588 + | ///
|
1589 + | /// The builder fails to construct a [`JsonEnumsInput`](crate::input::JsonEnumsInput) if a [`ConstraintViolation`] occurs.
|
1590 + | ///
|
1591 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1592 + | pub fn build(self) -> Result<crate::input::JsonEnumsInput, ConstraintViolation> {
|
1593 + | self.build_enforcing_all_constraints()
|
1594 + | }
|
1595 + | fn build_enforcing_all_constraints(
|
1596 + | self,
|
1597 + | ) -> Result<crate::input::JsonEnumsInput, ConstraintViolation> {
|
1598 + | Ok(crate::input::JsonEnumsInput {
|
1599 + | foo_enum1: self
|
1600 + | .foo_enum1
|
1601 + | .map(|v| match v {
|
1602 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1603 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1604 + | })
|
1605 + | .map(|res| res.map_err(ConstraintViolation::FooEnum1))
|
1606 + | .transpose()?,
|
1607 + | foo_enum2: self
|
1608 + | .foo_enum2
|
1609 + | .map(|v| match v {
|
1610 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1611 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1612 + | })
|
1613 + | .map(|res| res.map_err(ConstraintViolation::FooEnum2))
|
1614 + | .transpose()?,
|
1615 + | foo_enum3: self
|
1616 + | .foo_enum3
|
1617 + | .map(|v| match v {
|
1618 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1619 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1620 + | })
|
1621 + | .map(|res| res.map_err(ConstraintViolation::FooEnum3))
|
1622 + | .transpose()?,
|
1623 + | foo_enum_list: self
|
1624 + | .foo_enum_list
|
1625 + | .map(|v| match v {
|
1626 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1627 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1628 + | })
|
1629 + | .map(|res| {
|
1630 + | res.map(|v| v.into())
|
1631 + | .map_err(ConstraintViolation::FooEnumList)
|
1632 + | })
|
1633 + | .transpose()?,
|
1634 + | foo_enum_set: self
|
1635 + | .foo_enum_set
|
1636 + | .map(|v| match v {
|
1637 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1638 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1639 + | })
|
1640 + | .map(|res| res.map_err(ConstraintViolation::FooEnumSet))
|
1641 + | .transpose()?,
|
1642 + | foo_enum_map: self
|
1643 + | .foo_enum_map
|
1644 + | .map(|v| match v {
|
1645 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1646 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1647 + | })
|
1648 + | .map(|res| {
|
1649 + | res.map(|v| v.into())
|
1650 + | .map_err(ConstraintViolation::FooEnumMap)
|
1651 + | })
|
1652 + | .transpose()?,
|
1653 + | })
|
1654 + | }
|
1655 + | }
|
1656 + | }
|
1657 + | /// See [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1658 + | pub mod json_int_enums_input {
|
1659 + |
|
1660 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1661 + | /// Holds one variant for each of the ways the builder can fail.
|
1662 + | #[non_exhaustive]
|
1663 + | #[allow(clippy::enum_variant_names)]
|
1664 + | pub enum ConstraintViolation {
|
1665 + | /// Constraint violation occurred building member `int_enum_set` when building `JsonIntEnumsInput`.
|
1666 + | #[doc(hidden)]
|
1667 + | IntEnumSet(crate::model::integer_enum_set::ConstraintViolation),
|
1668 + | }
|
1669 + | impl ::std::fmt::Display for ConstraintViolation {
|
1670 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1671 + | match self {
|
1672 + | ConstraintViolation::IntEnumSet(_) => write!(f, "constraint violation occurred building member `int_enum_set` when building `JsonIntEnumsInput`"),
|
1673 + | }
|
1674 + | }
|
1675 + | }
|
1676 + | impl ::std::error::Error for ConstraintViolation {}
|
1677 + | impl ConstraintViolation {
|
1678 + | pub(crate) fn as_validation_exception_field(
|
1679 + | self,
|
1680 + | path: ::std::string::String,
|
1681 + | ) -> crate::model::ValidationExceptionField {
|
1682 + | match self {
|
1683 + | ConstraintViolation::IntEnumSet(inner) => {
|
1684 + | inner.as_validation_exception_field(path + "/intEnumSet")
|
1685 + | }
|
1686 + | }
|
1687 + | }
|
1688 + | }
|
1689 + | impl ::std::convert::From<ConstraintViolation>
|
1690 + | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
1691 + | {
|
1692 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1693 + | let first_validation_exception_field =
|
1694 + | constraint_violation.as_validation_exception_field("".to_owned());
|
1695 + | let validation_exception = crate::error::ValidationException {
|
1696 + | message: format!(
|
1697 + | "1 validation error detected. {}",
|
1698 + | &first_validation_exception_field.message
|
1699 + | ),
|
1700 + | field_list: Some(vec![first_validation_exception_field]),
|
1701 + | };
|
1702 + | Self::ConstraintViolation(
|
1703 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1704 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1705 + | )
|
1706 + | }
|
1707 + | }
|
1708 + | impl ::std::convert::From<Builder>
|
1709 + | for crate::constrained::MaybeConstrained<crate::input::JsonIntEnumsInput>
|
1710 + | {
|
1711 + | fn from(builder: Builder) -> Self {
|
1712 + | Self::Unconstrained(builder)
|
1713 + | }
|
1714 + | }
|
1715 + | impl ::std::convert::TryFrom<Builder> for crate::input::JsonIntEnumsInput {
|
1716 + | type Error = ConstraintViolation;
|
1717 + |
|
1718 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1719 + | builder.build()
|
1720 + | }
|
1721 + | }
|
1722 + | /// A builder for [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1723 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1724 + | pub struct Builder {
|
1725 + | pub(crate) int_enum1: ::std::option::Option<i32>,
|
1726 + | pub(crate) int_enum2: ::std::option::Option<i32>,
|
1727 + | pub(crate) int_enum3: ::std::option::Option<i32>,
|
1728 + | pub(crate) int_enum_list: ::std::option::Option<::std::vec::Vec<i32>>,
|
1729 + | pub(crate) int_enum_set: ::std::option::Option<
|
1730 + | crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>,
|
1731 + | >,
|
1732 + | pub(crate) int_enum_map:
|
1733 + | ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
1734 + | }
|
1735 + | impl Builder {
|
1952 1736 | #[allow(missing_docs)] // documentation missing in model
|
1953 - | pub fn httpdate_timestamp(
|
1954 - | mut self,
|
1955 - | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1956 - | ) -> Self {
|
1957 - | self.httpdate_timestamp = input;
|
1737 + | pub fn int_enum1(mut self, input: ::std::option::Option<i32>) -> Self {
|
1738 + | self.int_enum1 = input;
|
1958 1739 | self
|
1959 1740 | }
|
1960 1741 | #[allow(missing_docs)] // documentation missing in model
|
1961 - | pub(crate) fn set_httpdate_timestamp(
|
1742 + | pub(crate) fn set_int_enum1(
|
1962 1743 | mut self,
|
1963 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
1744 + | input: Option<impl ::std::convert::Into<i32>>,
|
1964 1745 | ) -> Self {
|
1965 - | self.httpdate_timestamp = input.map(|v| v.into());
|
1966 - | self
|
1967 - | }
|
1968 - | #[allow(missing_docs)] // documentation missing in model
|
1969 - | pub fn integer(mut self, input: ::std::option::Option<i32>) -> Self {
|
1970 - | self.integer = input;
|
1971 - | self
|
1972 - | }
|
1973 - | #[allow(missing_docs)] // documentation missing in model
|
1974 - | pub(crate) fn set_integer(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
1975 - | self.integer = input.map(|v| v.into());
|
1746 + | self.int_enum1 = input.map(|v| v.into());
|
1976 1747 | self
|
1977 1748 | }
|
1978 1749 | #[allow(missing_docs)] // documentation missing in model
|
1979 - | pub fn iso8601_timestamp(
|
1980 - | mut self,
|
1981 - | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
1982 - | ) -> Self {
|
1983 - | self.iso8601_timestamp = input;
|
1750 + | pub fn int_enum2(mut self, input: ::std::option::Option<i32>) -> Self {
|
1751 + | self.int_enum2 = input;
|
1984 1752 | self
|
1985 1753 | }
|
1986 1754 | #[allow(missing_docs)] // documentation missing in model
|
1987 - | pub(crate) fn set_iso8601_timestamp(
|
1755 + | pub(crate) fn set_int_enum2(
|
1988 1756 | mut self,
|
1989 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
1757 + | input: Option<impl ::std::convert::Into<i32>>,
|
1990 1758 | ) -> Self {
|
1991 - | self.iso8601_timestamp = input.map(|v| v.into());
|
1759 + | self.int_enum2 = input.map(|v| v.into());
|
1992 1760 | self
|
1993 1761 | }
|
1994 1762 | #[allow(missing_docs)] // documentation missing in model
|
1995 - | pub fn json_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1996 - | self.json_value = input;
|
1763 + | pub fn int_enum3(mut self, input: ::std::option::Option<i32>) -> Self {
|
1764 + | self.int_enum3 = input;
|
1997 1765 | self
|
1998 1766 | }
|
1999 1767 | #[allow(missing_docs)] // documentation missing in model
|
2000 - | pub(crate) fn set_json_value(
|
1768 + | pub(crate) fn set_int_enum3(
|
2001 1769 | mut self,
|
2002 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1770 + | input: Option<impl ::std::convert::Into<i32>>,
|
2003 1771 | ) -> Self {
|
2004 - | self.json_value = input.map(|v| v.into());
|
1772 + | self.int_enum3 = input.map(|v| v.into());
|
2005 1773 | self
|
2006 1774 | }
|
2007 1775 | #[allow(missing_docs)] // documentation missing in model
|
2008 - | pub fn list_of_lists(
|
2009 - | mut self,
|
2010 - | input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
2011 - | ) -> Self {
|
2012 - | self.list_of_lists = input;
|
1776 + | pub fn int_enum_list(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
|
1777 + | self.int_enum_list = input;
|
2013 1778 | self
|
2014 1779 | }
|
2015 1780 | #[allow(missing_docs)] // documentation missing in model
|
2016 - | pub(crate) fn set_list_of_lists(
|
1781 + | pub(crate) fn set_int_enum_list(
|
2017 1782 | mut self,
|
2018 - | input: Option<
|
2019 - | impl ::std::convert::Into<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
|
2020 - | >,
|
1783 + | input: Option<impl ::std::convert::Into<::std::vec::Vec<i32>>>,
|
2021 1784 | ) -> Self {
|
2022 - | self.list_of_lists = input.map(|v| v.into());
|
1785 + | self.int_enum_list = input.map(|v| v.into());
|
2023 1786 | self
|
2024 1787 | }
|
2025 1788 | #[allow(missing_docs)] // documentation missing in model
|
2026 - | pub fn list_of_maps_of_strings(
|
1789 + | pub fn int_enum_set(
|
2027 1790 | mut self,
|
2028 - | input: ::std::option::Option<
|
2029 - | ::std::vec::Vec<
|
2030 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2031 - | >,
|
2032 - | >,
|
1791 + | input: ::std::option::Option<crate::model::IntegerEnumSet>,
|
2033 1792 | ) -> Self {
|
2034 - | self.list_of_maps_of_strings = input;
|
1793 + | self.int_enum_set = input.map(crate::constrained::MaybeConstrained::Constrained);
|
2035 1794 | self
|
2036 1795 | }
|
2037 1796 | #[allow(missing_docs)] // documentation missing in model
|
2038 - | pub(crate) fn set_list_of_maps_of_strings(
|
1797 + | pub(crate) fn set_int_enum_set(
|
2039 1798 | mut self,
|
2040 1799 | input: Option<
|
2041 1800 | impl ::std::convert::Into<
|
2042 - | ::std::vec::Vec<
|
2043 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2044 - | >,
|
1801 + | crate::constrained::MaybeConstrained<crate::model::IntegerEnumSet>,
|
2045 1802 | >,
|
2046 1803 | >,
|
2047 1804 | ) -> Self {
|
2048 - | self.list_of_maps_of_strings = input.map(|v| v.into());
|
1805 + | self.int_enum_set = input.map(|v| v.into());
|
2049 1806 | self
|
2050 1807 | }
|
2051 1808 | #[allow(missing_docs)] // documentation missing in model
|
2052 - | pub fn list_of_strings(
|
1809 + | pub fn int_enum_map(
|
2053 1810 | mut self,
|
2054 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
1811 + | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, i32>>,
|
2055 1812 | ) -> Self {
|
2056 - | self.list_of_strings = input;
|
1813 + | self.int_enum_map = input;
|
2057 1814 | self
|
2058 1815 | }
|
2059 1816 | #[allow(missing_docs)] // documentation missing in model
|
2060 - | pub(crate) fn set_list_of_strings(
|
1817 + | pub(crate) fn set_int_enum_map(
|
2061 1818 | mut self,
|
2062 - | input: Option<impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>>,
|
1819 + | input: Option<
|
1820 + | impl ::std::convert::Into<::std::collections::HashMap<::std::string::String, i32>>,
|
1821 + | >,
|
2063 1822 | ) -> Self {
|
2064 - | self.list_of_strings = input.map(|v| v.into());
|
1823 + | self.int_enum_map = input.map(|v| v.into());
|
2065 1824 | self
|
2066 1825 | }
|
2067 - | #[allow(missing_docs)] // documentation missing in model
|
2068 - | pub fn list_of_structs(
|
2069 - | mut self,
|
2070 - | input: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
|
2071 - | ) -> Self {
|
2072 - | self.list_of_structs = input;
|
2073 - | self
|
1826 + | /// Consumes the builder and constructs a [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput).
|
1827 + | ///
|
1828 + | /// The builder fails to construct a [`JsonIntEnumsInput`](crate::input::JsonIntEnumsInput) if a [`ConstraintViolation`] occurs.
|
1829 + | ///
|
1830 + | pub fn build(self) -> Result<crate::input::JsonIntEnumsInput, ConstraintViolation> {
|
1831 + | self.build_enforcing_all_constraints()
|
2074 1832 | }
|
2075 - | #[allow(missing_docs)] // documentation missing in model
|
2076 - | pub(crate) fn set_list_of_structs(
|
2077 - | mut self,
|
2078 - | input: Option<impl ::std::convert::Into<::std::vec::Vec<crate::model::SimpleStruct>>>,
|
2079 - | ) -> Self {
|
2080 - | self.list_of_structs = input.map(|v| v.into());
|
2081 - | self
|
1833 + | fn build_enforcing_all_constraints(
|
1834 + | self,
|
1835 + | ) -> Result<crate::input::JsonIntEnumsInput, ConstraintViolation> {
|
1836 + | Ok(crate::input::JsonIntEnumsInput {
|
1837 + | int_enum1: self.int_enum1,
|
1838 + | int_enum2: self.int_enum2,
|
1839 + | int_enum3: self.int_enum3,
|
1840 + | int_enum_list: self.int_enum_list,
|
1841 + | int_enum_set: self
|
1842 + | .int_enum_set
|
1843 + | .map(|v| match v {
|
1844 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1845 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1846 + | })
|
1847 + | .map(|res| res.map_err(ConstraintViolation::IntEnumSet))
|
1848 + | .transpose()?,
|
1849 + | int_enum_map: self.int_enum_map,
|
1850 + | })
|
2082 1851 | }
|
2083 - | #[allow(missing_docs)] // documentation missing in model
|
2084 - | pub fn long(mut self, input: ::std::option::Option<i64>) -> Self {
|
2085 - | self.long = input;
|
2086 - | self
|
1852 + | }
|
1853 + | }
|
1854 + | /// See [`NullOperationInput`](crate::input::NullOperationInput).
|
1855 + | pub mod null_operation_input {
|
1856 + |
|
1857 + | impl ::std::convert::From<Builder> for crate::input::NullOperationInput {
|
1858 + | fn from(builder: Builder) -> Self {
|
1859 + | builder.build()
|
2087 1860 | }
|
1861 + | }
|
1862 + | /// A builder for [`NullOperationInput`](crate::input::NullOperationInput).
|
1863 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1864 + | pub struct Builder {
|
1865 + | pub(crate) string: ::std::option::Option<::std::string::String>,
|
1866 + | }
|
1867 + | impl Builder {
|
2088 1868 | #[allow(missing_docs)] // documentation missing in model
|
2089 - | pub(crate) fn set_long(mut self, input: Option<impl ::std::convert::Into<i64>>) -> Self {
|
2090 - | self.long = input.map(|v| v.into());
|
1869 + | pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1870 + | self.string = input;
|
2091 1871 | self
|
2092 1872 | }
|
2093 1873 | #[allow(missing_docs)] // documentation missing in model
|
2094 - | pub fn map_of_lists_of_strings(
|
1874 + | pub(crate) fn set_string(
|
2095 1875 | mut self,
|
2096 - | input: ::std::option::Option<
|
2097 - | ::std::collections::HashMap<
|
2098 - | ::std::string::String,
|
2099 - | ::std::vec::Vec<::std::string::String>,
|
2100 - | >,
|
2101 - | >,
|
1876 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2102 1877 | ) -> Self {
|
2103 - | self.map_of_lists_of_strings = input;
|
1878 + | self.string = input.map(|v| v.into());
|
2104 1879 | self
|
2105 1880 | }
|
2106 - | #[allow(missing_docs)] // documentation missing in model
|
2107 - | pub(crate) fn set_map_of_lists_of_strings(
|
2108 - | mut self,
|
2109 - | input: Option<
|
2110 - | impl ::std::convert::Into<
|
2111 - | ::std::collections::HashMap<
|
2112 - | ::std::string::String,
|
2113 - | ::std::vec::Vec<::std::string::String>,
|
2114 - | >,
|
2115 - | >,
|
2116 - | >,
|
2117 - | ) -> Self {
|
2118 - | self.map_of_lists_of_strings = input.map(|v| v.into());
|
2119 - | self
|
1881 + | /// Consumes the builder and constructs a [`NullOperationInput`](crate::input::NullOperationInput).
|
1882 + | pub fn build(self) -> crate::input::NullOperationInput {
|
1883 + | self.build_enforcing_all_constraints()
|
2120 1884 | }
|
2121 - | #[allow(missing_docs)] // documentation missing in model
|
2122 - | pub fn map_of_maps(
|
2123 - | mut self,
|
2124 - | input: ::std::option::Option<
|
2125 - | ::std::collections::HashMap<
|
2126 - | ::std::string::String,
|
2127 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2128 - | >,
|
2129 - | >,
|
2130 - | ) -> Self {
|
2131 - | self.map_of_maps = input;
|
2132 - | self
|
1885 + | fn build_enforcing_all_constraints(self) -> crate::input::NullOperationInput {
|
1886 + | crate::input::NullOperationInput {
|
1887 + | string: self.string,
|
1888 + | }
|
2133 1889 | }
|
2134 - | #[allow(missing_docs)] // documentation missing in model
|
2135 - | pub(crate) fn set_map_of_maps(
|
2136 - | mut self,
|
2137 - | input: Option<
|
2138 - | impl ::std::convert::Into<
|
2139 - | ::std::collections::HashMap<
|
2140 - | ::std::string::String,
|
2141 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2142 - | >,
|
2143 - | >,
|
2144 - | >,
|
2145 - | ) -> Self {
|
2146 - | self.map_of_maps = input.map(|v| v.into());
|
2147 - | self
|
1890 + | }
|
1891 + | }
|
1892 + | /// See [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
1893 + | pub mod sparse_nulls_operation_input {
|
1894 + |
|
1895 + | impl ::std::convert::From<Builder> for crate::input::SparseNullsOperationInput {
|
1896 + | fn from(builder: Builder) -> Self {
|
1897 + | builder.build()
|
2148 1898 | }
|
1899 + | }
|
1900 + | /// A builder for [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
1901 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1902 + | pub struct Builder {
|
1903 + | pub(crate) sparse_string_list:
|
1904 + | ::std::option::Option<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
|
1905 + | pub(crate) sparse_string_map: ::std::option::Option<
|
1906 + | ::std::collections::HashMap<
|
1907 + | ::std::string::String,
|
1908 + | ::std::option::Option<::std::string::String>,
|
1909 + | >,
|
1910 + | >,
|
1911 + | }
|
1912 + | impl Builder {
|
2149 1913 | #[allow(missing_docs)] // documentation missing in model
|
2150 - | pub fn map_of_strings(
|
1914 + | pub fn sparse_string_list(
|
2151 1915 | mut self,
|
2152 1916 | input: ::std::option::Option<
|
2153 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1917 + | ::std::vec::Vec<::std::option::Option<::std::string::String>>,
|
2154 1918 | >,
|
2155 1919 | ) -> Self {
|
2156 - | self.map_of_strings = input;
|
1920 + | self.sparse_string_list = input;
|
2157 1921 | self
|
2158 1922 | }
|
2159 1923 | #[allow(missing_docs)] // documentation missing in model
|
2160 - | pub(crate) fn set_map_of_strings(
|
1924 + | pub(crate) fn set_sparse_string_list(
|
2161 1925 | mut self,
|
2162 1926 | input: Option<
|
2163 - | impl ::std::convert::Into<
|
2164 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2165 - | >,
|
1927 + | impl ::std::convert::Into<::std::vec::Vec<::std::option::Option<::std::string::String>>>,
|
2166 1928 | >,
|
2167 1929 | ) -> Self {
|
2168 - | self.map_of_strings = input.map(|v| v.into());
|
1930 + | self.sparse_string_list = input.map(|v| v.into());
|
2169 1931 | self
|
2170 1932 | }
|
2171 1933 | #[allow(missing_docs)] // documentation missing in model
|
2172 - | pub fn map_of_structs(
|
1934 + | pub fn sparse_string_map(
|
2173 1935 | mut self,
|
2174 1936 | input: ::std::option::Option<
|
2175 - | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
1937 + | ::std::collections::HashMap<
|
1938 + | ::std::string::String,
|
1939 + | ::std::option::Option<::std::string::String>,
|
1940 + | >,
|
2176 1941 | >,
|
2177 1942 | ) -> Self {
|
2178 - | self.map_of_structs = input;
|
1943 + | self.sparse_string_map = input;
|
2179 1944 | self
|
2180 1945 | }
|
2181 1946 | #[allow(missing_docs)] // documentation missing in model
|
2182 - | pub(crate) fn set_map_of_structs(
|
1947 + | pub(crate) fn set_sparse_string_map(
|
2183 1948 | mut self,
|
2184 1949 | input: Option<
|
2185 1950 | impl ::std::convert::Into<
|
2186 - | ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
|
1951 + | ::std::collections::HashMap<
|
1952 + | ::std::string::String,
|
1953 + | ::std::option::Option<::std::string::String>,
|
1954 + | >,
|
2187 1955 | >,
|
2188 1956 | >,
|
2189 1957 | ) -> Self {
|
2190 - | self.map_of_structs = input.map(|v| v.into());
|
1958 + | self.sparse_string_map = input.map(|v| v.into());
|
2191 1959 | self
|
2192 1960 | }
|
2193 - | #[allow(missing_docs)] // documentation missing in model
|
2194 - | pub fn recursive_list(
|
2195 - | mut self,
|
2196 - | input: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
|
2197 - | ) -> Self {
|
2198 - | self.recursive_list = input;
|
2199 - | self
|
1961 + | /// Consumes the builder and constructs a [`SparseNullsOperationInput`](crate::input::SparseNullsOperationInput).
|
1962 + | pub fn build(self) -> crate::input::SparseNullsOperationInput {
|
1963 + | self.build_enforcing_all_constraints()
|
2200 1964 | }
|
2201 - | #[allow(missing_docs)] // documentation missing in model
|
2202 - | pub(crate) fn set_recursive_list(
|
2203 - | mut self,
|
2204 - | input: Option<impl ::std::convert::Into<::std::vec::Vec<crate::model::KitchenSink>>>,
|
2205 - | ) -> Self {
|
2206 - | self.recursive_list = input.map(|v| v.into());
|
1965 + | fn build_enforcing_all_constraints(self) -> crate::input::SparseNullsOperationInput {
|
1966 + | crate::input::SparseNullsOperationInput {
|
1967 + | sparse_string_list: self.sparse_string_list,
|
1968 + | sparse_string_map: self.sparse_string_map,
|
1969 + | }
|
1970 + | }
|
1971 + | }
|
1972 + | }
|
1973 + | /// See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1974 + | pub mod greeting_with_errors_input {
|
1975 + |
|
1976 + | impl ::std::convert::From<Builder> for crate::input::GreetingWithErrorsInput {
|
1977 + | fn from(builder: Builder) -> Self {
|
1978 + | builder.build()
|
1979 + | }
|
1980 + | }
|
1981 + | /// A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1982 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1983 + | pub struct Builder {}
|
1984 + | impl Builder {
|
1985 + | /// Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1986 + | pub fn build(self) -> crate::input::GreetingWithErrorsInput {
|
1987 + | self.build_enforcing_all_constraints()
|
1988 + | }
|
1989 + | fn build_enforcing_all_constraints(self) -> crate::input::GreetingWithErrorsInput {
|
1990 + | crate::input::GreetingWithErrorsInput {}
|
1991 + | }
|
1992 + | }
|
1993 + | }
|
1994 + | /// See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1995 + | pub mod json_unions_input {
|
1996 + |
|
1997 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1998 + | /// Holds one variant for each of the ways the builder can fail.
|
1999 + | #[non_exhaustive]
|
2000 + | #[allow(clippy::enum_variant_names)]
|
2001 + | pub enum ConstraintViolation {
|
2002 + | /// Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
2003 + | #[doc(hidden)]
|
2004 + | Contents(crate::model::my_union::ConstraintViolation),
|
2005 + | }
|
2006 + | impl ::std::fmt::Display for ConstraintViolation {
|
2007 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2008 + | match self {
|
2009 + | ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
2010 + | }
|
2011 + | }
|
2012 + | }
|
2013 + | impl ::std::error::Error for ConstraintViolation {}
|
2014 + | impl ConstraintViolation {
|
2015 + | pub(crate) fn as_validation_exception_field(
|
2016 + | self,
|
2017 + | path: ::std::string::String,
|
2018 + | ) -> crate::model::ValidationExceptionField {
|
2019 + | match self {
|
2020 + | ConstraintViolation::Contents(inner) => {
|
2021 + | inner.as_validation_exception_field(path + "/contents")
|
2022 + | }
|
2023 + | }
|
2024 + | }
|
2025 + | }
|
2026 + | impl ::std::convert::From<ConstraintViolation>
|
2027 + | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
2028 + | {
|
2029 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2030 + | let first_validation_exception_field =
|
2031 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2032 + | let validation_exception = crate::error::ValidationException {
|
2033 + | message: format!(
|
2034 + | "1 validation error detected. {}",
|
2035 + | &first_validation_exception_field.message
|
2036 + | ),
|
2037 + | field_list: Some(vec![first_validation_exception_field]),
|
2038 + | };
|
2039 + | Self::ConstraintViolation(
|
2040 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2041 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2042 + | )
|
2043 + | }
|
2044 + | }
|
2045 + | impl ::std::convert::From<Builder>
|
2046 + | for crate::constrained::MaybeConstrained<crate::input::JsonUnionsInput>
|
2047 + | {
|
2048 + | fn from(builder: Builder) -> Self {
|
2049 + | Self::Unconstrained(builder)
|
2050 + | }
|
2051 + | }
|
2052 + | impl ::std::convert::TryFrom<Builder> for crate::input::JsonUnionsInput {
|
2053 + | type Error = ConstraintViolation;
|
2054 + |
|
2055 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2056 + | builder.build()
|
2057 + | }
|
2058 + | }
|
2059 + | /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
2060 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2061 + | pub struct Builder {
|
2062 + | pub(crate) contents:
|
2063 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
2064 + | }
|
2065 + | impl Builder {
|
2066 + | /// A union with a representative set of types for members.
|
2067 + | pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
|
2068 + | self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
|
2207 2069 | self
|
2208 2070 | }
|
2209 - | #[allow(missing_docs)] // documentation missing in model
|
2210 - | pub fn recursive_map(
|
2071 + | /// A union with a representative set of types for members.
|
2072 + | pub(crate) fn set_contents(
|
2211 2073 | mut self,
|
2212 - | input: ::std::option::Option<
|
2213 - | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
2074 + | input: Option<
|
2075 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
2214 2076 | >,
|
2215 2077 | ) -> Self {
|
2216 - | self.recursive_map = input;
|
2078 + | self.contents = input.map(|v| v.into());
|
2217 2079 | self
|
2218 2080 | }
|
2081 + | /// Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
2082 + | ///
|
2083 + | /// The builder fails to construct a [`JsonUnionsInput`](crate::input::JsonUnionsInput) if a [`ConstraintViolation`] occurs.
|
2084 + | ///
|
2085 + | pub fn build(self) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
2086 + | self.build_enforcing_all_constraints()
|
2087 + | }
|
2088 + | fn build_enforcing_all_constraints(
|
2089 + | self,
|
2090 + | ) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
2091 + | Ok(crate::input::JsonUnionsInput {
|
2092 + | contents: self
|
2093 + | .contents
|
2094 + | .map(|v| match v {
|
2095 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2096 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2097 + | })
|
2098 + | .map(|res| res.map_err(ConstraintViolation::Contents))
|
2099 + | .transpose()?,
|
2100 + | })
|
2101 + | }
|
2102 + | }
|
2103 + | }
|
2104 + | /// See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
2105 + | pub mod endpoint_operation_input {
|
2106 + |
|
2107 + | impl ::std::convert::From<Builder> for crate::input::EndpointOperationInput {
|
2108 + | fn from(builder: Builder) -> Self {
|
2109 + | builder.build()
|
2110 + | }
|
2111 + | }
|
2112 + | /// A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
2113 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2114 + | pub struct Builder {}
|
2115 + | impl Builder {
|
2116 + | /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
2117 + | pub fn build(self) -> crate::input::EndpointOperationInput {
|
2118 + | self.build_enforcing_all_constraints()
|
2119 + | }
|
2120 + | fn build_enforcing_all_constraints(self) -> crate::input::EndpointOperationInput {
|
2121 + | crate::input::EndpointOperationInput {}
|
2122 + | }
|
2123 + | }
|
2124 + | }
|
2125 + | /// See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
2126 + | pub mod endpoint_with_host_label_operation_input {
|
2127 + |
|
2128 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2129 + | /// Holds one variant for each of the ways the builder can fail.
|
2130 + | #[non_exhaustive]
|
2131 + | #[allow(clippy::enum_variant_names)]
|
2132 + | pub enum ConstraintViolation {
|
2133 + | /// `label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
2134 + | MissingLabel,
|
2135 + | }
|
2136 + | impl ::std::fmt::Display for ConstraintViolation {
|
2137 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2138 + | match self {
|
2139 + | ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
2140 + | }
|
2141 + | }
|
2142 + | }
|
2143 + | impl ::std::error::Error for ConstraintViolation {}
|
2144 + | impl ConstraintViolation {
|
2145 + | pub(crate) fn as_validation_exception_field(
|
2146 + | self,
|
2147 + | path: ::std::string::String,
|
2148 + | ) -> crate::model::ValidationExceptionField {
|
2149 + | match self {
|
2150 + | ConstraintViolation::MissingLabel => crate::model::ValidationExceptionField {
|
2151 + | message: format!(
|
2152 + | "Value at '{}/label' failed to satisfy constraint: Member must not be null",
|
2153 + | path
|
2154 + | ),
|
2155 + | path: path + "/label",
|
2156 + | },
|
2157 + | }
|
2158 + | }
|
2159 + | }
|
2160 + | impl ::std::convert::From<ConstraintViolation>
|
2161 + | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
2162 + | {
|
2163 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2164 + | let first_validation_exception_field =
|
2165 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2166 + | let validation_exception = crate::error::ValidationException {
|
2167 + | message: format!(
|
2168 + | "1 validation error detected. {}",
|
2169 + | &first_validation_exception_field.message
|
2170 + | ),
|
2171 + | field_list: Some(vec![first_validation_exception_field]),
|
2172 + | };
|
2173 + | Self::ConstraintViolation(
|
2174 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2175 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2176 + | )
|
2177 + | }
|
2178 + | }
|
2179 + | impl ::std::convert::From<Builder>
|
2180 + | for crate::constrained::MaybeConstrained<crate::input::EndpointWithHostLabelOperationInput>
|
2181 + | {
|
2182 + | fn from(builder: Builder) -> Self {
|
2183 + | Self::Unconstrained(builder)
|
2184 + | }
|
2185 + | }
|
2186 + | impl ::std::convert::TryFrom<Builder> for crate::input::EndpointWithHostLabelOperationInput {
|
2187 + | type Error = ConstraintViolation;
|
2188 + |
|
2189 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2190 + | builder.build()
|
2191 + | }
|
2192 + | }
|
2193 + | /// A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
2194 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2195 + | pub struct Builder {
|
2196 + | pub(crate) label: ::std::option::Option<::std::string::String>,
|
2197 + | }
|
2198 + | impl Builder {
|
2219 2199 | #[allow(missing_docs)] // documentation missing in model
|
2220 - | pub(crate) fn set_recursive_map(
|
2221 - | mut self,
|
2222 - | input: Option<
|
2223 - | impl ::std::convert::Into<
|
2224 - | ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
|
2225 - | >,
|
2226 - | >,
|
2227 - | ) -> Self {
|
2228 - | self.recursive_map = input.map(|v| v.into());
|
2200 + | pub fn label(mut self, input: ::std::string::String) -> Self {
|
2201 + | self.label = Some(input);
|
2229 2202 | self
|
2230 2203 | }
|
2231 2204 | #[allow(missing_docs)] // documentation missing in model
|
2232 - | pub fn recursive_struct(
|
2205 + | pub(crate) fn set_label(
|
2233 2206 | mut self,
|
2234 - | input: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
|
2207 + | input: impl ::std::convert::Into<::std::string::String>,
|
2235 2208 | ) -> Self {
|
2236 - | self.recursive_struct = input;
|
2209 + | self.label = Some(input.into());
|
2237 2210 | self
|
2238 2211 | }
|
2239 - | #[allow(missing_docs)] // documentation missing in model
|
2240 - | pub(crate) fn set_recursive_struct(
|
2241 - | mut self,
|
2242 - | input: Option<impl ::std::convert::Into<::std::boxed::Box<crate::model::KitchenSink>>>,
|
2243 - | ) -> Self {
|
2244 - | self.recursive_struct = input.map(|v| v.into());
|
2245 - | self
|
2212 + | /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
2213 + | ///
|
2214 + | /// The builder fails to construct a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) if a [`ConstraintViolation`] occurs.
|
2215 + | ///
|
2216 + | pub fn build(
|
2217 + | self,
|
2218 + | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
2219 + | {
|
2220 + | self.build_enforcing_all_constraints()
|
2246 2221 | }
|
2247 - | #[allow(missing_docs)] // documentation missing in model
|
2248 - | pub fn simple_struct(
|
2249 - | mut self,
|
2250 - | input: ::std::option::Option<crate::model::SimpleStruct>,
|
2251 - | ) -> Self {
|
2252 - | self.simple_struct = input;
|
2253 - | self
|
2222 + | fn build_enforcing_all_constraints(
|
2223 + | self,
|
2224 + | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
2225 + | {
|
2226 + | Ok(crate::input::EndpointWithHostLabelOperationInput {
|
2227 + | label: self.label.ok_or(ConstraintViolation::MissingLabel)?,
|
2228 + | })
|
2254 2229 | }
|
2255 - | #[allow(missing_docs)] // documentation missing in model
|
2256 - | pub(crate) fn set_simple_struct(
|
2257 - | mut self,
|
2258 - | input: Option<impl ::std::convert::Into<crate::model::SimpleStruct>>,
|
2259 - | ) -> Self {
|
2260 - | self.simple_struct = input.map(|v| v.into());
|
2261 - | self
|
2230 + | }
|
2231 + | }
|
2232 + | /// See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
2233 + | pub mod host_with_path_operation_input {
|
2234 + |
|
2235 + | impl ::std::convert::From<Builder> for crate::input::HostWithPathOperationInput {
|
2236 + | fn from(builder: Builder) -> Self {
|
2237 + | builder.build()
|
2262 2238 | }
|
2263 - | #[allow(missing_docs)] // documentation missing in model
|
2264 - | pub fn string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2265 - | self.string = input;
|
2266 - | self
|
2239 + | }
|
2240 + | /// A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
2241 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2242 + | pub struct Builder {}
|
2243 + | impl Builder {
|
2244 + | /// Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
2245 + | pub fn build(self) -> crate::input::HostWithPathOperationInput {
|
2246 + | self.build_enforcing_all_constraints()
|
2267 2247 | }
|
2268 - | #[allow(missing_docs)] // documentation missing in model
|
2269 - | pub(crate) fn set_string(
|
2270 - | mut self,
|
2271 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2272 - | ) -> Self {
|
2273 - | self.string = input.map(|v| v.into());
|
2274 - | self
|
2248 + | fn build_enforcing_all_constraints(self) -> crate::input::HostWithPathOperationInput {
|
2249 + | crate::input::HostWithPathOperationInput {}
|
2275 2250 | }
|
2276 - | #[allow(missing_docs)] // documentation missing in model
|
2277 - | pub fn struct_with_json_name(
|
2278 - | mut self,
|
2279 - | input: ::std::option::Option<crate::model::StructWithJsonName>,
|
2280 - | ) -> Self {
|
2281 - | self.struct_with_json_name = input;
|
2282 - | self
|
2251 + | }
|
2252 + | }
|
2253 + | /// See [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
2254 + | pub mod datetime_offsets_input {
|
2255 + |
|
2256 + | impl ::std::convert::From<Builder> for crate::input::DatetimeOffsetsInput {
|
2257 + | fn from(builder: Builder) -> Self {
|
2258 + | builder.build()
|
2283 2259 | }
|
2284 - | #[allow(missing_docs)] // documentation missing in model
|
2285 - | pub(crate) fn set_struct_with_json_name(
|
2286 - | mut self,
|
2287 - | input: Option<impl ::std::convert::Into<crate::model::StructWithJsonName>>,
|
2288 - | ) -> Self {
|
2289 - | self.struct_with_json_name = input.map(|v| v.into());
|
2290 - | self
|
2260 + | }
|
2261 + | /// A builder for [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
2262 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2263 + | pub struct Builder {}
|
2264 + | impl Builder {
|
2265 + | /// Consumes the builder and constructs a [`DatetimeOffsetsInput`](crate::input::DatetimeOffsetsInput).
|
2266 + | pub fn build(self) -> crate::input::DatetimeOffsetsInput {
|
2267 + | self.build_enforcing_all_constraints()
|
2268 + | }
|
2269 + | fn build_enforcing_all_constraints(self) -> crate::input::DatetimeOffsetsInput {
|
2270 + | crate::input::DatetimeOffsetsInput {}
|
2271 + | }
|
2272 + | }
|
2273 + | }
|
2274 + | /// See [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
2275 + | pub mod fractional_seconds_input {
|
2276 + |
|
2277 + | impl ::std::convert::From<Builder> for crate::input::FractionalSecondsInput {
|
2278 + | fn from(builder: Builder) -> Self {
|
2279 + | builder.build()
|
2280 + | }
|
2281 + | }
|
2282 + | /// A builder for [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
2283 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2284 + | pub struct Builder {}
|
2285 + | impl Builder {
|
2286 + | /// Consumes the builder and constructs a [`FractionalSecondsInput`](crate::input::FractionalSecondsInput).
|
2287 + | pub fn build(self) -> crate::input::FractionalSecondsInput {
|
2288 + | self.build_enforcing_all_constraints()
|
2291 2289 | }
|
2290 + | fn build_enforcing_all_constraints(self) -> crate::input::FractionalSecondsInput {
|
2291 + | crate::input::FractionalSecondsInput {}
|
2292 + | }
|
2293 + | }
|
2294 + | }
|
2295 + | /// See [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
2296 + | pub mod put_with_content_encoding_input {
|
2297 + |
|
2298 + | impl ::std::convert::From<Builder> for crate::input::PutWithContentEncodingInput {
|
2299 + | fn from(builder: Builder) -> Self {
|
2300 + | builder.build()
|
2301 + | }
|
2302 + | }
|
2303 + | /// A builder for [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
2304 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2305 + | pub struct Builder {
|
2306 + | pub(crate) encoding: ::std::option::Option<::std::string::String>,
|
2307 + | pub(crate) data: ::std::option::Option<::std::string::String>,
|
2308 + | }
|
2309 + | impl Builder {
|
2292 2310 | #[allow(missing_docs)] // documentation missing in model
|
2293 - | pub fn timestamp(
|
2294 - | mut self,
|
2295 - | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
2296 - | ) -> Self {
|
2297 - | self.timestamp = input;
|
2311 + | pub fn encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2312 + | self.encoding = input;
|
2298 2313 | self
|
2299 2314 | }
|
2300 2315 | #[allow(missing_docs)] // documentation missing in model
|
2301 - | pub(crate) fn set_timestamp(
|
2316 + | pub(crate) fn set_encoding(
|
2302 2317 | mut self,
|
2303 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
2318 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2304 2319 | ) -> Self {
|
2305 - | self.timestamp = input.map(|v| v.into());
|
2320 + | self.encoding = input.map(|v| v.into());
|
2306 2321 | self
|
2307 2322 | }
|
2308 2323 | #[allow(missing_docs)] // documentation missing in model
|
2309 - | pub fn unix_timestamp(
|
2310 - | mut self,
|
2311 - | input: ::std::option::Option<::aws_smithy_types::DateTime>,
|
2312 - | ) -> Self {
|
2313 - | self.unix_timestamp = input;
|
2324 + | pub fn data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
2325 + | self.data = input;
|
2314 2326 | self
|
2315 2327 | }
|
2316 2328 | #[allow(missing_docs)] // documentation missing in model
|
2317 - | pub(crate) fn set_unix_timestamp(
|
2329 + | pub(crate) fn set_data(
|
2318 2330 | mut self,
|
2319 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
|
2331 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
2320 2332 | ) -> Self {
|
2321 - | self.unix_timestamp = input.map(|v| v.into());
|
2333 + | self.data = input.map(|v| v.into());
|
2322 2334 | self
|
2323 2335 | }
|
2324 - | /// Consumes the builder and constructs a [`KitchenSinkOperationInput`](crate::input::KitchenSinkOperationInput).
|
2325 - | pub fn build(self) -> crate::input::KitchenSinkOperationInput {
|
2336 + | /// Consumes the builder and constructs a [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
2337 + | pub fn build(self) -> crate::input::PutWithContentEncodingInput {
|
2326 2338 | self.build_enforcing_all_constraints()
|
2327 2339 | }
|
2328 - | fn build_enforcing_all_constraints(self) -> crate::input::KitchenSinkOperationInput {
|
2329 - | crate::input::KitchenSinkOperationInput {
|
2330 - | blob: self.blob,
|
2331 - | boolean: self.boolean,
|
2332 - | double: self.double,
|
2333 - | empty_struct: self.empty_struct,
|
2334 - | float: self.float,
|
2335 - | httpdate_timestamp: self.httpdate_timestamp,
|
2336 - | integer: self.integer,
|
2337 - | iso8601_timestamp: self.iso8601_timestamp,
|
2338 - | json_value: self.json_value,
|
2339 - | list_of_lists: self.list_of_lists,
|
2340 - | list_of_maps_of_strings: self.list_of_maps_of_strings,
|
2341 - | list_of_strings: self.list_of_strings,
|
2342 - | list_of_structs: self.list_of_structs,
|
2343 - | long: self.long,
|
2344 - | map_of_lists_of_strings: self.map_of_lists_of_strings,
|
2345 - | map_of_maps: self.map_of_maps,
|
2346 - | map_of_strings: self.map_of_strings,
|
2347 - | map_of_structs: self.map_of_structs,
|
2348 - | recursive_list: self.recursive_list,
|
2349 - | recursive_map: self.recursive_map,
|
2350 - | recursive_struct: self.recursive_struct,
|
2351 - | simple_struct: self.simple_struct,
|
2352 - | string: self.string,
|
2353 - | struct_with_json_name: self.struct_with_json_name,
|
2354 - | timestamp: self.timestamp,
|
2355 - | unix_timestamp: self.unix_timestamp,
|
2340 + | fn build_enforcing_all_constraints(self) -> crate::input::PutWithContentEncodingInput {
|
2341 + | crate::input::PutWithContentEncodingInput {
|
2342 + | encoding: self.encoding,
|
2343 + | data: self.data,
|
2356 2344 | }
|
2357 2345 | }
|
2358 2346 | }
|
2359 2347 | }
|
2360 - | /// See [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
2361 - | pub mod empty_operation_input {
|
2348 + | /// See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
2349 + | pub mod content_type_parameters_input {
|
2362 2350 |
|
2363 - | impl ::std::convert::From<Builder> for crate::input::EmptyOperationInput {
|
2351 + | impl ::std::convert::From<Builder> for crate::input::ContentTypeParametersInput {
|
2364 2352 | fn from(builder: Builder) -> Self {
|
2365 2353 | builder.build()
|
2366 2354 | }
|
2367 2355 | }
|
2368 - | /// A builder for [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
2356 + | /// A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
2369 2357 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2370 - | pub struct Builder {}
|
2358 + | pub struct Builder {
|
2359 + | pub(crate) value: ::std::option::Option<i32>,
|
2360 + | }
|
2371 2361 | impl Builder {
|
2372 - | /// Consumes the builder and constructs a [`EmptyOperationInput`](crate::input::EmptyOperationInput).
|
2373 - | pub fn build(self) -> crate::input::EmptyOperationInput {
|
2362 + | #[allow(missing_docs)] // documentation missing in model
|
2363 + | pub fn value(mut self, input: ::std::option::Option<i32>) -> Self {
|
2364 + | self.value = input;
|
2365 + | self
|
2366 + | }
|
2367 + | #[allow(missing_docs)] // documentation missing in model
|
2368 + | pub(crate) fn set_value(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
2369 + | self.value = input.map(|v| v.into());
|
2370 + | self
|
2371 + | }
|
2372 + | /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
2373 + | pub fn build(self) -> crate::input::ContentTypeParametersInput {
|
2374 2374 | self.build_enforcing_all_constraints()
|
2375 2375 | }
|
2376 - | fn build_enforcing_all_constraints(self) -> crate::input::EmptyOperationInput {
|
2377 - | crate::input::EmptyOperationInput {}
|
2376 + | fn build_enforcing_all_constraints(self) -> crate::input::ContentTypeParametersInput {
|
2377 + | crate::input::ContentTypeParametersInput { value: self.value }
|
2378 2378 | }
|
2379 2379 | }
|
2380 2380 | }
|