798 316 | type Unconstrained =
|
799 317 | crate::input::constrained_http_bound_shapes_operation_input_internal::Builder;
|
800 318 | }
|
801 319 | impl ConstrainedHttpBoundShapesOperationInput {
|
802 320 | /// Creates a new builder-style object to manufacture [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
803 321 | pub fn builder() -> crate::input::constrained_http_bound_shapes_operation_input::Builder {
|
804 322 | crate::input::constrained_http_bound_shapes_operation_input::Builder::default()
|
805 323 | }
|
806 324 | }
|
807 325 |
|
808 - | #[allow(missing_docs)] // documentation missing in model
|
809 - | #[derive(
|
810 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
811 - | )]
|
812 - | pub struct ConstrainedShapesOnlyInOutputOperationInput {}
|
813 - | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
814 - | type Unconstrained =
|
815 - | crate::input::constrained_shapes_only_in_output_operation_input_internal::Builder;
|
816 - | }
|
817 - | impl ConstrainedShapesOnlyInOutputOperationInput {
|
818 - | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
819 - | pub fn builder() -> crate::input::constrained_shapes_only_in_output_operation_input::Builder {
|
820 - | crate::input::constrained_shapes_only_in_output_operation_input::Builder::default()
|
821 - | }
|
822 - | }
|
823 - |
|
824 326 | #[allow(missing_docs)] // documentation missing in model
|
825 327 | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
826 - | pub struct ConstrainedShapesOperationInput {
|
328 + | pub struct ConstrainedHttpPayloadBoundShapeOperationInput {
|
827 329 | #[allow(missing_docs)] // documentation missing in model
|
828 - | pub con_a: crate::model::ConA,
|
330 + | pub http_payload_bound_constrained_shape: crate::model::ConA,
|
829 331 | }
|
830 - | impl ConstrainedShapesOperationInput {
|
332 + | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
831 333 | #[allow(missing_docs)] // documentation missing in model
|
832 - | pub fn con_a(&self) -> &crate::model::ConA {
|
833 - | &self.con_a
|
334 + | pub fn http_payload_bound_constrained_shape(&self) -> &crate::model::ConA {
|
335 + | &self.http_payload_bound_constrained_shape
|
834 336 | }
|
835 337 | }
|
836 - | impl crate::constrained::Constrained for crate::input::ConstrainedShapesOperationInput {
|
837 - | type Unconstrained = crate::input::constrained_shapes_operation_input_internal::Builder;
|
338 + | impl crate::constrained::Constrained
|
339 + | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
340 + | {
|
341 + | type Unconstrained =
|
342 + | crate::input::constrained_http_payload_bound_shape_operation_input_internal::Builder;
|
838 343 | }
|
839 - | impl ConstrainedShapesOperationInput {
|
840 - | /// Creates a new builder-style object to manufacture [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
841 - | pub fn builder() -> crate::input::constrained_shapes_operation_input::Builder {
|
842 - | crate::input::constrained_shapes_operation_input::Builder::default()
|
344 + | impl ConstrainedHttpPayloadBoundShapeOperationInput {
|
345 + | /// Creates a new builder-style object to manufacture [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
346 + | pub fn builder() -> crate::input::constrained_http_payload_bound_shape_operation_input::Builder
|
347 + | {
|
348 + | crate::input::constrained_http_payload_bound_shape_operation_input::Builder::default()
|
843 349 | }
|
844 350 | }
|
845 - | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
846 - | pub(crate) mod event_streams_operation_input_internal {
|
847 351 |
|
848 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
849 - | /// Holds one variant for each of the ways the builder can fail.
|
850 - | #[non_exhaustive]
|
851 - | #[allow(clippy::enum_variant_names)]
|
852 - | pub(crate) enum ConstraintViolation {
|
853 - | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
854 - | MissingEvents,
|
352 + | #[allow(missing_docs)] // documentation missing in model
|
353 + | #[derive(
|
354 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
355 + | )]
|
356 + | pub struct ConstrainedRecursiveShapesOperationInput {
|
357 + | #[allow(missing_docs)] // documentation missing in model
|
358 + | pub nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
359 + | #[allow(missing_docs)] // documentation missing in model
|
360 + | pub recursive_list: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
361 + | }
|
362 + | impl ConstrainedRecursiveShapesOperationInput {
|
363 + | #[allow(missing_docs)] // documentation missing in model
|
364 + | pub fn nested(
|
365 + | &self,
|
366 + | ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
|
367 + | self.nested.as_ref()
|
855 368 | }
|
856 - | impl ::std::fmt::Display for ConstraintViolation {
|
857 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
858 - | match self {
|
859 - | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
860 - | }
|
861 - | }
|
369 + | #[allow(missing_docs)] // documentation missing in model
|
370 + | pub fn recursive_list(&self) -> &[crate::model::RecursiveShapesInputOutputNested1] {
|
371 + | use std::ops::Deref;
|
372 + | self.recursive_list.deref()
|
862 373 | }
|
863 - | impl ::std::error::Error for ConstraintViolation {}
|
864 - | impl ConstraintViolation {
|
865 - | pub(crate) fn as_validation_exception_field(
|
866 - | self,
|
867 - | path: ::std::string::String,
|
868 - | ) -> crate::model::ValidationExceptionField {
|
869 - | match self {
|
870 - | ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
|
871 - | message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
|
872 - | path: path + "/events",
|
873 - | },
|
874 - | }
|
875 - | }
|
374 + | }
|
375 + | impl crate::constrained::Constrained for crate::input::ConstrainedRecursiveShapesOperationInput {
|
376 + | type Unconstrained =
|
377 + | crate::input::constrained_recursive_shapes_operation_input_internal::Builder;
|
378 + | }
|
379 + | impl ConstrainedRecursiveShapesOperationInput {
|
380 + | /// Creates a new builder-style object to manufacture [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
381 + | pub fn builder() -> crate::input::constrained_recursive_shapes_operation_input::Builder {
|
382 + | crate::input::constrained_recursive_shapes_operation_input::Builder::default()
|
876 383 | }
|
877 - | impl ::std::convert::From<ConstraintViolation>
|
878 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
879 - | {
|
880 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
881 - | let first_validation_exception_field =
|
882 - | constraint_violation.as_validation_exception_field("".to_owned());
|
883 - | let validation_exception = crate::error::ValidationException {
|
884 - | message: format!(
|
885 - | "1 validation error detected. {}",
|
886 - | &first_validation_exception_field.message
|
887 - | ),
|
888 - | field_list: Some(vec![first_validation_exception_field]),
|
889 - | };
|
890 - | Self::ConstraintViolation(
|
891 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
892 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
893 - | )
|
894 - | }
|
384 + | }
|
385 + |
|
386 + | #[allow(missing_docs)] // documentation missing in model
|
387 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
388 + | pub struct QueryParamsTargetingLengthMapOperationInput {
|
389 + | #[allow(missing_docs)] // documentation missing in model
|
390 + | pub length_map: ::std::option::Option<
|
391 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
392 + | >,
|
393 + | }
|
394 + | impl QueryParamsTargetingLengthMapOperationInput {
|
395 + | #[allow(missing_docs)] // documentation missing in model
|
396 + | pub fn length_map(
|
397 + | &self,
|
398 + | ) -> ::std::option::Option<
|
399 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
400 + | > {
|
401 + | self.length_map.as_ref()
|
895 402 | }
|
896 - | impl ::std::convert::From<Builder>
|
897 - | for crate::constrained::MaybeConstrained<crate::input::EventStreamsOperationInput>
|
898 - | {
|
899 - | fn from(builder: Builder) -> Self {
|
900 - | Self::Unconstrained(builder)
|
901 - | }
|
403 + | }
|
404 + | impl crate::constrained::Constrained for crate::input::QueryParamsTargetingLengthMapOperationInput {
|
405 + | type Unconstrained =
|
406 + | crate::input::query_params_targeting_length_map_operation_input_internal::Builder;
|
407 + | }
|
408 + | impl QueryParamsTargetingLengthMapOperationInput {
|
409 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
410 + | pub fn builder() -> crate::input::query_params_targeting_length_map_operation_input::Builder {
|
411 + | crate::input::query_params_targeting_length_map_operation_input::Builder::default()
|
902 412 | }
|
903 - | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
904 - | type Error = ConstraintViolation;
|
413 + | }
|
905 414 |
|
906 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
907 - | builder.build()
|
908 - | }
|
909 - | }
|
910 - | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
911 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
912 - | pub(crate) struct Builder {
|
913 - | pub(crate) events: ::std::option::Option<
|
914 - | ::aws_smithy_legacy_http::event_stream::Receiver<
|
915 - | crate::model::Event,
|
916 - | crate::error::EventError,
|
917 - | >,
|
918 - | >,
|
415 + | #[allow(missing_docs)] // documentation missing in model
|
416 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
417 + | pub struct QueryParamsTargetingMapOfLengthStringOperationInput {
|
418 + | #[allow(missing_docs)] // documentation missing in model
|
419 + | pub map_of_length_string: ::std::option::Option<
|
420 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
421 + | >,
|
422 + | }
|
423 + | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
424 + | #[allow(missing_docs)] // documentation missing in model
|
425 + | pub fn map_of_length_string(
|
426 + | &self,
|
427 + | ) -> ::std::option::Option<
|
428 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
429 + | > {
|
430 + | self.map_of_length_string.as_ref()
|
919 431 | }
|
920 - | impl Builder {
|
921 - | #[allow(missing_docs)] // documentation missing in model
|
922 - | pub(crate) fn set_events(
|
923 - | mut self,
|
924 - | input: impl ::std::convert::Into<
|
925 - | ::aws_smithy_legacy_http::event_stream::Receiver<
|
926 - | crate::model::Event,
|
927 - | crate::error::EventError,
|
928 - | >,
|
929 - | >,
|
930 - | ) -> Self {
|
931 - | self.events = Some(input.into());
|
932 - | self
|
933 - | }
|
934 - | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
935 - | ///
|
936 - | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if a [`ConstraintViolation`] occurs.
|
937 - | ///
|
938 - | pub fn build(
|
939 - | self,
|
940 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
941 - | self.build_enforcing_all_constraints()
|
942 - | }
|
943 - | fn build_enforcing_all_constraints(
|
944 - | self,
|
945 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
946 - | Ok(crate::input::EventStreamsOperationInput {
|
947 - | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
948 - | })
|
949 - | }
|
432 + | }
|
433 + | impl crate::constrained::Constrained
|
434 + | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
435 + | {
|
436 + | type Unconstrained =
|
437 + | crate::input::query_params_targeting_map_of_length_string_operation_input_internal::Builder;
|
438 + | }
|
439 + | impl QueryParamsTargetingMapOfLengthStringOperationInput {
|
440 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
441 + | pub fn builder(
|
442 + | ) -> crate::input::query_params_targeting_map_of_length_string_operation_input::Builder {
|
443 + | crate::input::query_params_targeting_map_of_length_string_operation_input::Builder::default(
|
444 + | )
|
950 445 | }
|
951 446 | }
|
952 - | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
953 - | pub mod event_streams_operation_input {
|
954 447 |
|
955 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
956 - | /// Holds one variant for each of the ways the builder can fail.
|
957 - | #[allow(clippy::enum_variant_names)]
|
958 - | pub enum ConstraintViolation {
|
959 - | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
960 - | MissingEvents,
|
448 + | #[allow(missing_docs)] // documentation missing in model
|
449 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
450 + | pub struct QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
451 + | #[allow(missing_docs)] // documentation missing in model
|
452 + | pub map_of_list_of_length_string: ::std::option::Option<
|
453 + | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
454 + | >,
|
455 + | }
|
456 + | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
457 + | #[allow(missing_docs)] // documentation missing in model
|
458 + | pub fn map_of_list_of_length_string(
|
459 + | &self,
|
460 + | ) -> ::std::option::Option<
|
461 + | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
462 + | > {
|
463 + | self.map_of_list_of_length_string.as_ref()
|
961 464 | }
|
962 - | impl ::std::fmt::Display for ConstraintViolation {
|
963 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
964 - | match self {
|
965 - | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
966 - | }
|
967 - | }
|
465 + | }
|
466 + | impl crate::constrained::Constrained
|
467 + | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
468 + | {
|
469 + | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_length_string_operation_input_internal::Builder;
|
470 + | }
|
471 + | impl QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
472 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
473 + | pub fn builder(
|
474 + | ) -> crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder
|
475 + | {
|
476 + | crate::input::query_params_targeting_map_of_list_of_length_string_operation_input::Builder::default()
|
968 477 | }
|
969 - | impl ::std::error::Error for ConstraintViolation {}
|
970 - | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
971 - | type Error = ConstraintViolation;
|
478 + | }
|
972 479 |
|
973 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
974 - | builder.build()
|
975 - | }
|
976 - | }
|
977 - | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
978 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
979 - | pub struct Builder {
|
980 - | pub(crate) events: ::std::option::Option<
|
981 - | ::aws_smithy_legacy_http::event_stream::Receiver<
|
982 - | crate::model::Event,
|
983 - | crate::error::EventError,
|
984 - | >,
|
985 - | >,
|
480 + | #[allow(missing_docs)] // documentation missing in model
|
481 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
482 + | pub struct QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
483 + | #[allow(missing_docs)] // documentation missing in model
|
484 + | pub map_of_set_of_length_string: ::std::option::Option<
|
485 + | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
486 + | >,
|
487 + | }
|
488 + | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
489 + | #[allow(missing_docs)] // documentation missing in model
|
490 + | pub fn map_of_set_of_length_string(
|
491 + | &self,
|
492 + | ) -> ::std::option::Option<
|
493 + | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
494 + | > {
|
495 + | self.map_of_set_of_length_string.as_ref()
|
986 496 | }
|
987 - | impl Builder {
|
988 - | #[allow(missing_docs)] // documentation missing in model
|
989 - | pub fn events(
|
990 - | mut self,
|
991 - | input: ::aws_smithy_legacy_http::event_stream::Receiver<
|
992 - | crate::model::Event,
|
993 - | crate::error::EventError,
|
994 - | >,
|
995 - | ) -> Self {
|
996 - | self.events = Some(input);
|
997 - | self
|
998 - | }
|
999 - | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
1000 - | ///
|
1001 - | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if you do not provide a value for all non-`Option`al members.
|
1002 - | ///
|
1003 - | pub fn build(
|
1004 - | self,
|
1005 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
1006 - | self.build_enforcing_required_and_enum_traits()
|
1007 - | }
|
1008 - | fn build_enforcing_required_and_enum_traits(
|
1009 - | self,
|
1010 - | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
1011 - | Ok(crate::input::EventStreamsOperationInput {
|
1012 - | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
1013 - | })
|
1014 - | }
|
497 + | }
|
498 + | impl crate::constrained::Constrained
|
499 + | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
500 + | {
|
501 + | type Unconstrained = crate::input::query_params_targeting_map_of_set_of_length_string_operation_input_internal::Builder;
|
502 + | }
|
503 + | impl QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
504 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
505 + | pub fn builder(
|
506 + | ) -> crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder
|
507 + | {
|
508 + | crate::input::query_params_targeting_map_of_set_of_length_string_operation_input::Builder::default()
|
1015 509 | }
|
1016 510 | }
|
1017 - | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1018 - | pub(crate) mod streaming_blob_operation_input_internal {
|
1019 511 |
|
1020 - | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
1021 - | fn from(builder: Builder) -> Self {
|
1022 - | builder.build()
|
1023 - | }
|
1024 - | }
|
1025 - | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1026 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
1027 - | pub(crate) struct Builder {
|
1028 - | pub(crate) streaming_blob:
|
1029 - | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
512 + | #[allow(missing_docs)] // documentation missing in model
|
513 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
514 + | pub struct QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
515 + | #[allow(missing_docs)] // documentation missing in model
|
516 + | pub map_of_length_list_of_pattern_string: ::std::option::Option<
|
517 + | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
518 + | >,
|
519 + | }
|
520 + | impl QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
521 + | #[allow(missing_docs)] // documentation missing in model
|
522 + | pub fn map_of_length_list_of_pattern_string(
|
523 + | &self,
|
524 + | ) -> ::std::option::Option<
|
525 + | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
526 + | > {
|
527 + | self.map_of_length_list_of_pattern_string.as_ref()
|
1030 528 | }
|
1031 - | impl Builder {
|
1032 - | #[allow(missing_docs)] // documentation missing in model
|
1033 - | pub(crate) fn set_streaming_blob(
|
1034 - | mut self,
|
1035 - | input: impl ::std::convert::Into<::aws_smithy_types::byte_stream::ByteStream>,
|
1036 - | ) -> Self {
|
1037 - | self.streaming_blob = Some(input.into());
|
1038 - | self
|
1039 - | }
|
1040 - | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1041 - | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
1042 - | self.build_enforcing_all_constraints()
|
1043 - | }
|
1044 - | fn build_enforcing_all_constraints(self) -> crate::input::StreamingBlobOperationInput {
|
1045 - | crate::input::StreamingBlobOperationInput {
|
1046 - | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
1047 - | }
|
1048 - | }
|
529 + | }
|
530 + | impl crate::constrained::Constrained
|
531 + | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
532 + | {
|
533 + | type Unconstrained = crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input_internal::Builder;
|
534 + | }
|
535 + | impl QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
536 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
537 + | pub fn builder() -> crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input::Builder{
|
538 + | crate::input::query_params_targeting_map_of_length_list_of_pattern_string_operation_input::Builder::default()
|
1049 539 | }
|
1050 540 | }
|
1051 - | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1052 - | pub mod streaming_blob_operation_input {
|
1053 541 |
|
1054 - | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
1055 - | fn from(builder: Builder) -> Self {
|
1056 - | builder.build()
|
1057 - | }
|
1058 - | }
|
1059 - | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1060 - | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
1061 - | pub struct Builder {
|
1062 - | pub(crate) streaming_blob:
|
1063 - | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
542 + | #[allow(missing_docs)] // documentation missing in model
|
543 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
544 + | pub struct QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
545 + | #[allow(missing_docs)] // documentation missing in model
|
546 + | pub map_of_list_of_enum_string: ::std::option::Option<
|
547 + | ::std::collections::HashMap<
|
548 + | crate::model::EnumString,
|
549 + | ::std::vec::Vec<crate::model::EnumString>,
|
550 + | >,
|
551 + | >,
|
552 + | }
|
553 + | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
554 + | #[allow(missing_docs)] // documentation missing in model
|
555 + | pub fn map_of_list_of_enum_string(
|
556 + | &self,
|
557 + | ) -> ::std::option::Option<
|
558 + | &::std::collections::HashMap<
|
559 + | crate::model::EnumString,
|
560 + | ::std::vec::Vec<crate::model::EnumString>,
|
561 + | >,
|
562 + | > {
|
563 + | self.map_of_list_of_enum_string.as_ref()
|
1064 564 | }
|
1065 - | impl Builder {
|
1066 - | #[allow(missing_docs)] // documentation missing in model
|
1067 - | pub fn streaming_blob(
|
1068 - | mut self,
|
1069 - | input: ::aws_smithy_types::byte_stream::ByteStream,
|
1070 - | ) -> Self {
|
1071 - | self.streaming_blob = Some(input);
|
1072 - | self
|
1073 - | }
|
1074 - | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
1075 - | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
1076 - | self.build_enforcing_required_and_enum_traits()
|
1077 - | }
|
1078 - | fn build_enforcing_required_and_enum_traits(
|
1079 - | self,
|
1080 - | ) -> crate::input::StreamingBlobOperationInput {
|
1081 - | crate::input::StreamingBlobOperationInput {
|
1082 - | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
1083 - | }
|
1084 - | }
|
565 + | }
|
566 + | impl crate::constrained::Constrained
|
567 + | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
568 + | {
|
569 + | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input_internal::Builder;
|
570 + | }
|
571 + | impl QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
572 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
573 + | pub fn builder(
|
574 + | ) -> crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder
|
575 + | {
|
576 + | crate::input::query_params_targeting_map_of_list_of_enum_string_operation_input::Builder::default()
|
1085 577 | }
|
1086 578 | }
|
1087 - | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1088 - | pub(crate) mod non_streaming_blob_operation_input_internal {
|
1089 579 |
|
1090 - | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
1091 - | fn from(builder: Builder) -> Self {
|
1092 - | builder.build()
|
1093 - | }
|
1094 - | }
|
1095 - | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1096 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1097 - | pub(crate) struct Builder {
|
1098 - | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
580 + | #[allow(missing_docs)] // documentation missing in model
|
581 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
582 + | pub struct QueryParamsTargetingMapOfPatternStringOperationInput {
|
583 + | #[allow(missing_docs)] // documentation missing in model
|
584 + | pub map_of_pattern_string: ::std::option::Option<
|
585 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
586 + | >,
|
587 + | }
|
588 + | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
589 + | #[allow(missing_docs)] // documentation missing in model
|
590 + | pub fn map_of_pattern_string(
|
591 + | &self,
|
592 + | ) -> ::std::option::Option<
|
593 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
594 + | > {
|
595 + | self.map_of_pattern_string.as_ref()
|
1099 596 | }
|
1100 - | impl Builder {
|
1101 - | #[allow(missing_docs)] // documentation missing in model
|
1102 - | pub(crate) fn set_non_streaming_blob(
|
1103 - | mut self,
|
1104 - | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
1105 - | ) -> Self {
|
1106 - | self.non_streaming_blob = input.map(|v| v.into());
|
1107 - | self
|
1108 - | }
|
1109 - | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1110 - | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
1111 - | self.build_enforcing_all_constraints()
|
1112 - | }
|
1113 - | fn build_enforcing_all_constraints(self) -> crate::input::NonStreamingBlobOperationInput {
|
1114 - | crate::input::NonStreamingBlobOperationInput {
|
1115 - | non_streaming_blob: self.non_streaming_blob,
|
1116 - | }
|
1117 - | }
|
597 + | }
|
598 + | impl crate::constrained::Constrained
|
599 + | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
600 + | {
|
601 + | type Unconstrained = crate::input::query_params_targeting_map_of_pattern_string_operation_input_internal::Builder;
|
602 + | }
|
603 + | impl QueryParamsTargetingMapOfPatternStringOperationInput {
|
604 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
605 + | pub fn builder(
|
606 + | ) -> crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder {
|
607 + | crate::input::query_params_targeting_map_of_pattern_string_operation_input::Builder::default(
|
608 + | )
|
1118 609 | }
|
1119 610 | }
|
1120 - | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1121 - | pub mod non_streaming_blob_operation_input {
|
1122 611 |
|
1123 - | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
1124 - | fn from(builder: Builder) -> Self {
|
1125 - | builder.build()
|
1126 - | }
|
1127 - | }
|
1128 - | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1129 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1130 - | pub struct Builder {
|
1131 - | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
1132 - | }
|
1133 - | impl Builder {
|
1134 - | #[allow(missing_docs)] // documentation missing in model
|
1135 - | pub fn non_streaming_blob(
|
1136 - | mut self,
|
1137 - | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
1138 - | ) -> Self {
|
1139 - | self.non_streaming_blob = input;
|
1140 - | self
|
1141 - | }
|
1142 - | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
1143 - | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
1144 - | self.build_enforcing_required_and_enum_traits()
|
1145 - | }
|
1146 - | fn build_enforcing_required_and_enum_traits(
|
1147 - | self,
|
1148 - | ) -> crate::input::NonStreamingBlobOperationInput {
|
1149 - | crate::input::NonStreamingBlobOperationInput {
|
1150 - | non_streaming_blob: self.non_streaming_blob,
|
1151 - | }
|
1152 - | }
|
1153 - | }
|
612 + | #[allow(missing_docs)] // documentation missing in model
|
613 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
614 + | pub struct QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
615 + | #[allow(missing_docs)] // documentation missing in model
|
616 + | pub map_of_list_of_pattern_string: ::std::option::Option<
|
617 + | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
618 + | >,
|
1154 619 | }
|
1155 - | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1156 - | pub(crate) mod query_params_targeting_map_of_enum_string_operation_input_internal {
|
1157 - |
|
1158 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1159 - | /// Holds one variant for each of the ways the builder can fail.
|
1160 - | #[non_exhaustive]
|
1161 - | #[allow(clippy::enum_variant_names)]
|
1162 - | pub(crate) enum ConstraintViolation {
|
1163 - | /// Constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`.
|
1164 - | #[doc(hidden)]
|
1165 - | MapOfEnumString(crate::model::map_of_enum_string_internal::ConstraintViolation),
|
1166 - | }
|
1167 - | impl ::std::fmt::Display for ConstraintViolation {
|
1168 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1169 - | match self {
|
1170 - | ConstraintViolation::MapOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`"),
|
1171 - | }
|
1172 - | }
|
1173 - | }
|
1174 - | impl ::std::error::Error for ConstraintViolation {}
|
1175 - | impl ConstraintViolation {
|
1176 - | pub(crate) fn as_validation_exception_field(
|
1177 - | self,
|
1178 - | path: ::std::string::String,
|
1179 - | ) -> crate::model::ValidationExceptionField {
|
1180 - | match self {
|
1181 - | ConstraintViolation::MapOfEnumString(inner) => {
|
1182 - | inner.as_validation_exception_field(path + "/mapOfEnumString")
|
1183 - | }
|
1184 - | }
|
1185 - | }
|
1186 - | }
|
1187 - | impl ::std::convert::From<ConstraintViolation>
|
1188 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1189 - | {
|
1190 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1191 - | let first_validation_exception_field =
|
1192 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1193 - | let validation_exception = crate::error::ValidationException {
|
1194 - | message: format!(
|
1195 - | "1 validation error detected. {}",
|
1196 - | &first_validation_exception_field.message
|
1197 - | ),
|
1198 - | field_list: Some(vec![first_validation_exception_field]),
|
1199 - | };
|
1200 - | Self::ConstraintViolation(
|
1201 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1202 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1203 - | )
|
1204 - | }
|
620 + | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
621 + | #[allow(missing_docs)] // documentation missing in model
|
622 + | pub fn map_of_list_of_pattern_string(
|
623 + | &self,
|
624 + | ) -> ::std::option::Option<
|
625 + | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
626 + | > {
|
627 + | self.map_of_list_of_pattern_string.as_ref()
|
1205 628 | }
|
1206 - | impl ::std::convert::From<Builder>
|
1207 - | for crate::constrained::MaybeConstrained<
|
1208 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1209 - | >
|
629 + | }
|
630 + | impl crate::constrained::Constrained
|
631 + | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
632 + | {
|
633 + | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input_internal::Builder;
|
634 + | }
|
635 + | impl QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
636 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
637 + | pub fn builder(
|
638 + | ) -> crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder
|
1210 639 | {
|
1211 - | fn from(builder: Builder) -> Self {
|
1212 - | Self::Unconstrained(builder)
|
1213 - | }
|
640 + | crate::input::query_params_targeting_map_of_list_of_pattern_string_operation_input::Builder::default()
|
1214 641 | }
|
1215 - | impl ::std::convert::TryFrom<Builder>
|
1216 - | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
1217 - | {
|
1218 - | type Error = ConstraintViolation;
|
642 + | }
|
1219 643 |
|
1220 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1221 - | builder.build()
|
1222 - | }
|
1223 - | }
|
1224 - | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1225 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1226 - | pub(crate) struct Builder {
|
1227 - | pub(crate) map_of_enum_string: ::std::option::Option<
|
1228 - | crate::constrained::MaybeConstrained<
|
1229 - | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
1230 - | >,
|
1231 - | >,
|
1232 - | }
|
1233 - | impl Builder {
|
1234 - | #[allow(missing_docs)] // documentation missing in model
|
1235 - | pub(crate) fn set_map_of_enum_string(
|
1236 - | mut self,
|
1237 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained>>>,
|
1238 - | ) -> Self {
|
1239 - | self.map_of_enum_string = input.map(|v| v.into());
|
1240 - | self
|
1241 - | }
|
1242 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1243 - | ///
|
1244 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1245 - | ///
|
1246 - | pub fn build(
|
1247 - | self,
|
1248 - | ) -> Result<
|
1249 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1250 - | ConstraintViolation,
|
1251 - | > {
|
1252 - | self.build_enforcing_all_constraints()
|
1253 - | }
|
1254 - | fn build_enforcing_all_constraints(
|
1255 - | self,
|
1256 - | ) -> Result<
|
1257 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
1258 - | ConstraintViolation,
|
1259 - | > {
|
1260 - | Ok(
|
1261 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
1262 - | map_of_enum_string: self
|
1263 - | .map_of_enum_string
|
1264 - | .map(|v| match v {
|
1265 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1266 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1267 - | })
|
1268 - | .map(|res| {
|
1269 - | res.map(|v| v.into())
|
1270 - | .map_err(ConstraintViolation::MapOfEnumString)
|
1271 - | })
|
1272 - | .transpose()?,
|
1273 - | },
|
1274 - | )
|
1275 - | }
|
644 + | #[allow(missing_docs)] // documentation missing in model
|
645 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
646 + | pub struct QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
647 + | #[allow(missing_docs)] // documentation missing in model
|
648 + | pub map_of_length_pattern_string: ::std::option::Option<
|
649 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
650 + | >,
|
651 + | }
|
652 + | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
653 + | #[allow(missing_docs)] // documentation missing in model
|
654 + | pub fn map_of_length_pattern_string(
|
655 + | &self,
|
656 + | ) -> ::std::option::Option<
|
657 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
658 + | > {
|
659 + | self.map_of_length_pattern_string.as_ref()
|
1276 660 | }
|
1277 661 | }
|
1278 - | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1279 - | pub mod query_params_targeting_map_of_enum_string_operation_input {
|
1280 - |
|
1281 - | impl ::std::convert::From<Builder>
|
1282 - | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
662 + | impl crate::constrained::Constrained
|
663 + | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
664 + | {
|
665 + | type Unconstrained = crate::input::query_params_targeting_map_of_length_pattern_string_operation_input_internal::Builder;
|
666 + | }
|
667 + | impl QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
668 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
669 + | pub fn builder(
|
670 + | ) -> crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder
|
1283 671 | {
|
1284 - | fn from(builder: Builder) -> Self {
|
1285 - | builder.build()
|
1286 - | }
|
672 + | crate::input::query_params_targeting_map_of_length_pattern_string_operation_input::Builder::default()
|
1287 673 | }
|
1288 - | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1289 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1290 - | pub struct Builder {
|
1291 - | pub(crate) map_of_enum_string: ::std::option::Option<
|
1292 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
1293 - | >,
|
674 + | }
|
675 + |
|
676 + | #[allow(missing_docs)] // documentation missing in model
|
677 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
678 + | pub struct QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
679 + | #[allow(missing_docs)] // documentation missing in model
|
680 + | pub map_of_length_pattern_string: ::std::option::Option<
|
681 + | ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
682 + | >,
|
683 + | }
|
684 + | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
685 + | #[allow(missing_docs)] // documentation missing in model
|
686 + | pub fn map_of_length_pattern_string(
|
687 + | &self,
|
688 + | ) -> ::std::option::Option<
|
689 + | &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
|
690 + | > {
|
691 + | self.map_of_length_pattern_string.as_ref()
|
1294 692 | }
|
1295 - | impl Builder {
|
1296 - | #[allow(missing_docs)] // documentation missing in model
|
1297 - | pub fn map_of_enum_string(
|
1298 - | mut self,
|
1299 - | input: ::std::option::Option<
|
1300 - | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
1301 - | >,
|
1302 - | ) -> Self {
|
1303 - | self.map_of_enum_string = input;
|
1304 - | self
|
1305 - | }
|
1306 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
1307 - | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
1308 - | self.build_enforcing_required_and_enum_traits()
|
1309 - | }
|
1310 - | fn build_enforcing_required_and_enum_traits(
|
1311 - | self,
|
1312 - | ) -> crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
1313 - | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
1314 - | map_of_enum_string: self.map_of_enum_string,
|
1315 - | }
|
1316 - | }
|
693 + | }
|
694 + | impl crate::constrained::Constrained
|
695 + | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
696 + | {
|
697 + | type Unconstrained = crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input_internal::Builder;
|
698 + | }
|
699 + | impl QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
700 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
701 + | pub fn builder() -> crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder{
|
702 + | crate::input::query_params_targeting_map_of_list_of_length_pattern_string_operation_input::Builder::default()
|
1317 703 | }
|
1318 704 | }
|
1319 - | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1320 - | pub(crate) mod http_prefix_headers_targeting_length_map_operation_input_internal {
|
705 + |
|
706 + | #[allow(missing_docs)] // documentation missing in model
|
707 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
708 + | pub struct HttpPrefixHeadersTargetingLengthMapOperationInput {
|
709 + | #[allow(missing_docs)] // documentation missing in model
|
710 + | pub length_map: ::std::option::Option<
|
711 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
712 + | >,
|
713 + | }
|
714 + | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
715 + | #[allow(missing_docs)] // documentation missing in model
|
716 + | pub fn length_map(
|
717 + | &self,
|
718 + | ) -> ::std::option::Option<
|
719 + | &::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
720 + | > {
|
721 + | self.length_map.as_ref()
|
722 + | }
|
723 + | }
|
724 + | impl crate::constrained::Constrained
|
725 + | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
726 + | {
|
727 + | type Unconstrained =
|
728 + | crate::input::http_prefix_headers_targeting_length_map_operation_input_internal::Builder;
|
729 + | }
|
730 + | impl HttpPrefixHeadersTargetingLengthMapOperationInput {
|
731 + | /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
732 + | pub fn builder(
|
733 + | ) -> crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder {
|
734 + | crate::input::http_prefix_headers_targeting_length_map_operation_input::Builder::default()
|
735 + | }
|
736 + | }
|
737 + |
|
738 + | #[allow(missing_docs)] // documentation missing in model
|
739 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
740 + | pub struct QueryParamsTargetingMapOfEnumStringOperationInput {
|
741 + | #[allow(missing_docs)] // documentation missing in model
|
742 + | pub map_of_enum_string: ::std::option::Option<
|
743 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
744 + | >,
|
745 + | }
|
746 + | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
747 + | #[allow(missing_docs)] // documentation missing in model
|
748 + | pub fn map_of_enum_string(
|
749 + | &self,
|
750 + | ) -> ::std::option::Option<
|
751 + | &::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
752 + | > {
|
753 + | self.map_of_enum_string.as_ref()
|
754 + | }
|
755 + | }
|
756 + | impl crate::constrained::Constrained
|
757 + | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
758 + | {
|
759 + | type Unconstrained =
|
760 + | crate::input::query_params_targeting_map_of_enum_string_operation_input_internal::Builder;
|
761 + | }
|
762 + | impl QueryParamsTargetingMapOfEnumStringOperationInput {
|
763 + | /// Creates a new builder-style object to manufacture [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
764 + | pub fn builder(
|
765 + | ) -> crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder {
|
766 + | crate::input::query_params_targeting_map_of_enum_string_operation_input::Builder::default()
|
767 + | }
|
768 + | }
|
769 + |
|
770 + | #[allow(missing_docs)] // documentation missing in model
|
771 + | #[derive(
|
772 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
773 + | )]
|
774 + | pub struct NonStreamingBlobOperationInput {
|
775 + | #[allow(missing_docs)] // documentation missing in model
|
776 + | pub non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
777 + | }
|
778 + | impl NonStreamingBlobOperationInput {
|
779 + | #[allow(missing_docs)] // documentation missing in model
|
780 + | pub fn non_streaming_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
781 + | self.non_streaming_blob.as_ref()
|
782 + | }
|
783 + | }
|
784 + | impl crate::constrained::Constrained for crate::input::NonStreamingBlobOperationInput {
|
785 + | type Unconstrained = crate::input::non_streaming_blob_operation_input_internal::Builder;
|
786 + | }
|
787 + | impl NonStreamingBlobOperationInput {
|
788 + | /// Creates a new builder-style object to manufacture [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
789 + | pub fn builder() -> crate::input::non_streaming_blob_operation_input::Builder {
|
790 + | crate::input::non_streaming_blob_operation_input::Builder::default()
|
791 + | }
|
792 + | }
|
793 + |
|
794 + | #[allow(missing_docs)] // documentation missing in model
|
795 + | #[derive(::std::fmt::Debug)]
|
796 + | pub struct StreamingBlobOperationInput {
|
797 + | #[allow(missing_docs)] // documentation missing in model
|
798 + | pub streaming_blob: ::aws_smithy_types::byte_stream::ByteStream,
|
799 + | }
|
800 + | impl StreamingBlobOperationInput {
|
801 + | #[allow(missing_docs)] // documentation missing in model
|
802 + | pub fn streaming_blob(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
|
803 + | &self.streaming_blob
|
804 + | }
|
805 + | }
|
806 + | impl crate::constrained::Constrained for crate::input::StreamingBlobOperationInput {
|
807 + | type Unconstrained = crate::input::streaming_blob_operation_input_internal::Builder;
|
808 + | }
|
809 + | impl StreamingBlobOperationInput {
|
810 + | /// Creates a new builder-style object to manufacture [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
811 + | pub fn builder() -> crate::input::streaming_blob_operation_input::Builder {
|
812 + | crate::input::streaming_blob_operation_input::Builder::default()
|
813 + | }
|
814 + | }
|
815 + |
|
816 + | #[allow(missing_docs)] // documentation missing in model
|
817 + | #[derive(::std::fmt::Debug)]
|
818 + | pub struct EventStreamsOperationInput {
|
819 + | #[allow(missing_docs)] // documentation missing in model
|
820 + | pub events: ::aws_smithy_legacy_http::event_stream::Receiver<
|
821 + | crate::model::Event,
|
822 + | crate::error::EventError,
|
823 + | >,
|
824 + | }
|
825 + | impl EventStreamsOperationInput {
|
826 + | #[allow(missing_docs)] // documentation missing in model
|
827 + | pub fn events(
|
828 + | &self,
|
829 + | ) -> &::aws_smithy_legacy_http::event_stream::Receiver<
|
830 + | crate::model::Event,
|
831 + | crate::error::EventError,
|
832 + | > {
|
833 + | &self.events
|
834 + | }
|
835 + | }
|
836 + | impl crate::constrained::Constrained for crate::input::EventStreamsOperationInput {
|
837 + | type Unconstrained = crate::input::event_streams_operation_input_internal::Builder;
|
838 + | }
|
839 + | impl EventStreamsOperationInput {
|
840 + | /// Creates a new builder-style object to manufacture [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
841 + | pub fn builder() -> crate::input::event_streams_operation_input::Builder {
|
842 + | crate::input::event_streams_operation_input::Builder::default()
|
843 + | }
|
844 + | }
|
845 + | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
846 + | pub(crate) mod constrained_shapes_operation_input_internal {
|
1321 847 |
|
1322 848 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1323 849 | /// Holds one variant for each of the ways the builder can fail.
|
1324 850 | #[non_exhaustive]
|
1325 851 | #[allow(clippy::enum_variant_names)]
|
1326 852 | pub(crate) enum ConstraintViolation {
|
1327 - | /// Constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`.
|
853 + | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
854 + | MissingConA,
|
855 + | /// Constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`.
|
1328 856 | #[doc(hidden)]
|
1329 - | LengthMap(crate::model::con_b_map_internal::ConstraintViolation),
|
857 + | ConA(crate::model::con_a_internal::ConstraintViolation),
|
1330 858 | }
|
1331 859 | impl ::std::fmt::Display for ConstraintViolation {
|
1332 860 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1333 861 | match self {
|
1334 - | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`"),
|
862 + | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
863 + | ConstraintViolation::ConA(_) => write!(f, "constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`"),
|
1335 864 | }
|
1336 865 | }
|
1337 866 | }
|
1338 867 | impl ::std::error::Error for ConstraintViolation {}
|
1339 868 | impl ConstraintViolation {
|
1340 869 | pub(crate) fn as_validation_exception_field(
|
1341 870 | self,
|
1342 871 | path: ::std::string::String,
|
1343 872 | ) -> crate::model::ValidationExceptionField {
|
1344 873 | match self {
|
1345 - | ConstraintViolation::LengthMap(inner) => {
|
1346 - | inner.as_validation_exception_field(path + "/lengthMap")
|
874 + | ConstraintViolation::MissingConA => crate::model::ValidationExceptionField {
|
875 + | message: format!(
|
876 + | "Value at '{}/conA' failed to satisfy constraint: Member must not be null",
|
877 + | path
|
878 + | ),
|
879 + | path: path + "/conA",
|
880 + | },
|
881 + | ConstraintViolation::ConA(inner) => {
|
882 + | inner.as_validation_exception_field(path + "/conA")
|
1347 883 | }
|
1348 884 | }
|
1349 885 | }
|
1350 886 | }
|
1351 887 | impl ::std::convert::From<ConstraintViolation>
|
1352 888 | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1353 889 | {
|
1354 890 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1355 891 | let first_validation_exception_field =
|
1356 892 | constraint_violation.as_validation_exception_field("".to_owned());
|
1357 893 | let validation_exception = crate::error::ValidationException {
|
1358 894 | message: format!(
|
1359 895 | "1 validation error detected. {}",
|
1360 896 | &first_validation_exception_field.message
|
1361 897 | ),
|
1362 898 | field_list: Some(vec![first_validation_exception_field]),
|
1363 899 | };
|
1364 900 | Self::ConstraintViolation(
|
1365 901 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1366 902 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1367 903 | )
|
1368 904 | }
|
1369 905 | }
|
1370 906 | impl ::std::convert::From<Builder>
|
1371 - | for crate::constrained::MaybeConstrained<
|
1372 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1373 - | >
|
907 + | for crate::constrained::MaybeConstrained<crate::input::ConstrainedShapesOperationInput>
|
1374 908 | {
|
1375 909 | fn from(builder: Builder) -> Self {
|
1376 910 | Self::Unconstrained(builder)
|
1377 911 | }
|
1378 912 | }
|
1379 - | impl ::std::convert::TryFrom<Builder>
|
1380 - | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
1381 - | {
|
913 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
1382 914 | type Error = ConstraintViolation;
|
1383 915 |
|
1384 916 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1385 917 | builder.build()
|
1386 918 | }
|
1387 919 | }
|
1388 - | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
920 + | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
1389 921 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1390 922 | pub(crate) struct Builder {
|
1391 - | pub(crate) length_map:
|
1392 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
923 + | pub(crate) con_a:
|
924 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
1393 925 | }
|
1394 926 | impl Builder {
|
1395 927 | #[allow(missing_docs)] // documentation missing in model
|
1396 - | pub(crate) fn set_length_map(
|
928 + | pub(crate) fn set_con_a(
|
1397 929 | mut self,
|
1398 - | input: Option<
|
1399 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
1400 - | >,
|
930 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
1401 931 | ) -> Self {
|
1402 - | self.length_map = input.map(|v| v.into());
|
932 + | self.con_a = Some(input.into());
|
1403 933 | self
|
1404 934 | }
|
1405 - | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
935 + | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
1406 936 | ///
|
1407 - | /// The builder fails to construct a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
937 + | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
1408 938 | ///
|
939 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1409 940 | pub fn build(
|
1410 941 | self,
|
1411 - | ) -> Result<
|
1412 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1413 - | ConstraintViolation,
|
1414 - | > {
|
942 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
1415 943 | self.build_enforcing_all_constraints()
|
1416 944 | }
|
1417 945 | fn build_enforcing_all_constraints(
|
1418 946 | self,
|
1419 - | ) -> Result<
|
1420 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
1421 - | ConstraintViolation,
|
1422 - | > {
|
1423 - | Ok(
|
1424 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
1425 - | length_map: self
|
1426 - | .length_map
|
1427 - | .map(|v| match v {
|
1428 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1429 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1430 - | })
|
1431 - | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
1432 - | .transpose()?
|
1433 - | .map(|v: crate::model::ConBMap| v.into()),
|
1434 - | },
|
1435 - | )
|
947 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
948 + | Ok(crate::input::ConstrainedShapesOperationInput {
|
949 + | con_a: self
|
950 + | .con_a
|
951 + | .map(|v| match v {
|
952 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
953 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
954 + | })
|
955 + | .map(|res| res.map_err(ConstraintViolation::ConA))
|
956 + | .transpose()?
|
957 + | .ok_or(ConstraintViolation::MissingConA)?,
|
958 + | })
|
1436 959 | }
|
1437 960 | }
|
1438 961 | }
|
1439 - | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1440 - | pub mod http_prefix_headers_targeting_length_map_operation_input {
|
962 + | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
963 + | pub mod constrained_shapes_operation_input {
|
1441 964 |
|
1442 - | impl ::std::convert::From<Builder>
|
1443 - | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
1444 - | {
|
1445 - | fn from(builder: Builder) -> Self {
|
965 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
966 + | /// Holds one variant for each of the ways the builder can fail.
|
967 + | #[allow(clippy::enum_variant_names)]
|
968 + | pub enum ConstraintViolation {
|
969 + | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
970 + | MissingConA,
|
971 + | }
|
972 + | impl ::std::fmt::Display for ConstraintViolation {
|
973 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
974 + | match self {
|
975 + | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
976 + | }
|
977 + | }
|
978 + | }
|
979 + | impl ::std::error::Error for ConstraintViolation {}
|
980 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
981 + | type Error = ConstraintViolation;
|
982 + |
|
983 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1446 984 | builder.build()
|
1447 985 | }
|
1448 986 | }
|
1449 - | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
987 + | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
1450 988 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1451 989 | pub struct Builder {
|
1452 - | pub(crate) length_map: ::std::option::Option<
|
1453 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1454 - | >,
|
990 + | pub(crate) con_a: ::std::option::Option<crate::model::ConA>,
|
1455 991 | }
|
1456 992 | impl Builder {
|
1457 993 | #[allow(missing_docs)] // documentation missing in model
|
1458 - | pub fn length_map(
|
1459 - | mut self,
|
1460 - | input: ::std::option::Option<
|
1461 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1462 - | >,
|
1463 - | ) -> Self {
|
1464 - | self.length_map = input;
|
994 + | pub fn con_a(mut self, input: crate::model::ConA) -> Self {
|
995 + | self.con_a = Some(input);
|
1465 996 | self
|
1466 997 | }
|
1467 - | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
1468 - | pub fn build(self) -> crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
998 + | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
999 + | ///
|
1000 + | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
1001 + | ///
|
1002 + | pub fn build(
|
1003 + | self,
|
1004 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
1469 1005 | self.build_enforcing_required_and_enum_traits()
|
1470 1006 | }
|
1471 1007 | fn build_enforcing_required_and_enum_traits(
|
1472 1008 | self,
|
1473 - | ) -> crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
1474 - | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
1475 - | length_map: self.length_map,
|
1476 - | }
|
1009 + | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
1010 + | Ok(crate::input::ConstrainedShapesOperationInput {
|
1011 + | con_a: self.con_a.ok_or(ConstraintViolation::MissingConA)?,
|
1012 + | })
|
1477 1013 | }
|
1478 1014 | }
|
1479 1015 | }
|
1480 - | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1481 - | pub(crate) mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input_internal {
|
1016 + | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1017 + | pub(crate) mod constrained_shapes_only_in_output_operation_input_internal {
|
1482 1018 |
|
1483 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1484 - | /// Holds one variant for each of the ways the builder can fail.
|
1485 - | #[non_exhaustive]
|
1486 - | #[allow(clippy::enum_variant_names)]
|
1487 - | pub(crate) enum ConstraintViolation {
|
1488 - | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`.
|
1489 - | #[doc(hidden)]
|
1490 - | MapOfLengthPatternString(
|
1491 - | crate::model::map_of_list_of_length_pattern_string_internal::ConstraintViolation,
|
1492 - | ),
|
1493 - | }
|
1494 - | impl ::std::fmt::Display for ConstraintViolation {
|
1495 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1496 - | match self {
|
1497 - | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`"),
|
1498 - | }
|
1499 - | }
|
1500 - | }
|
1501 - | impl ::std::error::Error for ConstraintViolation {}
|
1502 - | impl ConstraintViolation {
|
1503 - | pub(crate) fn as_validation_exception_field(
|
1504 - | self,
|
1505 - | path: ::std::string::String,
|
1506 - | ) -> crate::model::ValidationExceptionField {
|
1507 - | match self {
|
1508 - | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
1509 - | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
1510 - | }
|
1511 - | }
|
1512 - | }
|
1513 - | }
|
1514 - | impl ::std::convert::From<ConstraintViolation>
|
1515 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1516 - | {
|
1517 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1518 - | let first_validation_exception_field =
|
1519 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1520 - | let validation_exception = crate::error::ValidationException {
|
1521 - | message: format!(
|
1522 - | "1 validation error detected. {}",
|
1523 - | &first_validation_exception_field.message
|
1524 - | ),
|
1525 - | field_list: Some(vec![first_validation_exception_field]),
|
1526 - | };
|
1527 - | Self::ConstraintViolation(
|
1528 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1529 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1530 - | )
|
1531 - | }
|
1532 - | }
|
1533 - | impl ::std::convert::From<Builder>
|
1534 - | for crate::constrained::MaybeConstrained<
|
1535 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1536 - | >
|
1537 - | {
|
1019 + | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1538 1020 | fn from(builder: Builder) -> Self {
|
1539 - | Self::Unconstrained(builder)
|
1540 - | }
|
1541 - | }
|
1542 - | impl ::std::convert::TryFrom<Builder>
|
1543 - | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
1544 - | {
|
1545 - | type Error = ConstraintViolation;
|
1546 - |
|
1547 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1548 1021 | builder.build()
|
1549 1022 | }
|
1550 1023 | }
|
1551 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1024 + | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1552 1025 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1553 - | pub(crate) struct Builder {
|
1554 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>,
|
1555 - | }
|
1026 + | pub(crate) struct Builder {}
|
1556 1027 | impl Builder {
|
1557 - | #[allow(missing_docs)] // documentation missing in model
|
1558 - | pub(crate) fn set_map_of_length_pattern_string(
|
1559 - | mut self,
|
1560 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>>,
|
1561 - | ) -> Self {
|
1562 - | self.map_of_length_pattern_string = input.map(|v| v.into());
|
1563 - | self
|
1564 - | }
|
1565 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1566 - | ///
|
1567 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1568 - | ///
|
1569 - | pub fn build(
|
1570 - | self,
|
1571 - | ) -> Result<
|
1572 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1573 - | ConstraintViolation,
|
1574 - | > {
|
1028 + | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1029 + | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1575 1030 | self.build_enforcing_all_constraints()
|
1576 1031 | }
|
1577 1032 | fn build_enforcing_all_constraints(
|
1578 1033 | self,
|
1579 - | ) -> Result<
|
1580 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
1581 - | ConstraintViolation,
|
1582 - | > {
|
1583 - | Ok(
|
1584 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
1585 - | map_of_length_pattern_string: self
|
1586 - | .map_of_length_pattern_string
|
1587 - | .map(|v| match v {
|
1588 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1589 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1590 - | })
|
1591 - | .map(|res| {
|
1592 - | res.map(|v| v.into())
|
1593 - | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
1594 - | })
|
1595 - | .transpose()?,
|
1596 - | },
|
1597 - | )
|
1034 + | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1035 + | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
1598 1036 | }
|
1599 1037 | }
|
1600 1038 | }
|
1601 - | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1602 - | pub mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input {
|
1039 + | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1040 + | pub mod constrained_shapes_only_in_output_operation_input {
|
1603 1041 |
|
1604 - | impl ::std::convert::From<Builder>
|
1605 - | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
1606 - | {
|
1042 + | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1607 1043 | fn from(builder: Builder) -> Self {
|
1608 1044 | builder.build()
|
1609 1045 | }
|
1610 1046 | }
|
1611 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1047 + | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1612 1048 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1613 - | pub struct Builder {
|
1614 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<
|
1615 - | ::std::collections::HashMap<
|
1616 - | ::std::string::String,
|
1617 - | ::std::vec::Vec<::std::string::String>,
|
1618 - | >,
|
1619 - | >,
|
1620 - | }
|
1049 + | pub struct Builder {}
|
1621 1050 | impl Builder {
|
1622 - | #[allow(missing_docs)] // documentation missing in model
|
1623 - | pub fn map_of_length_pattern_string(
|
1624 - | mut self,
|
1625 - | input: ::std::option::Option<
|
1626 - | ::std::collections::HashMap<
|
1627 - | ::std::string::String,
|
1628 - | ::std::vec::Vec<::std::string::String>,
|
1629 - | >,
|
1630 - | >,
|
1631 - | ) -> Self {
|
1632 - | self.map_of_length_pattern_string = input;
|
1633 - | self
|
1634 - | }
|
1635 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
1636 - | pub fn build(
|
1637 - | self,
|
1638 - | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
1639 - | {
|
1051 + | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
1052 + | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1640 1053 | self.build_enforcing_required_and_enum_traits()
|
1641 1054 | }
|
1642 1055 | fn build_enforcing_required_and_enum_traits(
|
1643 1056 | self,
|
1644 - | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
1645 - | {
|
1646 - | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
1647 - | map_of_length_pattern_string: self.map_of_length_pattern_string,
|
1648 - | }
|
1057 + | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
1058 + | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
1649 1059 | }
|
1650 1060 | }
|
1651 1061 | }
|
1652 - | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1653 - | pub(crate) mod query_params_targeting_map_of_length_pattern_string_operation_input_internal {
|
1062 + | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1063 + | pub(crate) mod constrained_http_bound_shapes_operation_input_internal {
|
1654 1064 |
|
1655 1065 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1656 1066 | /// Holds one variant for each of the ways the builder can fail.
|
1657 1067 | #[non_exhaustive]
|
1658 1068 | #[allow(clippy::enum_variant_names)]
|
1659 1069 | pub(crate) enum ConstraintViolation {
|
1660 - | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`.
|
1070 + | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1071 + | MissingLengthStringLabel,
|
1072 + | /// Constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1661 1073 | #[doc(hidden)]
|
1662 - | MapOfLengthPatternString(
|
1663 - | crate::model::map_of_length_pattern_string_internal::ConstraintViolation,
|
1074 + | LengthStringLabel(crate::model::length_string_internal::ConstraintViolation),
|
1075 + | /// Constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1076 + | #[doc(hidden)]
|
1077 + | RangeIntegerLabel(crate::model::range_integer_internal::ConstraintViolation),
|
1078 + | /// Constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1079 + | #[doc(hidden)]
|
1080 + | RangeShortLabel(crate::model::range_short_internal::ConstraintViolation),
|
1081 + | /// Constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1082 + | #[doc(hidden)]
|
1083 + | RangeLongLabel(crate::model::range_long_internal::ConstraintViolation),
|
1084 + | /// Constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1085 + | #[doc(hidden)]
|
1086 + | RangeByteLabel(crate::model::range_byte_internal::ConstraintViolation),
|
1087 + | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1088 + | MissingEnumStringLabel,
|
1089 + | /// Constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1090 + | #[doc(hidden)]
|
1091 + | EnumStringLabel(crate::model::enum_string_internal::ConstraintViolation),
|
1092 + | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
1093 + | MissingLengthStringHeaderMap,
|
1094 + | /// Constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1095 + | #[doc(hidden)]
|
1096 + | LengthStringHeaderMap(crate::model::map_of_length_string_internal::ConstraintViolation),
|
1097 + | /// Constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1098 + | #[doc(hidden)]
|
1099 + | LengthStringHeader(crate::model::length_string_internal::ConstraintViolation),
|
1100 + | /// Constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1101 + | #[doc(hidden)]
|
1102 + | RangeIntegerHeader(crate::model::range_integer_internal::ConstraintViolation),
|
1103 + | /// Constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1104 + | #[doc(hidden)]
|
1105 + | RangeShortHeader(crate::model::range_short_internal::ConstraintViolation),
|
1106 + | /// Constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1107 + | #[doc(hidden)]
|
1108 + | RangeLongHeader(crate::model::range_long_internal::ConstraintViolation),
|
1109 + | /// Constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1110 + | #[doc(hidden)]
|
1111 + | RangeByteHeader(crate::model::range_byte_internal::ConstraintViolation),
|
1112 + | /// Constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1113 + | #[doc(hidden)]
|
1114 + | LengthStringSetHeader(crate::model::set_of_length_string_internal::ConstraintViolation),
|
1115 + | /// Constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1116 + | #[doc(hidden)]
|
1117 + | ListLengthStringHeader(crate::model::list_of_length_string_internal::ConstraintViolation),
|
1118 + | /// Constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1119 + | #[doc(hidden)]
|
1120 + | LengthListPatternStringHeader(
|
1121 + | crate::model::length_list_of_pattern_string_internal::ConstraintViolation,
|
1664 1122 | ),
|
1665 - | }
|
1666 - | impl ::std::fmt::Display for ConstraintViolation {
|
1667 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1668 - | match self {
|
1669 - | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`"),
|
1670 - | }
|
1671 - | }
|
1672 - | }
|
1673 - | impl ::std::error::Error for ConstraintViolation {}
|
1674 - | impl ConstraintViolation {
|
1123 + | /// Constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1124 + | #[doc(hidden)]
|
1125 + | LengthSetPatternStringHeader(
|
1126 + | crate::model::length_set_of_pattern_string_internal::ConstraintViolation,
|
1127 + | ),
|
1128 + | /// Constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1129 + | #[doc(hidden)]
|
1130 + | RangeByteSetHeader(crate::model::set_of_range_byte_internal::ConstraintViolation),
|
1131 + | /// Constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1132 + | #[doc(hidden)]
|
1133 + | RangeShortSetHeader(crate::model::set_of_range_short_internal::ConstraintViolation),
|
1134 + | /// Constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1135 + | #[doc(hidden)]
|
1136 + | RangeIntegerSetHeader(crate::model::set_of_range_integer_internal::ConstraintViolation),
|
1137 + | /// Constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1138 + | #[doc(hidden)]
|
1139 + | RangeLongSetHeader(crate::model::set_of_range_long_internal::ConstraintViolation),
|
1140 + | /// Constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1141 + | #[doc(hidden)]
|
1142 + | RangeByteListHeader(crate::model::list_of_range_byte_internal::ConstraintViolation),
|
1143 + | /// Constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1144 + | #[doc(hidden)]
|
1145 + | RangeShortListHeader(crate::model::list_of_range_short_internal::ConstraintViolation),
|
1146 + | /// Constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1147 + | #[doc(hidden)]
|
1148 + | RangeIntegerListHeader(crate::model::list_of_range_integer_internal::ConstraintViolation),
|
1149 + | /// Constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1150 + | #[doc(hidden)]
|
1151 + | RangeLongListHeader(crate::model::list_of_range_long_internal::ConstraintViolation),
|
1152 + | /// Constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1153 + | #[doc(hidden)]
|
1154 + | LengthStringQuery(crate::model::length_string_internal::ConstraintViolation),
|
1155 + | /// Constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1156 + | #[doc(hidden)]
|
1157 + | RangeByteQuery(crate::model::range_byte_internal::ConstraintViolation),
|
1158 + | /// Constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1159 + | #[doc(hidden)]
|
1160 + | RangeShortQuery(crate::model::range_short_internal::ConstraintViolation),
|
1161 + | /// Constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1162 + | #[doc(hidden)]
|
1163 + | RangeIntegerQuery(crate::model::range_integer_internal::ConstraintViolation),
|
1164 + | /// Constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1165 + | #[doc(hidden)]
|
1166 + | RangeLongQuery(crate::model::range_long_internal::ConstraintViolation),
|
1167 + | /// Constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1168 + | #[doc(hidden)]
|
1169 + | EnumStringQuery(crate::model::enum_string_internal::ConstraintViolation),
|
1170 + | /// Constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1171 + | #[doc(hidden)]
|
1172 + | LengthStringListQuery(crate::model::list_of_length_string_internal::ConstraintViolation),
|
1173 + | /// Constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1174 + | #[doc(hidden)]
|
1175 + | LengthListPatternStringQuery(
|
1176 + | crate::model::length_list_of_pattern_string_internal::ConstraintViolation,
|
1177 + | ),
|
1178 + | /// Constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1179 + | #[doc(hidden)]
|
1180 + | LengthStringSetQuery(crate::model::set_of_length_string_internal::ConstraintViolation),
|
1181 + | /// Constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1182 + | #[doc(hidden)]
|
1183 + | RangeByteListQuery(crate::model::list_of_range_byte_internal::ConstraintViolation),
|
1184 + | /// Constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1185 + | #[doc(hidden)]
|
1186 + | RangeShortListQuery(crate::model::list_of_range_short_internal::ConstraintViolation),
|
1187 + | /// Constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1188 + | #[doc(hidden)]
|
1189 + | RangeIntegerListQuery(crate::model::list_of_range_integer_internal::ConstraintViolation),
|
1190 + | /// Constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1191 + | #[doc(hidden)]
|
1192 + | RangeLongListQuery(crate::model::list_of_range_long_internal::ConstraintViolation),
|
1193 + | /// Constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1194 + | #[doc(hidden)]
|
1195 + | RangeByteSetQuery(crate::model::set_of_range_byte_internal::ConstraintViolation),
|
1196 + | /// Constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1197 + | #[doc(hidden)]
|
1198 + | RangeShortSetQuery(crate::model::set_of_range_short_internal::ConstraintViolation),
|
1199 + | /// Constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1200 + | #[doc(hidden)]
|
1201 + | RangeIntegerSetQuery(crate::model::set_of_range_integer_internal::ConstraintViolation),
|
1202 + | /// Constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1203 + | #[doc(hidden)]
|
1204 + | RangeLongSetQuery(crate::model::set_of_range_long_internal::ConstraintViolation),
|
1205 + | /// Constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
1206 + | #[doc(hidden)]
|
1207 + | EnumStringListQuery(crate::model::list_of_enum_string_internal::ConstraintViolation),
|
1208 + | }
|
1209 + | impl ::std::fmt::Display for ConstraintViolation {
|
1210 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1211 + | match self {
|
1212 + | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1213 + | ConstraintViolation::LengthStringLabel(_) => write!(f, "constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1214 + | ConstraintViolation::RangeIntegerLabel(_) => write!(f, "constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1215 + | ConstraintViolation::RangeShortLabel(_) => write!(f, "constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1216 + | ConstraintViolation::RangeLongLabel(_) => write!(f, "constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1217 + | ConstraintViolation::RangeByteLabel(_) => write!(f, "constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1218 + | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1219 + | ConstraintViolation::EnumStringLabel(_) => write!(f, "constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1220 + | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1221 + | ConstraintViolation::LengthStringHeaderMap(_) => write!(f, "constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1222 + | ConstraintViolation::LengthStringHeader(_) => write!(f, "constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1223 + | ConstraintViolation::RangeIntegerHeader(_) => write!(f, "constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1224 + | ConstraintViolation::RangeShortHeader(_) => write!(f, "constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1225 + | ConstraintViolation::RangeLongHeader(_) => write!(f, "constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1226 + | ConstraintViolation::RangeByteHeader(_) => write!(f, "constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1227 + | ConstraintViolation::LengthStringSetHeader(_) => write!(f, "constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1228 + | ConstraintViolation::ListLengthStringHeader(_) => write!(f, "constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1229 + | ConstraintViolation::LengthListPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1230 + | ConstraintViolation::LengthSetPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1231 + | ConstraintViolation::RangeByteSetHeader(_) => write!(f, "constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1232 + | ConstraintViolation::RangeShortSetHeader(_) => write!(f, "constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1233 + | ConstraintViolation::RangeIntegerSetHeader(_) => write!(f, "constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1234 + | ConstraintViolation::RangeLongSetHeader(_) => write!(f, "constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1235 + | ConstraintViolation::RangeByteListHeader(_) => write!(f, "constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1236 + | ConstraintViolation::RangeShortListHeader(_) => write!(f, "constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1237 + | ConstraintViolation::RangeIntegerListHeader(_) => write!(f, "constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1238 + | ConstraintViolation::RangeLongListHeader(_) => write!(f, "constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1239 + | ConstraintViolation::LengthStringQuery(_) => write!(f, "constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1240 + | ConstraintViolation::RangeByteQuery(_) => write!(f, "constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1241 + | ConstraintViolation::RangeShortQuery(_) => write!(f, "constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1242 + | ConstraintViolation::RangeIntegerQuery(_) => write!(f, "constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1243 + | ConstraintViolation::RangeLongQuery(_) => write!(f, "constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1244 + | ConstraintViolation::EnumStringQuery(_) => write!(f, "constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1245 + | ConstraintViolation::LengthStringListQuery(_) => write!(f, "constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1246 + | ConstraintViolation::LengthListPatternStringQuery(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1247 + | ConstraintViolation::LengthStringSetQuery(_) => write!(f, "constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1248 + | ConstraintViolation::RangeByteListQuery(_) => write!(f, "constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1249 + | ConstraintViolation::RangeShortListQuery(_) => write!(f, "constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1250 + | ConstraintViolation::RangeIntegerListQuery(_) => write!(f, "constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1251 + | ConstraintViolation::RangeLongListQuery(_) => write!(f, "constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1252 + | ConstraintViolation::RangeByteSetQuery(_) => write!(f, "constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1253 + | ConstraintViolation::RangeShortSetQuery(_) => write!(f, "constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1254 + | ConstraintViolation::RangeIntegerSetQuery(_) => write!(f, "constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1255 + | ConstraintViolation::RangeLongSetQuery(_) => write!(f, "constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1256 + | ConstraintViolation::EnumStringListQuery(_) => write!(f, "constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
1257 + | }
|
1258 + | }
|
1259 + | }
|
1260 + | impl ::std::error::Error for ConstraintViolation {}
|
1261 + | impl ConstraintViolation {
|
1675 1262 | pub(crate) fn as_validation_exception_field(
|
1676 1263 | self,
|
1677 1264 | path: ::std::string::String,
|
1678 1265 | ) -> crate::model::ValidationExceptionField {
|
1679 1266 | match self {
|
1680 - | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
1681 - | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
1682 - | }
|
1683 - | }
|
1267 + | ConstraintViolation::MissingLengthStringLabel => crate::model::ValidationExceptionField {
|
1268 + | message: format!("Value at '{}/lengthStringLabel' failed to satisfy constraint: Member must not be null", path),
|
1269 + | path: path + "/lengthStringLabel",
|
1270 + | },
|
1271 + | ConstraintViolation::LengthStringLabel(inner) => inner.as_validation_exception_field(path + "/lengthStringLabel"),
|
1272 + | ConstraintViolation::RangeIntegerLabel(inner) => inner.as_validation_exception_field(path + "/rangeIntegerLabel"),
|
1273 + | ConstraintViolation::RangeShortLabel(inner) => inner.as_validation_exception_field(path + "/rangeShortLabel"),
|
1274 + | ConstraintViolation::RangeLongLabel(inner) => inner.as_validation_exception_field(path + "/rangeLongLabel"),
|
1275 + | ConstraintViolation::RangeByteLabel(inner) => inner.as_validation_exception_field(path + "/rangeByteLabel"),
|
1276 + | ConstraintViolation::MissingEnumStringLabel => crate::model::ValidationExceptionField {
|
1277 + | message: format!("Value at '{}/enumStringLabel' failed to satisfy constraint: Member must not be null", path),
|
1278 + | path: path + "/enumStringLabel",
|
1279 + | },
|
1280 + | ConstraintViolation::EnumStringLabel(inner) => inner.as_validation_exception_field(path + "/enumStringLabel"),
|
1281 + | ConstraintViolation::MissingLengthStringHeaderMap => crate::model::ValidationExceptionField {
|
1282 + | message: format!("Value at '{}/lengthStringHeaderMap' failed to satisfy constraint: Member must not be null", path),
|
1283 + | path: path + "/lengthStringHeaderMap",
|
1284 + | },
|
1285 + | ConstraintViolation::LengthStringHeaderMap(inner) => inner.as_validation_exception_field(path + "/lengthStringHeaderMap"),
|
1286 + | ConstraintViolation::LengthStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringHeader"),
|
1287 + | ConstraintViolation::RangeIntegerHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerHeader"),
|
1288 + | ConstraintViolation::RangeShortHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortHeader"),
|
1289 + | ConstraintViolation::RangeLongHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongHeader"),
|
1290 + | ConstraintViolation::RangeByteHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteHeader"),
|
1291 + | ConstraintViolation::LengthStringSetHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringSetHeader"),
|
1292 + | ConstraintViolation::ListLengthStringHeader(inner) => inner.as_validation_exception_field(path + "/listLengthStringHeader"),
|
1293 + | ConstraintViolation::LengthListPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringHeader"),
|
1294 + | ConstraintViolation::LengthSetPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthSetPatternStringHeader"),
|
1295 + | ConstraintViolation::RangeByteSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteSetHeader"),
|
1296 + | ConstraintViolation::RangeShortSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortSetHeader"),
|
1297 + | ConstraintViolation::RangeIntegerSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetHeader"),
|
1298 + | ConstraintViolation::RangeLongSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongSetHeader"),
|
1299 + | ConstraintViolation::RangeByteListHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteListHeader"),
|
1300 + | ConstraintViolation::RangeShortListHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortListHeader"),
|
1301 + | ConstraintViolation::RangeIntegerListHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListHeader"),
|
1302 + | ConstraintViolation::RangeLongListHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongListHeader"),
|
1303 + | ConstraintViolation::LengthStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringQuery"),
|
1304 + | ConstraintViolation::RangeByteQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteQuery"),
|
1305 + | ConstraintViolation::RangeShortQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortQuery"),
|
1306 + | ConstraintViolation::RangeIntegerQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerQuery"),
|
1307 + | ConstraintViolation::RangeLongQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongQuery"),
|
1308 + | ConstraintViolation::EnumStringQuery(inner) => inner.as_validation_exception_field(path + "/enumStringQuery"),
|
1309 + | ConstraintViolation::LengthStringListQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringListQuery"),
|
1310 + | ConstraintViolation::LengthListPatternStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringQuery"),
|
1311 + | ConstraintViolation::LengthStringSetQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringSetQuery"),
|
1312 + | ConstraintViolation::RangeByteListQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteListQuery"),
|
1313 + | ConstraintViolation::RangeShortListQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortListQuery"),
|
1314 + | ConstraintViolation::RangeIntegerListQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListQuery"),
|
1315 + | ConstraintViolation::RangeLongListQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongListQuery"),
|
1316 + | ConstraintViolation::RangeByteSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteSetQuery"),
|
1317 + | ConstraintViolation::RangeShortSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortSetQuery"),
|
1318 + | ConstraintViolation::RangeIntegerSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetQuery"),
|
1319 + | ConstraintViolation::RangeLongSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongSetQuery"),
|
1320 + | ConstraintViolation::EnumStringListQuery(inner) => inner.as_validation_exception_field(path + "/enumStringListQuery"),
|
1321 + | }
|
1684 1322 | }
|
1685 1323 | }
|
1686 1324 | impl ::std::convert::From<ConstraintViolation>
|
1687 1325 | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1688 1326 | {
|
1689 1327 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1690 1328 | let first_validation_exception_field =
|
1691 1329 | constraint_violation.as_validation_exception_field("".to_owned());
|
1692 1330 | let validation_exception = crate::error::ValidationException {
|
1693 1331 | message: format!(
|
1694 1332 | "1 validation error detected. {}",
|
1695 1333 | &first_validation_exception_field.message
|
1696 1334 | ),
|
1697 1335 | field_list: Some(vec![first_validation_exception_field]),
|
1698 1336 | };
|
1699 1337 | Self::ConstraintViolation(
|
1700 1338 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1701 1339 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1702 1340 | )
|
1703 1341 | }
|
1704 1342 | }
|
1705 1343 | impl ::std::convert::From<Builder>
|
1706 1344 | for crate::constrained::MaybeConstrained<
|
1707 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1345 + | crate::input::ConstrainedHttpBoundShapesOperationInput,
|
1708 1346 | >
|
1709 1347 | {
|
1710 1348 | fn from(builder: Builder) -> Self {
|
1711 1349 | Self::Unconstrained(builder)
|
1712 1350 | }
|
1713 1351 | }
|
1714 - | impl ::std::convert::TryFrom<Builder>
|
1715 - | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
1716 - | {
|
1352 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
1717 1353 | type Error = ConstraintViolation;
|
1718 1354 |
|
1719 1355 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1720 1356 | builder.build()
|
1721 1357 | }
|
1722 1358 | }
|
1723 - | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1359 + | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1724 1360 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1725 1361 | pub(crate) struct Builder {
|
1726 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>,
|
1362 + | pub(crate) length_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1363 + | pub(crate) range_integer_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1364 + | pub(crate) range_short_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1365 + | pub(crate) range_long_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1366 + | pub(crate) range_byte_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1367 + | pub(crate) enum_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
1368 + | pub(crate) length_string_header_map: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
1369 + | pub(crate) length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1370 + | pub(crate) range_integer_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1371 + | pub(crate) range_short_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1372 + | pub(crate) range_long_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1373 + | pub(crate) range_byte_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1374 + | pub(crate) length_string_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
1375 + | pub(crate) list_length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
1376 + | pub(crate) length_list_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
1377 + | pub(crate) length_set_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>>,
|
1378 + | pub(crate) range_byte_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
1379 + | pub(crate) range_short_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
1380 + | pub(crate) range_integer_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
1381 + | pub(crate) range_long_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
1382 + | pub(crate) range_byte_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
1383 + | pub(crate) range_short_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
1384 + | pub(crate) range_integer_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
1385 + | pub(crate) range_long_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
1386 + | pub(crate) length_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
1387 + | pub(crate) range_byte_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
1388 + | pub(crate) range_short_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
1389 + | pub(crate) range_integer_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
1390 + | pub(crate) range_long_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
1391 + | pub(crate) enum_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
1392 + | pub(crate) length_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
1393 + | pub(crate) length_list_pattern_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
1394 + | pub(crate) length_string_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
1395 + | pub(crate) range_byte_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
1396 + | pub(crate) range_short_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
1397 + | pub(crate) range_integer_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
1398 + | pub(crate) range_long_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
1399 + | pub(crate) range_byte_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
1400 + | pub(crate) range_short_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
1401 + | pub(crate) range_integer_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
1402 + | pub(crate) range_long_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
1403 + | pub(crate) enum_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>,
|
1727 1404 | }
|
1728 1405 | impl Builder {
|
1729 1406 | #[allow(missing_docs)] // documentation missing in model
|
1730 - | pub(crate) fn set_map_of_length_pattern_string(
|
1407 + | pub(crate) fn set_length_string_label(
|
1731 1408 | mut self,
|
1732 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>>,
|
1409 + | input: impl ::std::convert::Into<
|
1410 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1411 + | >,
|
1733 1412 | ) -> Self {
|
1734 - | self.map_of_length_pattern_string = input.map(|v| v.into());
|
1413 + | self.length_string_label = Some(input.into());
|
1735 1414 | self
|
1736 1415 | }
|
1737 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1738 - | ///
|
1739 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1740 - | ///
|
1741 - | pub fn build(
|
1742 - | self,
|
1743 - | ) -> Result<
|
1744 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1745 - | ConstraintViolation,
|
1746 - | > {
|
1747 - | self.build_enforcing_all_constraints()
|
1416 + | #[allow(missing_docs)] // documentation missing in model
|
1417 + | pub(crate) fn set_range_integer_label(
|
1418 + | mut self,
|
1419 + | input: impl ::std::convert::Into<
|
1420 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1421 + | >,
|
1422 + | ) -> Self {
|
1423 + | self.range_integer_label = Some(input.into());
|
1424 + | self
|
1748 1425 | }
|
1749 - | fn build_enforcing_all_constraints(
|
1750 - | self,
|
1751 - | ) -> Result<
|
1752 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
1753 - | ConstraintViolation,
|
1754 - | > {
|
1755 - | Ok(
|
1756 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
1757 - | map_of_length_pattern_string: self
|
1758 - | .map_of_length_pattern_string
|
1759 - | .map(|v| match v {
|
1760 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1761 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1762 - | })
|
1763 - | .map(|res| {
|
1764 - | res.map(|v| v.into())
|
1765 - | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
1766 - | })
|
1767 - | .transpose()?,
|
1768 - | },
|
1769 - | )
|
1426 + | #[allow(missing_docs)] // documentation missing in model
|
1427 + | pub(crate) fn set_range_short_label(
|
1428 + | mut self,
|
1429 + | input: impl ::std::convert::Into<
|
1430 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
1431 + | >,
|
1432 + | ) -> Self {
|
1433 + | self.range_short_label = Some(input.into());
|
1434 + | self
|
1770 1435 | }
|
1771 - | }
|
1772 - | }
|
1773 - | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1774 - | pub mod query_params_targeting_map_of_length_pattern_string_operation_input {
|
1775 - |
|
1776 - | impl ::std::convert::From<Builder>
|
1777 - | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
1778 - | {
|
1779 - | fn from(builder: Builder) -> Self {
|
1780 - | builder.build()
|
1436 + | #[allow(missing_docs)] // documentation missing in model
|
1437 + | pub(crate) fn set_range_long_label(
|
1438 + | mut self,
|
1439 + | input: impl ::std::convert::Into<
|
1440 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1441 + | >,
|
1442 + | ) -> Self {
|
1443 + | self.range_long_label = Some(input.into());
|
1444 + | self
|
1781 1445 | }
|
1782 - | }
|
1783 - | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1784 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1785 - | pub struct Builder {
|
1786 - | pub(crate) map_of_length_pattern_string: ::std::option::Option<
|
1787 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1788 - | >,
|
1789 - | }
|
1790 - | impl Builder {
|
1791 1446 | #[allow(missing_docs)] // documentation missing in model
|
1792 - | pub fn map_of_length_pattern_string(
|
1447 + | pub(crate) fn set_range_byte_label(
|
1793 1448 | mut self,
|
1794 - | input: ::std::option::Option<
|
1795 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1449 + | input: impl ::std::convert::Into<
|
1450 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1796 1451 | >,
|
1797 1452 | ) -> Self {
|
1798 - | self.map_of_length_pattern_string = input;
|
1453 + | self.range_byte_label = Some(input.into());
|
1799 1454 | self
|
1800 1455 | }
|
1801 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
1802 - | pub fn build(
|
1803 - | self,
|
1804 - | ) -> crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
1805 - | self.build_enforcing_required_and_enum_traits()
|
1456 + | #[allow(missing_docs)] // documentation missing in model
|
1457 + | pub(crate) fn set_enum_string_label(
|
1458 + | mut self,
|
1459 + | input: impl ::std::convert::Into<
|
1460 + | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
1461 + | >,
|
1462 + | ) -> Self {
|
1463 + | self.enum_string_label = Some(input.into());
|
1464 + | self
|
1806 1465 | }
|
1807 - | fn build_enforcing_required_and_enum_traits(
|
1808 - | self,
|
1809 - | ) -> crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
1810 - | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
1811 - | map_of_length_pattern_string: self.map_of_length_pattern_string,
|
1812 - | }
|
1466 + | #[allow(missing_docs)] // documentation missing in model
|
1467 + | pub(crate) fn set_length_string_header_map(
|
1468 + | mut self,
|
1469 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
1470 + | ) -> Self {
|
1471 + | self.length_string_header_map = Some(input.into());
|
1472 + | self
|
1813 1473 | }
|
1814 - | }
|
1815 - | }
|
1816 - | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1817 - | pub(crate) mod query_params_targeting_map_of_list_of_pattern_string_operation_input_internal {
|
1818 - |
|
1819 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1820 - | /// Holds one variant for each of the ways the builder can fail.
|
1821 - | #[non_exhaustive]
|
1822 - | #[allow(clippy::enum_variant_names)]
|
1823 - | pub(crate) enum ConstraintViolation {
|
1824 - | /// Constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`.
|
1825 - | #[doc(hidden)]
|
1826 - | MapOfListOfPatternString(
|
1827 - | crate::model::map_of_list_of_pattern_string_internal::ConstraintViolation,
|
1828 - | ),
|
1829 - | }
|
1830 - | impl ::std::fmt::Display for ConstraintViolation {
|
1831 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
1832 - | match self {
|
1833 - | ConstraintViolation::MapOfListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`"),
|
1834 - | }
|
1474 + | #[allow(missing_docs)] // documentation missing in model
|
1475 + | pub(crate) fn set_length_string_header(
|
1476 + | mut self,
|
1477 + | input: Option<
|
1478 + | impl ::std::convert::Into<
|
1479 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1480 + | >,
|
1481 + | >,
|
1482 + | ) -> Self {
|
1483 + | self.length_string_header = input.map(|v| v.into());
|
1484 + | self
|
1835 1485 | }
|
1836 - | }
|
1837 - | impl ::std::error::Error for ConstraintViolation {}
|
1838 - | impl ConstraintViolation {
|
1839 - | pub(crate) fn as_validation_exception_field(
|
1840 - | self,
|
1841 - | path: ::std::string::String,
|
1842 - | ) -> crate::model::ValidationExceptionField {
|
1843 - | match self {
|
1844 - | ConstraintViolation::MapOfListOfPatternString(inner) => {
|
1845 - | inner.as_validation_exception_field(path + "/mapOfListOfPatternString")
|
1846 - | }
|
1847 - | }
|
1486 + | #[allow(missing_docs)] // documentation missing in model
|
1487 + | pub(crate) fn set_range_integer_header(
|
1488 + | mut self,
|
1489 + | input: impl ::std::convert::Into<
|
1490 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1491 + | >,
|
1492 + | ) -> Self {
|
1493 + | self.range_integer_header = Some(input.into());
|
1494 + | self
|
1848 1495 | }
|
1849 - | }
|
1850 - | impl ::std::convert::From<ConstraintViolation>
|
1851 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
1852 - | {
|
1853 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
1854 - | let first_validation_exception_field =
|
1855 - | constraint_violation.as_validation_exception_field("".to_owned());
|
1856 - | let validation_exception = crate::error::ValidationException {
|
1857 - | message: format!(
|
1858 - | "1 validation error detected. {}",
|
1859 - | &first_validation_exception_field.message
|
1860 - | ),
|
1861 - | field_list: Some(vec![first_validation_exception_field]),
|
1862 - | };
|
1863 - | Self::ConstraintViolation(
|
1864 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
1865 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
1866 - | )
|
1496 + | #[allow(missing_docs)] // documentation missing in model
|
1497 + | pub(crate) fn set_range_short_header(
|
1498 + | mut self,
|
1499 + | input: impl ::std::convert::Into<
|
1500 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
1501 + | >,
|
1502 + | ) -> Self {
|
1503 + | self.range_short_header = Some(input.into());
|
1504 + | self
|
1867 1505 | }
|
1868 - | }
|
1869 - | impl ::std::convert::From<Builder>
|
1870 - | for crate::constrained::MaybeConstrained<
|
1871 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1872 - | >
|
1873 - | {
|
1874 - | fn from(builder: Builder) -> Self {
|
1875 - | Self::Unconstrained(builder)
|
1506 + | #[allow(missing_docs)] // documentation missing in model
|
1507 + | pub(crate) fn set_range_long_header(
|
1508 + | mut self,
|
1509 + | input: impl ::std::convert::Into<
|
1510 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1511 + | >,
|
1512 + | ) -> Self {
|
1513 + | self.range_long_header = Some(input.into());
|
1514 + | self
|
1876 1515 | }
|
1877 - | }
|
1878 - | impl ::std::convert::TryFrom<Builder>
|
1879 - | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
1880 - | {
|
1881 - | type Error = ConstraintViolation;
|
1882 - |
|
1883 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
1884 - | builder.build()
|
1516 + | #[allow(missing_docs)] // documentation missing in model
|
1517 + | pub(crate) fn set_range_byte_header(
|
1518 + | mut self,
|
1519 + | input: impl ::std::convert::Into<
|
1520 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1521 + | >,
|
1522 + | ) -> Self {
|
1523 + | self.range_byte_header = Some(input.into());
|
1524 + | self
|
1885 1525 | }
|
1886 - | }
|
1887 - | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1888 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1889 - | pub(crate) struct Builder {
|
1890 - | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>,
|
1891 - | }
|
1892 - | impl Builder {
|
1893 1526 | #[allow(missing_docs)] // documentation missing in model
|
1894 - | pub(crate) fn set_map_of_list_of_pattern_string(
|
1527 + | pub(crate) fn set_length_string_set_header(
|
1895 1528 | mut self,
|
1896 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>>,
|
1529 + | input: Option<
|
1530 + | impl ::std::convert::Into<
|
1531 + | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
1532 + | >,
|
1533 + | >,
|
1897 1534 | ) -> Self {
|
1898 - | self.map_of_list_of_pattern_string = input.map(|v| v.into());
|
1535 + | self.length_string_set_header = input.map(|v| v.into());
|
1899 1536 | self
|
1900 1537 | }
|
1901 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1902 - | ///
|
1903 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
1904 - | ///
|
1905 - | pub fn build(
|
1906 - | self,
|
1907 - | ) -> Result<
|
1908 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1909 - | ConstraintViolation,
|
1910 - | > {
|
1911 - | self.build_enforcing_all_constraints()
|
1538 + | #[allow(missing_docs)] // documentation missing in model
|
1539 + | pub(crate) fn set_list_length_string_header(
|
1540 + | mut self,
|
1541 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
1542 + | ) -> Self {
|
1543 + | self.list_length_string_header = input.map(|v| v.into());
|
1544 + | self
|
1912 1545 | }
|
1913 - | fn build_enforcing_all_constraints(
|
1914 - | self,
|
1915 - | ) -> Result<
|
1916 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
1917 - | ConstraintViolation,
|
1918 - | > {
|
1919 - | Ok(
|
1920 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
1921 - | map_of_list_of_pattern_string: self
|
1922 - | .map_of_list_of_pattern_string
|
1923 - | .map(|v| match v {
|
1924 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1925 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1926 - | })
|
1927 - | .map(|res| {
|
1928 - | res.map(|v| v.into())
|
1929 - | .map_err(ConstraintViolation::MapOfListOfPatternString)
|
1930 - | })
|
1931 - | .transpose()?,
|
1932 - | },
|
1933 - | )
|
1546 + | #[allow(missing_docs)] // documentation missing in model
|
1547 + | pub(crate) fn set_length_list_pattern_string_header(
|
1548 + | mut self,
|
1549 + | input: Option<
|
1550 + | impl ::std::convert::Into<
|
1551 + | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
1552 + | >,
|
1553 + | >,
|
1554 + | ) -> Self {
|
1555 + | self.length_list_pattern_string_header = input.map(|v| v.into());
|
1556 + | self
|
1934 1557 | }
|
1935 - | }
|
1936 - | }
|
1937 - | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1938 - | pub mod query_params_targeting_map_of_list_of_pattern_string_operation_input {
|
1939 - |
|
1940 - | impl ::std::convert::From<Builder>
|
1941 - | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
1942 - | {
|
1943 - | fn from(builder: Builder) -> Self {
|
1944 - | builder.build()
|
1558 + | #[allow(missing_docs)] // documentation missing in model
|
1559 + | pub(crate) fn set_length_set_pattern_string_header(
|
1560 + | mut self,
|
1561 + | input: Option<
|
1562 + | impl ::std::convert::Into<
|
1563 + | crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
|
1564 + | >,
|
1565 + | >,
|
1566 + | ) -> Self {
|
1567 + | self.length_set_pattern_string_header = input.map(|v| v.into());
|
1568 + | self
|
1945 1569 | }
|
1946 - | }
|
1947 - | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1948 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1949 - | pub struct Builder {
|
1950 - | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<
|
1951 - | ::std::collections::HashMap<
|
1952 - | ::std::string::String,
|
1953 - | ::std::vec::Vec<::std::string::String>,
|
1570 + | #[allow(missing_docs)] // documentation missing in model
|
1571 + | pub(crate) fn set_range_byte_set_header(
|
1572 + | mut self,
|
1573 + | input: Option<
|
1574 + | impl ::std::convert::Into<
|
1575 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
1576 + | >,
|
1954 1577 | >,
|
1955 - | >,
|
1956 - | }
|
1957 - | impl Builder {
|
1578 + | ) -> Self {
|
1579 + | self.range_byte_set_header = input.map(|v| v.into());
|
1580 + | self
|
1581 + | }
|
1958 1582 | #[allow(missing_docs)] // documentation missing in model
|
1959 - | pub fn map_of_list_of_pattern_string(
|
1583 + | pub(crate) fn set_range_short_set_header(
|
1960 1584 | mut self,
|
1961 - | input: ::std::option::Option<
|
1962 - | ::std::collections::HashMap<
|
1963 - | ::std::string::String,
|
1964 - | ::std::vec::Vec<::std::string::String>,
|
1585 + | input: Option<
|
1586 + | impl ::std::convert::Into<
|
1587 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
1965 1588 | >,
|
1966 1589 | >,
|
1967 1590 | ) -> Self {
|
1968 - | self.map_of_list_of_pattern_string = input;
|
1591 + | self.range_short_set_header = input.map(|v| v.into());
|
1969 1592 | self
|
1970 1593 | }
|
1971 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
1972 - | pub fn build(
|
1973 - | self,
|
1974 - | ) -> crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
1975 - | self.build_enforcing_required_and_enum_traits()
|
1594 + | #[allow(missing_docs)] // documentation missing in model
|
1595 + | pub(crate) fn set_range_integer_set_header(
|
1596 + | mut self,
|
1597 + | input: Option<
|
1598 + | impl ::std::convert::Into<
|
1599 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
1600 + | >,
|
1601 + | >,
|
1602 + | ) -> Self {
|
1603 + | self.range_integer_set_header = input.map(|v| v.into());
|
1604 + | self
|
1976 1605 | }
|
1977 - | fn build_enforcing_required_and_enum_traits(
|
1978 - | self,
|
1979 - | ) -> crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
1980 - | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
1981 - | map_of_list_of_pattern_string: self.map_of_list_of_pattern_string,
|
1982 - | }
|
1606 + | #[allow(missing_docs)] // documentation missing in model
|
1607 + | pub(crate) fn set_range_long_set_header(
|
1608 + | mut self,
|
1609 + | input: Option<
|
1610 + | impl ::std::convert::Into<
|
1611 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
1612 + | >,
|
1613 + | >,
|
1614 + | ) -> Self {
|
1615 + | self.range_long_set_header = input.map(|v| v.into());
|
1616 + | self
|
1983 1617 | }
|
1984 - | }
|
1985 - | }
|
1986 - | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
1987 - | pub(crate) mod query_params_targeting_map_of_pattern_string_operation_input_internal {
|
1988 - |
|
1989 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
1990 - | /// Holds one variant for each of the ways the builder can fail.
|
1991 - | #[non_exhaustive]
|
1992 - | #[allow(clippy::enum_variant_names)]
|
1993 - | pub(crate) enum ConstraintViolation {
|
1994 - | /// Constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`.
|
1995 - | #[doc(hidden)]
|
1996 - | MapOfPatternString(crate::model::map_of_pattern_string_internal::ConstraintViolation),
|
1997 - | }
|
1998 - | impl ::std::fmt::Display for ConstraintViolation {
|
1999 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2000 - | match self {
|
2001 - | ConstraintViolation::MapOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`"),
|
2002 - | }
|
1618 + | #[allow(missing_docs)] // documentation missing in model
|
1619 + | pub(crate) fn set_range_byte_list_header(
|
1620 + | mut self,
|
1621 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
1622 + | ) -> Self {
|
1623 + | self.range_byte_list_header = input.map(|v| v.into());
|
1624 + | self
|
2003 1625 | }
|
2004 - | }
|
2005 - | impl ::std::error::Error for ConstraintViolation {}
|
2006 - | impl ConstraintViolation {
|
2007 - | pub(crate) fn as_validation_exception_field(
|
2008 - | self,
|
2009 - | path: ::std::string::String,
|
2010 - | ) -> crate::model::ValidationExceptionField {
|
2011 - | match self {
|
2012 - | ConstraintViolation::MapOfPatternString(inner) => {
|
2013 - | inner.as_validation_exception_field(path + "/mapOfPatternString")
|
2014 - | }
|
2015 - | }
|
1626 + | #[allow(missing_docs)] // documentation missing in model
|
1627 + | pub(crate) fn set_range_short_list_header(
|
1628 + | mut self,
|
1629 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
1630 + | ) -> Self {
|
1631 + | self.range_short_list_header = input.map(|v| v.into());
|
1632 + | self
|
2016 1633 | }
|
2017 - | }
|
2018 - | impl ::std::convert::From<ConstraintViolation>
|
2019 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2020 - | {
|
2021 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2022 - | let first_validation_exception_field =
|
2023 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2024 - | let validation_exception = crate::error::ValidationException {
|
2025 - | message: format!(
|
2026 - | "1 validation error detected. {}",
|
2027 - | &first_validation_exception_field.message
|
2028 - | ),
|
2029 - | field_list: Some(vec![first_validation_exception_field]),
|
2030 - | };
|
2031 - | Self::ConstraintViolation(
|
2032 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2033 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2034 - | )
|
1634 + | #[allow(missing_docs)] // documentation missing in model
|
1635 + | pub(crate) fn set_range_integer_list_header(
|
1636 + | mut self,
|
1637 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
1638 + | ) -> Self {
|
1639 + | self.range_integer_list_header = input.map(|v| v.into());
|
1640 + | self
|
2035 1641 | }
|
2036 - | }
|
2037 - | impl ::std::convert::From<Builder>
|
2038 - | for crate::constrained::MaybeConstrained<
|
2039 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
2040 - | >
|
2041 - | {
|
2042 - | fn from(builder: Builder) -> Self {
|
2043 - | Self::Unconstrained(builder)
|
1642 + | #[allow(missing_docs)] // documentation missing in model
|
1643 + | pub(crate) fn set_range_long_list_header(
|
1644 + | mut self,
|
1645 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
1646 + | ) -> Self {
|
1647 + | self.range_long_list_header = input.map(|v| v.into());
|
1648 + | self
|
2044 1649 | }
|
2045 - | }
|
2046 - | impl ::std::convert::TryFrom<Builder>
|
2047 - | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
2048 - | {
|
2049 - | type Error = ConstraintViolation;
|
2050 - |
|
2051 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2052 - | builder.build()
|
1650 + | #[allow(missing_docs)] // documentation missing in model
|
1651 + | pub(crate) fn set_length_string_query(
|
1652 + | mut self,
|
1653 + | input: Option<
|
1654 + | impl ::std::convert::Into<
|
1655 + | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
1656 + | >,
|
1657 + | >,
|
1658 + | ) -> Self {
|
1659 + | self.length_string_query = input.map(|v| v.into());
|
1660 + | self
|
2053 1661 | }
|
2054 - | }
|
2055 - | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
2056 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2057 - | pub(crate) struct Builder {
|
2058 - | pub(crate) map_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>,
|
2059 - | }
|
2060 - | impl Builder {
|
2061 1662 | #[allow(missing_docs)] // documentation missing in model
|
2062 - | pub(crate) fn set_map_of_pattern_string(
|
1663 + | pub(crate) fn set_range_byte_query(
|
2063 1664 | mut self,
|
2064 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>>,
|
1665 + | input: impl ::std::convert::Into<
|
1666 + | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
1667 + | >,
|
2065 1668 | ) -> Self {
|
2066 - | self.map_of_pattern_string = input.map(|v| v.into());
|
1669 + | self.range_byte_query = Some(input.into());
|
2067 1670 | self
|
2068 1671 | }
|
2069 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
2070 - | ///
|
2071 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2072 - | ///
|
2073 - | pub fn build(
|
2074 - | self,
|
2075 - | ) -> Result<
|
2076 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
2077 - | ConstraintViolation,
|
2078 - | > {
|
2079 - | self.build_enforcing_all_constraints()
|
2080 - | }
|
2081 - | fn build_enforcing_all_constraints(
|
2082 - | self,
|
2083 - | ) -> Result<
|
2084 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
2085 - | ConstraintViolation,
|
2086 - | > {
|
2087 - | Ok(
|
2088 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
2089 - | map_of_pattern_string: self
|
2090 - | .map_of_pattern_string
|
2091 - | .map(|v| match v {
|
2092 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2093 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2094 - | })
|
2095 - | .map(|res| {
|
2096 - | res.map(|v| v.into())
|
2097 - | .map_err(ConstraintViolation::MapOfPatternString)
|
2098 - | })
|
2099 - | .transpose()?,
|
2100 - | },
|
2101 - | )
|
2102 - | }
|
2103 - | }
|
2104 - | }
|
2105 - | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
2106 - | pub mod query_params_targeting_map_of_pattern_string_operation_input {
|
2107 - |
|
2108 - | impl ::std::convert::From<Builder>
|
2109 - | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
2110 - | {
|
2111 - | fn from(builder: Builder) -> Self {
|
2112 - | builder.build()
|
2113 - | }
|
2114 - | }
|
2115 - | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
2116 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2117 - | pub struct Builder {
|
2118 - | pub(crate) map_of_pattern_string: ::std::option::Option<
|
2119 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2120 - | >,
|
2121 - | }
|
2122 - | impl Builder {
|
2123 1672 | #[allow(missing_docs)] // documentation missing in model
|
2124 - | pub fn map_of_pattern_string(
|
1673 + | pub(crate) fn set_range_short_query(
|
2125 1674 | mut self,
|
2126 - | input: ::std::option::Option<
|
2127 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
1675 + | input: impl ::std::convert::Into<
|
1676 + | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
2128 1677 | >,
|
2129 1678 | ) -> Self {
|
2130 - | self.map_of_pattern_string = input;
|
1679 + | self.range_short_query = Some(input.into());
|
2131 1680 | self
|
2132 1681 | }
|
2133 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
2134 - | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
2135 - | self.build_enforcing_required_and_enum_traits()
|
2136 - | }
|
2137 - | fn build_enforcing_required_and_enum_traits(
|
2138 - | self,
|
2139 - | ) -> crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
2140 - | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
2141 - | map_of_pattern_string: self.map_of_pattern_string,
|
2142 - | }
|
2143 - | }
|
2144 - | }
|
2145 - | }
|
2146 - | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2147 - | pub(crate) mod query_params_targeting_map_of_list_of_enum_string_operation_input_internal {
|
2148 - |
|
2149 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2150 - | /// Holds one variant for each of the ways the builder can fail.
|
2151 - | #[non_exhaustive]
|
2152 - | #[allow(clippy::enum_variant_names)]
|
2153 - | pub(crate) enum ConstraintViolation {
|
2154 - | /// Constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`.
|
2155 - | #[doc(hidden)]
|
2156 - | MapOfListOfEnumString(
|
2157 - | crate::model::map_of_list_of_enum_string_internal::ConstraintViolation,
|
2158 - | ),
|
2159 - | }
|
2160 - | impl ::std::fmt::Display for ConstraintViolation {
|
2161 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2162 - | match self {
|
2163 - | ConstraintViolation::MapOfListOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`"),
|
2164 - | }
|
2165 - | }
|
2166 - | }
|
2167 - | impl ::std::error::Error for ConstraintViolation {}
|
2168 - | impl ConstraintViolation {
|
2169 - | pub(crate) fn as_validation_exception_field(
|
2170 - | self,
|
2171 - | path: ::std::string::String,
|
2172 - | ) -> crate::model::ValidationExceptionField {
|
2173 - | match self {
|
2174 - | ConstraintViolation::MapOfListOfEnumString(inner) => {
|
2175 - | inner.as_validation_exception_field(path + "/mapOfListOfEnumString")
|
2176 - | }
|
2177 - | }
|
2178 - | }
|
2179 - | }
|
2180 - | impl ::std::convert::From<ConstraintViolation>
|
2181 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2182 - | {
|
2183 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2184 - | let first_validation_exception_field =
|
2185 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2186 - | let validation_exception = crate::error::ValidationException {
|
2187 - | message: format!(
|
2188 - | "1 validation error detected. {}",
|
2189 - | &first_validation_exception_field.message
|
2190 - | ),
|
2191 - | field_list: Some(vec![first_validation_exception_field]),
|
2192 - | };
|
2193 - | Self::ConstraintViolation(
|
2194 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2195 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2196 - | )
|
2197 - | }
|
2198 - | }
|
2199 - | impl ::std::convert::From<Builder>
|
2200 - | for crate::constrained::MaybeConstrained<
|
2201 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
2202 - | >
|
2203 - | {
|
2204 - | fn from(builder: Builder) -> Self {
|
2205 - | Self::Unconstrained(builder)
|
2206 - | }
|
2207 - | }
|
2208 - | impl ::std::convert::TryFrom<Builder>
|
2209 - | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
2210 - | {
|
2211 - | type Error = ConstraintViolation;
|
2212 - |
|
2213 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2214 - | builder.build()
|
2215 - | }
|
2216 - | }
|
2217 - | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2218 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2219 - | pub(crate) struct Builder {
|
2220 - | pub(crate) map_of_list_of_enum_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>,
|
2221 - | }
|
2222 - | impl Builder {
|
2223 1682 | #[allow(missing_docs)] // documentation missing in model
|
2224 - | pub(crate) fn set_map_of_list_of_enum_string(
|
1683 + | pub(crate) fn set_range_integer_query(
|
2225 1684 | mut self,
|
2226 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>>,
|
1685 + | input: impl ::std::convert::Into<
|
1686 + | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
1687 + | >,
|
2227 1688 | ) -> Self {
|
2228 - | self.map_of_list_of_enum_string = input.map(|v| v.into());
|
1689 + | self.range_integer_query = Some(input.into());
|
2229 1690 | self
|
2230 1691 | }
|
2231 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2232 - | ///
|
2233 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2234 - | ///
|
2235 - | pub fn build(
|
2236 - | self,
|
2237 - | ) -> Result<
|
2238 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
2239 - | ConstraintViolation,
|
2240 - | > {
|
2241 - | self.build_enforcing_all_constraints()
|
1692 + | #[allow(missing_docs)] // documentation missing in model
|
1693 + | pub(crate) fn set_range_long_query(
|
1694 + | mut self,
|
1695 + | input: impl ::std::convert::Into<
|
1696 + | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
1697 + | >,
|
1698 + | ) -> Self {
|
1699 + | self.range_long_query = Some(input.into());
|
1700 + | self
|
2242 1701 | }
|
2243 - | fn build_enforcing_all_constraints(
|
2244 - | self,
|
2245 - | ) -> Result<
|
2246 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
2247 - | ConstraintViolation,
|
2248 - | > {
|
2249 - | Ok(
|
2250 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
2251 - | map_of_list_of_enum_string: self
|
2252 - | .map_of_list_of_enum_string
|
2253 - | .map(|v| match v {
|
2254 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2255 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2256 - | })
|
2257 - | .map(|res| {
|
2258 - | res.map(|v| v.into())
|
2259 - | .map_err(ConstraintViolation::MapOfListOfEnumString)
|
2260 - | })
|
2261 - | .transpose()?,
|
2262 - | },
|
2263 - | )
|
1702 + | #[allow(missing_docs)] // documentation missing in model
|
1703 + | pub(crate) fn set_enum_string_query(
|
1704 + | mut self,
|
1705 + | input: Option<
|
1706 + | impl ::std::convert::Into<
|
1707 + | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
1708 + | >,
|
1709 + | >,
|
1710 + | ) -> Self {
|
1711 + | self.enum_string_query = input.map(|v| v.into());
|
1712 + | self
|
2264 1713 | }
|
2265 - | }
|
2266 - | }
|
2267 - | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2268 - | pub mod query_params_targeting_map_of_list_of_enum_string_operation_input {
|
2269 - |
|
2270 - | impl ::std::convert::From<Builder>
|
2271 - | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
2272 - | {
|
2273 - | fn from(builder: Builder) -> Self {
|
2274 - | builder.build()
|
1714 + | #[allow(missing_docs)] // documentation missing in model
|
1715 + | pub(crate) fn set_length_string_list_query(
|
1716 + | mut self,
|
1717 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
1718 + | ) -> Self {
|
1719 + | self.length_string_list_query = input.map(|v| v.into());
|
1720 + | self
|
2275 1721 | }
|
2276 - | }
|
2277 - | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2278 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2279 - | pub struct Builder {
|
2280 - | pub(crate) map_of_list_of_enum_string: ::std::option::Option<
|
2281 - | ::std::collections::HashMap<
|
2282 - | crate::model::EnumString,
|
2283 - | ::std::vec::Vec<crate::model::EnumString>,
|
1722 + | #[allow(missing_docs)] // documentation missing in model
|
1723 + | pub(crate) fn set_length_list_pattern_string_query(
|
1724 + | mut self,
|
1725 + | input: Option<
|
1726 + | impl ::std::convert::Into<
|
1727 + | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
1728 + | >,
|
2284 1729 | >,
|
2285 - | >,
|
2286 - | }
|
2287 - | impl Builder {
|
1730 + | ) -> Self {
|
1731 + | self.length_list_pattern_string_query = input.map(|v| v.into());
|
1732 + | self
|
1733 + | }
|
2288 1734 | #[allow(missing_docs)] // documentation missing in model
|
2289 - | pub fn map_of_list_of_enum_string(
|
1735 + | pub(crate) fn set_length_string_set_query(
|
2290 1736 | mut self,
|
2291 - | input: ::std::option::Option<
|
2292 - | ::std::collections::HashMap<
|
2293 - | crate::model::EnumString,
|
2294 - | ::std::vec::Vec<crate::model::EnumString>,
|
1737 + | input: Option<
|
1738 + | impl ::std::convert::Into<
|
1739 + | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
2295 1740 | >,
|
2296 1741 | >,
|
2297 1742 | ) -> Self {
|
2298 - | self.map_of_list_of_enum_string = input;
|
1743 + | self.length_string_set_query = input.map(|v| v.into());
|
2299 1744 | self
|
2300 1745 | }
|
2301 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
2302 - | pub fn build(
|
2303 - | self,
|
2304 - | ) -> crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
2305 - | self.build_enforcing_required_and_enum_traits()
|
2306 - | }
|
2307 - | fn build_enforcing_required_and_enum_traits(
|
2308 - | self,
|
2309 - | ) -> crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
2310 - | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
2311 - | map_of_list_of_enum_string: self.map_of_list_of_enum_string,
|
2312 - | }
|
2313 - | }
|
2314 - | }
|
2315 - | }
|
2316 - | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2317 - | pub(crate) mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input_internal {
|
2318 - |
|
2319 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2320 - | /// Holds one variant for each of the ways the builder can fail.
|
2321 - | #[non_exhaustive]
|
2322 - | #[allow(clippy::enum_variant_names)]
|
2323 - | pub(crate) enum ConstraintViolation {
|
2324 - | /// Constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`.
|
2325 - | #[doc(hidden)]
|
2326 - | MapOfLengthListOfPatternString(
|
2327 - | crate::model::map_of_length_list_of_pattern_string_internal::ConstraintViolation,
|
2328 - | ),
|
2329 - | }
|
2330 - | impl ::std::fmt::Display for ConstraintViolation {
|
2331 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2332 - | match self {
|
2333 - | ConstraintViolation::MapOfLengthListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`"),
|
2334 - | }
|
2335 - | }
|
2336 - | }
|
2337 - | impl ::std::error::Error for ConstraintViolation {}
|
2338 - | impl ConstraintViolation {
|
2339 - | pub(crate) fn as_validation_exception_field(
|
2340 - | self,
|
2341 - | path: ::std::string::String,
|
2342 - | ) -> crate::model::ValidationExceptionField {
|
2343 - | match self {
|
2344 - | ConstraintViolation::MapOfLengthListOfPatternString(inner) => {
|
2345 - | inner.as_validation_exception_field(path + "/mapOfLengthListOfPatternString")
|
2346 - | }
|
2347 - | }
|
2348 - | }
|
2349 - | }
|
2350 - | impl ::std::convert::From<ConstraintViolation>
|
2351 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2352 - | {
|
2353 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2354 - | let first_validation_exception_field =
|
2355 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2356 - | let validation_exception = crate::error::ValidationException {
|
2357 - | message: format!(
|
2358 - | "1 validation error detected. {}",
|
2359 - | &first_validation_exception_field.message
|
2360 - | ),
|
2361 - | field_list: Some(vec![first_validation_exception_field]),
|
2362 - | };
|
2363 - | Self::ConstraintViolation(
|
2364 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2365 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2366 - | )
|
2367 - | }
|
2368 - | }
|
2369 - | impl ::std::convert::From<Builder>
|
2370 - | for crate::constrained::MaybeConstrained<
|
2371 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2372 - | >
|
2373 - | {
|
2374 - | fn from(builder: Builder) -> Self {
|
2375 - | Self::Unconstrained(builder)
|
1746 + | #[allow(missing_docs)] // documentation missing in model
|
1747 + | pub(crate) fn set_range_byte_list_query(
|
1748 + | mut self,
|
1749 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
1750 + | ) -> Self {
|
1751 + | self.range_byte_list_query = input.map(|v| v.into());
|
1752 + | self
|
2376 1753 | }
|
2377 - | }
|
2378 - | impl ::std::convert::TryFrom<Builder>
|
2379 - | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
2380 - | {
|
2381 - | type Error = ConstraintViolation;
|
2382 - |
|
2383 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2384 - | builder.build()
|
1754 + | #[allow(missing_docs)] // documentation missing in model
|
1755 + | pub(crate) fn set_range_short_list_query(
|
1756 + | mut self,
|
1757 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
1758 + | ) -> Self {
|
1759 + | self.range_short_list_query = input.map(|v| v.into());
|
1760 + | self
|
2385 1761 | }
|
2386 - | }
|
2387 - | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2388 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2389 - | pub(crate) struct Builder {
|
2390 - | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>,
|
2391 - | }
|
2392 - | impl Builder {
|
2393 1762 | #[allow(missing_docs)] // documentation missing in model
|
2394 - | pub(crate) fn set_map_of_length_list_of_pattern_string(
|
1763 + | pub(crate) fn set_range_integer_list_query(
|
2395 1764 | mut self,
|
2396 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>>,
|
1765 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
2397 1766 | ) -> Self {
|
2398 - | self.map_of_length_list_of_pattern_string = input.map(|v| v.into());
|
1767 + | self.range_integer_list_query = input.map(|v| v.into());
|
2399 1768 | self
|
2400 1769 | }
|
2401 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2402 - | ///
|
2403 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2404 - | ///
|
2405 - | pub fn build(
|
2406 - | self,
|
2407 - | ) -> Result<
|
2408 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2409 - | ConstraintViolation,
|
2410 - | > {
|
2411 - | self.build_enforcing_all_constraints()
|
1770 + | #[allow(missing_docs)] // documentation missing in model
|
1771 + | pub(crate) fn set_range_long_list_query(
|
1772 + | mut self,
|
1773 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
1774 + | ) -> Self {
|
1775 + | self.range_long_list_query = input.map(|v| v.into());
|
1776 + | self
|
2412 1777 | }
|
2413 - | fn build_enforcing_all_constraints(
|
2414 - | self,
|
2415 - | ) -> Result<
|
2416 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
2417 - | ConstraintViolation,
|
2418 - | > {
|
2419 - | Ok(
|
2420 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
2421 - | map_of_length_list_of_pattern_string: self
|
2422 - | .map_of_length_list_of_pattern_string
|
2423 - | .map(|v| match v {
|
2424 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2425 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2426 - | })
|
2427 - | .map(|res| {
|
2428 - | res.map(|v| v.into())
|
2429 - | .map_err(ConstraintViolation::MapOfLengthListOfPatternString)
|
2430 - | })
|
2431 - | .transpose()?,
|
2432 - | },
|
2433 - | )
|
1778 + | #[allow(missing_docs)] // documentation missing in model
|
1779 + | pub(crate) fn set_range_byte_set_query(
|
1780 + | mut self,
|
1781 + | input: Option<
|
1782 + | impl ::std::convert::Into<
|
1783 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
1784 + | >,
|
1785 + | >,
|
1786 + | ) -> Self {
|
1787 + | self.range_byte_set_query = input.map(|v| v.into());
|
1788 + | self
|
2434 1789 | }
|
2435 - | }
|
2436 - | }
|
2437 - | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2438 - | pub mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input {
|
2439 - |
|
2440 - | impl ::std::convert::From<Builder>
|
2441 - | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
2442 - | {
|
2443 - | fn from(builder: Builder) -> Self {
|
2444 - | builder.build()
|
1790 + | #[allow(missing_docs)] // documentation missing in model
|
1791 + | pub(crate) fn set_range_short_set_query(
|
1792 + | mut self,
|
1793 + | input: Option<
|
1794 + | impl ::std::convert::Into<
|
1795 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
1796 + | >,
|
1797 + | >,
|
1798 + | ) -> Self {
|
1799 + | self.range_short_set_query = input.map(|v| v.into());
|
1800 + | self
|
2445 1801 | }
|
2446 - | }
|
2447 - | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
2448 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2449 - | pub struct Builder {
|
2450 - | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<
|
2451 - | ::std::collections::HashMap<
|
2452 - | ::std::string::String,
|
2453 - | ::std::vec::Vec<::std::string::String>,
|
1802 + | #[allow(missing_docs)] // documentation missing in model
|
1803 + | pub(crate) fn set_range_integer_set_query(
|
1804 + | mut self,
|
1805 + | input: Option<
|
1806 + | impl ::std::convert::Into<
|
1807 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
1808 + | >,
|
2454 1809 | >,
|
2455 - | >,
|
2456 - | }
|
2457 - | impl Builder {
|
1810 + | ) -> Self {
|
1811 + | self.range_integer_set_query = input.map(|v| v.into());
|
1812 + | self
|
1813 + | }
|
2458 1814 | #[allow(missing_docs)] // documentation missing in model
|
2459 - | pub fn map_of_length_list_of_pattern_string(
|
1815 + | pub(crate) fn set_range_long_set_query(
|
2460 1816 | mut self,
|
2461 - | input: ::std::option::Option<
|
2462 - | ::std::collections::HashMap<
|
2463 - | ::std::string::String,
|
2464 - | ::std::vec::Vec<::std::string::String>,
|
1817 + | input: Option<
|
1818 + | impl ::std::convert::Into<
|
1819 + | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
2465 1820 | >,
|
2466 1821 | >,
|
2467 1822 | ) -> Self {
|
2468 - | self.map_of_length_list_of_pattern_string = input;
|
1823 + | self.range_long_set_query = input.map(|v| v.into());
|
2469 1824 | self
|
2470 1825 | }
|
2471 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
1826 + | #[allow(missing_docs)] // documentation missing in model
|
1827 + | pub(crate) fn set_enum_string_list_query(
|
1828 + | mut self,
|
1829 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>>,
|
1830 + | ) -> Self {
|
1831 + | self.enum_string_list_query = input.map(|v| v.into());
|
1832 + | self
|
1833 + | }
|
1834 + | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
1835 + | ///
|
1836 + | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
1837 + | ///
|
1838 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2472 1839 | pub fn build(
|
2473 1840 | self,
|
2474 - | ) -> crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
1841 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
2475 1842 | {
|
2476 - | self.build_enforcing_required_and_enum_traits()
|
1843 + | self.build_enforcing_all_constraints()
|
2477 1844 | }
|
2478 - | fn build_enforcing_required_and_enum_traits(
|
1845 + | fn build_enforcing_all_constraints(
|
2479 1846 | self,
|
2480 - | ) -> crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
2481 - | {
|
2482 - | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
2483 - | map_of_length_list_of_pattern_string: self.map_of_length_list_of_pattern_string,
|
2484 - | }
|
2485 - | }
|
2486 - | }
|
2487 - | }
|
2488 - | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2489 - | pub(crate) mod query_params_targeting_map_of_set_of_length_string_operation_input_internal {
|
2490 - |
|
2491 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2492 - | /// Holds one variant for each of the ways the builder can fail.
|
2493 - | #[non_exhaustive]
|
2494 - | #[allow(clippy::enum_variant_names)]
|
2495 - | pub(crate) enum ConstraintViolation {
|
2496 - | /// Constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`.
|
2497 - | #[doc(hidden)]
|
2498 - | MapOfSetOfLengthString(
|
2499 - | crate::model::map_of_set_of_length_string_internal::ConstraintViolation,
|
2500 - | ),
|
2501 - | }
|
2502 - | impl ::std::fmt::Display for ConstraintViolation {
|
2503 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2504 - | match self {
|
2505 - | ConstraintViolation::MapOfSetOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`"),
|
2506 - | }
|
2507 - | }
|
2508 - | }
|
2509 - | impl ::std::error::Error for ConstraintViolation {}
|
2510 - | impl ConstraintViolation {
|
2511 - | pub(crate) fn as_validation_exception_field(
|
2512 - | self,
|
2513 - | path: ::std::string::String,
|
2514 - | ) -> crate::model::ValidationExceptionField {
|
2515 - | match self {
|
2516 - | ConstraintViolation::MapOfSetOfLengthString(inner) => {
|
2517 - | inner.as_validation_exception_field(path + "/mapOfSetOfLengthString")
|
2518 - | }
|
2519 - | }
|
2520 - | }
|
2521 - | }
|
2522 - | impl ::std::convert::From<ConstraintViolation>
|
2523 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2524 - | {
|
2525 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2526 - | let first_validation_exception_field =
|
2527 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2528 - | let validation_exception = crate::error::ValidationException {
|
2529 - | message: format!(
|
2530 - | "1 validation error detected. {}",
|
2531 - | &first_validation_exception_field.message
|
2532 - | ),
|
2533 - | field_list: Some(vec![first_validation_exception_field]),
|
2534 - | };
|
2535 - | Self::ConstraintViolation(
|
2536 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2537 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2538 - | )
|
2539 - | }
|
2540 - | }
|
2541 - | impl ::std::convert::From<Builder>
|
2542 - | for crate::constrained::MaybeConstrained<
|
2543 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2544 - | >
|
2545 - | {
|
2546 - | fn from(builder: Builder) -> Self {
|
2547 - | Self::Unconstrained(builder)
|
2548 - | }
|
2549 - | }
|
2550 - | impl ::std::convert::TryFrom<Builder>
|
2551 - | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
2552 - | {
|
2553 - | type Error = ConstraintViolation;
|
2554 - |
|
2555 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2556 - | builder.build()
|
2557 - | }
|
2558 - | }
|
2559 - | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2560 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2561 - | pub(crate) struct Builder {
|
2562 - | pub(crate) map_of_set_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>,
|
2563 - | }
|
2564 - | impl Builder {
|
2565 - | #[allow(missing_docs)] // documentation missing in model
|
2566 - | pub(crate) fn set_map_of_set_of_length_string(
|
2567 - | mut self,
|
2568 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>>,
|
2569 - | ) -> Self {
|
2570 - | self.map_of_set_of_length_string = input.map(|v| v.into());
|
2571 - | self
|
2572 - | }
|
2573 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2574 - | ///
|
2575 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2576 - | ///
|
2577 - | pub fn build(
|
2578 - | self,
|
2579 - | ) -> Result<
|
2580 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2581 - | ConstraintViolation,
|
2582 - | > {
|
2583 - | self.build_enforcing_all_constraints()
|
2584 - | }
|
2585 - | fn build_enforcing_all_constraints(
|
2586 - | self,
|
2587 - | ) -> Result<
|
2588 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
2589 - | ConstraintViolation,
|
2590 - | > {
|
2591 - | Ok(
|
2592 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
2593 - | map_of_set_of_length_string: self
|
2594 - | .map_of_set_of_length_string
|
2595 - | .map(|v| match v {
|
2596 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2597 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2598 - | })
|
2599 - | .map(|res| {
|
2600 - | res.map(|v| v.into())
|
2601 - | .map_err(ConstraintViolation::MapOfSetOfLengthString)
|
2602 - | })
|
2603 - | .transpose()?,
|
2604 - | },
|
2605 - | )
|
2606 - | }
|
2607 - | }
|
2608 - | }
|
2609 - | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2610 - | pub mod query_params_targeting_map_of_set_of_length_string_operation_input {
|
2611 - |
|
2612 - | impl ::std::convert::From<Builder>
|
2613 - | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
2614 - | {
|
2615 - | fn from(builder: Builder) -> Self {
|
2616 - | builder.build()
|
2617 - | }
|
2618 - | }
|
2619 - | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2620 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2621 - | pub struct Builder {
|
2622 - | pub(crate) map_of_set_of_length_string: ::std::option::Option<
|
2623 - | ::std::collections::HashMap<
|
2624 - | ::std::string::String,
|
2625 - | ::std::vec::Vec<::std::string::String>,
|
2626 - | >,
|
2627 - | >,
|
2628 - | }
|
2629 - | impl Builder {
|
2630 - | #[allow(missing_docs)] // documentation missing in model
|
2631 - | pub fn map_of_set_of_length_string(
|
2632 - | mut self,
|
2633 - | input: ::std::option::Option<
|
2634 - | ::std::collections::HashMap<
|
2635 - | ::std::string::String,
|
2636 - | ::std::vec::Vec<::std::string::String>,
|
2637 - | >,
|
2638 - | >,
|
2639 - | ) -> Self {
|
2640 - | self.map_of_set_of_length_string = input;
|
2641 - | self
|
2642 - | }
|
2643 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
2644 - | pub fn build(
|
2645 - | self,
|
2646 - | ) -> crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
2647 - | self.build_enforcing_required_and_enum_traits()
|
2648 - | }
|
2649 - | fn build_enforcing_required_and_enum_traits(
|
2650 - | self,
|
2651 - | ) -> crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
2652 - | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
2653 - | map_of_set_of_length_string: self.map_of_set_of_length_string,
|
2654 - | }
|
2655 - | }
|
2656 - | }
|
2657 - | }
|
2658 - | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2659 - | pub(crate) mod query_params_targeting_map_of_list_of_length_string_operation_input_internal {
|
2660 - |
|
2661 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2662 - | /// Holds one variant for each of the ways the builder can fail.
|
2663 - | #[non_exhaustive]
|
2664 - | #[allow(clippy::enum_variant_names)]
|
2665 - | pub(crate) enum ConstraintViolation {
|
2666 - | /// Constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`.
|
2667 - | #[doc(hidden)]
|
2668 - | MapOfListOfLengthString(
|
2669 - | crate::model::map_of_list_of_length_string_internal::ConstraintViolation,
|
2670 - | ),
|
2671 - | }
|
2672 - | impl ::std::fmt::Display for ConstraintViolation {
|
2673 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2674 - | match self {
|
2675 - | ConstraintViolation::MapOfListOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`"),
|
2676 - | }
|
2677 - | }
|
2678 - | }
|
2679 - | impl ::std::error::Error for ConstraintViolation {}
|
2680 - | impl ConstraintViolation {
|
2681 - | pub(crate) fn as_validation_exception_field(
|
2682 - | self,
|
2683 - | path: ::std::string::String,
|
2684 - | ) -> crate::model::ValidationExceptionField {
|
2685 - | match self {
|
2686 - | ConstraintViolation::MapOfListOfLengthString(inner) => {
|
2687 - | inner.as_validation_exception_field(path + "/mapOfListOfLengthString")
|
2688 - | }
|
2689 - | }
|
2690 - | }
|
2691 - | }
|
2692 - | impl ::std::convert::From<ConstraintViolation>
|
2693 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2694 - | {
|
2695 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2696 - | let first_validation_exception_field =
|
2697 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2698 - | let validation_exception = crate::error::ValidationException {
|
2699 - | message: format!(
|
2700 - | "1 validation error detected. {}",
|
2701 - | &first_validation_exception_field.message
|
2702 - | ),
|
2703 - | field_list: Some(vec![first_validation_exception_field]),
|
2704 - | };
|
2705 - | Self::ConstraintViolation(
|
2706 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2707 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2708 - | )
|
2709 - | }
|
2710 - | }
|
2711 - | impl ::std::convert::From<Builder>
|
2712 - | for crate::constrained::MaybeConstrained<
|
2713 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2714 - | >
|
2715 - | {
|
2716 - | fn from(builder: Builder) -> Self {
|
2717 - | Self::Unconstrained(builder)
|
2718 - | }
|
2719 - | }
|
2720 - | impl ::std::convert::TryFrom<Builder>
|
2721 - | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
2722 - | {
|
2723 - | type Error = ConstraintViolation;
|
2724 - |
|
2725 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2726 - | builder.build()
|
2727 - | }
|
2728 - | }
|
2729 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2730 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2731 - | pub(crate) struct Builder {
|
2732 - | pub(crate) map_of_list_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>,
|
2733 - | }
|
2734 - | impl Builder {
|
2735 - | #[allow(missing_docs)] // documentation missing in model
|
2736 - | pub(crate) fn set_map_of_list_of_length_string(
|
2737 - | mut self,
|
2738 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>>,
|
2739 - | ) -> Self {
|
2740 - | self.map_of_list_of_length_string = input.map(|v| v.into());
|
2741 - | self
|
2742 - | }
|
2743 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2744 - | ///
|
2745 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2746 - | ///
|
2747 - | pub fn build(
|
2748 - | self,
|
2749 - | ) -> Result<
|
2750 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2751 - | ConstraintViolation,
|
2752 - | > {
|
2753 - | self.build_enforcing_all_constraints()
|
2754 - | }
|
2755 - | fn build_enforcing_all_constraints(
|
2756 - | self,
|
2757 - | ) -> Result<
|
2758 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
2759 - | ConstraintViolation,
|
2760 - | > {
|
2761 - | Ok(
|
2762 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
2763 - | map_of_list_of_length_string: self
|
2764 - | .map_of_list_of_length_string
|
2765 - | .map(|v| match v {
|
2766 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2767 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2768 - | })
|
2769 - | .map(|res| {
|
2770 - | res.map(|v| v.into())
|
2771 - | .map_err(ConstraintViolation::MapOfListOfLengthString)
|
2772 - | })
|
2773 - | .transpose()?,
|
2774 - | },
|
2775 - | )
|
2776 - | }
|
2777 - | }
|
2778 - | }
|
2779 - | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2780 - | pub mod query_params_targeting_map_of_list_of_length_string_operation_input {
|
2781 - |
|
2782 - | impl ::std::convert::From<Builder>
|
2783 - | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
2784 - | {
|
2785 - | fn from(builder: Builder) -> Self {
|
2786 - | builder.build()
|
2787 - | }
|
2788 - | }
|
2789 - | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2790 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2791 - | pub struct Builder {
|
2792 - | pub(crate) map_of_list_of_length_string: ::std::option::Option<
|
2793 - | ::std::collections::HashMap<
|
2794 - | ::std::string::String,
|
2795 - | ::std::vec::Vec<::std::string::String>,
|
2796 - | >,
|
2797 - | >,
|
2798 - | }
|
2799 - | impl Builder {
|
2800 - | #[allow(missing_docs)] // documentation missing in model
|
2801 - | pub fn map_of_list_of_length_string(
|
2802 - | mut self,
|
2803 - | input: ::std::option::Option<
|
2804 - | ::std::collections::HashMap<
|
2805 - | ::std::string::String,
|
2806 - | ::std::vec::Vec<::std::string::String>,
|
2807 - | >,
|
2808 - | >,
|
2809 - | ) -> Self {
|
2810 - | self.map_of_list_of_length_string = input;
|
2811 - | self
|
2812 - | }
|
2813 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
2814 - | pub fn build(
|
2815 - | self,
|
2816 - | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
2817 - | self.build_enforcing_required_and_enum_traits()
|
2818 - | }
|
2819 - | fn build_enforcing_required_and_enum_traits(
|
2820 - | self,
|
2821 - | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
2822 - | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
2823 - | map_of_list_of_length_string: self.map_of_list_of_length_string,
|
2824 - | }
|
2825 - | }
|
2826 - | }
|
2827 - | }
|
2828 - | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2829 - | pub(crate) mod query_params_targeting_map_of_length_string_operation_input_internal {
|
2830 - |
|
2831 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2832 - | /// Holds one variant for each of the ways the builder can fail.
|
2833 - | #[non_exhaustive]
|
2834 - | #[allow(clippy::enum_variant_names)]
|
2835 - | pub(crate) enum ConstraintViolation {
|
2836 - | /// Constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`.
|
2837 - | #[doc(hidden)]
|
2838 - | MapOfLengthString(crate::model::map_of_length_string_internal::ConstraintViolation),
|
2839 - | }
|
2840 - | impl ::std::fmt::Display for ConstraintViolation {
|
2841 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2842 - | match self {
|
2843 - | ConstraintViolation::MapOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`"),
|
2844 - | }
|
2845 - | }
|
2846 - | }
|
2847 - | impl ::std::error::Error for ConstraintViolation {}
|
2848 - | impl ConstraintViolation {
|
2849 - | pub(crate) fn as_validation_exception_field(
|
2850 - | self,
|
2851 - | path: ::std::string::String,
|
2852 - | ) -> crate::model::ValidationExceptionField {
|
2853 - | match self {
|
2854 - | ConstraintViolation::MapOfLengthString(inner) => {
|
2855 - | inner.as_validation_exception_field(path + "/mapOfLengthString")
|
2856 - | }
|
2857 - | }
|
2858 - | }
|
2859 - | }
|
2860 - | impl ::std::convert::From<ConstraintViolation>
|
2861 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2862 - | {
|
2863 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2864 - | let first_validation_exception_field =
|
2865 - | constraint_violation.as_validation_exception_field("".to_owned());
|
2866 - | let validation_exception = crate::error::ValidationException {
|
2867 - | message: format!(
|
2868 - | "1 validation error detected. {}",
|
2869 - | &first_validation_exception_field.message
|
2870 - | ),
|
2871 - | field_list: Some(vec![first_validation_exception_field]),
|
2872 - | };
|
2873 - | Self::ConstraintViolation(
|
2874 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2875 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2876 - | )
|
2877 - | }
|
2878 - | }
|
2879 - | impl ::std::convert::From<Builder>
|
2880 - | for crate::constrained::MaybeConstrained<
|
2881 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2882 - | >
|
2883 - | {
|
2884 - | fn from(builder: Builder) -> Self {
|
2885 - | Self::Unconstrained(builder)
|
2886 - | }
|
2887 - | }
|
2888 - | impl ::std::convert::TryFrom<Builder>
|
2889 - | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
2890 - | {
|
2891 - | type Error = ConstraintViolation;
|
2892 - |
|
2893 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2894 - | builder.build()
|
2895 - | }
|
2896 - | }
|
2897 - | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2898 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2899 - | pub(crate) struct Builder {
|
2900 - | pub(crate) map_of_length_string: ::std::option::Option<
|
2901 - | crate::constrained::MaybeConstrained<
|
2902 - | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
2903 - | >,
|
2904 - | >,
|
2905 - | }
|
2906 - | impl Builder {
|
2907 - | #[allow(missing_docs)] // documentation missing in model
|
2908 - | pub(crate) fn set_map_of_length_string(
|
2909 - | mut self,
|
2910 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>>,
|
2911 - | ) -> Self {
|
2912 - | self.map_of_length_string = input.map(|v| v.into());
|
2913 - | self
|
2914 - | }
|
2915 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2916 - | ///
|
2917 - | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
2918 - | ///
|
2919 - | pub fn build(
|
2920 - | self,
|
2921 - | ) -> Result<
|
2922 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2923 - | ConstraintViolation,
|
2924 - | > {
|
2925 - | self.build_enforcing_all_constraints()
|
2926 - | }
|
2927 - | fn build_enforcing_all_constraints(
|
2928 - | self,
|
2929 - | ) -> Result<
|
2930 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
2931 - | ConstraintViolation,
|
2932 - | > {
|
2933 - | Ok(
|
2934 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
2935 - | map_of_length_string: self
|
2936 - | .map_of_length_string
|
2937 - | .map(|v| match v {
|
2938 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2939 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2940 - | })
|
2941 - | .map(|res| {
|
2942 - | res.map(|v| v.into())
|
2943 - | .map_err(ConstraintViolation::MapOfLengthString)
|
2944 - | })
|
2945 - | .transpose()?,
|
2946 - | },
|
2947 - | )
|
2948 - | }
|
2949 - | }
|
2950 - | }
|
2951 - | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2952 - | pub mod query_params_targeting_map_of_length_string_operation_input {
|
2953 - |
|
2954 - | impl ::std::convert::From<Builder>
|
2955 - | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
2956 - | {
|
2957 - | fn from(builder: Builder) -> Self {
|
2958 - | builder.build()
|
2959 - | }
|
2960 - | }
|
2961 - | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2962 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2963 - | pub struct Builder {
|
2964 - | pub(crate) map_of_length_string: ::std::option::Option<
|
2965 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2966 - | >,
|
2967 - | }
|
2968 - | impl Builder {
|
2969 - | #[allow(missing_docs)] // documentation missing in model
|
2970 - | pub fn map_of_length_string(
|
2971 - | mut self,
|
2972 - | input: ::std::option::Option<
|
2973 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2974 - | >,
|
2975 - | ) -> Self {
|
2976 - | self.map_of_length_string = input;
|
2977 - | self
|
2978 - | }
|
2979 - | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
2980 - | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
2981 - | self.build_enforcing_required_and_enum_traits()
|
2982 - | }
|
2983 - | fn build_enforcing_required_and_enum_traits(
|
2984 - | self,
|
2985 - | ) -> crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
2986 - | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
2987 - | map_of_length_string: self.map_of_length_string,
|
2988 - | }
|
2989 - | }
|
2990 - | }
|
2991 - | }
|
2992 - | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
2993 - | pub(crate) mod query_params_targeting_length_map_operation_input_internal {
|
2994 - |
|
2995 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2996 - | /// Holds one variant for each of the ways the builder can fail.
|
2997 - | #[non_exhaustive]
|
2998 - | #[allow(clippy::enum_variant_names)]
|
2999 - | pub(crate) enum ConstraintViolation {
|
3000 - | /// Constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`.
|
3001 - | #[doc(hidden)]
|
3002 - | LengthMap(crate::model::con_b_map_internal::ConstraintViolation),
|
3003 - | }
|
3004 - | impl ::std::fmt::Display for ConstraintViolation {
|
3005 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3006 - | match self {
|
3007 - | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`"),
|
3008 - | }
|
3009 - | }
|
3010 - | }
|
3011 - | impl ::std::error::Error for ConstraintViolation {}
|
3012 - | impl ConstraintViolation {
|
3013 - | pub(crate) fn as_validation_exception_field(
|
3014 - | self,
|
3015 - | path: ::std::string::String,
|
3016 - | ) -> crate::model::ValidationExceptionField {
|
3017 - | match self {
|
3018 - | ConstraintViolation::LengthMap(inner) => {
|
3019 - | inner.as_validation_exception_field(path + "/lengthMap")
|
3020 - | }
|
3021 - | }
|
3022 - | }
|
3023 - | }
|
3024 - | impl ::std::convert::From<ConstraintViolation>
|
3025 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3026 - | {
|
3027 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3028 - | let first_validation_exception_field =
|
3029 - | constraint_violation.as_validation_exception_field("".to_owned());
|
3030 - | let validation_exception = crate::error::ValidationException {
|
3031 - | message: format!(
|
3032 - | "1 validation error detected. {}",
|
3033 - | &first_validation_exception_field.message
|
3034 - | ),
|
3035 - | field_list: Some(vec![first_validation_exception_field]),
|
3036 - | };
|
3037 - | Self::ConstraintViolation(
|
3038 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3039 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3040 - | )
|
3041 - | }
|
3042 - | }
|
3043 - | impl ::std::convert::From<Builder>
|
3044 - | for crate::constrained::MaybeConstrained<
|
3045 - | crate::input::QueryParamsTargetingLengthMapOperationInput,
|
3046 - | >
|
3047 - | {
|
3048 - | fn from(builder: Builder) -> Self {
|
3049 - | Self::Unconstrained(builder)
|
3050 - | }
|
3051 - | }
|
3052 - | impl ::std::convert::TryFrom<Builder>
|
3053 - | for crate::input::QueryParamsTargetingLengthMapOperationInput
|
3054 - | {
|
3055 - | type Error = ConstraintViolation;
|
3056 - |
|
3057 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3058 - | builder.build()
|
3059 - | }
|
3060 - | }
|
3061 - | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3062 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3063 - | pub(crate) struct Builder {
|
3064 - | pub(crate) length_map:
|
3065 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
3066 - | }
|
3067 - | impl Builder {
|
3068 - | #[allow(missing_docs)] // documentation missing in model
|
3069 - | pub(crate) fn set_length_map(
|
3070 - | mut self,
|
3071 - | input: Option<
|
3072 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
3073 - | >,
|
3074 - | ) -> Self {
|
3075 - | self.length_map = input.map(|v| v.into());
|
3076 - | self
|
3077 - | }
|
3078 - | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3079 - | ///
|
3080 - | /// The builder fails to construct a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
3081 - | ///
|
3082 - | pub fn build(
|
3083 - | self,
|
3084 - | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
3085 - | {
|
3086 - | self.build_enforcing_all_constraints()
|
3087 - | }
|
3088 - | fn build_enforcing_all_constraints(
|
3089 - | self,
|
3090 - | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
3091 - | {
|
3092 - | Ok(crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3093 - | length_map: self
|
3094 - | .length_map
|
3095 - | .map(|v| match v {
|
3096 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3097 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3098 - | })
|
3099 - | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
3100 - | .transpose()?
|
3101 - | .map(|v: crate::model::ConBMap| v.into()),
|
3102 - | })
|
3103 - | }
|
3104 - | }
|
3105 - | }
|
3106 - | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3107 - | pub mod query_params_targeting_length_map_operation_input {
|
3108 - |
|
3109 - | impl ::std::convert::From<Builder> for crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3110 - | fn from(builder: Builder) -> Self {
|
3111 - | builder.build()
|
3112 - | }
|
3113 - | }
|
3114 - | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3115 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3116 - | pub struct Builder {
|
3117 - | pub(crate) length_map: ::std::option::Option<
|
3118 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3119 - | >,
|
3120 - | }
|
3121 - | impl Builder {
|
3122 - | #[allow(missing_docs)] // documentation missing in model
|
3123 - | pub fn length_map(
|
3124 - | mut self,
|
3125 - | input: ::std::option::Option<
|
3126 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3127 - | >,
|
3128 - | ) -> Self {
|
3129 - | self.length_map = input;
|
3130 - | self
|
3131 - | }
|
3132 - | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3133 - | pub fn build(self) -> crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3134 - | self.build_enforcing_required_and_enum_traits()
|
3135 - | }
|
3136 - | fn build_enforcing_required_and_enum_traits(
|
3137 - | self,
|
3138 - | ) -> crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3139 - | crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3140 - | length_map: self.length_map,
|
3141 - | }
|
3142 - | }
|
3143 - | }
|
3144 - | }
|
3145 - | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3146 - | pub(crate) mod constrained_recursive_shapes_operation_input_internal {
|
3147 - |
|
3148 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3149 - | /// Holds one variant for each of the ways the builder can fail.
|
3150 - | #[non_exhaustive]
|
3151 - | #[allow(clippy::enum_variant_names)]
|
3152 - | pub(crate) enum ConstraintViolation {
|
3153 - | /// Constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`.
|
3154 - | #[doc(hidden)]
|
3155 - | Nested(crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation),
|
3156 - | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
3157 - | MissingRecursiveList,
|
3158 - | /// Constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`.
|
3159 - | #[doc(hidden)]
|
3160 - | RecursiveList(crate::model::recursive_list_internal::ConstraintViolation),
|
3161 - | }
|
3162 - | impl ::std::fmt::Display for ConstraintViolation {
|
3163 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3164 - | match self {
|
3165 - | ConstraintViolation::Nested(_) => write!(f, "constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`"),
|
3166 - | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
3167 - | ConstraintViolation::RecursiveList(_) => write!(f, "constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`"),
|
3168 - | }
|
3169 - | }
|
3170 - | }
|
3171 - | impl ::std::error::Error for ConstraintViolation {}
|
3172 - | impl ConstraintViolation {
|
3173 - | pub(crate) fn as_validation_exception_field(
|
3174 - | self,
|
3175 - | path: ::std::string::String,
|
3176 - | ) -> crate::model::ValidationExceptionField {
|
3177 - | match self {
|
3178 - | ConstraintViolation::Nested(inner) => inner.as_validation_exception_field(path + "/nested"),
|
3179 - | ConstraintViolation::MissingRecursiveList => crate::model::ValidationExceptionField {
|
3180 - | message: format!("Value at '{}/recursiveList' failed to satisfy constraint: Member must not be null", path),
|
3181 - | path: path + "/recursiveList",
|
3182 - | },
|
3183 - | ConstraintViolation::RecursiveList(inner) => inner.as_validation_exception_field(path + "/recursiveList"),
|
3184 - | }
|
3185 - | }
|
3186 - | }
|
3187 - | impl ::std::convert::From<ConstraintViolation>
|
3188 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3189 - | {
|
3190 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3191 - | let first_validation_exception_field =
|
3192 - | constraint_violation.as_validation_exception_field("".to_owned());
|
3193 - | let validation_exception = crate::error::ValidationException {
|
3194 - | message: format!(
|
3195 - | "1 validation error detected. {}",
|
3196 - | &first_validation_exception_field.message
|
3197 - | ),
|
3198 - | field_list: Some(vec![first_validation_exception_field]),
|
3199 - | };
|
3200 - | Self::ConstraintViolation(
|
3201 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3202 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3203 - | )
|
3204 - | }
|
3205 - | }
|
3206 - | impl ::std::convert::From<Builder>
|
3207 - | for crate::constrained::MaybeConstrained<
|
3208 - | crate::input::ConstrainedRecursiveShapesOperationInput,
|
3209 - | >
|
3210 - | {
|
3211 - | fn from(builder: Builder) -> Self {
|
3212 - | Self::Unconstrained(builder)
|
3213 - | }
|
3214 - | }
|
3215 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
3216 - | type Error = ConstraintViolation;
|
3217 - |
|
3218 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3219 - | builder.build()
|
3220 - | }
|
3221 - | }
|
3222 - | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3223 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3224 - | pub(crate) struct Builder {
|
3225 - | pub(crate) nested: ::std::option::Option<
|
3226 - | crate::constrained::MaybeConstrained<crate::model::RecursiveShapesInputOutputNested1>,
|
3227 - | >,
|
3228 - | pub(crate) recursive_list: ::std::option::Option<
|
3229 - | crate::constrained::MaybeConstrained<
|
3230 - | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
3231 - | >,
|
3232 - | >,
|
3233 - | }
|
3234 - | impl Builder {
|
3235 - | #[allow(missing_docs)] // documentation missing in model
|
3236 - | pub(crate) fn set_nested(
|
3237 - | mut self,
|
3238 - | input: Option<
|
3239 - | impl ::std::convert::Into<
|
3240 - | crate::constrained::MaybeConstrained<
|
3241 - | crate::model::RecursiveShapesInputOutputNested1,
|
3242 - | >,
|
3243 - | >,
|
3244 - | >,
|
3245 - | ) -> Self {
|
3246 - | self.nested = input.map(|v| v.into());
|
3247 - | self
|
3248 - | }
|
3249 - | #[allow(missing_docs)] // documentation missing in model
|
3250 - | pub(crate) fn set_recursive_list(
|
3251 - | mut self,
|
3252 - | input: impl ::std::convert::Into<
|
3253 - | crate::constrained::MaybeConstrained<
|
3254 - | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
3255 - | >,
|
3256 - | >,
|
3257 - | ) -> Self {
|
3258 - | self.recursive_list = Some(input.into());
|
3259 - | self
|
3260 - | }
|
3261 - | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3262 - | ///
|
3263 - | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
3264 - | ///
|
3265 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
3266 - | pub fn build(
|
3267 - | self,
|
3268 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3269 - | {
|
3270 - | self.build_enforcing_all_constraints()
|
3271 - | }
|
3272 - | fn build_enforcing_all_constraints(
|
3273 - | self,
|
3274 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3275 - | {
|
3276 - | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
3277 - | nested: self
|
3278 - | .nested
|
3279 - | .map(|v| match v {
|
3280 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3281 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3282 - | })
|
3283 - | .map(|res| res.map_err(ConstraintViolation::Nested))
|
3284 - | .transpose()?,
|
3285 - | recursive_list: self
|
3286 - | .recursive_list
|
3287 - | .map(|v| match v {
|
3288 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3289 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3290 - | })
|
3291 - | .map(|res| {
|
3292 - | res.map(|v| v.into())
|
3293 - | .map_err(ConstraintViolation::RecursiveList)
|
3294 - | })
|
3295 - | .transpose()?
|
3296 - | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
3297 - | })
|
3298 - | }
|
3299 - | }
|
3300 - | }
|
3301 - | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3302 - | pub mod constrained_recursive_shapes_operation_input {
|
3303 - |
|
3304 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3305 - | /// Holds one variant for each of the ways the builder can fail.
|
3306 - | #[allow(clippy::enum_variant_names)]
|
3307 - | pub enum ConstraintViolation {
|
3308 - | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
3309 - | MissingRecursiveList,
|
3310 - | }
|
3311 - | impl ::std::fmt::Display for ConstraintViolation {
|
3312 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3313 - | match self {
|
3314 - | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
3315 - | }
|
3316 - | }
|
3317 - | }
|
3318 - | impl ::std::error::Error for ConstraintViolation {}
|
3319 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
3320 - | type Error = ConstraintViolation;
|
3321 - |
|
3322 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3323 - | builder.build()
|
3324 - | }
|
3325 - | }
|
3326 - | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3327 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3328 - | pub struct Builder {
|
3329 - | pub(crate) nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3330 - | pub(crate) recursive_list:
|
3331 - | ::std::option::Option<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>>,
|
3332 - | }
|
3333 - | impl Builder {
|
3334 - | #[allow(missing_docs)] // documentation missing in model
|
3335 - | pub fn nested(
|
3336 - | mut self,
|
3337 - | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3338 - | ) -> Self {
|
3339 - | self.nested = input;
|
3340 - | self
|
3341 - | }
|
3342 - | #[allow(missing_docs)] // documentation missing in model
|
3343 - | pub fn recursive_list(
|
3344 - | mut self,
|
3345 - | input: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
3346 - | ) -> Self {
|
3347 - | self.recursive_list = Some(input);
|
3348 - | self
|
3349 - | }
|
3350 - | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3351 - | ///
|
3352 - | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
3353 - | ///
|
3354 - | pub fn build(
|
3355 - | self,
|
3356 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3357 - | {
|
3358 - | self.build_enforcing_required_and_enum_traits()
|
3359 - | }
|
3360 - | fn build_enforcing_required_and_enum_traits(
|
3361 - | self,
|
3362 - | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3363 - | {
|
3364 - | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
3365 - | nested: self.nested,
|
3366 - | recursive_list: self
|
3367 - | .recursive_list
|
3368 - | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
3369 - | })
|
3370 - | }
|
3371 - | }
|
3372 - | }
|
3373 - | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3374 - | pub(crate) mod constrained_http_payload_bound_shape_operation_input_internal {
|
3375 - |
|
3376 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3377 - | /// Holds one variant for each of the ways the builder can fail.
|
3378 - | #[non_exhaustive]
|
3379 - | #[allow(clippy::enum_variant_names)]
|
3380 - | pub(crate) enum ConstraintViolation {
|
3381 - | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
3382 - | MissingHttpPayloadBoundConstrainedShape,
|
3383 - | /// Constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
3384 - | #[doc(hidden)]
|
3385 - | HttpPayloadBoundConstrainedShape(crate::model::con_a_internal::ConstraintViolation),
|
3386 - | }
|
3387 - | impl ::std::fmt::Display for ConstraintViolation {
|
3388 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3389 - | match self {
|
3390 - | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
3391 - | ConstraintViolation::HttpPayloadBoundConstrainedShape(_) => write!(f, "constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
3392 - | }
|
3393 - | }
|
3394 - | }
|
3395 - | impl ::std::error::Error for ConstraintViolation {}
|
3396 - | impl ConstraintViolation {
|
3397 - | pub(crate) fn as_validation_exception_field(
|
3398 - | self,
|
3399 - | path: ::std::string::String,
|
3400 - | ) -> crate::model::ValidationExceptionField {
|
3401 - | match self {
|
3402 - | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => crate::model::ValidationExceptionField {
|
3403 - | message: format!("Value at '{}/httpPayloadBoundConstrainedShape' failed to satisfy constraint: Member must not be null", path),
|
3404 - | path: path + "/httpPayloadBoundConstrainedShape",
|
3405 - | },
|
3406 - | ConstraintViolation::HttpPayloadBoundConstrainedShape(inner) => inner.as_validation_exception_field(path + "/httpPayloadBoundConstrainedShape"),
|
3407 - | }
|
3408 - | }
|
3409 - | }
|
3410 - | impl ::std::convert::From<ConstraintViolation>
|
3411 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3412 - | {
|
3413 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3414 - | let first_validation_exception_field =
|
3415 - | constraint_violation.as_validation_exception_field("".to_owned());
|
3416 - | let validation_exception = crate::error::ValidationException {
|
3417 - | message: format!(
|
3418 - | "1 validation error detected. {}",
|
3419 - | &first_validation_exception_field.message
|
3420 - | ),
|
3421 - | field_list: Some(vec![first_validation_exception_field]),
|
3422 - | };
|
3423 - | Self::ConstraintViolation(
|
3424 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3425 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3426 - | )
|
3427 - | }
|
3428 - | }
|
3429 - | impl ::std::convert::From<Builder>
|
3430 - | for crate::constrained::MaybeConstrained<
|
3431 - | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput,
|
3432 - | >
|
3433 - | {
|
3434 - | fn from(builder: Builder) -> Self {
|
3435 - | Self::Unconstrained(builder)
|
3436 - | }
|
3437 - | }
|
3438 - | impl ::std::convert::TryFrom<Builder>
|
3439 - | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
3440 - | {
|
3441 - | type Error = ConstraintViolation;
|
3442 - |
|
3443 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3444 - | builder.build()
|
3445 - | }
|
3446 - | }
|
3447 - | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3448 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3449 - | pub(crate) struct Builder {
|
3450 - | pub(crate) http_payload_bound_constrained_shape:
|
3451 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
3452 - | }
|
3453 - | impl Builder {
|
3454 - | #[allow(missing_docs)] // documentation missing in model
|
3455 - | pub(crate) fn set_http_payload_bound_constrained_shape(
|
3456 - | mut self,
|
3457 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
3458 - | ) -> Self {
|
3459 - | self.http_payload_bound_constrained_shape = Some(input.into());
|
3460 - | self
|
3461 - | }
|
3462 - | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3463 - | ///
|
3464 - | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
3465 - | ///
|
3466 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
3467 - | pub fn build(
|
3468 - | self,
|
3469 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
3470 - | {
|
3471 - | self.build_enforcing_all_constraints()
|
3472 - | }
|
3473 - | fn build_enforcing_all_constraints(
|
3474 - | self,
|
3475 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
3476 - | {
|
3477 - | Ok(
|
3478 - | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
3479 - | http_payload_bound_constrained_shape: self
|
3480 - | .http_payload_bound_constrained_shape
|
3481 - | .map(|v| match v {
|
3482 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3483 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3484 - | })
|
3485 - | .map(|res| {
|
3486 - | res.map_err(ConstraintViolation::HttpPayloadBoundConstrainedShape)
|
3487 - | })
|
3488 - | .transpose()?
|
3489 - | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
3490 - | },
|
3491 - | )
|
3492 - | }
|
3493 - | }
|
3494 - | }
|
3495 - | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3496 - | pub mod constrained_http_payload_bound_shape_operation_input {
|
3497 - |
|
3498 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3499 - | /// Holds one variant for each of the ways the builder can fail.
|
3500 - | #[allow(clippy::enum_variant_names)]
|
3501 - | pub enum ConstraintViolation {
|
3502 - | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
3503 - | MissingHttpPayloadBoundConstrainedShape,
|
3504 - | }
|
3505 - | impl ::std::fmt::Display for ConstraintViolation {
|
3506 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3507 - | match self {
|
3508 - | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
3509 - | }
|
3510 - | }
|
3511 - | }
|
3512 - | impl ::std::error::Error for ConstraintViolation {}
|
3513 - | impl ::std::convert::TryFrom<Builder>
|
3514 - | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
3515 - | {
|
3516 - | type Error = ConstraintViolation;
|
3517 - |
|
3518 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3519 - | builder.build()
|
3520 - | }
|
3521 - | }
|
3522 - | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3523 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3524 - | pub struct Builder {
|
3525 - | pub(crate) http_payload_bound_constrained_shape: ::std::option::Option<crate::model::ConA>,
|
3526 - | }
|
3527 - | impl Builder {
|
3528 - | #[allow(missing_docs)] // documentation missing in model
|
3529 - | pub fn http_payload_bound_constrained_shape(mut self, input: crate::model::ConA) -> Self {
|
3530 - | self.http_payload_bound_constrained_shape = Some(input);
|
3531 - | self
|
3532 - | }
|
3533 - | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
3534 - | ///
|
3535 - | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if you do not provide a value for all non-`Option`al members.
|
3536 - | ///
|
3537 - | pub fn build(
|
3538 - | self,
|
3539 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
3540 - | {
|
3541 - | self.build_enforcing_required_and_enum_traits()
|
3542 - | }
|
3543 - | fn build_enforcing_required_and_enum_traits(
|
3544 - | self,
|
3545 - | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
3546 - | {
|
3547 - | Ok(
|
3548 - | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
3549 - | http_payload_bound_constrained_shape: self
|
3550 - | .http_payload_bound_constrained_shape
|
3551 - | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
3552 - | },
|
3553 - | )
|
3554 - | }
|
3555 - | }
|
3556 - | }
|
3557 - | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
3558 - | pub(crate) mod constrained_http_bound_shapes_operation_input_internal {
|
3559 - |
|
3560 - | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3561 - | /// Holds one variant for each of the ways the builder can fail.
|
3562 - | #[non_exhaustive]
|
3563 - | #[allow(clippy::enum_variant_names)]
|
3564 - | pub(crate) enum ConstraintViolation {
|
3565 - | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
3566 - | MissingLengthStringLabel,
|
3567 - | /// Constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3568 - | #[doc(hidden)]
|
3569 - | LengthStringLabel(crate::model::length_string_internal::ConstraintViolation),
|
3570 - | /// Constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3571 - | #[doc(hidden)]
|
3572 - | RangeIntegerLabel(crate::model::range_integer_internal::ConstraintViolation),
|
3573 - | /// Constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3574 - | #[doc(hidden)]
|
3575 - | RangeShortLabel(crate::model::range_short_internal::ConstraintViolation),
|
3576 - | /// Constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3577 - | #[doc(hidden)]
|
3578 - | RangeLongLabel(crate::model::range_long_internal::ConstraintViolation),
|
3579 - | /// Constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3580 - | #[doc(hidden)]
|
3581 - | RangeByteLabel(crate::model::range_byte_internal::ConstraintViolation),
|
3582 - | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
3583 - | MissingEnumStringLabel,
|
3584 - | /// Constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3585 - | #[doc(hidden)]
|
3586 - | EnumStringLabel(crate::model::enum_string_internal::ConstraintViolation),
|
3587 - | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
3588 - | MissingLengthStringHeaderMap,
|
3589 - | /// Constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3590 - | #[doc(hidden)]
|
3591 - | LengthStringHeaderMap(crate::model::map_of_length_string_internal::ConstraintViolation),
|
3592 - | /// Constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3593 - | #[doc(hidden)]
|
3594 - | LengthStringHeader(crate::model::length_string_internal::ConstraintViolation),
|
3595 - | /// Constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3596 - | #[doc(hidden)]
|
3597 - | RangeIntegerHeader(crate::model::range_integer_internal::ConstraintViolation),
|
3598 - | /// Constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3599 - | #[doc(hidden)]
|
3600 - | RangeShortHeader(crate::model::range_short_internal::ConstraintViolation),
|
3601 - | /// Constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3602 - | #[doc(hidden)]
|
3603 - | RangeLongHeader(crate::model::range_long_internal::ConstraintViolation),
|
3604 - | /// Constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3605 - | #[doc(hidden)]
|
3606 - | RangeByteHeader(crate::model::range_byte_internal::ConstraintViolation),
|
3607 - | /// Constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3608 - | #[doc(hidden)]
|
3609 - | LengthStringSetHeader(crate::model::set_of_length_string_internal::ConstraintViolation),
|
3610 - | /// Constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3611 - | #[doc(hidden)]
|
3612 - | ListLengthStringHeader(crate::model::list_of_length_string_internal::ConstraintViolation),
|
3613 - | /// Constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3614 - | #[doc(hidden)]
|
3615 - | LengthListPatternStringHeader(
|
3616 - | crate::model::length_list_of_pattern_string_internal::ConstraintViolation,
|
3617 - | ),
|
3618 - | /// Constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3619 - | #[doc(hidden)]
|
3620 - | LengthSetPatternStringHeader(
|
3621 - | crate::model::length_set_of_pattern_string_internal::ConstraintViolation,
|
3622 - | ),
|
3623 - | /// Constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3624 - | #[doc(hidden)]
|
3625 - | RangeByteSetHeader(crate::model::set_of_range_byte_internal::ConstraintViolation),
|
3626 - | /// Constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3627 - | #[doc(hidden)]
|
3628 - | RangeShortSetHeader(crate::model::set_of_range_short_internal::ConstraintViolation),
|
3629 - | /// Constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3630 - | #[doc(hidden)]
|
3631 - | RangeIntegerSetHeader(crate::model::set_of_range_integer_internal::ConstraintViolation),
|
3632 - | /// Constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3633 - | #[doc(hidden)]
|
3634 - | RangeLongSetHeader(crate::model::set_of_range_long_internal::ConstraintViolation),
|
3635 - | /// Constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3636 - | #[doc(hidden)]
|
3637 - | RangeByteListHeader(crate::model::list_of_range_byte_internal::ConstraintViolation),
|
3638 - | /// Constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3639 - | #[doc(hidden)]
|
3640 - | RangeShortListHeader(crate::model::list_of_range_short_internal::ConstraintViolation),
|
3641 - | /// Constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3642 - | #[doc(hidden)]
|
3643 - | RangeIntegerListHeader(crate::model::list_of_range_integer_internal::ConstraintViolation),
|
3644 - | /// Constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3645 - | #[doc(hidden)]
|
3646 - | RangeLongListHeader(crate::model::list_of_range_long_internal::ConstraintViolation),
|
3647 - | /// Constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3648 - | #[doc(hidden)]
|
3649 - | LengthStringQuery(crate::model::length_string_internal::ConstraintViolation),
|
3650 - | /// Constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3651 - | #[doc(hidden)]
|
3652 - | RangeByteQuery(crate::model::range_byte_internal::ConstraintViolation),
|
3653 - | /// Constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3654 - | #[doc(hidden)]
|
3655 - | RangeShortQuery(crate::model::range_short_internal::ConstraintViolation),
|
3656 - | /// Constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3657 - | #[doc(hidden)]
|
3658 - | RangeIntegerQuery(crate::model::range_integer_internal::ConstraintViolation),
|
3659 - | /// Constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3660 - | #[doc(hidden)]
|
3661 - | RangeLongQuery(crate::model::range_long_internal::ConstraintViolation),
|
3662 - | /// Constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3663 - | #[doc(hidden)]
|
3664 - | EnumStringQuery(crate::model::enum_string_internal::ConstraintViolation),
|
3665 - | /// Constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3666 - | #[doc(hidden)]
|
3667 - | LengthStringListQuery(crate::model::list_of_length_string_internal::ConstraintViolation),
|
3668 - | /// Constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3669 - | #[doc(hidden)]
|
3670 - | LengthListPatternStringQuery(
|
3671 - | crate::model::length_list_of_pattern_string_internal::ConstraintViolation,
|
3672 - | ),
|
3673 - | /// Constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3674 - | #[doc(hidden)]
|
3675 - | LengthStringSetQuery(crate::model::set_of_length_string_internal::ConstraintViolation),
|
3676 - | /// Constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3677 - | #[doc(hidden)]
|
3678 - | RangeByteListQuery(crate::model::list_of_range_byte_internal::ConstraintViolation),
|
3679 - | /// Constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3680 - | #[doc(hidden)]
|
3681 - | RangeShortListQuery(crate::model::list_of_range_short_internal::ConstraintViolation),
|
3682 - | /// Constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3683 - | #[doc(hidden)]
|
3684 - | RangeIntegerListQuery(crate::model::list_of_range_integer_internal::ConstraintViolation),
|
3685 - | /// Constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3686 - | #[doc(hidden)]
|
3687 - | RangeLongListQuery(crate::model::list_of_range_long_internal::ConstraintViolation),
|
3688 - | /// Constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3689 - | #[doc(hidden)]
|
3690 - | RangeByteSetQuery(crate::model::set_of_range_byte_internal::ConstraintViolation),
|
3691 - | /// Constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3692 - | #[doc(hidden)]
|
3693 - | RangeShortSetQuery(crate::model::set_of_range_short_internal::ConstraintViolation),
|
3694 - | /// Constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3695 - | #[doc(hidden)]
|
3696 - | RangeIntegerSetQuery(crate::model::set_of_range_integer_internal::ConstraintViolation),
|
3697 - | /// Constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3698 - | #[doc(hidden)]
|
3699 - | RangeLongSetQuery(crate::model::set_of_range_long_internal::ConstraintViolation),
|
3700 - | /// Constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`.
|
3701 - | #[doc(hidden)]
|
3702 - | EnumStringListQuery(crate::model::list_of_enum_string_internal::ConstraintViolation),
|
3703 - | }
|
3704 - | impl ::std::fmt::Display for ConstraintViolation {
|
3705 - | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3706 - | match self {
|
3707 - | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3708 - | ConstraintViolation::LengthStringLabel(_) => write!(f, "constraint violation occurred building member `length_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3709 - | ConstraintViolation::RangeIntegerLabel(_) => write!(f, "constraint violation occurred building member `range_integer_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3710 - | ConstraintViolation::RangeShortLabel(_) => write!(f, "constraint violation occurred building member `range_short_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3711 - | ConstraintViolation::RangeLongLabel(_) => write!(f, "constraint violation occurred building member `range_long_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3712 - | ConstraintViolation::RangeByteLabel(_) => write!(f, "constraint violation occurred building member `range_byte_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3713 - | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3714 - | ConstraintViolation::EnumStringLabel(_) => write!(f, "constraint violation occurred building member `enum_string_label` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3715 - | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3716 - | ConstraintViolation::LengthStringHeaderMap(_) => write!(f, "constraint violation occurred building member `length_string_header_map` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3717 - | ConstraintViolation::LengthStringHeader(_) => write!(f, "constraint violation occurred building member `length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3718 - | ConstraintViolation::RangeIntegerHeader(_) => write!(f, "constraint violation occurred building member `range_integer_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3719 - | ConstraintViolation::RangeShortHeader(_) => write!(f, "constraint violation occurred building member `range_short_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3720 - | ConstraintViolation::RangeLongHeader(_) => write!(f, "constraint violation occurred building member `range_long_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3721 - | ConstraintViolation::RangeByteHeader(_) => write!(f, "constraint violation occurred building member `range_byte_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3722 - | ConstraintViolation::LengthStringSetHeader(_) => write!(f, "constraint violation occurred building member `length_string_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3723 - | ConstraintViolation::ListLengthStringHeader(_) => write!(f, "constraint violation occurred building member `list_length_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3724 - | ConstraintViolation::LengthListPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3725 - | ConstraintViolation::LengthSetPatternStringHeader(_) => write!(f, "constraint violation occurred building member `length_set_pattern_string_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3726 - | ConstraintViolation::RangeByteSetHeader(_) => write!(f, "constraint violation occurred building member `range_byte_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3727 - | ConstraintViolation::RangeShortSetHeader(_) => write!(f, "constraint violation occurred building member `range_short_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3728 - | ConstraintViolation::RangeIntegerSetHeader(_) => write!(f, "constraint violation occurred building member `range_integer_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3729 - | ConstraintViolation::RangeLongSetHeader(_) => write!(f, "constraint violation occurred building member `range_long_set_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3730 - | ConstraintViolation::RangeByteListHeader(_) => write!(f, "constraint violation occurred building member `range_byte_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3731 - | ConstraintViolation::RangeShortListHeader(_) => write!(f, "constraint violation occurred building member `range_short_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3732 - | ConstraintViolation::RangeIntegerListHeader(_) => write!(f, "constraint violation occurred building member `range_integer_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3733 - | ConstraintViolation::RangeLongListHeader(_) => write!(f, "constraint violation occurred building member `range_long_list_header` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3734 - | ConstraintViolation::LengthStringQuery(_) => write!(f, "constraint violation occurred building member `length_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3735 - | ConstraintViolation::RangeByteQuery(_) => write!(f, "constraint violation occurred building member `range_byte_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3736 - | ConstraintViolation::RangeShortQuery(_) => write!(f, "constraint violation occurred building member `range_short_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3737 - | ConstraintViolation::RangeIntegerQuery(_) => write!(f, "constraint violation occurred building member `range_integer_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3738 - | ConstraintViolation::RangeLongQuery(_) => write!(f, "constraint violation occurred building member `range_long_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3739 - | ConstraintViolation::EnumStringQuery(_) => write!(f, "constraint violation occurred building member `enum_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3740 - | ConstraintViolation::LengthStringListQuery(_) => write!(f, "constraint violation occurred building member `length_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3741 - | ConstraintViolation::LengthListPatternStringQuery(_) => write!(f, "constraint violation occurred building member `length_list_pattern_string_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3742 - | ConstraintViolation::LengthStringSetQuery(_) => write!(f, "constraint violation occurred building member `length_string_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3743 - | ConstraintViolation::RangeByteListQuery(_) => write!(f, "constraint violation occurred building member `range_byte_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3744 - | ConstraintViolation::RangeShortListQuery(_) => write!(f, "constraint violation occurred building member `range_short_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3745 - | ConstraintViolation::RangeIntegerListQuery(_) => write!(f, "constraint violation occurred building member `range_integer_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3746 - | ConstraintViolation::RangeLongListQuery(_) => write!(f, "constraint violation occurred building member `range_long_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3747 - | ConstraintViolation::RangeByteSetQuery(_) => write!(f, "constraint violation occurred building member `range_byte_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3748 - | ConstraintViolation::RangeShortSetQuery(_) => write!(f, "constraint violation occurred building member `range_short_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3749 - | ConstraintViolation::RangeIntegerSetQuery(_) => write!(f, "constraint violation occurred building member `range_integer_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3750 - | ConstraintViolation::RangeLongSetQuery(_) => write!(f, "constraint violation occurred building member `range_long_set_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3751 - | ConstraintViolation::EnumStringListQuery(_) => write!(f, "constraint violation occurred building member `enum_string_list_query` when building `ConstrainedHttpBoundShapesOperationInput`"),
|
3752 - | }
|
3753 - | }
|
3754 - | }
|
3755 - | impl ::std::error::Error for ConstraintViolation {}
|
3756 - | impl ConstraintViolation {
|
3757 - | pub(crate) fn as_validation_exception_field(
|
3758 - | self,
|
3759 - | path: ::std::string::String,
|
3760 - | ) -> crate::model::ValidationExceptionField {
|
3761 - | match self {
|
3762 - | ConstraintViolation::MissingLengthStringLabel => crate::model::ValidationExceptionField {
|
3763 - | message: format!("Value at '{}/lengthStringLabel' failed to satisfy constraint: Member must not be null", path),
|
3764 - | path: path + "/lengthStringLabel",
|
3765 - | },
|
3766 - | ConstraintViolation::LengthStringLabel(inner) => inner.as_validation_exception_field(path + "/lengthStringLabel"),
|
3767 - | ConstraintViolation::RangeIntegerLabel(inner) => inner.as_validation_exception_field(path + "/rangeIntegerLabel"),
|
3768 - | ConstraintViolation::RangeShortLabel(inner) => inner.as_validation_exception_field(path + "/rangeShortLabel"),
|
3769 - | ConstraintViolation::RangeLongLabel(inner) => inner.as_validation_exception_field(path + "/rangeLongLabel"),
|
3770 - | ConstraintViolation::RangeByteLabel(inner) => inner.as_validation_exception_field(path + "/rangeByteLabel"),
|
3771 - | ConstraintViolation::MissingEnumStringLabel => crate::model::ValidationExceptionField {
|
3772 - | message: format!("Value at '{}/enumStringLabel' failed to satisfy constraint: Member must not be null", path),
|
3773 - | path: path + "/enumStringLabel",
|
3774 - | },
|
3775 - | ConstraintViolation::EnumStringLabel(inner) => inner.as_validation_exception_field(path + "/enumStringLabel"),
|
3776 - | ConstraintViolation::MissingLengthStringHeaderMap => crate::model::ValidationExceptionField {
|
3777 - | message: format!("Value at '{}/lengthStringHeaderMap' failed to satisfy constraint: Member must not be null", path),
|
3778 - | path: path + "/lengthStringHeaderMap",
|
3779 - | },
|
3780 - | ConstraintViolation::LengthStringHeaderMap(inner) => inner.as_validation_exception_field(path + "/lengthStringHeaderMap"),
|
3781 - | ConstraintViolation::LengthStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringHeader"),
|
3782 - | ConstraintViolation::RangeIntegerHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerHeader"),
|
3783 - | ConstraintViolation::RangeShortHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortHeader"),
|
3784 - | ConstraintViolation::RangeLongHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongHeader"),
|
3785 - | ConstraintViolation::RangeByteHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteHeader"),
|
3786 - | ConstraintViolation::LengthStringSetHeader(inner) => inner.as_validation_exception_field(path + "/lengthStringSetHeader"),
|
3787 - | ConstraintViolation::ListLengthStringHeader(inner) => inner.as_validation_exception_field(path + "/listLengthStringHeader"),
|
3788 - | ConstraintViolation::LengthListPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringHeader"),
|
3789 - | ConstraintViolation::LengthSetPatternStringHeader(inner) => inner.as_validation_exception_field(path + "/lengthSetPatternStringHeader"),
|
3790 - | ConstraintViolation::RangeByteSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteSetHeader"),
|
3791 - | ConstraintViolation::RangeShortSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortSetHeader"),
|
3792 - | ConstraintViolation::RangeIntegerSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetHeader"),
|
3793 - | ConstraintViolation::RangeLongSetHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongSetHeader"),
|
3794 - | ConstraintViolation::RangeByteListHeader(inner) => inner.as_validation_exception_field(path + "/rangeByteListHeader"),
|
3795 - | ConstraintViolation::RangeShortListHeader(inner) => inner.as_validation_exception_field(path + "/rangeShortListHeader"),
|
3796 - | ConstraintViolation::RangeIntegerListHeader(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListHeader"),
|
3797 - | ConstraintViolation::RangeLongListHeader(inner) => inner.as_validation_exception_field(path + "/rangeLongListHeader"),
|
3798 - | ConstraintViolation::LengthStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringQuery"),
|
3799 - | ConstraintViolation::RangeByteQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteQuery"),
|
3800 - | ConstraintViolation::RangeShortQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortQuery"),
|
3801 - | ConstraintViolation::RangeIntegerQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerQuery"),
|
3802 - | ConstraintViolation::RangeLongQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongQuery"),
|
3803 - | ConstraintViolation::EnumStringQuery(inner) => inner.as_validation_exception_field(path + "/enumStringQuery"),
|
3804 - | ConstraintViolation::LengthStringListQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringListQuery"),
|
3805 - | ConstraintViolation::LengthListPatternStringQuery(inner) => inner.as_validation_exception_field(path + "/lengthListPatternStringQuery"),
|
3806 - | ConstraintViolation::LengthStringSetQuery(inner) => inner.as_validation_exception_field(path + "/lengthStringSetQuery"),
|
3807 - | ConstraintViolation::RangeByteListQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteListQuery"),
|
3808 - | ConstraintViolation::RangeShortListQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortListQuery"),
|
3809 - | ConstraintViolation::RangeIntegerListQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerListQuery"),
|
3810 - | ConstraintViolation::RangeLongListQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongListQuery"),
|
3811 - | ConstraintViolation::RangeByteSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeByteSetQuery"),
|
3812 - | ConstraintViolation::RangeShortSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeShortSetQuery"),
|
3813 - | ConstraintViolation::RangeIntegerSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeIntegerSetQuery"),
|
3814 - | ConstraintViolation::RangeLongSetQuery(inner) => inner.as_validation_exception_field(path + "/rangeLongSetQuery"),
|
3815 - | ConstraintViolation::EnumStringListQuery(inner) => inner.as_validation_exception_field(path + "/enumStringListQuery"),
|
3816 - | }
|
3817 - | }
|
3818 - | }
|
3819 - | impl ::std::convert::From<ConstraintViolation>
|
3820 - | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3821 - | {
|
3822 - | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3823 - | let first_validation_exception_field =
|
3824 - | constraint_violation.as_validation_exception_field("".to_owned());
|
3825 - | let validation_exception = crate::error::ValidationException {
|
3826 - | message: format!(
|
3827 - | "1 validation error detected. {}",
|
3828 - | &first_validation_exception_field.message
|
3829 - | ),
|
3830 - | field_list: Some(vec![first_validation_exception_field]),
|
3831 - | };
|
3832 - | Self::ConstraintViolation(
|
3833 - | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3834 - | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3835 - | )
|
3836 - | }
|
3837 - | }
|
3838 - | impl ::std::convert::From<Builder>
|
3839 - | for crate::constrained::MaybeConstrained<
|
3840 - | crate::input::ConstrainedHttpBoundShapesOperationInput,
|
3841 - | >
|
3842 - | {
|
3843 - | fn from(builder: Builder) -> Self {
|
3844 - | Self::Unconstrained(builder)
|
3845 - | }
|
3846 - | }
|
3847 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
3848 - | type Error = ConstraintViolation;
|
3849 - |
|
3850 - | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3851 - | builder.build()
|
3852 - | }
|
3853 - | }
|
3854 - | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
3855 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3856 - | pub(crate) struct Builder {
|
3857 - | pub(crate) length_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3858 - | pub(crate) range_integer_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3859 - | pub(crate) range_short_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3860 - | pub(crate) range_long_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3861 - | pub(crate) range_byte_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3862 - | pub(crate) enum_string_label: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
3863 - | pub(crate) length_string_header_map: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
3864 - | pub(crate) length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3865 - | pub(crate) range_integer_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3866 - | pub(crate) range_short_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3867 - | pub(crate) range_long_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3868 - | pub(crate) range_byte_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3869 - | pub(crate) length_string_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
3870 - | pub(crate) list_length_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
3871 - | pub(crate) length_list_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
3872 - | pub(crate) length_set_pattern_string_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>>,
|
3873 - | pub(crate) range_byte_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
3874 - | pub(crate) range_short_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
3875 - | pub(crate) range_integer_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
3876 - | pub(crate) range_long_set_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
3877 - | pub(crate) range_byte_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
3878 - | pub(crate) range_short_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
3879 - | pub(crate) range_integer_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
3880 - | pub(crate) range_long_list_header: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
3881 - | pub(crate) length_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthString>>,
|
3882 - | pub(crate) range_byte_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeByte>>,
|
3883 - | pub(crate) range_short_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeShort>>,
|
3884 - | pub(crate) range_integer_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeInteger>>,
|
3885 - | pub(crate) range_long_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::RangeLong>>,
|
3886 - | pub(crate) enum_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::EnumString>>,
|
3887 - | pub(crate) length_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>,
|
3888 - | pub(crate) length_list_pattern_string_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>>,
|
3889 - | pub(crate) length_string_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>>,
|
3890 - | pub(crate) range_byte_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>,
|
3891 - | pub(crate) range_short_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>,
|
3892 - | pub(crate) range_integer_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>,
|
3893 - | pub(crate) range_long_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>,
|
3894 - | pub(crate) range_byte_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>>,
|
3895 - | pub(crate) range_short_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>>,
|
3896 - | pub(crate) range_integer_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>>,
|
3897 - | pub(crate) range_long_set_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>>,
|
3898 - | pub(crate) enum_string_list_query: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>,
|
3899 - | }
|
3900 - | impl Builder {
|
3901 - | #[allow(missing_docs)] // documentation missing in model
|
3902 - | pub(crate) fn set_length_string_label(
|
3903 - | mut self,
|
3904 - | input: impl ::std::convert::Into<
|
3905 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
3906 - | >,
|
3907 - | ) -> Self {
|
3908 - | self.length_string_label = Some(input.into());
|
3909 - | self
|
3910 - | }
|
3911 - | #[allow(missing_docs)] // documentation missing in model
|
3912 - | pub(crate) fn set_range_integer_label(
|
3913 - | mut self,
|
3914 - | input: impl ::std::convert::Into<
|
3915 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
3916 - | >,
|
3917 - | ) -> Self {
|
3918 - | self.range_integer_label = Some(input.into());
|
3919 - | self
|
3920 - | }
|
3921 - | #[allow(missing_docs)] // documentation missing in model
|
3922 - | pub(crate) fn set_range_short_label(
|
3923 - | mut self,
|
3924 - | input: impl ::std::convert::Into<
|
3925 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
3926 - | >,
|
3927 - | ) -> Self {
|
3928 - | self.range_short_label = Some(input.into());
|
3929 - | self
|
3930 - | }
|
3931 - | #[allow(missing_docs)] // documentation missing in model
|
3932 - | pub(crate) fn set_range_long_label(
|
3933 - | mut self,
|
3934 - | input: impl ::std::convert::Into<
|
3935 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
3936 - | >,
|
3937 - | ) -> Self {
|
3938 - | self.range_long_label = Some(input.into());
|
3939 - | self
|
3940 - | }
|
3941 - | #[allow(missing_docs)] // documentation missing in model
|
3942 - | pub(crate) fn set_range_byte_label(
|
3943 - | mut self,
|
3944 - | input: impl ::std::convert::Into<
|
3945 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
3946 - | >,
|
3947 - | ) -> Self {
|
3948 - | self.range_byte_label = Some(input.into());
|
3949 - | self
|
3950 - | }
|
3951 - | #[allow(missing_docs)] // documentation missing in model
|
3952 - | pub(crate) fn set_enum_string_label(
|
3953 - | mut self,
|
3954 - | input: impl ::std::convert::Into<
|
3955 - | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
3956 - | >,
|
3957 - | ) -> Self {
|
3958 - | self.enum_string_label = Some(input.into());
|
3959 - | self
|
3960 - | }
|
3961 - | #[allow(missing_docs)] // documentation missing in model
|
3962 - | pub(crate) fn set_length_string_header_map(
|
3963 - | mut self,
|
3964 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>,
|
3965 - | ) -> Self {
|
3966 - | self.length_string_header_map = Some(input.into());
|
3967 - | self
|
3968 - | }
|
3969 - | #[allow(missing_docs)] // documentation missing in model
|
3970 - | pub(crate) fn set_length_string_header(
|
3971 - | mut self,
|
3972 - | input: Option<
|
3973 - | impl ::std::convert::Into<
|
3974 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
3975 - | >,
|
3976 - | >,
|
3977 - | ) -> Self {
|
3978 - | self.length_string_header = input.map(|v| v.into());
|
3979 - | self
|
3980 - | }
|
3981 - | #[allow(missing_docs)] // documentation missing in model
|
3982 - | pub(crate) fn set_range_integer_header(
|
3983 - | mut self,
|
3984 - | input: impl ::std::convert::Into<
|
3985 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
3986 - | >,
|
3987 - | ) -> Self {
|
3988 - | self.range_integer_header = Some(input.into());
|
3989 - | self
|
3990 - | }
|
3991 - | #[allow(missing_docs)] // documentation missing in model
|
3992 - | pub(crate) fn set_range_short_header(
|
3993 - | mut self,
|
3994 - | input: impl ::std::convert::Into<
|
3995 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
3996 - | >,
|
3997 - | ) -> Self {
|
3998 - | self.range_short_header = Some(input.into());
|
3999 - | self
|
4000 - | }
|
4001 - | #[allow(missing_docs)] // documentation missing in model
|
4002 - | pub(crate) fn set_range_long_header(
|
4003 - | mut self,
|
4004 - | input: impl ::std::convert::Into<
|
4005 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
4006 - | >,
|
4007 - | ) -> Self {
|
4008 - | self.range_long_header = Some(input.into());
|
4009 - | self
|
4010 - | }
|
4011 - | #[allow(missing_docs)] // documentation missing in model
|
4012 - | pub(crate) fn set_range_byte_header(
|
4013 - | mut self,
|
4014 - | input: impl ::std::convert::Into<
|
4015 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
4016 - | >,
|
4017 - | ) -> Self {
|
4018 - | self.range_byte_header = Some(input.into());
|
4019 - | self
|
4020 - | }
|
4021 - | #[allow(missing_docs)] // documentation missing in model
|
4022 - | pub(crate) fn set_length_string_set_header(
|
4023 - | mut self,
|
4024 - | input: Option<
|
4025 - | impl ::std::convert::Into<
|
4026 - | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
4027 - | >,
|
4028 - | >,
|
4029 - | ) -> Self {
|
4030 - | self.length_string_set_header = input.map(|v| v.into());
|
4031 - | self
|
4032 - | }
|
4033 - | #[allow(missing_docs)] // documentation missing in model
|
4034 - | pub(crate) fn set_list_length_string_header(
|
4035 - | mut self,
|
4036 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
4037 - | ) -> Self {
|
4038 - | self.list_length_string_header = input.map(|v| v.into());
|
4039 - | self
|
4040 - | }
|
4041 - | #[allow(missing_docs)] // documentation missing in model
|
4042 - | pub(crate) fn set_length_list_pattern_string_header(
|
4043 - | mut self,
|
4044 - | input: Option<
|
4045 - | impl ::std::convert::Into<
|
4046 - | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
4047 - | >,
|
4048 - | >,
|
4049 - | ) -> Self {
|
4050 - | self.length_list_pattern_string_header = input.map(|v| v.into());
|
4051 - | self
|
4052 - | }
|
4053 - | #[allow(missing_docs)] // documentation missing in model
|
4054 - | pub(crate) fn set_length_set_pattern_string_header(
|
4055 - | mut self,
|
4056 - | input: Option<
|
4057 - | impl ::std::convert::Into<
|
4058 - | crate::constrained::MaybeConstrained<crate::model::LengthSetOfPatternString>,
|
4059 - | >,
|
4060 - | >,
|
4061 - | ) -> Self {
|
4062 - | self.length_set_pattern_string_header = input.map(|v| v.into());
|
4063 - | self
|
4064 - | }
|
4065 - | #[allow(missing_docs)] // documentation missing in model
|
4066 - | pub(crate) fn set_range_byte_set_header(
|
4067 - | mut self,
|
4068 - | input: Option<
|
4069 - | impl ::std::convert::Into<
|
4070 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
4071 - | >,
|
4072 - | >,
|
4073 - | ) -> Self {
|
4074 - | self.range_byte_set_header = input.map(|v| v.into());
|
4075 - | self
|
4076 - | }
|
4077 - | #[allow(missing_docs)] // documentation missing in model
|
4078 - | pub(crate) fn set_range_short_set_header(
|
4079 - | mut self,
|
4080 - | input: Option<
|
4081 - | impl ::std::convert::Into<
|
4082 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
4083 - | >,
|
4084 - | >,
|
4085 - | ) -> Self {
|
4086 - | self.range_short_set_header = input.map(|v| v.into());
|
4087 - | self
|
4088 - | }
|
4089 - | #[allow(missing_docs)] // documentation missing in model
|
4090 - | pub(crate) fn set_range_integer_set_header(
|
4091 - | mut self,
|
4092 - | input: Option<
|
4093 - | impl ::std::convert::Into<
|
4094 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
4095 - | >,
|
4096 - | >,
|
4097 - | ) -> Self {
|
4098 - | self.range_integer_set_header = input.map(|v| v.into());
|
4099 - | self
|
4100 - | }
|
4101 - | #[allow(missing_docs)] // documentation missing in model
|
4102 - | pub(crate) fn set_range_long_set_header(
|
4103 - | mut self,
|
4104 - | input: Option<
|
4105 - | impl ::std::convert::Into<
|
4106 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
4107 - | >,
|
4108 - | >,
|
4109 - | ) -> Self {
|
4110 - | self.range_long_set_header = input.map(|v| v.into());
|
4111 - | self
|
4112 - | }
|
4113 - | #[allow(missing_docs)] // documentation missing in model
|
4114 - | pub(crate) fn set_range_byte_list_header(
|
4115 - | mut self,
|
4116 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
4117 - | ) -> Self {
|
4118 - | self.range_byte_list_header = input.map(|v| v.into());
|
4119 - | self
|
4120 - | }
|
4121 - | #[allow(missing_docs)] // documentation missing in model
|
4122 - | pub(crate) fn set_range_short_list_header(
|
4123 - | mut self,
|
4124 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
4125 - | ) -> Self {
|
4126 - | self.range_short_list_header = input.map(|v| v.into());
|
4127 - | self
|
4128 - | }
|
4129 - | #[allow(missing_docs)] // documentation missing in model
|
4130 - | pub(crate) fn set_range_integer_list_header(
|
4131 - | mut self,
|
4132 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
4133 - | ) -> Self {
|
4134 - | self.range_integer_list_header = input.map(|v| v.into());
|
4135 - | self
|
4136 - | }
|
4137 - | #[allow(missing_docs)] // documentation missing in model
|
4138 - | pub(crate) fn set_range_long_list_header(
|
4139 - | mut self,
|
4140 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
4141 - | ) -> Self {
|
4142 - | self.range_long_list_header = input.map(|v| v.into());
|
4143 - | self
|
4144 - | }
|
4145 - | #[allow(missing_docs)] // documentation missing in model
|
4146 - | pub(crate) fn set_length_string_query(
|
4147 - | mut self,
|
4148 - | input: Option<
|
4149 - | impl ::std::convert::Into<
|
4150 - | crate::constrained::MaybeConstrained<crate::model::LengthString>,
|
4151 - | >,
|
4152 - | >,
|
4153 - | ) -> Self {
|
4154 - | self.length_string_query = input.map(|v| v.into());
|
4155 - | self
|
4156 - | }
|
4157 - | #[allow(missing_docs)] // documentation missing in model
|
4158 - | pub(crate) fn set_range_byte_query(
|
4159 - | mut self,
|
4160 - | input: impl ::std::convert::Into<
|
4161 - | crate::constrained::MaybeConstrained<crate::model::RangeByte>,
|
4162 - | >,
|
4163 - | ) -> Self {
|
4164 - | self.range_byte_query = Some(input.into());
|
4165 - | self
|
4166 - | }
|
4167 - | #[allow(missing_docs)] // documentation missing in model
|
4168 - | pub(crate) fn set_range_short_query(
|
4169 - | mut self,
|
4170 - | input: impl ::std::convert::Into<
|
4171 - | crate::constrained::MaybeConstrained<crate::model::RangeShort>,
|
4172 - | >,
|
4173 - | ) -> Self {
|
4174 - | self.range_short_query = Some(input.into());
|
4175 - | self
|
4176 - | }
|
4177 - | #[allow(missing_docs)] // documentation missing in model
|
4178 - | pub(crate) fn set_range_integer_query(
|
4179 - | mut self,
|
4180 - | input: impl ::std::convert::Into<
|
4181 - | crate::constrained::MaybeConstrained<crate::model::RangeInteger>,
|
4182 - | >,
|
4183 - | ) -> Self {
|
4184 - | self.range_integer_query = Some(input.into());
|
4185 - | self
|
4186 - | }
|
4187 - | #[allow(missing_docs)] // documentation missing in model
|
4188 - | pub(crate) fn set_range_long_query(
|
4189 - | mut self,
|
4190 - | input: impl ::std::convert::Into<
|
4191 - | crate::constrained::MaybeConstrained<crate::model::RangeLong>,
|
4192 - | >,
|
4193 - | ) -> Self {
|
4194 - | self.range_long_query = Some(input.into());
|
4195 - | self
|
4196 - | }
|
4197 - | #[allow(missing_docs)] // documentation missing in model
|
4198 - | pub(crate) fn set_enum_string_query(
|
4199 - | mut self,
|
4200 - | input: Option<
|
4201 - | impl ::std::convert::Into<
|
4202 - | crate::constrained::MaybeConstrained<crate::model::EnumString>,
|
4203 - | >,
|
4204 - | >,
|
4205 - | ) -> Self {
|
4206 - | self.enum_string_query = input.map(|v| v.into());
|
4207 - | self
|
4208 - | }
|
4209 - | #[allow(missing_docs)] // documentation missing in model
|
4210 - | pub(crate) fn set_length_string_list_query(
|
4211 - | mut self,
|
4212 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_length_string_constrained::ListOfLengthStringConstrained>>>,
|
4213 - | ) -> Self {
|
4214 - | self.length_string_list_query = input.map(|v| v.into());
|
4215 - | self
|
4216 - | }
|
4217 - | #[allow(missing_docs)] // documentation missing in model
|
4218 - | pub(crate) fn set_length_list_pattern_string_query(
|
4219 - | mut self,
|
4220 - | input: Option<
|
4221 - | impl ::std::convert::Into<
|
4222 - | crate::constrained::MaybeConstrained<crate::model::LengthListOfPatternString>,
|
4223 - | >,
|
4224 - | >,
|
4225 - | ) -> Self {
|
4226 - | self.length_list_pattern_string_query = input.map(|v| v.into());
|
4227 - | self
|
4228 - | }
|
4229 - | #[allow(missing_docs)] // documentation missing in model
|
4230 - | pub(crate) fn set_length_string_set_query(
|
4231 - | mut self,
|
4232 - | input: Option<
|
4233 - | impl ::std::convert::Into<
|
4234 - | crate::constrained::MaybeConstrained<crate::model::SetOfLengthString>,
|
4235 - | >,
|
4236 - | >,
|
4237 - | ) -> Self {
|
4238 - | self.length_string_set_query = input.map(|v| v.into());
|
4239 - | self
|
4240 - | }
|
4241 - | #[allow(missing_docs)] // documentation missing in model
|
4242 - | pub(crate) fn set_range_byte_list_query(
|
4243 - | mut self,
|
4244 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_byte_constrained::ListOfRangeByteConstrained>>>,
|
4245 - | ) -> Self {
|
4246 - | self.range_byte_list_query = input.map(|v| v.into());
|
4247 - | self
|
4248 - | }
|
4249 - | #[allow(missing_docs)] // documentation missing in model
|
4250 - | pub(crate) fn set_range_short_list_query(
|
4251 - | mut self,
|
4252 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_short_constrained::ListOfRangeShortConstrained>>>,
|
4253 - | ) -> Self {
|
4254 - | self.range_short_list_query = input.map(|v| v.into());
|
4255 - | self
|
4256 - | }
|
4257 - | #[allow(missing_docs)] // documentation missing in model
|
4258 - | pub(crate) fn set_range_integer_list_query(
|
4259 - | mut self,
|
4260 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_integer_constrained::ListOfRangeIntegerConstrained>>>,
|
4261 - | ) -> Self {
|
4262 - | self.range_integer_list_query = input.map(|v| v.into());
|
4263 - | self
|
4264 - | }
|
4265 - | #[allow(missing_docs)] // documentation missing in model
|
4266 - | pub(crate) fn set_range_long_list_query(
|
4267 - | mut self,
|
4268 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_range_long_constrained::ListOfRangeLongConstrained>>>,
|
4269 - | ) -> Self {
|
4270 - | self.range_long_list_query = input.map(|v| v.into());
|
4271 - | self
|
4272 - | }
|
4273 - | #[allow(missing_docs)] // documentation missing in model
|
4274 - | pub(crate) fn set_range_byte_set_query(
|
4275 - | mut self,
|
4276 - | input: Option<
|
4277 - | impl ::std::convert::Into<
|
4278 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeByte>,
|
4279 - | >,
|
4280 - | >,
|
4281 - | ) -> Self {
|
4282 - | self.range_byte_set_query = input.map(|v| v.into());
|
4283 - | self
|
4284 - | }
|
4285 - | #[allow(missing_docs)] // documentation missing in model
|
4286 - | pub(crate) fn set_range_short_set_query(
|
4287 - | mut self,
|
4288 - | input: Option<
|
4289 - | impl ::std::convert::Into<
|
4290 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeShort>,
|
4291 - | >,
|
4292 - | >,
|
4293 - | ) -> Self {
|
4294 - | self.range_short_set_query = input.map(|v| v.into());
|
4295 - | self
|
4296 - | }
|
4297 - | #[allow(missing_docs)] // documentation missing in model
|
4298 - | pub(crate) fn set_range_integer_set_query(
|
4299 - | mut self,
|
4300 - | input: Option<
|
4301 - | impl ::std::convert::Into<
|
4302 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeInteger>,
|
4303 - | >,
|
4304 - | >,
|
4305 - | ) -> Self {
|
4306 - | self.range_integer_set_query = input.map(|v| v.into());
|
4307 - | self
|
4308 - | }
|
4309 - | #[allow(missing_docs)] // documentation missing in model
|
4310 - | pub(crate) fn set_range_long_set_query(
|
4311 - | mut self,
|
4312 - | input: Option<
|
4313 - | impl ::std::convert::Into<
|
4314 - | crate::constrained::MaybeConstrained<crate::model::SetOfRangeLong>,
|
4315 - | >,
|
4316 - | >,
|
4317 - | ) -> Self {
|
4318 - | self.range_long_set_query = input.map(|v| v.into());
|
4319 - | self
|
4320 - | }
|
4321 - | #[allow(missing_docs)] // documentation missing in model
|
4322 - | pub(crate) fn set_enum_string_list_query(
|
4323 - | mut self,
|
4324 - | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::list_of_enum_string_constrained::ListOfEnumStringConstrained>>>,
|
4325 - | ) -> Self {
|
4326 - | self.enum_string_list_query = input.map(|v| v.into());
|
4327 - | self
|
4328 - | }
|
4329 - | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
4330 - | ///
|
4331 - | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
4332 - | ///
|
4333 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
4334 - | pub fn build(
|
4335 - | self,
|
4336 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
4337 - | {
|
4338 - | self.build_enforcing_all_constraints()
|
4339 - | }
|
4340 - | fn build_enforcing_all_constraints(
|
4341 - | self,
|
4342 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
1847 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
4343 1848 | {
|
4344 1849 | Ok(crate::input::ConstrainedHttpBoundShapesOperationInput {
|
4345 1850 | length_string_label: self
|
4346 1851 | .length_string_label
|
4347 1852 | .map(|v| match v {
|
4348 1853 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4349 1854 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4350 1855 | })
|
4351 1856 | .map(|res| res.map_err(ConstraintViolation::LengthStringLabel))
|
4352 1857 | .transpose()?
|
4687 2192 | res.map(|v| v.into())
|
4688 2193 | .map_err(ConstraintViolation::RangeShortListQuery)
|
4689 2194 | })
|
4690 2195 | .transpose()?,
|
4691 2196 | range_integer_list_query: self
|
4692 2197 | .range_integer_list_query
|
4693 2198 | .map(|v| match v {
|
4694 2199 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4695 2200 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4696 2201 | })
|
4697 - | .map(|res| {
|
4698 - | res.map(|v| v.into())
|
4699 - | .map_err(ConstraintViolation::RangeIntegerListQuery)
|
4700 - | })
|
2202 + | .map(|res| {
|
2203 + | res.map(|v| v.into())
|
2204 + | .map_err(ConstraintViolation::RangeIntegerListQuery)
|
2205 + | })
|
2206 + | .transpose()?,
|
2207 + | range_long_list_query: self
|
2208 + | .range_long_list_query
|
2209 + | .map(|v| match v {
|
2210 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2211 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2212 + | })
|
2213 + | .map(|res| {
|
2214 + | res.map(|v| v.into())
|
2215 + | .map_err(ConstraintViolation::RangeLongListQuery)
|
2216 + | })
|
2217 + | .transpose()?,
|
2218 + | range_byte_set_query: self
|
2219 + | .range_byte_set_query
|
2220 + | .map(|v| match v {
|
2221 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2222 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2223 + | })
|
2224 + | .map(|res| res.map_err(ConstraintViolation::RangeByteSetQuery))
|
2225 + | .transpose()?
|
2226 + | .map(|v: crate::model::SetOfRangeByte| v.into()),
|
2227 + | range_short_set_query: self
|
2228 + | .range_short_set_query
|
2229 + | .map(|v| match v {
|
2230 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2231 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2232 + | })
|
2233 + | .map(|res| res.map_err(ConstraintViolation::RangeShortSetQuery))
|
2234 + | .transpose()?
|
2235 + | .map(|v: crate::model::SetOfRangeShort| v.into()),
|
2236 + | range_integer_set_query: self
|
2237 + | .range_integer_set_query
|
2238 + | .map(|v| match v {
|
2239 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2240 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2241 + | })
|
2242 + | .map(|res| res.map_err(ConstraintViolation::RangeIntegerSetQuery))
|
2243 + | .transpose()?
|
2244 + | .map(|v: crate::model::SetOfRangeInteger| v.into()),
|
2245 + | range_long_set_query: self
|
2246 + | .range_long_set_query
|
2247 + | .map(|v| match v {
|
2248 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2249 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2250 + | })
|
2251 + | .map(|res| res.map_err(ConstraintViolation::RangeLongSetQuery))
|
2252 + | .transpose()?
|
2253 + | .map(|v: crate::model::SetOfRangeLong| v.into()),
|
2254 + | enum_string_list_query: self
|
2255 + | .enum_string_list_query
|
2256 + | .map(|v| match v {
|
2257 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2258 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2259 + | })
|
2260 + | .map(|res| {
|
2261 + | res.map(|v| v.into())
|
2262 + | .map_err(ConstraintViolation::EnumStringListQuery)
|
2263 + | })
|
2264 + | .transpose()?,
|
2265 + | })
|
2266 + | }
|
2267 + | }
|
2268 + | }
|
2269 + | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
2270 + | pub mod constrained_http_bound_shapes_operation_input {
|
2271 + |
|
2272 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2273 + | /// Holds one variant for each of the ways the builder can fail.
|
2274 + | #[allow(clippy::enum_variant_names)]
|
2275 + | pub enum ConstraintViolation {
|
2276 + | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2277 + | MissingLengthStringLabel,
|
2278 + | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2279 + | MissingEnumStringLabel,
|
2280 + | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
2281 + | MissingLengthStringHeaderMap,
|
2282 + | }
|
2283 + | impl ::std::fmt::Display for ConstraintViolation {
|
2284 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2285 + | match self {
|
2286 + | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
2287 + | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
2288 + | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
2289 + | }
|
2290 + | }
|
2291 + | }
|
2292 + | impl ::std::error::Error for ConstraintViolation {}
|
2293 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
2294 + | type Error = ConstraintViolation;
|
2295 + |
|
2296 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2297 + | builder.build()
|
2298 + | }
|
2299 + | }
|
2300 + | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
2301 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2302 + | pub struct Builder {
|
2303 + | pub(crate) length_string_label: ::std::option::Option<::std::string::String>,
|
2304 + | pub(crate) range_integer_label: ::std::option::Option<i32>,
|
2305 + | pub(crate) range_short_label: ::std::option::Option<i16>,
|
2306 + | pub(crate) range_long_label: ::std::option::Option<i64>,
|
2307 + | pub(crate) range_byte_label: ::std::option::Option<i8>,
|
2308 + | pub(crate) enum_string_label: ::std::option::Option<crate::model::EnumString>,
|
2309 + | pub(crate) length_string_header_map: ::std::option::Option<
|
2310 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2311 + | >,
|
2312 + | pub(crate) length_string_header: ::std::option::Option<::std::string::String>,
|
2313 + | pub(crate) range_integer_header: ::std::option::Option<i32>,
|
2314 + | pub(crate) range_short_header: ::std::option::Option<i16>,
|
2315 + | pub(crate) range_long_header: ::std::option::Option<i64>,
|
2316 + | pub(crate) range_byte_header: ::std::option::Option<i8>,
|
2317 + | pub(crate) length_string_set_header:
|
2318 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2319 + | pub(crate) list_length_string_header:
|
2320 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2321 + | pub(crate) length_list_pattern_string_header:
|
2322 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2323 + | pub(crate) length_set_pattern_string_header:
|
2324 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2325 + | pub(crate) range_byte_set_header: ::std::option::Option<::std::vec::Vec<i8>>,
|
2326 + | pub(crate) range_short_set_header: ::std::option::Option<::std::vec::Vec<i16>>,
|
2327 + | pub(crate) range_integer_set_header: ::std::option::Option<::std::vec::Vec<i32>>,
|
2328 + | pub(crate) range_long_set_header: ::std::option::Option<::std::vec::Vec<i64>>,
|
2329 + | pub(crate) range_byte_list_header: ::std::option::Option<::std::vec::Vec<i8>>,
|
2330 + | pub(crate) range_short_list_header: ::std::option::Option<::std::vec::Vec<i16>>,
|
2331 + | pub(crate) range_integer_list_header: ::std::option::Option<::std::vec::Vec<i32>>,
|
2332 + | pub(crate) range_long_list_header: ::std::option::Option<::std::vec::Vec<i64>>,
|
2333 + | pub(crate) length_string_query: ::std::option::Option<::std::string::String>,
|
2334 + | pub(crate) range_byte_query: ::std::option::Option<i8>,
|
2335 + | pub(crate) range_short_query: ::std::option::Option<i16>,
|
2336 + | pub(crate) range_integer_query: ::std::option::Option<i32>,
|
2337 + | pub(crate) range_long_query: ::std::option::Option<i64>,
|
2338 + | pub(crate) enum_string_query: ::std::option::Option<crate::model::EnumString>,
|
2339 + | pub(crate) length_string_list_query:
|
2340 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2341 + | pub(crate) length_list_pattern_string_query:
|
2342 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2343 + | pub(crate) length_string_set_query:
|
2344 + | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2345 + | pub(crate) range_byte_list_query: ::std::option::Option<::std::vec::Vec<i8>>,
|
2346 + | pub(crate) range_short_list_query: ::std::option::Option<::std::vec::Vec<i16>>,
|
2347 + | pub(crate) range_integer_list_query: ::std::option::Option<::std::vec::Vec<i32>>,
|
2348 + | pub(crate) range_long_list_query: ::std::option::Option<::std::vec::Vec<i64>>,
|
2349 + | pub(crate) range_byte_set_query: ::std::option::Option<::std::vec::Vec<i8>>,
|
2350 + | pub(crate) range_short_set_query: ::std::option::Option<::std::vec::Vec<i16>>,
|
2351 + | pub(crate) range_integer_set_query: ::std::option::Option<::std::vec::Vec<i32>>,
|
2352 + | pub(crate) range_long_set_query: ::std::option::Option<::std::vec::Vec<i64>>,
|
2353 + | pub(crate) enum_string_list_query:
|
2354 + | ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
2355 + | }
|
2356 + | impl Builder {
|
2357 + | #[allow(missing_docs)] // documentation missing in model
|
2358 + | pub fn length_string_label(mut self, input: ::std::string::String) -> Self {
|
2359 + | self.length_string_label = Some(input);
|
2360 + | self
|
2361 + | }
|
2362 + | #[allow(missing_docs)] // documentation missing in model
|
2363 + | pub fn range_integer_label(mut self, input: i32) -> Self {
|
2364 + | self.range_integer_label = Some(input);
|
2365 + | self
|
2366 + | }
|
2367 + | #[allow(missing_docs)] // documentation missing in model
|
2368 + | pub fn range_short_label(mut self, input: i16) -> Self {
|
2369 + | self.range_short_label = Some(input);
|
2370 + | self
|
2371 + | }
|
2372 + | #[allow(missing_docs)] // documentation missing in model
|
2373 + | pub fn range_long_label(mut self, input: i64) -> Self {
|
2374 + | self.range_long_label = Some(input);
|
2375 + | self
|
2376 + | }
|
2377 + | #[allow(missing_docs)] // documentation missing in model
|
2378 + | pub fn range_byte_label(mut self, input: i8) -> Self {
|
2379 + | self.range_byte_label = Some(input);
|
2380 + | self
|
2381 + | }
|
2382 + | #[allow(missing_docs)] // documentation missing in model
|
2383 + | pub fn enum_string_label(mut self, input: crate::model::EnumString) -> Self {
|
2384 + | self.enum_string_label = Some(input);
|
2385 + | self
|
2386 + | }
|
2387 + | #[allow(missing_docs)] // documentation missing in model
|
2388 + | pub fn length_string_header_map(
|
2389 + | mut self,
|
2390 + | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
2391 + | ) -> Self {
|
2392 + | self.length_string_header_map = Some(input);
|
2393 + | self
|
2394 + | }
|
2395 + | #[allow(missing_docs)] // documentation missing in model
|
2396 + | pub fn length_string_header(
|
2397 + | mut self,
|
2398 + | input: ::std::option::Option<::std::string::String>,
|
2399 + | ) -> Self {
|
2400 + | self.length_string_header = input;
|
2401 + | self
|
2402 + | }
|
2403 + | #[allow(missing_docs)] // documentation missing in model
|
2404 + | pub fn range_integer_header(mut self, input: i32) -> Self {
|
2405 + | self.range_integer_header = Some(input);
|
2406 + | self
|
2407 + | }
|
2408 + | #[allow(missing_docs)] // documentation missing in model
|
2409 + | pub fn range_short_header(mut self, input: i16) -> Self {
|
2410 + | self.range_short_header = Some(input);
|
2411 + | self
|
2412 + | }
|
2413 + | #[allow(missing_docs)] // documentation missing in model
|
2414 + | pub fn range_long_header(mut self, input: i64) -> Self {
|
2415 + | self.range_long_header = Some(input);
|
2416 + | self
|
2417 + | }
|
2418 + | #[allow(missing_docs)] // documentation missing in model
|
2419 + | pub fn range_byte_header(mut self, input: i8) -> Self {
|
2420 + | self.range_byte_header = Some(input);
|
2421 + | self
|
2422 + | }
|
2423 + | #[allow(missing_docs)] // documentation missing in model
|
2424 + | pub fn length_string_set_header(
|
2425 + | mut self,
|
2426 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2427 + | ) -> Self {
|
2428 + | self.length_string_set_header = input;
|
2429 + | self
|
2430 + | }
|
2431 + | #[allow(missing_docs)] // documentation missing in model
|
2432 + | pub fn list_length_string_header(
|
2433 + | mut self,
|
2434 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2435 + | ) -> Self {
|
2436 + | self.list_length_string_header = input;
|
2437 + | self
|
2438 + | }
|
2439 + | #[allow(missing_docs)] // documentation missing in model
|
2440 + | pub fn length_list_pattern_string_header(
|
2441 + | mut self,
|
2442 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2443 + | ) -> Self {
|
2444 + | self.length_list_pattern_string_header = input;
|
2445 + | self
|
2446 + | }
|
2447 + | #[allow(missing_docs)] // documentation missing in model
|
2448 + | pub fn length_set_pattern_string_header(
|
2449 + | mut self,
|
2450 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2451 + | ) -> Self {
|
2452 + | self.length_set_pattern_string_header = input;
|
2453 + | self
|
2454 + | }
|
2455 + | #[allow(missing_docs)] // documentation missing in model
|
2456 + | pub fn range_byte_set_header(
|
2457 + | mut self,
|
2458 + | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
2459 + | ) -> Self {
|
2460 + | self.range_byte_set_header = input;
|
2461 + | self
|
2462 + | }
|
2463 + | #[allow(missing_docs)] // documentation missing in model
|
2464 + | pub fn range_short_set_header(
|
2465 + | mut self,
|
2466 + | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
2467 + | ) -> Self {
|
2468 + | self.range_short_set_header = input;
|
2469 + | self
|
2470 + | }
|
2471 + | #[allow(missing_docs)] // documentation missing in model
|
2472 + | pub fn range_integer_set_header(
|
2473 + | mut self,
|
2474 + | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
2475 + | ) -> Self {
|
2476 + | self.range_integer_set_header = input;
|
2477 + | self
|
2478 + | }
|
2479 + | #[allow(missing_docs)] // documentation missing in model
|
2480 + | pub fn range_long_set_header(
|
2481 + | mut self,
|
2482 + | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
2483 + | ) -> Self {
|
2484 + | self.range_long_set_header = input;
|
2485 + | self
|
2486 + | }
|
2487 + | #[allow(missing_docs)] // documentation missing in model
|
2488 + | pub fn range_byte_list_header(
|
2489 + | mut self,
|
2490 + | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
2491 + | ) -> Self {
|
2492 + | self.range_byte_list_header = input;
|
2493 + | self
|
2494 + | }
|
2495 + | #[allow(missing_docs)] // documentation missing in model
|
2496 + | pub fn range_short_list_header(
|
2497 + | mut self,
|
2498 + | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
2499 + | ) -> Self {
|
2500 + | self.range_short_list_header = input;
|
2501 + | self
|
2502 + | }
|
2503 + | #[allow(missing_docs)] // documentation missing in model
|
2504 + | pub fn range_integer_list_header(
|
2505 + | mut self,
|
2506 + | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
2507 + | ) -> Self {
|
2508 + | self.range_integer_list_header = input;
|
2509 + | self
|
2510 + | }
|
2511 + | #[allow(missing_docs)] // documentation missing in model
|
2512 + | pub fn range_long_list_header(
|
2513 + | mut self,
|
2514 + | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
2515 + | ) -> Self {
|
2516 + | self.range_long_list_header = input;
|
2517 + | self
|
2518 + | }
|
2519 + | #[allow(missing_docs)] // documentation missing in model
|
2520 + | pub fn length_string_query(
|
2521 + | mut self,
|
2522 + | input: ::std::option::Option<::std::string::String>,
|
2523 + | ) -> Self {
|
2524 + | self.length_string_query = input;
|
2525 + | self
|
2526 + | }
|
2527 + | #[allow(missing_docs)] // documentation missing in model
|
2528 + | pub fn range_byte_query(mut self, input: i8) -> Self {
|
2529 + | self.range_byte_query = Some(input);
|
2530 + | self
|
2531 + | }
|
2532 + | #[allow(missing_docs)] // documentation missing in model
|
2533 + | pub fn range_short_query(mut self, input: i16) -> Self {
|
2534 + | self.range_short_query = Some(input);
|
2535 + | self
|
2536 + | }
|
2537 + | #[allow(missing_docs)] // documentation missing in model
|
2538 + | pub fn range_integer_query(mut self, input: i32) -> Self {
|
2539 + | self.range_integer_query = Some(input);
|
2540 + | self
|
2541 + | }
|
2542 + | #[allow(missing_docs)] // documentation missing in model
|
2543 + | pub fn range_long_query(mut self, input: i64) -> Self {
|
2544 + | self.range_long_query = Some(input);
|
2545 + | self
|
2546 + | }
|
2547 + | #[allow(missing_docs)] // documentation missing in model
|
2548 + | pub fn enum_string_query(
|
2549 + | mut self,
|
2550 + | input: ::std::option::Option<crate::model::EnumString>,
|
2551 + | ) -> Self {
|
2552 + | self.enum_string_query = input;
|
2553 + | self
|
2554 + | }
|
2555 + | #[allow(missing_docs)] // documentation missing in model
|
2556 + | pub fn length_string_list_query(
|
2557 + | mut self,
|
2558 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2559 + | ) -> Self {
|
2560 + | self.length_string_list_query = input;
|
2561 + | self
|
2562 + | }
|
2563 + | #[allow(missing_docs)] // documentation missing in model
|
2564 + | pub fn length_list_pattern_string_query(
|
2565 + | mut self,
|
2566 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2567 + | ) -> Self {
|
2568 + | self.length_list_pattern_string_query = input;
|
2569 + | self
|
2570 + | }
|
2571 + | #[allow(missing_docs)] // documentation missing in model
|
2572 + | pub fn length_string_set_query(
|
2573 + | mut self,
|
2574 + | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
2575 + | ) -> Self {
|
2576 + | self.length_string_set_query = input;
|
2577 + | self
|
2578 + | }
|
2579 + | #[allow(missing_docs)] // documentation missing in model
|
2580 + | pub fn range_byte_list_query(
|
2581 + | mut self,
|
2582 + | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
2583 + | ) -> Self {
|
2584 + | self.range_byte_list_query = input;
|
2585 + | self
|
2586 + | }
|
2587 + | #[allow(missing_docs)] // documentation missing in model
|
2588 + | pub fn range_short_list_query(
|
2589 + | mut self,
|
2590 + | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
2591 + | ) -> Self {
|
2592 + | self.range_short_list_query = input;
|
2593 + | self
|
2594 + | }
|
2595 + | #[allow(missing_docs)] // documentation missing in model
|
2596 + | pub fn range_integer_list_query(
|
2597 + | mut self,
|
2598 + | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
2599 + | ) -> Self {
|
2600 + | self.range_integer_list_query = input;
|
2601 + | self
|
2602 + | }
|
2603 + | #[allow(missing_docs)] // documentation missing in model
|
2604 + | pub fn range_long_list_query(
|
2605 + | mut self,
|
2606 + | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
2607 + | ) -> Self {
|
2608 + | self.range_long_list_query = input;
|
2609 + | self
|
2610 + | }
|
2611 + | #[allow(missing_docs)] // documentation missing in model
|
2612 + | pub fn range_byte_set_query(
|
2613 + | mut self,
|
2614 + | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
2615 + | ) -> Self {
|
2616 + | self.range_byte_set_query = input;
|
2617 + | self
|
2618 + | }
|
2619 + | #[allow(missing_docs)] // documentation missing in model
|
2620 + | pub fn range_short_set_query(
|
2621 + | mut self,
|
2622 + | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
2623 + | ) -> Self {
|
2624 + | self.range_short_set_query = input;
|
2625 + | self
|
2626 + | }
|
2627 + | #[allow(missing_docs)] // documentation missing in model
|
2628 + | pub fn range_integer_set_query(
|
2629 + | mut self,
|
2630 + | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
2631 + | ) -> Self {
|
2632 + | self.range_integer_set_query = input;
|
2633 + | self
|
2634 + | }
|
2635 + | #[allow(missing_docs)] // documentation missing in model
|
2636 + | pub fn range_long_set_query(
|
2637 + | mut self,
|
2638 + | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
2639 + | ) -> Self {
|
2640 + | self.range_long_set_query = input;
|
2641 + | self
|
2642 + | }
|
2643 + | #[allow(missing_docs)] // documentation missing in model
|
2644 + | pub fn enum_string_list_query(
|
2645 + | mut self,
|
2646 + | input: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
2647 + | ) -> Self {
|
2648 + | self.enum_string_list_query = input;
|
2649 + | self
|
2650 + | }
|
2651 + | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
2652 + | ///
|
2653 + | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
2654 + | ///
|
2655 + | pub fn build(
|
2656 + | self,
|
2657 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
2658 + | {
|
2659 + | self.build_enforcing_required_and_enum_traits()
|
2660 + | }
|
2661 + | fn build_enforcing_required_and_enum_traits(
|
2662 + | self,
|
2663 + | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
2664 + | {
|
2665 + | Ok(crate::input::ConstrainedHttpBoundShapesOperationInput {
|
2666 + | length_string_label: self
|
2667 + | .length_string_label
|
2668 + | .ok_or(ConstraintViolation::MissingLengthStringLabel)?,
|
2669 + | range_integer_label: self.range_integer_label.unwrap_or(0i32),
|
2670 + | range_short_label: self.range_short_label.unwrap_or(0i16),
|
2671 + | range_long_label: self.range_long_label.unwrap_or(0i64),
|
2672 + | range_byte_label: self.range_byte_label.unwrap_or(0i8),
|
2673 + | enum_string_label: self
|
2674 + | .enum_string_label
|
2675 + | .ok_or(ConstraintViolation::MissingEnumStringLabel)?,
|
2676 + | length_string_header_map: self
|
2677 + | .length_string_header_map
|
2678 + | .ok_or(ConstraintViolation::MissingLengthStringHeaderMap)?,
|
2679 + | length_string_header: self.length_string_header,
|
2680 + | range_integer_header: self.range_integer_header.unwrap_or(0i32),
|
2681 + | range_short_header: self.range_short_header.unwrap_or(0i16),
|
2682 + | range_long_header: self.range_long_header.unwrap_or(0i64),
|
2683 + | range_byte_header: self.range_byte_header.unwrap_or(0i8),
|
2684 + | length_string_set_header: self.length_string_set_header,
|
2685 + | list_length_string_header: self.list_length_string_header,
|
2686 + | length_list_pattern_string_header: self.length_list_pattern_string_header,
|
2687 + | length_set_pattern_string_header: self.length_set_pattern_string_header,
|
2688 + | range_byte_set_header: self.range_byte_set_header,
|
2689 + | range_short_set_header: self.range_short_set_header,
|
2690 + | range_integer_set_header: self.range_integer_set_header,
|
2691 + | range_long_set_header: self.range_long_set_header,
|
2692 + | range_byte_list_header: self.range_byte_list_header,
|
2693 + | range_short_list_header: self.range_short_list_header,
|
2694 + | range_integer_list_header: self.range_integer_list_header,
|
2695 + | range_long_list_header: self.range_long_list_header,
|
2696 + | length_string_query: self.length_string_query,
|
2697 + | range_byte_query: self.range_byte_query.unwrap_or(0i8),
|
2698 + | range_short_query: self.range_short_query.unwrap_or(0i16),
|
2699 + | range_integer_query: self.range_integer_query.unwrap_or(0i32),
|
2700 + | range_long_query: self.range_long_query.unwrap_or(0i64),
|
2701 + | enum_string_query: self.enum_string_query,
|
2702 + | length_string_list_query: self.length_string_list_query,
|
2703 + | length_list_pattern_string_query: self.length_list_pattern_string_query,
|
2704 + | length_string_set_query: self.length_string_set_query,
|
2705 + | range_byte_list_query: self.range_byte_list_query,
|
2706 + | range_short_list_query: self.range_short_list_query,
|
2707 + | range_integer_list_query: self.range_integer_list_query,
|
2708 + | range_long_list_query: self.range_long_list_query,
|
2709 + | range_byte_set_query: self.range_byte_set_query,
|
2710 + | range_short_set_query: self.range_short_set_query,
|
2711 + | range_integer_set_query: self.range_integer_set_query,
|
2712 + | range_long_set_query: self.range_long_set_query,
|
2713 + | enum_string_list_query: self.enum_string_list_query,
|
2714 + | })
|
2715 + | }
|
2716 + | }
|
2717 + | }
|
2718 + | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2719 + | pub(crate) mod constrained_http_payload_bound_shape_operation_input_internal {
|
2720 + |
|
2721 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2722 + | /// Holds one variant for each of the ways the builder can fail.
|
2723 + | #[non_exhaustive]
|
2724 + | #[allow(clippy::enum_variant_names)]
|
2725 + | pub(crate) enum ConstraintViolation {
|
2726 + | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2727 + | MissingHttpPayloadBoundConstrainedShape,
|
2728 + | /// Constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2729 + | #[doc(hidden)]
|
2730 + | HttpPayloadBoundConstrainedShape(crate::model::con_a_internal::ConstraintViolation),
|
2731 + | }
|
2732 + | impl ::std::fmt::Display for ConstraintViolation {
|
2733 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2734 + | match self {
|
2735 + | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2736 + | ConstraintViolation::HttpPayloadBoundConstrainedShape(_) => write!(f, "constraint violation occurred building member `http_payload_bound_constrained_shape` when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2737 + | }
|
2738 + | }
|
2739 + | }
|
2740 + | impl ::std::error::Error for ConstraintViolation {}
|
2741 + | impl ConstraintViolation {
|
2742 + | pub(crate) fn as_validation_exception_field(
|
2743 + | self,
|
2744 + | path: ::std::string::String,
|
2745 + | ) -> crate::model::ValidationExceptionField {
|
2746 + | match self {
|
2747 + | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => crate::model::ValidationExceptionField {
|
2748 + | message: format!("Value at '{}/httpPayloadBoundConstrainedShape' failed to satisfy constraint: Member must not be null", path),
|
2749 + | path: path + "/httpPayloadBoundConstrainedShape",
|
2750 + | },
|
2751 + | ConstraintViolation::HttpPayloadBoundConstrainedShape(inner) => inner.as_validation_exception_field(path + "/httpPayloadBoundConstrainedShape"),
|
2752 + | }
|
2753 + | }
|
2754 + | }
|
2755 + | impl ::std::convert::From<ConstraintViolation>
|
2756 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2757 + | {
|
2758 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2759 + | let first_validation_exception_field =
|
2760 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2761 + | let validation_exception = crate::error::ValidationException {
|
2762 + | message: format!(
|
2763 + | "1 validation error detected. {}",
|
2764 + | &first_validation_exception_field.message
|
2765 + | ),
|
2766 + | field_list: Some(vec![first_validation_exception_field]),
|
2767 + | };
|
2768 + | Self::ConstraintViolation(
|
2769 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2770 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2771 + | )
|
2772 + | }
|
2773 + | }
|
2774 + | impl ::std::convert::From<Builder>
|
2775 + | for crate::constrained::MaybeConstrained<
|
2776 + | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput,
|
2777 + | >
|
2778 + | {
|
2779 + | fn from(builder: Builder) -> Self {
|
2780 + | Self::Unconstrained(builder)
|
2781 + | }
|
2782 + | }
|
2783 + | impl ::std::convert::TryFrom<Builder>
|
2784 + | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
2785 + | {
|
2786 + | type Error = ConstraintViolation;
|
2787 + |
|
2788 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2789 + | builder.build()
|
2790 + | }
|
2791 + | }
|
2792 + | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2793 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2794 + | pub(crate) struct Builder {
|
2795 + | pub(crate) http_payload_bound_constrained_shape:
|
2796 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
2797 + | }
|
2798 + | impl Builder {
|
2799 + | #[allow(missing_docs)] // documentation missing in model
|
2800 + | pub(crate) fn set_http_payload_bound_constrained_shape(
|
2801 + | mut self,
|
2802 + | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
2803 + | ) -> Self {
|
2804 + | self.http_payload_bound_constrained_shape = Some(input.into());
|
2805 + | self
|
2806 + | }
|
2807 + | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2808 + | ///
|
2809 + | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if a [`ConstraintViolation`] occurs.
|
2810 + | ///
|
2811 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
2812 + | pub fn build(
|
2813 + | self,
|
2814 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2815 + | {
|
2816 + | self.build_enforcing_all_constraints()
|
2817 + | }
|
2818 + | fn build_enforcing_all_constraints(
|
2819 + | self,
|
2820 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2821 + | {
|
2822 + | Ok(
|
2823 + | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
2824 + | http_payload_bound_constrained_shape: self
|
2825 + | .http_payload_bound_constrained_shape
|
2826 + | .map(|v| match v {
|
2827 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
2828 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
2829 + | })
|
2830 + | .map(|res| {
|
2831 + | res.map_err(ConstraintViolation::HttpPayloadBoundConstrainedShape)
|
2832 + | })
|
2833 + | .transpose()?
|
2834 + | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
2835 + | },
|
2836 + | )
|
2837 + | }
|
2838 + | }
|
2839 + | }
|
2840 + | /// See [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2841 + | pub mod constrained_http_payload_bound_shape_operation_input {
|
2842 + |
|
2843 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2844 + | /// Holds one variant for each of the ways the builder can fail.
|
2845 + | #[allow(clippy::enum_variant_names)]
|
2846 + | pub enum ConstraintViolation {
|
2847 + | /// `http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`.
|
2848 + | MissingHttpPayloadBoundConstrainedShape,
|
2849 + | }
|
2850 + | impl ::std::fmt::Display for ConstraintViolation {
|
2851 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2852 + | match self {
|
2853 + | ConstraintViolation::MissingHttpPayloadBoundConstrainedShape => write!(f, "`http_payload_bound_constrained_shape` was not provided but it is required when building `ConstrainedHttpPayloadBoundShapeOperationInput`"),
|
2854 + | }
|
2855 + | }
|
2856 + | }
|
2857 + | impl ::std::error::Error for ConstraintViolation {}
|
2858 + | impl ::std::convert::TryFrom<Builder>
|
2859 + | for crate::input::ConstrainedHttpPayloadBoundShapeOperationInput
|
2860 + | {
|
2861 + | type Error = ConstraintViolation;
|
2862 + |
|
2863 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2864 + | builder.build()
|
2865 + | }
|
2866 + | }
|
2867 + | /// A builder for [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2868 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2869 + | pub struct Builder {
|
2870 + | pub(crate) http_payload_bound_constrained_shape: ::std::option::Option<crate::model::ConA>,
|
2871 + | }
|
2872 + | impl Builder {
|
2873 + | #[allow(missing_docs)] // documentation missing in model
|
2874 + | pub fn http_payload_bound_constrained_shape(mut self, input: crate::model::ConA) -> Self {
|
2875 + | self.http_payload_bound_constrained_shape = Some(input);
|
2876 + | self
|
2877 + | }
|
2878 + | /// Consumes the builder and constructs a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput).
|
2879 + | ///
|
2880 + | /// The builder fails to construct a [`ConstrainedHttpPayloadBoundShapeOperationInput`](crate::input::ConstrainedHttpPayloadBoundShapeOperationInput) if you do not provide a value for all non-`Option`al members.
|
2881 + | ///
|
2882 + | pub fn build(
|
2883 + | self,
|
2884 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2885 + | {
|
2886 + | self.build_enforcing_required_and_enum_traits()
|
2887 + | }
|
2888 + | fn build_enforcing_required_and_enum_traits(
|
2889 + | self,
|
2890 + | ) -> Result<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput, ConstraintViolation>
|
2891 + | {
|
2892 + | Ok(
|
2893 + | crate::input::ConstrainedHttpPayloadBoundShapeOperationInput {
|
2894 + | http_payload_bound_constrained_shape: self
|
2895 + | .http_payload_bound_constrained_shape
|
2896 + | .ok_or(ConstraintViolation::MissingHttpPayloadBoundConstrainedShape)?,
|
2897 + | },
|
2898 + | )
|
2899 + | }
|
2900 + | }
|
2901 + | }
|
2902 + | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2903 + | pub(crate) mod constrained_recursive_shapes_operation_input_internal {
|
2904 + |
|
2905 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
2906 + | /// Holds one variant for each of the ways the builder can fail.
|
2907 + | #[non_exhaustive]
|
2908 + | #[allow(clippy::enum_variant_names)]
|
2909 + | pub(crate) enum ConstraintViolation {
|
2910 + | /// Constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`.
|
2911 + | #[doc(hidden)]
|
2912 + | Nested(crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation),
|
2913 + | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
2914 + | MissingRecursiveList,
|
2915 + | /// Constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`.
|
2916 + | #[doc(hidden)]
|
2917 + | RecursiveList(crate::model::recursive_list_internal::ConstraintViolation),
|
2918 + | }
|
2919 + | impl ::std::fmt::Display for ConstraintViolation {
|
2920 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
2921 + | match self {
|
2922 + | ConstraintViolation::Nested(_) => write!(f, "constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`"),
|
2923 + | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
2924 + | ConstraintViolation::RecursiveList(_) => write!(f, "constraint violation occurred building member `recursive_list` when building `ConstrainedRecursiveShapesOperationInput`"),
|
2925 + | }
|
2926 + | }
|
2927 + | }
|
2928 + | impl ::std::error::Error for ConstraintViolation {}
|
2929 + | impl ConstraintViolation {
|
2930 + | pub(crate) fn as_validation_exception_field(
|
2931 + | self,
|
2932 + | path: ::std::string::String,
|
2933 + | ) -> crate::model::ValidationExceptionField {
|
2934 + | match self {
|
2935 + | ConstraintViolation::Nested(inner) => inner.as_validation_exception_field(path + "/nested"),
|
2936 + | ConstraintViolation::MissingRecursiveList => crate::model::ValidationExceptionField {
|
2937 + | message: format!("Value at '{}/recursiveList' failed to satisfy constraint: Member must not be null", path),
|
2938 + | path: path + "/recursiveList",
|
2939 + | },
|
2940 + | ConstraintViolation::RecursiveList(inner) => inner.as_validation_exception_field(path + "/recursiveList"),
|
2941 + | }
|
2942 + | }
|
2943 + | }
|
2944 + | impl ::std::convert::From<ConstraintViolation>
|
2945 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
2946 + | {
|
2947 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
2948 + | let first_validation_exception_field =
|
2949 + | constraint_violation.as_validation_exception_field("".to_owned());
|
2950 + | let validation_exception = crate::error::ValidationException {
|
2951 + | message: format!(
|
2952 + | "1 validation error detected. {}",
|
2953 + | &first_validation_exception_field.message
|
2954 + | ),
|
2955 + | field_list: Some(vec![first_validation_exception_field]),
|
2956 + | };
|
2957 + | Self::ConstraintViolation(
|
2958 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
2959 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
2960 + | )
|
2961 + | }
|
2962 + | }
|
2963 + | impl ::std::convert::From<Builder>
|
2964 + | for crate::constrained::MaybeConstrained<
|
2965 + | crate::input::ConstrainedRecursiveShapesOperationInput,
|
2966 + | >
|
2967 + | {
|
2968 + | fn from(builder: Builder) -> Self {
|
2969 + | Self::Unconstrained(builder)
|
2970 + | }
|
2971 + | }
|
2972 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
2973 + | type Error = ConstraintViolation;
|
2974 + |
|
2975 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
2976 + | builder.build()
|
2977 + | }
|
2978 + | }
|
2979 + | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
2980 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
2981 + | pub(crate) struct Builder {
|
2982 + | pub(crate) nested: ::std::option::Option<
|
2983 + | crate::constrained::MaybeConstrained<crate::model::RecursiveShapesInputOutputNested1>,
|
2984 + | >,
|
2985 + | pub(crate) recursive_list: ::std::option::Option<
|
2986 + | crate::constrained::MaybeConstrained<
|
2987 + | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
2988 + | >,
|
2989 + | >,
|
2990 + | }
|
2991 + | impl Builder {
|
2992 + | #[allow(missing_docs)] // documentation missing in model
|
2993 + | pub(crate) fn set_nested(
|
2994 + | mut self,
|
2995 + | input: Option<
|
2996 + | impl ::std::convert::Into<
|
2997 + | crate::constrained::MaybeConstrained<
|
2998 + | crate::model::RecursiveShapesInputOutputNested1,
|
2999 + | >,
|
3000 + | >,
|
3001 + | >,
|
3002 + | ) -> Self {
|
3003 + | self.nested = input.map(|v| v.into());
|
3004 + | self
|
3005 + | }
|
3006 + | #[allow(missing_docs)] // documentation missing in model
|
3007 + | pub(crate) fn set_recursive_list(
|
3008 + | mut self,
|
3009 + | input: impl ::std::convert::Into<
|
3010 + | crate::constrained::MaybeConstrained<
|
3011 + | crate::constrained::recursive_list_constrained::RecursiveListConstrained,
|
3012 + | >,
|
3013 + | >,
|
3014 + | ) -> Self {
|
3015 + | self.recursive_list = Some(input.into());
|
3016 + | self
|
3017 + | }
|
3018 + | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3019 + | ///
|
3020 + | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
3021 + | ///
|
3022 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
3023 + | pub fn build(
|
3024 + | self,
|
3025 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3026 + | {
|
3027 + | self.build_enforcing_all_constraints()
|
3028 + | }
|
3029 + | fn build_enforcing_all_constraints(
|
3030 + | self,
|
3031 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3032 + | {
|
3033 + | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
3034 + | nested: self
|
3035 + | .nested
|
3036 + | .map(|v| match v {
|
3037 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3038 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3039 + | })
|
3040 + | .map(|res| res.map_err(ConstraintViolation::Nested))
|
4701 3041 | .transpose()?,
|
4702 - | range_long_list_query: self
|
4703 - | .range_long_list_query
|
3042 + | recursive_list: self
|
3043 + | .recursive_list
|
4704 3044 | .map(|v| match v {
|
4705 3045 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4706 3046 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4707 3047 | })
|
4708 3048 | .map(|res| {
|
4709 3049 | res.map(|v| v.into())
|
4710 - | .map_err(ConstraintViolation::RangeLongListQuery)
|
4711 - | })
|
4712 - | .transpose()?,
|
4713 - | range_byte_set_query: self
|
4714 - | .range_byte_set_query
|
4715 - | .map(|v| match v {
|
4716 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4717 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4718 - | })
|
4719 - | .map(|res| res.map_err(ConstraintViolation::RangeByteSetQuery))
|
4720 - | .transpose()?
|
4721 - | .map(|v: crate::model::SetOfRangeByte| v.into()),
|
4722 - | range_short_set_query: self
|
4723 - | .range_short_set_query
|
4724 - | .map(|v| match v {
|
4725 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4726 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4727 - | })
|
4728 - | .map(|res| res.map_err(ConstraintViolation::RangeShortSetQuery))
|
4729 - | .transpose()?
|
4730 - | .map(|v: crate::model::SetOfRangeShort| v.into()),
|
4731 - | range_integer_set_query: self
|
4732 - | .range_integer_set_query
|
4733 - | .map(|v| match v {
|
4734 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4735 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3050 + | .map_err(ConstraintViolation::RecursiveList)
|
4736 3051 | })
|
4737 - | .map(|res| res.map_err(ConstraintViolation::RangeIntegerSetQuery))
|
4738 3052 | .transpose()?
|
4739 - | .map(|v: crate::model::SetOfRangeInteger| v.into()),
|
4740 - | range_long_set_query: self
|
4741 - | .range_long_set_query
|
3053 + | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
3054 + | })
|
3055 + | }
|
3056 + | }
|
3057 + | }
|
3058 + | /// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3059 + | pub mod constrained_recursive_shapes_operation_input {
|
3060 + |
|
3061 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3062 + | /// Holds one variant for each of the ways the builder can fail.
|
3063 + | #[allow(clippy::enum_variant_names)]
|
3064 + | pub enum ConstraintViolation {
|
3065 + | /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`.
|
3066 + | MissingRecursiveList,
|
3067 + | }
|
3068 + | impl ::std::fmt::Display for ConstraintViolation {
|
3069 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3070 + | match self {
|
3071 + | ConstraintViolation::MissingRecursiveList => write!(f, "`recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationInput`"),
|
3072 + | }
|
3073 + | }
|
3074 + | }
|
3075 + | impl ::std::error::Error for ConstraintViolation {}
|
3076 + | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedRecursiveShapesOperationInput {
|
3077 + | type Error = ConstraintViolation;
|
3078 + |
|
3079 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3080 + | builder.build()
|
3081 + | }
|
3082 + | }
|
3083 + | /// A builder for [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3084 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3085 + | pub struct Builder {
|
3086 + | pub(crate) nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3087 + | pub(crate) recursive_list:
|
3088 + | ::std::option::Option<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>>,
|
3089 + | }
|
3090 + | impl Builder {
|
3091 + | #[allow(missing_docs)] // documentation missing in model
|
3092 + | pub fn nested(
|
3093 + | mut self,
|
3094 + | input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
|
3095 + | ) -> Self {
|
3096 + | self.nested = input;
|
3097 + | self
|
3098 + | }
|
3099 + | #[allow(missing_docs)] // documentation missing in model
|
3100 + | pub fn recursive_list(
|
3101 + | mut self,
|
3102 + | input: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
|
3103 + | ) -> Self {
|
3104 + | self.recursive_list = Some(input);
|
3105 + | self
|
3106 + | }
|
3107 + | /// Consumes the builder and constructs a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
|
3108 + | ///
|
3109 + | /// The builder fails to construct a [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
3110 + | ///
|
3111 + | pub fn build(
|
3112 + | self,
|
3113 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3114 + | {
|
3115 + | self.build_enforcing_required_and_enum_traits()
|
3116 + | }
|
3117 + | fn build_enforcing_required_and_enum_traits(
|
3118 + | self,
|
3119 + | ) -> Result<crate::input::ConstrainedRecursiveShapesOperationInput, ConstraintViolation>
|
3120 + | {
|
3121 + | Ok(crate::input::ConstrainedRecursiveShapesOperationInput {
|
3122 + | nested: self.nested,
|
3123 + | recursive_list: self
|
3124 + | .recursive_list
|
3125 + | .ok_or(ConstraintViolation::MissingRecursiveList)?,
|
3126 + | })
|
3127 + | }
|
3128 + | }
|
3129 + | }
|
3130 + | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3131 + | pub(crate) mod query_params_targeting_length_map_operation_input_internal {
|
3132 + |
|
3133 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3134 + | /// Holds one variant for each of the ways the builder can fail.
|
3135 + | #[non_exhaustive]
|
3136 + | #[allow(clippy::enum_variant_names)]
|
3137 + | pub(crate) enum ConstraintViolation {
|
3138 + | /// Constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`.
|
3139 + | #[doc(hidden)]
|
3140 + | LengthMap(crate::model::con_b_map_internal::ConstraintViolation),
|
3141 + | }
|
3142 + | impl ::std::fmt::Display for ConstraintViolation {
|
3143 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3144 + | match self {
|
3145 + | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `QueryParamsTargetingLengthMapOperationInput`"),
|
3146 + | }
|
3147 + | }
|
3148 + | }
|
3149 + | impl ::std::error::Error for ConstraintViolation {}
|
3150 + | impl ConstraintViolation {
|
3151 + | pub(crate) fn as_validation_exception_field(
|
3152 + | self,
|
3153 + | path: ::std::string::String,
|
3154 + | ) -> crate::model::ValidationExceptionField {
|
3155 + | match self {
|
3156 + | ConstraintViolation::LengthMap(inner) => {
|
3157 + | inner.as_validation_exception_field(path + "/lengthMap")
|
3158 + | }
|
3159 + | }
|
3160 + | }
|
3161 + | }
|
3162 + | impl ::std::convert::From<ConstraintViolation>
|
3163 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3164 + | {
|
3165 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3166 + | let first_validation_exception_field =
|
3167 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3168 + | let validation_exception = crate::error::ValidationException {
|
3169 + | message: format!(
|
3170 + | "1 validation error detected. {}",
|
3171 + | &first_validation_exception_field.message
|
3172 + | ),
|
3173 + | field_list: Some(vec![first_validation_exception_field]),
|
3174 + | };
|
3175 + | Self::ConstraintViolation(
|
3176 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3177 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3178 + | )
|
3179 + | }
|
3180 + | }
|
3181 + | impl ::std::convert::From<Builder>
|
3182 + | for crate::constrained::MaybeConstrained<
|
3183 + | crate::input::QueryParamsTargetingLengthMapOperationInput,
|
3184 + | >
|
3185 + | {
|
3186 + | fn from(builder: Builder) -> Self {
|
3187 + | Self::Unconstrained(builder)
|
3188 + | }
|
3189 + | }
|
3190 + | impl ::std::convert::TryFrom<Builder>
|
3191 + | for crate::input::QueryParamsTargetingLengthMapOperationInput
|
3192 + | {
|
3193 + | type Error = ConstraintViolation;
|
3194 + |
|
3195 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3196 + | builder.build()
|
3197 + | }
|
3198 + | }
|
3199 + | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3200 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3201 + | pub(crate) struct Builder {
|
3202 + | pub(crate) length_map:
|
3203 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
3204 + | }
|
3205 + | impl Builder {
|
3206 + | #[allow(missing_docs)] // documentation missing in model
|
3207 + | pub(crate) fn set_length_map(
|
3208 + | mut self,
|
3209 + | input: Option<
|
3210 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
3211 + | >,
|
3212 + | ) -> Self {
|
3213 + | self.length_map = input.map(|v| v.into());
|
3214 + | self
|
3215 + | }
|
3216 + | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3217 + | ///
|
3218 + | /// The builder fails to construct a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
3219 + | ///
|
3220 + | pub fn build(
|
3221 + | self,
|
3222 + | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
3223 + | {
|
3224 + | self.build_enforcing_all_constraints()
|
3225 + | }
|
3226 + | fn build_enforcing_all_constraints(
|
3227 + | self,
|
3228 + | ) -> Result<crate::input::QueryParamsTargetingLengthMapOperationInput, ConstraintViolation>
|
3229 + | {
|
3230 + | Ok(crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3231 + | length_map: self
|
3232 + | .length_map
|
4742 3233 | .map(|v| match v {
|
4743 3234 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4744 3235 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4745 3236 | })
|
4746 - | .map(|res| res.map_err(ConstraintViolation::RangeLongSetQuery))
|
3237 + | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
4747 3238 | .transpose()?
|
4748 - | .map(|v: crate::model::SetOfRangeLong| v.into()),
|
4749 - | enum_string_list_query: self
|
4750 - | .enum_string_list_query
|
4751 - | .map(|v| match v {
|
4752 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4753 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4754 - | })
|
4755 - | .map(|res| {
|
4756 - | res.map(|v| v.into())
|
4757 - | .map_err(ConstraintViolation::EnumStringListQuery)
|
4758 - | })
|
4759 - | .transpose()?,
|
3239 + | .map(|v: crate::model::ConBMap| v.into()),
|
4760 3240 | })
|
4761 3241 | }
|
4762 3242 | }
|
4763 3243 | }
|
4764 - | /// See [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
4765 - | pub mod constrained_http_bound_shapes_operation_input {
|
3244 + | /// See [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3245 + | pub mod query_params_targeting_length_map_operation_input {
|
3246 + |
|
3247 + | impl ::std::convert::From<Builder> for crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3248 + | fn from(builder: Builder) -> Self {
|
3249 + | builder.build()
|
3250 + | }
|
3251 + | }
|
3252 + | /// A builder for [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3253 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3254 + | pub struct Builder {
|
3255 + | pub(crate) length_map: ::std::option::Option<
|
3256 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3257 + | >,
|
3258 + | }
|
3259 + | impl Builder {
|
3260 + | #[allow(missing_docs)] // documentation missing in model
|
3261 + | pub fn length_map(
|
3262 + | mut self,
|
3263 + | input: ::std::option::Option<
|
3264 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3265 + | >,
|
3266 + | ) -> Self {
|
3267 + | self.length_map = input;
|
3268 + | self
|
3269 + | }
|
3270 + | /// Consumes the builder and constructs a [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
|
3271 + | pub fn build(self) -> crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3272 + | self.build_enforcing_required_and_enum_traits()
|
3273 + | }
|
3274 + | fn build_enforcing_required_and_enum_traits(
|
3275 + | self,
|
3276 + | ) -> crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3277 + | crate::input::QueryParamsTargetingLengthMapOperationInput {
|
3278 + | length_map: self.length_map,
|
3279 + | }
|
3280 + | }
|
3281 + | }
|
3282 + | }
|
3283 + | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3284 + | pub(crate) mod query_params_targeting_map_of_length_string_operation_input_internal {
|
3285 + |
|
3286 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3287 + | /// Holds one variant for each of the ways the builder can fail.
|
3288 + | #[non_exhaustive]
|
3289 + | #[allow(clippy::enum_variant_names)]
|
3290 + | pub(crate) enum ConstraintViolation {
|
3291 + | /// Constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`.
|
3292 + | #[doc(hidden)]
|
3293 + | MapOfLengthString(crate::model::map_of_length_string_internal::ConstraintViolation),
|
3294 + | }
|
3295 + | impl ::std::fmt::Display for ConstraintViolation {
|
3296 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3297 + | match self {
|
3298 + | ConstraintViolation::MapOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_length_string` when building `QueryParamsTargetingMapOfLengthStringOperationInput`"),
|
3299 + | }
|
3300 + | }
|
3301 + | }
|
3302 + | impl ::std::error::Error for ConstraintViolation {}
|
3303 + | impl ConstraintViolation {
|
3304 + | pub(crate) fn as_validation_exception_field(
|
3305 + | self,
|
3306 + | path: ::std::string::String,
|
3307 + | ) -> crate::model::ValidationExceptionField {
|
3308 + | match self {
|
3309 + | ConstraintViolation::MapOfLengthString(inner) => {
|
3310 + | inner.as_validation_exception_field(path + "/mapOfLengthString")
|
3311 + | }
|
3312 + | }
|
3313 + | }
|
3314 + | }
|
3315 + | impl ::std::convert::From<ConstraintViolation>
|
3316 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3317 + | {
|
3318 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3319 + | let first_validation_exception_field =
|
3320 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3321 + | let validation_exception = crate::error::ValidationException {
|
3322 + | message: format!(
|
3323 + | "1 validation error detected. {}",
|
3324 + | &first_validation_exception_field.message
|
3325 + | ),
|
3326 + | field_list: Some(vec![first_validation_exception_field]),
|
3327 + | };
|
3328 + | Self::ConstraintViolation(
|
3329 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3330 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3331 + | )
|
3332 + | }
|
3333 + | }
|
3334 + | impl ::std::convert::From<Builder>
|
3335 + | for crate::constrained::MaybeConstrained<
|
3336 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3337 + | >
|
3338 + | {
|
3339 + | fn from(builder: Builder) -> Self {
|
3340 + | Self::Unconstrained(builder)
|
3341 + | }
|
3342 + | }
|
3343 + | impl ::std::convert::TryFrom<Builder>
|
3344 + | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
3345 + | {
|
3346 + | type Error = ConstraintViolation;
|
3347 + |
|
3348 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3349 + | builder.build()
|
3350 + | }
|
3351 + | }
|
3352 + | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3353 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3354 + | pub(crate) struct Builder {
|
3355 + | pub(crate) map_of_length_string: ::std::option::Option<
|
3356 + | crate::constrained::MaybeConstrained<
|
3357 + | crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained,
|
3358 + | >,
|
3359 + | >,
|
3360 + | }
|
3361 + | impl Builder {
|
3362 + | #[allow(missing_docs)] // documentation missing in model
|
3363 + | pub(crate) fn set_map_of_length_string(
|
3364 + | mut self,
|
3365 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_string_constrained::MapOfLengthStringConstrained>>>,
|
3366 + | ) -> Self {
|
3367 + | self.map_of_length_string = input.map(|v| v.into());
|
3368 + | self
|
3369 + | }
|
3370 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3371 + | ///
|
3372 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3373 + | ///
|
3374 + | pub fn build(
|
3375 + | self,
|
3376 + | ) -> Result<
|
3377 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3378 + | ConstraintViolation,
|
3379 + | > {
|
3380 + | self.build_enforcing_all_constraints()
|
3381 + | }
|
3382 + | fn build_enforcing_all_constraints(
|
3383 + | self,
|
3384 + | ) -> Result<
|
3385 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput,
|
3386 + | ConstraintViolation,
|
3387 + | > {
|
3388 + | Ok(
|
3389 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
3390 + | map_of_length_string: self
|
3391 + | .map_of_length_string
|
3392 + | .map(|v| match v {
|
3393 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3394 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3395 + | })
|
3396 + | .map(|res| {
|
3397 + | res.map(|v| v.into())
|
3398 + | .map_err(ConstraintViolation::MapOfLengthString)
|
3399 + | })
|
3400 + | .transpose()?,
|
3401 + | },
|
3402 + | )
|
3403 + | }
|
3404 + | }
|
3405 + | }
|
3406 + | /// See [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3407 + | pub mod query_params_targeting_map_of_length_string_operation_input {
|
3408 + |
|
3409 + | impl ::std::convert::From<Builder>
|
3410 + | for crate::input::QueryParamsTargetingMapOfLengthStringOperationInput
|
3411 + | {
|
3412 + | fn from(builder: Builder) -> Self {
|
3413 + | builder.build()
|
3414 + | }
|
3415 + | }
|
3416 + | /// A builder for [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3417 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3418 + | pub struct Builder {
|
3419 + | pub(crate) map_of_length_string: ::std::option::Option<
|
3420 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3421 + | >,
|
3422 + | }
|
3423 + | impl Builder {
|
3424 + | #[allow(missing_docs)] // documentation missing in model
|
3425 + | pub fn map_of_length_string(
|
3426 + | mut self,
|
3427 + | input: ::std::option::Option<
|
3428 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
3429 + | >,
|
3430 + | ) -> Self {
|
3431 + | self.map_of_length_string = input;
|
3432 + | self
|
3433 + | }
|
3434 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthStringOperationInput).
|
3435 + | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
3436 + | self.build_enforcing_required_and_enum_traits()
|
3437 + | }
|
3438 + | fn build_enforcing_required_and_enum_traits(
|
3439 + | self,
|
3440 + | ) -> crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
3441 + | crate::input::QueryParamsTargetingMapOfLengthStringOperationInput {
|
3442 + | map_of_length_string: self.map_of_length_string,
|
3443 + | }
|
3444 + | }
|
3445 + | }
|
3446 + | }
|
3447 + | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3448 + | pub(crate) mod query_params_targeting_map_of_list_of_length_string_operation_input_internal {
|
3449 + |
|
3450 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3451 + | /// Holds one variant for each of the ways the builder can fail.
|
3452 + | #[non_exhaustive]
|
3453 + | #[allow(clippy::enum_variant_names)]
|
3454 + | pub(crate) enum ConstraintViolation {
|
3455 + | /// Constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`.
|
3456 + | #[doc(hidden)]
|
3457 + | MapOfListOfLengthString(
|
3458 + | crate::model::map_of_list_of_length_string_internal::ConstraintViolation,
|
3459 + | ),
|
3460 + | }
|
3461 + | impl ::std::fmt::Display for ConstraintViolation {
|
3462 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3463 + | match self {
|
3464 + | ConstraintViolation::MapOfListOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_length_string` when building `QueryParamsTargetingMapOfListOfLengthStringOperationInput`"),
|
3465 + | }
|
3466 + | }
|
3467 + | }
|
3468 + | impl ::std::error::Error for ConstraintViolation {}
|
3469 + | impl ConstraintViolation {
|
3470 + | pub(crate) fn as_validation_exception_field(
|
3471 + | self,
|
3472 + | path: ::std::string::String,
|
3473 + | ) -> crate::model::ValidationExceptionField {
|
3474 + | match self {
|
3475 + | ConstraintViolation::MapOfListOfLengthString(inner) => {
|
3476 + | inner.as_validation_exception_field(path + "/mapOfListOfLengthString")
|
3477 + | }
|
3478 + | }
|
3479 + | }
|
3480 + | }
|
3481 + | impl ::std::convert::From<ConstraintViolation>
|
3482 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3483 + | {
|
3484 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3485 + | let first_validation_exception_field =
|
3486 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3487 + | let validation_exception = crate::error::ValidationException {
|
3488 + | message: format!(
|
3489 + | "1 validation error detected. {}",
|
3490 + | &first_validation_exception_field.message
|
3491 + | ),
|
3492 + | field_list: Some(vec![first_validation_exception_field]),
|
3493 + | };
|
3494 + | Self::ConstraintViolation(
|
3495 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3496 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3497 + | )
|
3498 + | }
|
3499 + | }
|
3500 + | impl ::std::convert::From<Builder>
|
3501 + | for crate::constrained::MaybeConstrained<
|
3502 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3503 + | >
|
3504 + | {
|
3505 + | fn from(builder: Builder) -> Self {
|
3506 + | Self::Unconstrained(builder)
|
3507 + | }
|
3508 + | }
|
3509 + | impl ::std::convert::TryFrom<Builder>
|
3510 + | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
3511 + | {
|
3512 + | type Error = ConstraintViolation;
|
3513 + |
|
3514 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3515 + | builder.build()
|
3516 + | }
|
3517 + | }
|
3518 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3519 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3520 + | pub(crate) struct Builder {
|
3521 + | pub(crate) map_of_list_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>,
|
3522 + | }
|
3523 + | impl Builder {
|
3524 + | #[allow(missing_docs)] // documentation missing in model
|
3525 + | pub(crate) fn set_map_of_list_of_length_string(
|
3526 + | mut self,
|
3527 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_string_constrained::MapOfListOfLengthStringConstrained>>>,
|
3528 + | ) -> Self {
|
3529 + | self.map_of_list_of_length_string = input.map(|v| v.into());
|
3530 + | self
|
3531 + | }
|
3532 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3533 + | ///
|
3534 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3535 + | ///
|
3536 + | pub fn build(
|
3537 + | self,
|
3538 + | ) -> Result<
|
3539 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3540 + | ConstraintViolation,
|
3541 + | > {
|
3542 + | self.build_enforcing_all_constraints()
|
3543 + | }
|
3544 + | fn build_enforcing_all_constraints(
|
3545 + | self,
|
3546 + | ) -> Result<
|
3547 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput,
|
3548 + | ConstraintViolation,
|
3549 + | > {
|
3550 + | Ok(
|
3551 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
3552 + | map_of_list_of_length_string: self
|
3553 + | .map_of_list_of_length_string
|
3554 + | .map(|v| match v {
|
3555 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3556 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3557 + | })
|
3558 + | .map(|res| {
|
3559 + | res.map(|v| v.into())
|
3560 + | .map_err(ConstraintViolation::MapOfListOfLengthString)
|
3561 + | })
|
3562 + | .transpose()?,
|
3563 + | },
|
3564 + | )
|
3565 + | }
|
3566 + | }
|
3567 + | }
|
3568 + | /// See [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3569 + | pub mod query_params_targeting_map_of_list_of_length_string_operation_input {
|
3570 + |
|
3571 + | impl ::std::convert::From<Builder>
|
3572 + | for crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput
|
3573 + | {
|
3574 + | fn from(builder: Builder) -> Self {
|
3575 + | builder.build()
|
3576 + | }
|
3577 + | }
|
3578 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3579 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3580 + | pub struct Builder {
|
3581 + | pub(crate) map_of_list_of_length_string: ::std::option::Option<
|
3582 + | ::std::collections::HashMap<
|
3583 + | ::std::string::String,
|
3584 + | ::std::vec::Vec<::std::string::String>,
|
3585 + | >,
|
3586 + | >,
|
3587 + | }
|
3588 + | impl Builder {
|
3589 + | #[allow(missing_docs)] // documentation missing in model
|
3590 + | pub fn map_of_list_of_length_string(
|
3591 + | mut self,
|
3592 + | input: ::std::option::Option<
|
3593 + | ::std::collections::HashMap<
|
3594 + | ::std::string::String,
|
3595 + | ::std::vec::Vec<::std::string::String>,
|
3596 + | >,
|
3597 + | >,
|
3598 + | ) -> Self {
|
3599 + | self.map_of_list_of_length_string = input;
|
3600 + | self
|
3601 + | }
|
3602 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput).
|
3603 + | pub fn build(
|
3604 + | self,
|
3605 + | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
3606 + | self.build_enforcing_required_and_enum_traits()
|
3607 + | }
|
3608 + | fn build_enforcing_required_and_enum_traits(
|
3609 + | self,
|
3610 + | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
3611 + | crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput {
|
3612 + | map_of_list_of_length_string: self.map_of_list_of_length_string,
|
3613 + | }
|
3614 + | }
|
3615 + | }
|
3616 + | }
|
3617 + | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3618 + | pub(crate) mod query_params_targeting_map_of_set_of_length_string_operation_input_internal {
|
3619 + |
|
3620 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3621 + | /// Holds one variant for each of the ways the builder can fail.
|
3622 + | #[non_exhaustive]
|
3623 + | #[allow(clippy::enum_variant_names)]
|
3624 + | pub(crate) enum ConstraintViolation {
|
3625 + | /// Constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`.
|
3626 + | #[doc(hidden)]
|
3627 + | MapOfSetOfLengthString(
|
3628 + | crate::model::map_of_set_of_length_string_internal::ConstraintViolation,
|
3629 + | ),
|
3630 + | }
|
3631 + | impl ::std::fmt::Display for ConstraintViolation {
|
3632 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3633 + | match self {
|
3634 + | ConstraintViolation::MapOfSetOfLengthString(_) => write!(f, "constraint violation occurred building member `map_of_set_of_length_string` when building `QueryParamsTargetingMapOfSetOfLengthStringOperationInput`"),
|
3635 + | }
|
3636 + | }
|
3637 + | }
|
3638 + | impl ::std::error::Error for ConstraintViolation {}
|
3639 + | impl ConstraintViolation {
|
3640 + | pub(crate) fn as_validation_exception_field(
|
3641 + | self,
|
3642 + | path: ::std::string::String,
|
3643 + | ) -> crate::model::ValidationExceptionField {
|
3644 + | match self {
|
3645 + | ConstraintViolation::MapOfSetOfLengthString(inner) => {
|
3646 + | inner.as_validation_exception_field(path + "/mapOfSetOfLengthString")
|
3647 + | }
|
3648 + | }
|
3649 + | }
|
3650 + | }
|
3651 + | impl ::std::convert::From<ConstraintViolation>
|
3652 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3653 + | {
|
3654 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3655 + | let first_validation_exception_field =
|
3656 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3657 + | let validation_exception = crate::error::ValidationException {
|
3658 + | message: format!(
|
3659 + | "1 validation error detected. {}",
|
3660 + | &first_validation_exception_field.message
|
3661 + | ),
|
3662 + | field_list: Some(vec![first_validation_exception_field]),
|
3663 + | };
|
3664 + | Self::ConstraintViolation(
|
3665 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3666 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3667 + | )
|
3668 + | }
|
3669 + | }
|
3670 + | impl ::std::convert::From<Builder>
|
3671 + | for crate::constrained::MaybeConstrained<
|
3672 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3673 + | >
|
3674 + | {
|
3675 + | fn from(builder: Builder) -> Self {
|
3676 + | Self::Unconstrained(builder)
|
3677 + | }
|
3678 + | }
|
3679 + | impl ::std::convert::TryFrom<Builder>
|
3680 + | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
3681 + | {
|
3682 + | type Error = ConstraintViolation;
|
3683 + |
|
3684 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3685 + | builder.build()
|
3686 + | }
|
3687 + | }
|
3688 + | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3689 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3690 + | pub(crate) struct Builder {
|
3691 + | pub(crate) map_of_set_of_length_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>,
|
3692 + | }
|
3693 + | impl Builder {
|
3694 + | #[allow(missing_docs)] // documentation missing in model
|
3695 + | pub(crate) fn set_map_of_set_of_length_string(
|
3696 + | mut self,
|
3697 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_set_of_length_string_constrained::MapOfSetOfLengthStringConstrained>>>,
|
3698 + | ) -> Self {
|
3699 + | self.map_of_set_of_length_string = input.map(|v| v.into());
|
3700 + | self
|
3701 + | }
|
3702 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3703 + | ///
|
3704 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3705 + | ///
|
3706 + | pub fn build(
|
3707 + | self,
|
3708 + | ) -> Result<
|
3709 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3710 + | ConstraintViolation,
|
3711 + | > {
|
3712 + | self.build_enforcing_all_constraints()
|
3713 + | }
|
3714 + | fn build_enforcing_all_constraints(
|
3715 + | self,
|
3716 + | ) -> Result<
|
3717 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput,
|
3718 + | ConstraintViolation,
|
3719 + | > {
|
3720 + | Ok(
|
3721 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
3722 + | map_of_set_of_length_string: self
|
3723 + | .map_of_set_of_length_string
|
3724 + | .map(|v| match v {
|
3725 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3726 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3727 + | })
|
3728 + | .map(|res| {
|
3729 + | res.map(|v| v.into())
|
3730 + | .map_err(ConstraintViolation::MapOfSetOfLengthString)
|
3731 + | })
|
3732 + | .transpose()?,
|
3733 + | },
|
3734 + | )
|
3735 + | }
|
3736 + | }
|
3737 + | }
|
3738 + | /// See [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3739 + | pub mod query_params_targeting_map_of_set_of_length_string_operation_input {
|
3740 + |
|
3741 + | impl ::std::convert::From<Builder>
|
3742 + | for crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput
|
3743 + | {
|
3744 + | fn from(builder: Builder) -> Self {
|
3745 + | builder.build()
|
3746 + | }
|
3747 + | }
|
3748 + | /// A builder for [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3749 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3750 + | pub struct Builder {
|
3751 + | pub(crate) map_of_set_of_length_string: ::std::option::Option<
|
3752 + | ::std::collections::HashMap<
|
3753 + | ::std::string::String,
|
3754 + | ::std::vec::Vec<::std::string::String>,
|
3755 + | >,
|
3756 + | >,
|
3757 + | }
|
3758 + | impl Builder {
|
3759 + | #[allow(missing_docs)] // documentation missing in model
|
3760 + | pub fn map_of_set_of_length_string(
|
3761 + | mut self,
|
3762 + | input: ::std::option::Option<
|
3763 + | ::std::collections::HashMap<
|
3764 + | ::std::string::String,
|
3765 + | ::std::vec::Vec<::std::string::String>,
|
3766 + | >,
|
3767 + | >,
|
3768 + | ) -> Self {
|
3769 + | self.map_of_set_of_length_string = input;
|
3770 + | self
|
3771 + | }
|
3772 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfSetOfLengthStringOperationInput`](crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput).
|
3773 + | pub fn build(
|
3774 + | self,
|
3775 + | ) -> crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
3776 + | self.build_enforcing_required_and_enum_traits()
|
3777 + | }
|
3778 + | fn build_enforcing_required_and_enum_traits(
|
3779 + | self,
|
3780 + | ) -> crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
3781 + | crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput {
|
3782 + | map_of_set_of_length_string: self.map_of_set_of_length_string,
|
3783 + | }
|
3784 + | }
|
3785 + | }
|
3786 + | }
|
3787 + | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3788 + | pub(crate) mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input_internal {
|
3789 + |
|
3790 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3791 + | /// Holds one variant for each of the ways the builder can fail.
|
3792 + | #[non_exhaustive]
|
3793 + | #[allow(clippy::enum_variant_names)]
|
3794 + | pub(crate) enum ConstraintViolation {
|
3795 + | /// Constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`.
|
3796 + | #[doc(hidden)]
|
3797 + | MapOfLengthListOfPatternString(
|
3798 + | crate::model::map_of_length_list_of_pattern_string_internal::ConstraintViolation,
|
3799 + | ),
|
3800 + | }
|
3801 + | impl ::std::fmt::Display for ConstraintViolation {
|
3802 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3803 + | match self {
|
3804 + | ConstraintViolation::MapOfLengthListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_list_of_pattern_string` when building `QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`"),
|
3805 + | }
|
3806 + | }
|
3807 + | }
|
3808 + | impl ::std::error::Error for ConstraintViolation {}
|
3809 + | impl ConstraintViolation {
|
3810 + | pub(crate) fn as_validation_exception_field(
|
3811 + | self,
|
3812 + | path: ::std::string::String,
|
3813 + | ) -> crate::model::ValidationExceptionField {
|
3814 + | match self {
|
3815 + | ConstraintViolation::MapOfLengthListOfPatternString(inner) => {
|
3816 + | inner.as_validation_exception_field(path + "/mapOfLengthListOfPatternString")
|
3817 + | }
|
3818 + | }
|
3819 + | }
|
3820 + | }
|
3821 + | impl ::std::convert::From<ConstraintViolation>
|
3822 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3823 + | {
|
3824 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3825 + | let first_validation_exception_field =
|
3826 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3827 + | let validation_exception = crate::error::ValidationException {
|
3828 + | message: format!(
|
3829 + | "1 validation error detected. {}",
|
3830 + | &first_validation_exception_field.message
|
3831 + | ),
|
3832 + | field_list: Some(vec![first_validation_exception_field]),
|
3833 + | };
|
3834 + | Self::ConstraintViolation(
|
3835 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
3836 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
3837 + | )
|
3838 + | }
|
3839 + | }
|
3840 + | impl ::std::convert::From<Builder>
|
3841 + | for crate::constrained::MaybeConstrained<
|
3842 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3843 + | >
|
3844 + | {
|
3845 + | fn from(builder: Builder) -> Self {
|
3846 + | Self::Unconstrained(builder)
|
3847 + | }
|
3848 + | }
|
3849 + | impl ::std::convert::TryFrom<Builder>
|
3850 + | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
3851 + | {
|
3852 + | type Error = ConstraintViolation;
|
3853 + |
|
3854 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
3855 + | builder.build()
|
3856 + | }
|
3857 + | }
|
3858 + | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3859 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3860 + | pub(crate) struct Builder {
|
3861 + | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>,
|
3862 + | }
|
3863 + | impl Builder {
|
3864 + | #[allow(missing_docs)] // documentation missing in model
|
3865 + | pub(crate) fn set_map_of_length_list_of_pattern_string(
|
3866 + | mut self,
|
3867 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_list_of_pattern_string_constrained::MapOfLengthListOfPatternStringConstrained>>>,
|
3868 + | ) -> Self {
|
3869 + | self.map_of_length_list_of_pattern_string = input.map(|v| v.into());
|
3870 + | self
|
3871 + | }
|
3872 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3873 + | ///
|
3874 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
3875 + | ///
|
3876 + | pub fn build(
|
3877 + | self,
|
3878 + | ) -> Result<
|
3879 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3880 + | ConstraintViolation,
|
3881 + | > {
|
3882 + | self.build_enforcing_all_constraints()
|
3883 + | }
|
3884 + | fn build_enforcing_all_constraints(
|
3885 + | self,
|
3886 + | ) -> Result<
|
3887 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput,
|
3888 + | ConstraintViolation,
|
3889 + | > {
|
3890 + | Ok(
|
3891 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
3892 + | map_of_length_list_of_pattern_string: self
|
3893 + | .map_of_length_list_of_pattern_string
|
3894 + | .map(|v| match v {
|
3895 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
3896 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
3897 + | })
|
3898 + | .map(|res| {
|
3899 + | res.map(|v| v.into())
|
3900 + | .map_err(ConstraintViolation::MapOfLengthListOfPatternString)
|
3901 + | })
|
3902 + | .transpose()?,
|
3903 + | },
|
3904 + | )
|
3905 + | }
|
3906 + | }
|
3907 + | }
|
3908 + | /// See [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3909 + | pub mod query_params_targeting_map_of_length_list_of_pattern_string_operation_input {
|
3910 + |
|
3911 + | impl ::std::convert::From<Builder>
|
3912 + | for crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
3913 + | {
|
3914 + | fn from(builder: Builder) -> Self {
|
3915 + | builder.build()
|
3916 + | }
|
3917 + | }
|
3918 + | /// A builder for [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3919 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
3920 + | pub struct Builder {
|
3921 + | pub(crate) map_of_length_list_of_pattern_string: ::std::option::Option<
|
3922 + | ::std::collections::HashMap<
|
3923 + | ::std::string::String,
|
3924 + | ::std::vec::Vec<::std::string::String>,
|
3925 + | >,
|
3926 + | >,
|
3927 + | }
|
3928 + | impl Builder {
|
3929 + | #[allow(missing_docs)] // documentation missing in model
|
3930 + | pub fn map_of_length_list_of_pattern_string(
|
3931 + | mut self,
|
3932 + | input: ::std::option::Option<
|
3933 + | ::std::collections::HashMap<
|
3934 + | ::std::string::String,
|
3935 + | ::std::vec::Vec<::std::string::String>,
|
3936 + | >,
|
3937 + | >,
|
3938 + | ) -> Self {
|
3939 + | self.map_of_length_list_of_pattern_string = input;
|
3940 + | self
|
3941 + | }
|
3942 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput).
|
3943 + | pub fn build(
|
3944 + | self,
|
3945 + | ) -> crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
3946 + | {
|
3947 + | self.build_enforcing_required_and_enum_traits()
|
3948 + | }
|
3949 + | fn build_enforcing_required_and_enum_traits(
|
3950 + | self,
|
3951 + | ) -> crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput
|
3952 + | {
|
3953 + | crate::input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput {
|
3954 + | map_of_length_list_of_pattern_string: self.map_of_length_list_of_pattern_string,
|
3955 + | }
|
3956 + | }
|
3957 + | }
|
3958 + | }
|
3959 + | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
3960 + | pub(crate) mod query_params_targeting_map_of_list_of_enum_string_operation_input_internal {
|
3961 + |
|
3962 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
3963 + | /// Holds one variant for each of the ways the builder can fail.
|
3964 + | #[non_exhaustive]
|
3965 + | #[allow(clippy::enum_variant_names)]
|
3966 + | pub(crate) enum ConstraintViolation {
|
3967 + | /// Constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`.
|
3968 + | #[doc(hidden)]
|
3969 + | MapOfListOfEnumString(
|
3970 + | crate::model::map_of_list_of_enum_string_internal::ConstraintViolation,
|
3971 + | ),
|
3972 + | }
|
3973 + | impl ::std::fmt::Display for ConstraintViolation {
|
3974 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
3975 + | match self {
|
3976 + | ConstraintViolation::MapOfListOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_enum_string` when building `QueryParamsTargetingMapOfListOfEnumStringOperationInput`"),
|
3977 + | }
|
3978 + | }
|
3979 + | }
|
3980 + | impl ::std::error::Error for ConstraintViolation {}
|
3981 + | impl ConstraintViolation {
|
3982 + | pub(crate) fn as_validation_exception_field(
|
3983 + | self,
|
3984 + | path: ::std::string::String,
|
3985 + | ) -> crate::model::ValidationExceptionField {
|
3986 + | match self {
|
3987 + | ConstraintViolation::MapOfListOfEnumString(inner) => {
|
3988 + | inner.as_validation_exception_field(path + "/mapOfListOfEnumString")
|
3989 + | }
|
3990 + | }
|
3991 + | }
|
3992 + | }
|
3993 + | impl ::std::convert::From<ConstraintViolation>
|
3994 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
3995 + | {
|
3996 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
3997 + | let first_validation_exception_field =
|
3998 + | constraint_violation.as_validation_exception_field("".to_owned());
|
3999 + | let validation_exception = crate::error::ValidationException {
|
4000 + | message: format!(
|
4001 + | "1 validation error detected. {}",
|
4002 + | &first_validation_exception_field.message
|
4003 + | ),
|
4004 + | field_list: Some(vec![first_validation_exception_field]),
|
4005 + | };
|
4006 + | Self::ConstraintViolation(
|
4007 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4008 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4009 + | )
|
4010 + | }
|
4011 + | }
|
4012 + | impl ::std::convert::From<Builder>
|
4013 + | for crate::constrained::MaybeConstrained<
|
4014 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
4015 + | >
|
4016 + | {
|
4017 + | fn from(builder: Builder) -> Self {
|
4018 + | Self::Unconstrained(builder)
|
4019 + | }
|
4020 + | }
|
4021 + | impl ::std::convert::TryFrom<Builder>
|
4022 + | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
4023 + | {
|
4024 + | type Error = ConstraintViolation;
|
4025 + |
|
4026 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4027 + | builder.build()
|
4028 + | }
|
4029 + | }
|
4030 + | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
4031 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4032 + | pub(crate) struct Builder {
|
4033 + | pub(crate) map_of_list_of_enum_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>,
|
4034 + | }
|
4035 + | impl Builder {
|
4036 + | #[allow(missing_docs)] // documentation missing in model
|
4037 + | pub(crate) fn set_map_of_list_of_enum_string(
|
4038 + | mut self,
|
4039 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_enum_string_constrained::MapOfListOfEnumStringConstrained>>>,
|
4040 + | ) -> Self {
|
4041 + | self.map_of_list_of_enum_string = input.map(|v| v.into());
|
4042 + | self
|
4043 + | }
|
4044 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
4045 + | ///
|
4046 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4047 + | ///
|
4048 + | pub fn build(
|
4049 + | self,
|
4050 + | ) -> Result<
|
4051 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
4052 + | ConstraintViolation,
|
4053 + | > {
|
4054 + | self.build_enforcing_all_constraints()
|
4055 + | }
|
4056 + | fn build_enforcing_all_constraints(
|
4057 + | self,
|
4058 + | ) -> Result<
|
4059 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput,
|
4060 + | ConstraintViolation,
|
4061 + | > {
|
4062 + | Ok(
|
4063 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
4064 + | map_of_list_of_enum_string: self
|
4065 + | .map_of_list_of_enum_string
|
4066 + | .map(|v| match v {
|
4067 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4068 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4069 + | })
|
4070 + | .map(|res| {
|
4071 + | res.map(|v| v.into())
|
4072 + | .map_err(ConstraintViolation::MapOfListOfEnumString)
|
4073 + | })
|
4074 + | .transpose()?,
|
4075 + | },
|
4076 + | )
|
4077 + | }
|
4078 + | }
|
4079 + | }
|
4080 + | /// See [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
4081 + | pub mod query_params_targeting_map_of_list_of_enum_string_operation_input {
|
4082 + |
|
4083 + | impl ::std::convert::From<Builder>
|
4084 + | for crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput
|
4085 + | {
|
4086 + | fn from(builder: Builder) -> Self {
|
4087 + | builder.build()
|
4088 + | }
|
4089 + | }
|
4090 + | /// A builder for [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
4091 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4092 + | pub struct Builder {
|
4093 + | pub(crate) map_of_list_of_enum_string: ::std::option::Option<
|
4094 + | ::std::collections::HashMap<
|
4095 + | crate::model::EnumString,
|
4096 + | ::std::vec::Vec<crate::model::EnumString>,
|
4097 + | >,
|
4098 + | >,
|
4099 + | }
|
4100 + | impl Builder {
|
4101 + | #[allow(missing_docs)] // documentation missing in model
|
4102 + | pub fn map_of_list_of_enum_string(
|
4103 + | mut self,
|
4104 + | input: ::std::option::Option<
|
4105 + | ::std::collections::HashMap<
|
4106 + | crate::model::EnumString,
|
4107 + | ::std::vec::Vec<crate::model::EnumString>,
|
4108 + | >,
|
4109 + | >,
|
4110 + | ) -> Self {
|
4111 + | self.map_of_list_of_enum_string = input;
|
4112 + | self
|
4113 + | }
|
4114 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput).
|
4115 + | pub fn build(
|
4116 + | self,
|
4117 + | ) -> crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
4118 + | self.build_enforcing_required_and_enum_traits()
|
4119 + | }
|
4120 + | fn build_enforcing_required_and_enum_traits(
|
4121 + | self,
|
4122 + | ) -> crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
4123 + | crate::input::QueryParamsTargetingMapOfListOfEnumStringOperationInput {
|
4124 + | map_of_list_of_enum_string: self.map_of_list_of_enum_string,
|
4125 + | }
|
4126 + | }
|
4127 + | }
|
4128 + | }
|
4129 + | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4130 + | pub(crate) mod query_params_targeting_map_of_pattern_string_operation_input_internal {
|
4131 + |
|
4132 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4133 + | /// Holds one variant for each of the ways the builder can fail.
|
4134 + | #[non_exhaustive]
|
4135 + | #[allow(clippy::enum_variant_names)]
|
4136 + | pub(crate) enum ConstraintViolation {
|
4137 + | /// Constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`.
|
4138 + | #[doc(hidden)]
|
4139 + | MapOfPatternString(crate::model::map_of_pattern_string_internal::ConstraintViolation),
|
4140 + | }
|
4141 + | impl ::std::fmt::Display for ConstraintViolation {
|
4142 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4143 + | match self {
|
4144 + | ConstraintViolation::MapOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_pattern_string` when building `QueryParamsTargetingMapOfPatternStringOperationInput`"),
|
4145 + | }
|
4146 + | }
|
4147 + | }
|
4148 + | impl ::std::error::Error for ConstraintViolation {}
|
4149 + | impl ConstraintViolation {
|
4150 + | pub(crate) fn as_validation_exception_field(
|
4151 + | self,
|
4152 + | path: ::std::string::String,
|
4153 + | ) -> crate::model::ValidationExceptionField {
|
4154 + | match self {
|
4155 + | ConstraintViolation::MapOfPatternString(inner) => {
|
4156 + | inner.as_validation_exception_field(path + "/mapOfPatternString")
|
4157 + | }
|
4158 + | }
|
4159 + | }
|
4160 + | }
|
4161 + | impl ::std::convert::From<ConstraintViolation>
|
4162 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4163 + | {
|
4164 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4165 + | let first_validation_exception_field =
|
4166 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4167 + | let validation_exception = crate::error::ValidationException {
|
4168 + | message: format!(
|
4169 + | "1 validation error detected. {}",
|
4170 + | &first_validation_exception_field.message
|
4171 + | ),
|
4172 + | field_list: Some(vec![first_validation_exception_field]),
|
4173 + | };
|
4174 + | Self::ConstraintViolation(
|
4175 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4176 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4177 + | )
|
4178 + | }
|
4179 + | }
|
4180 + | impl ::std::convert::From<Builder>
|
4181 + | for crate::constrained::MaybeConstrained<
|
4182 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
4183 + | >
|
4184 + | {
|
4185 + | fn from(builder: Builder) -> Self {
|
4186 + | Self::Unconstrained(builder)
|
4187 + | }
|
4188 + | }
|
4189 + | impl ::std::convert::TryFrom<Builder>
|
4190 + | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
4191 + | {
|
4192 + | type Error = ConstraintViolation;
|
4193 + |
|
4194 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4195 + | builder.build()
|
4196 + | }
|
4197 + | }
|
4198 + | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4199 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4200 + | pub(crate) struct Builder {
|
4201 + | pub(crate) map_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>,
|
4202 + | }
|
4203 + | impl Builder {
|
4204 + | #[allow(missing_docs)] // documentation missing in model
|
4205 + | pub(crate) fn set_map_of_pattern_string(
|
4206 + | mut self,
|
4207 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_pattern_string_constrained::MapOfPatternStringConstrained>>>,
|
4208 + | ) -> Self {
|
4209 + | self.map_of_pattern_string = input.map(|v| v.into());
|
4210 + | self
|
4211 + | }
|
4212 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4213 + | ///
|
4214 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4215 + | ///
|
4216 + | pub fn build(
|
4217 + | self,
|
4218 + | ) -> Result<
|
4219 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
4220 + | ConstraintViolation,
|
4221 + | > {
|
4222 + | self.build_enforcing_all_constraints()
|
4223 + | }
|
4224 + | fn build_enforcing_all_constraints(
|
4225 + | self,
|
4226 + | ) -> Result<
|
4227 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput,
|
4228 + | ConstraintViolation,
|
4229 + | > {
|
4230 + | Ok(
|
4231 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
4232 + | map_of_pattern_string: self
|
4233 + | .map_of_pattern_string
|
4234 + | .map(|v| match v {
|
4235 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4236 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4237 + | })
|
4238 + | .map(|res| {
|
4239 + | res.map(|v| v.into())
|
4240 + | .map_err(ConstraintViolation::MapOfPatternString)
|
4241 + | })
|
4242 + | .transpose()?,
|
4243 + | },
|
4244 + | )
|
4245 + | }
|
4246 + | }
|
4247 + | }
|
4248 + | /// See [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4249 + | pub mod query_params_targeting_map_of_pattern_string_operation_input {
|
4250 + |
|
4251 + | impl ::std::convert::From<Builder>
|
4252 + | for crate::input::QueryParamsTargetingMapOfPatternStringOperationInput
|
4253 + | {
|
4254 + | fn from(builder: Builder) -> Self {
|
4255 + | builder.build()
|
4256 + | }
|
4257 + | }
|
4258 + | /// A builder for [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4259 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4260 + | pub struct Builder {
|
4261 + | pub(crate) map_of_pattern_string: ::std::option::Option<
|
4262 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4263 + | >,
|
4264 + | }
|
4265 + | impl Builder {
|
4266 + | #[allow(missing_docs)] // documentation missing in model
|
4267 + | pub fn map_of_pattern_string(
|
4268 + | mut self,
|
4269 + | input: ::std::option::Option<
|
4270 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4271 + | >,
|
4272 + | ) -> Self {
|
4273 + | self.map_of_pattern_string = input;
|
4274 + | self
|
4275 + | }
|
4276 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfPatternStringOperationInput).
|
4277 + | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
4278 + | self.build_enforcing_required_and_enum_traits()
|
4279 + | }
|
4280 + | fn build_enforcing_required_and_enum_traits(
|
4281 + | self,
|
4282 + | ) -> crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
4283 + | crate::input::QueryParamsTargetingMapOfPatternStringOperationInput {
|
4284 + | map_of_pattern_string: self.map_of_pattern_string,
|
4285 + | }
|
4286 + | }
|
4287 + | }
|
4288 + | }
|
4289 + | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4290 + | pub(crate) mod query_params_targeting_map_of_list_of_pattern_string_operation_input_internal {
|
4291 + |
|
4292 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4293 + | /// Holds one variant for each of the ways the builder can fail.
|
4294 + | #[non_exhaustive]
|
4295 + | #[allow(clippy::enum_variant_names)]
|
4296 + | pub(crate) enum ConstraintViolation {
|
4297 + | /// Constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`.
|
4298 + | #[doc(hidden)]
|
4299 + | MapOfListOfPatternString(
|
4300 + | crate::model::map_of_list_of_pattern_string_internal::ConstraintViolation,
|
4301 + | ),
|
4302 + | }
|
4303 + | impl ::std::fmt::Display for ConstraintViolation {
|
4304 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4305 + | match self {
|
4306 + | ConstraintViolation::MapOfListOfPatternString(_) => write!(f, "constraint violation occurred building member `map_of_list_of_pattern_string` when building `QueryParamsTargetingMapOfListOfPatternStringOperationInput`"),
|
4307 + | }
|
4308 + | }
|
4309 + | }
|
4310 + | impl ::std::error::Error for ConstraintViolation {}
|
4311 + | impl ConstraintViolation {
|
4312 + | pub(crate) fn as_validation_exception_field(
|
4313 + | self,
|
4314 + | path: ::std::string::String,
|
4315 + | ) -> crate::model::ValidationExceptionField {
|
4316 + | match self {
|
4317 + | ConstraintViolation::MapOfListOfPatternString(inner) => {
|
4318 + | inner.as_validation_exception_field(path + "/mapOfListOfPatternString")
|
4319 + | }
|
4320 + | }
|
4321 + | }
|
4322 + | }
|
4323 + | impl ::std::convert::From<ConstraintViolation>
|
4324 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4325 + | {
|
4326 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4327 + | let first_validation_exception_field =
|
4328 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4329 + | let validation_exception = crate::error::ValidationException {
|
4330 + | message: format!(
|
4331 + | "1 validation error detected. {}",
|
4332 + | &first_validation_exception_field.message
|
4333 + | ),
|
4334 + | field_list: Some(vec![first_validation_exception_field]),
|
4335 + | };
|
4336 + | Self::ConstraintViolation(
|
4337 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4338 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4339 + | )
|
4340 + | }
|
4341 + | }
|
4342 + | impl ::std::convert::From<Builder>
|
4343 + | for crate::constrained::MaybeConstrained<
|
4344 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
4345 + | >
|
4346 + | {
|
4347 + | fn from(builder: Builder) -> Self {
|
4348 + | Self::Unconstrained(builder)
|
4349 + | }
|
4350 + | }
|
4351 + | impl ::std::convert::TryFrom<Builder>
|
4352 + | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
4353 + | {
|
4354 + | type Error = ConstraintViolation;
|
4355 + |
|
4356 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4357 + | builder.build()
|
4358 + | }
|
4359 + | }
|
4360 + | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4361 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4362 + | pub(crate) struct Builder {
|
4363 + | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>,
|
4364 + | }
|
4365 + | impl Builder {
|
4366 + | #[allow(missing_docs)] // documentation missing in model
|
4367 + | pub(crate) fn set_map_of_list_of_pattern_string(
|
4368 + | mut self,
|
4369 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_pattern_string_constrained::MapOfListOfPatternStringConstrained>>>,
|
4370 + | ) -> Self {
|
4371 + | self.map_of_list_of_pattern_string = input.map(|v| v.into());
|
4372 + | self
|
4373 + | }
|
4374 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4375 + | ///
|
4376 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4377 + | ///
|
4378 + | pub fn build(
|
4379 + | self,
|
4380 + | ) -> Result<
|
4381 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
4382 + | ConstraintViolation,
|
4383 + | > {
|
4384 + | self.build_enforcing_all_constraints()
|
4385 + | }
|
4386 + | fn build_enforcing_all_constraints(
|
4387 + | self,
|
4388 + | ) -> Result<
|
4389 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput,
|
4390 + | ConstraintViolation,
|
4391 + | > {
|
4392 + | Ok(
|
4393 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
4394 + | map_of_list_of_pattern_string: self
|
4395 + | .map_of_list_of_pattern_string
|
4396 + | .map(|v| match v {
|
4397 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4398 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4399 + | })
|
4400 + | .map(|res| {
|
4401 + | res.map(|v| v.into())
|
4402 + | .map_err(ConstraintViolation::MapOfListOfPatternString)
|
4403 + | })
|
4404 + | .transpose()?,
|
4405 + | },
|
4406 + | )
|
4407 + | }
|
4408 + | }
|
4409 + | }
|
4410 + | /// See [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4411 + | pub mod query_params_targeting_map_of_list_of_pattern_string_operation_input {
|
4412 + |
|
4413 + | impl ::std::convert::From<Builder>
|
4414 + | for crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput
|
4415 + | {
|
4416 + | fn from(builder: Builder) -> Self {
|
4417 + | builder.build()
|
4418 + | }
|
4419 + | }
|
4420 + | /// A builder for [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4421 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4422 + | pub struct Builder {
|
4423 + | pub(crate) map_of_list_of_pattern_string: ::std::option::Option<
|
4424 + | ::std::collections::HashMap<
|
4425 + | ::std::string::String,
|
4426 + | ::std::vec::Vec<::std::string::String>,
|
4427 + | >,
|
4428 + | >,
|
4429 + | }
|
4430 + | impl Builder {
|
4431 + | #[allow(missing_docs)] // documentation missing in model
|
4432 + | pub fn map_of_list_of_pattern_string(
|
4433 + | mut self,
|
4434 + | input: ::std::option::Option<
|
4435 + | ::std::collections::HashMap<
|
4436 + | ::std::string::String,
|
4437 + | ::std::vec::Vec<::std::string::String>,
|
4438 + | >,
|
4439 + | >,
|
4440 + | ) -> Self {
|
4441 + | self.map_of_list_of_pattern_string = input;
|
4442 + | self
|
4443 + | }
|
4444 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput).
|
4445 + | pub fn build(
|
4446 + | self,
|
4447 + | ) -> crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
4448 + | self.build_enforcing_required_and_enum_traits()
|
4449 + | }
|
4450 + | fn build_enforcing_required_and_enum_traits(
|
4451 + | self,
|
4452 + | ) -> crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
4453 + | crate::input::QueryParamsTargetingMapOfListOfPatternStringOperationInput {
|
4454 + | map_of_list_of_pattern_string: self.map_of_list_of_pattern_string,
|
4455 + | }
|
4456 + | }
|
4457 + | }
|
4458 + | }
|
4459 + | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4460 + | pub(crate) mod query_params_targeting_map_of_length_pattern_string_operation_input_internal {
|
4461 + |
|
4462 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4463 + | /// Holds one variant for each of the ways the builder can fail.
|
4464 + | #[non_exhaustive]
|
4465 + | #[allow(clippy::enum_variant_names)]
|
4466 + | pub(crate) enum ConstraintViolation {
|
4467 + | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`.
|
4468 + | #[doc(hidden)]
|
4469 + | MapOfLengthPatternString(
|
4470 + | crate::model::map_of_length_pattern_string_internal::ConstraintViolation,
|
4471 + | ),
|
4472 + | }
|
4473 + | impl ::std::fmt::Display for ConstraintViolation {
|
4474 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4475 + | match self {
|
4476 + | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfLengthPatternStringOperationInput`"),
|
4477 + | }
|
4478 + | }
|
4479 + | }
|
4480 + | impl ::std::error::Error for ConstraintViolation {}
|
4481 + | impl ConstraintViolation {
|
4482 + | pub(crate) fn as_validation_exception_field(
|
4483 + | self,
|
4484 + | path: ::std::string::String,
|
4485 + | ) -> crate::model::ValidationExceptionField {
|
4486 + | match self {
|
4487 + | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
4488 + | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
4489 + | }
|
4490 + | }
|
4491 + | }
|
4492 + | }
|
4493 + | impl ::std::convert::From<ConstraintViolation>
|
4494 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4495 + | {
|
4496 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4497 + | let first_validation_exception_field =
|
4498 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4499 + | let validation_exception = crate::error::ValidationException {
|
4500 + | message: format!(
|
4501 + | "1 validation error detected. {}",
|
4502 + | &first_validation_exception_field.message
|
4503 + | ),
|
4504 + | field_list: Some(vec![first_validation_exception_field]),
|
4505 + | };
|
4506 + | Self::ConstraintViolation(
|
4507 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4508 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4509 + | )
|
4510 + | }
|
4511 + | }
|
4512 + | impl ::std::convert::From<Builder>
|
4513 + | for crate::constrained::MaybeConstrained<
|
4514 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4515 + | >
|
4516 + | {
|
4517 + | fn from(builder: Builder) -> Self {
|
4518 + | Self::Unconstrained(builder)
|
4519 + | }
|
4520 + | }
|
4521 + | impl ::std::convert::TryFrom<Builder>
|
4522 + | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
4523 + | {
|
4524 + | type Error = ConstraintViolation;
|
4525 + |
|
4526 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4527 + | builder.build()
|
4528 + | }
|
4529 + | }
|
4530 + | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4531 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4532 + | pub(crate) struct Builder {
|
4533 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>,
|
4534 + | }
|
4535 + | impl Builder {
|
4536 + | #[allow(missing_docs)] // documentation missing in model
|
4537 + | pub(crate) fn set_map_of_length_pattern_string(
|
4538 + | mut self,
|
4539 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_length_pattern_string_constrained::MapOfLengthPatternStringConstrained>>>,
|
4540 + | ) -> Self {
|
4541 + | self.map_of_length_pattern_string = input.map(|v| v.into());
|
4542 + | self
|
4543 + | }
|
4544 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4545 + | ///
|
4546 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4547 + | ///
|
4548 + | pub fn build(
|
4549 + | self,
|
4550 + | ) -> Result<
|
4551 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4552 + | ConstraintViolation,
|
4553 + | > {
|
4554 + | self.build_enforcing_all_constraints()
|
4555 + | }
|
4556 + | fn build_enforcing_all_constraints(
|
4557 + | self,
|
4558 + | ) -> Result<
|
4559 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput,
|
4560 + | ConstraintViolation,
|
4561 + | > {
|
4562 + | Ok(
|
4563 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
4564 + | map_of_length_pattern_string: self
|
4565 + | .map_of_length_pattern_string
|
4566 + | .map(|v| match v {
|
4567 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4568 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4569 + | })
|
4570 + | .map(|res| {
|
4571 + | res.map(|v| v.into())
|
4572 + | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
4573 + | })
|
4574 + | .transpose()?,
|
4575 + | },
|
4576 + | )
|
4577 + | }
|
4578 + | }
|
4579 + | }
|
4580 + | /// See [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4581 + | pub mod query_params_targeting_map_of_length_pattern_string_operation_input {
|
4582 + |
|
4583 + | impl ::std::convert::From<Builder>
|
4584 + | for crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput
|
4585 + | {
|
4586 + | fn from(builder: Builder) -> Self {
|
4587 + | builder.build()
|
4588 + | }
|
4589 + | }
|
4590 + | /// A builder for [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4591 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4592 + | pub struct Builder {
|
4593 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<
|
4594 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4595 + | >,
|
4596 + | }
|
4597 + | impl Builder {
|
4598 + | #[allow(missing_docs)] // documentation missing in model
|
4599 + | pub fn map_of_length_pattern_string(
|
4600 + | mut self,
|
4601 + | input: ::std::option::Option<
|
4602 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4603 + | >,
|
4604 + | ) -> Self {
|
4605 + | self.map_of_length_pattern_string = input;
|
4606 + | self
|
4607 + | }
|
4608 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput).
|
4609 + | pub fn build(
|
4610 + | self,
|
4611 + | ) -> crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
4612 + | self.build_enforcing_required_and_enum_traits()
|
4613 + | }
|
4614 + | fn build_enforcing_required_and_enum_traits(
|
4615 + | self,
|
4616 + | ) -> crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
4617 + | crate::input::QueryParamsTargetingMapOfLengthPatternStringOperationInput {
|
4618 + | map_of_length_pattern_string: self.map_of_length_pattern_string,
|
4619 + | }
|
4620 + | }
|
4621 + | }
|
4622 + | }
|
4623 + | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4624 + | pub(crate) mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input_internal {
|
4766 4625 |
|
4767 4626 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4768 4627 | /// Holds one variant for each of the ways the builder can fail.
|
4628 + | #[non_exhaustive]
|
4769 4629 | #[allow(clippy::enum_variant_names)]
|
4770 - | pub enum ConstraintViolation {
|
4771 - | /// `length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
4772 - | MissingLengthStringLabel,
|
4773 - | /// `enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
4774 - | MissingEnumStringLabel,
|
4775 - | /// `length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`.
|
4776 - | MissingLengthStringHeaderMap,
|
4630 + | pub(crate) enum ConstraintViolation {
|
4631 + | /// Constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`.
|
4632 + | #[doc(hidden)]
|
4633 + | MapOfLengthPatternString(
|
4634 + | crate::model::map_of_list_of_length_pattern_string_internal::ConstraintViolation,
|
4635 + | ),
|
4777 4636 | }
|
4778 4637 | impl ::std::fmt::Display for ConstraintViolation {
|
4779 4638 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4780 4639 | match self {
|
4781 - | ConstraintViolation::MissingLengthStringLabel => write!(f, "`length_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
4782 - | ConstraintViolation::MissingEnumStringLabel => write!(f, "`enum_string_label` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
4783 - | ConstraintViolation::MissingLengthStringHeaderMap => write!(f, "`length_string_header_map` was not provided but it is required when building `ConstrainedHttpBoundShapesOperationInput`"),
|
4640 + | ConstraintViolation::MapOfLengthPatternString(_) => write!(f, "constraint violation occurred building member `map_of_length_pattern_string` when building `QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`"),
|
4784 4641 | }
|
4785 4642 | }
|
4786 4643 | }
|
4787 4644 | impl ::std::error::Error for ConstraintViolation {}
|
4788 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedHttpBoundShapesOperationInput {
|
4645 + | impl ConstraintViolation {
|
4646 + | pub(crate) fn as_validation_exception_field(
|
4647 + | self,
|
4648 + | path: ::std::string::String,
|
4649 + | ) -> crate::model::ValidationExceptionField {
|
4650 + | match self {
|
4651 + | ConstraintViolation::MapOfLengthPatternString(inner) => {
|
4652 + | inner.as_validation_exception_field(path + "/mapOfLengthPatternString")
|
4653 + | }
|
4654 + | }
|
4655 + | }
|
4656 + | }
|
4657 + | impl ::std::convert::From<ConstraintViolation>
|
4658 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4659 + | {
|
4660 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4661 + | let first_validation_exception_field =
|
4662 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4663 + | let validation_exception = crate::error::ValidationException {
|
4664 + | message: format!(
|
4665 + | "1 validation error detected. {}",
|
4666 + | &first_validation_exception_field.message
|
4667 + | ),
|
4668 + | field_list: Some(vec![first_validation_exception_field]),
|
4669 + | };
|
4670 + | Self::ConstraintViolation(
|
4671 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4672 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4673 + | )
|
4674 + | }
|
4675 + | }
|
4676 + | impl ::std::convert::From<Builder>
|
4677 + | for crate::constrained::MaybeConstrained<
|
4678 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4679 + | >
|
4680 + | {
|
4681 + | fn from(builder: Builder) -> Self {
|
4682 + | Self::Unconstrained(builder)
|
4683 + | }
|
4684 + | }
|
4685 + | impl ::std::convert::TryFrom<Builder>
|
4686 + | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
4687 + | {
|
4789 4688 | type Error = ConstraintViolation;
|
4790 4689 |
|
4791 4690 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4792 4691 | builder.build()
|
4793 4692 | }
|
4794 4693 | }
|
4795 - | /// A builder for [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
4694 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4796 4695 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4797 - | pub struct Builder {
|
4798 - | pub(crate) length_string_label: ::std::option::Option<::std::string::String>,
|
4799 - | pub(crate) range_integer_label: ::std::option::Option<i32>,
|
4800 - | pub(crate) range_short_label: ::std::option::Option<i16>,
|
4801 - | pub(crate) range_long_label: ::std::option::Option<i64>,
|
4802 - | pub(crate) range_byte_label: ::std::option::Option<i8>,
|
4803 - | pub(crate) enum_string_label: ::std::option::Option<crate::model::EnumString>,
|
4804 - | pub(crate) length_string_header_map: ::std::option::Option<
|
4805 - | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4806 - | >,
|
4807 - | pub(crate) length_string_header: ::std::option::Option<::std::string::String>,
|
4808 - | pub(crate) range_integer_header: ::std::option::Option<i32>,
|
4809 - | pub(crate) range_short_header: ::std::option::Option<i16>,
|
4810 - | pub(crate) range_long_header: ::std::option::Option<i64>,
|
4811 - | pub(crate) range_byte_header: ::std::option::Option<i8>,
|
4812 - | pub(crate) length_string_set_header:
|
4813 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4814 - | pub(crate) list_length_string_header:
|
4815 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4816 - | pub(crate) length_list_pattern_string_header:
|
4817 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4818 - | pub(crate) length_set_pattern_string_header:
|
4819 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4820 - | pub(crate) range_byte_set_header: ::std::option::Option<::std::vec::Vec<i8>>,
|
4821 - | pub(crate) range_short_set_header: ::std::option::Option<::std::vec::Vec<i16>>,
|
4822 - | pub(crate) range_integer_set_header: ::std::option::Option<::std::vec::Vec<i32>>,
|
4823 - | pub(crate) range_long_set_header: ::std::option::Option<::std::vec::Vec<i64>>,
|
4824 - | pub(crate) range_byte_list_header: ::std::option::Option<::std::vec::Vec<i8>>,
|
4825 - | pub(crate) range_short_list_header: ::std::option::Option<::std::vec::Vec<i16>>,
|
4826 - | pub(crate) range_integer_list_header: ::std::option::Option<::std::vec::Vec<i32>>,
|
4827 - | pub(crate) range_long_list_header: ::std::option::Option<::std::vec::Vec<i64>>,
|
4828 - | pub(crate) length_string_query: ::std::option::Option<::std::string::String>,
|
4829 - | pub(crate) range_byte_query: ::std::option::Option<i8>,
|
4830 - | pub(crate) range_short_query: ::std::option::Option<i16>,
|
4831 - | pub(crate) range_integer_query: ::std::option::Option<i32>,
|
4832 - | pub(crate) range_long_query: ::std::option::Option<i64>,
|
4833 - | pub(crate) enum_string_query: ::std::option::Option<crate::model::EnumString>,
|
4834 - | pub(crate) length_string_list_query:
|
4835 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4836 - | pub(crate) length_list_pattern_string_query:
|
4837 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4838 - | pub(crate) length_string_set_query:
|
4839 - | ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4840 - | pub(crate) range_byte_list_query: ::std::option::Option<::std::vec::Vec<i8>>,
|
4841 - | pub(crate) range_short_list_query: ::std::option::Option<::std::vec::Vec<i16>>,
|
4842 - | pub(crate) range_integer_list_query: ::std::option::Option<::std::vec::Vec<i32>>,
|
4843 - | pub(crate) range_long_list_query: ::std::option::Option<::std::vec::Vec<i64>>,
|
4844 - | pub(crate) range_byte_set_query: ::std::option::Option<::std::vec::Vec<i8>>,
|
4845 - | pub(crate) range_short_set_query: ::std::option::Option<::std::vec::Vec<i16>>,
|
4846 - | pub(crate) range_integer_set_query: ::std::option::Option<::std::vec::Vec<i32>>,
|
4847 - | pub(crate) range_long_set_query: ::std::option::Option<::std::vec::Vec<i64>>,
|
4848 - | pub(crate) enum_string_list_query:
|
4849 - | ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
4696 + | pub(crate) struct Builder {
|
4697 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>,
|
4850 4698 | }
|
4851 4699 | impl Builder {
|
4852 4700 | #[allow(missing_docs)] // documentation missing in model
|
4853 - | pub fn length_string_label(mut self, input: ::std::string::String) -> Self {
|
4854 - | self.length_string_label = Some(input);
|
4855 - | self
|
4856 - | }
|
4857 - | #[allow(missing_docs)] // documentation missing in model
|
4858 - | pub fn range_integer_label(mut self, input: i32) -> Self {
|
4859 - | self.range_integer_label = Some(input);
|
4860 - | self
|
4861 - | }
|
4862 - | #[allow(missing_docs)] // documentation missing in model
|
4863 - | pub fn range_short_label(mut self, input: i16) -> Self {
|
4864 - | self.range_short_label = Some(input);
|
4865 - | self
|
4866 - | }
|
4867 - | #[allow(missing_docs)] // documentation missing in model
|
4868 - | pub fn range_long_label(mut self, input: i64) -> Self {
|
4869 - | self.range_long_label = Some(input);
|
4701 + | pub(crate) fn set_map_of_length_pattern_string(
|
4702 + | mut self,
|
4703 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_list_of_length_pattern_string_constrained::MapOfListOfLengthPatternStringConstrained>>>,
|
4704 + | ) -> Self {
|
4705 + | self.map_of_length_pattern_string = input.map(|v| v.into());
|
4870 4706 | self
|
4871 4707 | }
|
4872 - | #[allow(missing_docs)] // documentation missing in model
|
4873 - | pub fn range_byte_label(mut self, input: i8) -> Self {
|
4874 - | self.range_byte_label = Some(input);
|
4875 - | self
|
4708 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4709 + | ///
|
4710 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput) if a [`ConstraintViolation`] occurs.
|
4711 + | ///
|
4712 + | pub fn build(
|
4713 + | self,
|
4714 + | ) -> Result<
|
4715 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4716 + | ConstraintViolation,
|
4717 + | > {
|
4718 + | self.build_enforcing_all_constraints()
|
4876 4719 | }
|
4877 - | #[allow(missing_docs)] // documentation missing in model
|
4878 - | pub fn enum_string_label(mut self, input: crate::model::EnumString) -> Self {
|
4879 - | self.enum_string_label = Some(input);
|
4880 - | self
|
4720 + | fn build_enforcing_all_constraints(
|
4721 + | self,
|
4722 + | ) -> Result<
|
4723 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput,
|
4724 + | ConstraintViolation,
|
4725 + | > {
|
4726 + | Ok(
|
4727 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
4728 + | map_of_length_pattern_string: self
|
4729 + | .map_of_length_pattern_string
|
4730 + | .map(|v| match v {
|
4731 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4732 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4733 + | })
|
4734 + | .map(|res| {
|
4735 + | res.map(|v| v.into())
|
4736 + | .map_err(ConstraintViolation::MapOfLengthPatternString)
|
4737 + | })
|
4738 + | .transpose()?,
|
4739 + | },
|
4740 + | )
|
4881 4741 | }
|
4882 - | #[allow(missing_docs)] // documentation missing in model
|
4883 - | pub fn length_string_header_map(
|
4884 - | mut self,
|
4885 - | input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4886 - | ) -> Self {
|
4887 - | self.length_string_header_map = Some(input);
|
4888 - | self
|
4742 + | }
|
4743 + | }
|
4744 + | /// See [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4745 + | pub mod query_params_targeting_map_of_list_of_length_pattern_string_operation_input {
|
4746 + |
|
4747 + | impl ::std::convert::From<Builder>
|
4748 + | for crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
4749 + | {
|
4750 + | fn from(builder: Builder) -> Self {
|
4751 + | builder.build()
|
4889 4752 | }
|
4753 + | }
|
4754 + | /// A builder for [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4755 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4756 + | pub struct Builder {
|
4757 + | pub(crate) map_of_length_pattern_string: ::std::option::Option<
|
4758 + | ::std::collections::HashMap<
|
4759 + | ::std::string::String,
|
4760 + | ::std::vec::Vec<::std::string::String>,
|
4761 + | >,
|
4762 + | >,
|
4763 + | }
|
4764 + | impl Builder {
|
4890 4765 | #[allow(missing_docs)] // documentation missing in model
|
4891 - | pub fn length_string_header(
|
4766 + | pub fn map_of_length_pattern_string(
|
4892 4767 | mut self,
|
4893 - | input: ::std::option::Option<::std::string::String>,
|
4768 + | input: ::std::option::Option<
|
4769 + | ::std::collections::HashMap<
|
4770 + | ::std::string::String,
|
4771 + | ::std::vec::Vec<::std::string::String>,
|
4772 + | >,
|
4773 + | >,
|
4894 4774 | ) -> Self {
|
4895 - | self.length_string_header = input;
|
4896 - | self
|
4897 - | }
|
4898 - | #[allow(missing_docs)] // documentation missing in model
|
4899 - | pub fn range_integer_header(mut self, input: i32) -> Self {
|
4900 - | self.range_integer_header = Some(input);
|
4901 - | self
|
4902 - | }
|
4903 - | #[allow(missing_docs)] // documentation missing in model
|
4904 - | pub fn range_short_header(mut self, input: i16) -> Self {
|
4905 - | self.range_short_header = Some(input);
|
4775 + | self.map_of_length_pattern_string = input;
|
4906 4776 | self
|
4907 4777 | }
|
4908 - | #[allow(missing_docs)] // documentation missing in model
|
4909 - | pub fn range_long_header(mut self, input: i64) -> Self {
|
4910 - | self.range_long_header = Some(input);
|
4911 - | self
|
4778 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput`](crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput).
|
4779 + | pub fn build(
|
4780 + | self,
|
4781 + | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
4782 + | {
|
4783 + | self.build_enforcing_required_and_enum_traits()
|
4912 4784 | }
|
4913 - | #[allow(missing_docs)] // documentation missing in model
|
4914 - | pub fn range_byte_header(mut self, input: i8) -> Self {
|
4915 - | self.range_byte_header = Some(input);
|
4916 - | self
|
4785 + | fn build_enforcing_required_and_enum_traits(
|
4786 + | self,
|
4787 + | ) -> crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput
|
4788 + | {
|
4789 + | crate::input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput {
|
4790 + | map_of_length_pattern_string: self.map_of_length_pattern_string,
|
4791 + | }
|
4917 4792 | }
|
4918 - | #[allow(missing_docs)] // documentation missing in model
|
4919 - | pub fn length_string_set_header(
|
4920 - | mut self,
|
4921 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4922 - | ) -> Self {
|
4923 - | self.length_string_set_header = input;
|
4924 - | self
|
4793 + | }
|
4794 + | }
|
4795 + | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4796 + | pub(crate) mod http_prefix_headers_targeting_length_map_operation_input_internal {
|
4797 + |
|
4798 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4799 + | /// Holds one variant for each of the ways the builder can fail.
|
4800 + | #[non_exhaustive]
|
4801 + | #[allow(clippy::enum_variant_names)]
|
4802 + | pub(crate) enum ConstraintViolation {
|
4803 + | /// Constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`.
|
4804 + | #[doc(hidden)]
|
4805 + | LengthMap(crate::model::con_b_map_internal::ConstraintViolation),
|
4806 + | }
|
4807 + | impl ::std::fmt::Display for ConstraintViolation {
|
4808 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4809 + | match self {
|
4810 + | ConstraintViolation::LengthMap(_) => write!(f, "constraint violation occurred building member `length_map` when building `HttpPrefixHeadersTargetingLengthMapOperationInput`"),
|
4811 + | }
|
4925 4812 | }
|
4926 - | #[allow(missing_docs)] // documentation missing in model
|
4927 - | pub fn list_length_string_header(
|
4928 - | mut self,
|
4929 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4930 - | ) -> Self {
|
4931 - | self.list_length_string_header = input;
|
4932 - | self
|
4813 + | }
|
4814 + | impl ::std::error::Error for ConstraintViolation {}
|
4815 + | impl ConstraintViolation {
|
4816 + | pub(crate) fn as_validation_exception_field(
|
4817 + | self,
|
4818 + | path: ::std::string::String,
|
4819 + | ) -> crate::model::ValidationExceptionField {
|
4820 + | match self {
|
4821 + | ConstraintViolation::LengthMap(inner) => {
|
4822 + | inner.as_validation_exception_field(path + "/lengthMap")
|
4823 + | }
|
4824 + | }
|
4933 4825 | }
|
4934 - | #[allow(missing_docs)] // documentation missing in model
|
4935 - | pub fn length_list_pattern_string_header(
|
4936 - | mut self,
|
4937 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4938 - | ) -> Self {
|
4939 - | self.length_list_pattern_string_header = input;
|
4940 - | self
|
4826 + | }
|
4827 + | impl ::std::convert::From<ConstraintViolation>
|
4828 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4829 + | {
|
4830 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4831 + | let first_validation_exception_field =
|
4832 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4833 + | let validation_exception = crate::error::ValidationException {
|
4834 + | message: format!(
|
4835 + | "1 validation error detected. {}",
|
4836 + | &first_validation_exception_field.message
|
4837 + | ),
|
4838 + | field_list: Some(vec![first_validation_exception_field]),
|
4839 + | };
|
4840 + | Self::ConstraintViolation(
|
4841 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
4842 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
4843 + | )
|
4941 4844 | }
|
4942 - | #[allow(missing_docs)] // documentation missing in model
|
4943 - | pub fn length_set_pattern_string_header(
|
4944 - | mut self,
|
4945 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
4946 - | ) -> Self {
|
4947 - | self.length_set_pattern_string_header = input;
|
4948 - | self
|
4845 + | }
|
4846 + | impl ::std::convert::From<Builder>
|
4847 + | for crate::constrained::MaybeConstrained<
|
4848 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4849 + | >
|
4850 + | {
|
4851 + | fn from(builder: Builder) -> Self {
|
4852 + | Self::Unconstrained(builder)
|
4949 4853 | }
|
4950 - | #[allow(missing_docs)] // documentation missing in model
|
4951 - | pub fn range_byte_set_header(
|
4952 - | mut self,
|
4953 - | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
4954 - | ) -> Self {
|
4955 - | self.range_byte_set_header = input;
|
4956 - | self
|
4854 + | }
|
4855 + | impl ::std::convert::TryFrom<Builder>
|
4856 + | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
4857 + | {
|
4858 + | type Error = ConstraintViolation;
|
4859 + |
|
4860 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
4861 + | builder.build()
|
4957 4862 | }
|
4863 + | }
|
4864 + | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4865 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4866 + | pub(crate) struct Builder {
|
4867 + | pub(crate) length_map:
|
4868 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
4869 + | }
|
4870 + | impl Builder {
|
4958 4871 | #[allow(missing_docs)] // documentation missing in model
|
4959 - | pub fn range_short_set_header(
|
4872 + | pub(crate) fn set_length_map(
|
4960 4873 | mut self,
|
4961 - | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
4874 + | input: Option<
|
4875 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConBMap>>,
|
4876 + | >,
|
4962 4877 | ) -> Self {
|
4963 - | self.range_short_set_header = input;
|
4878 + | self.length_map = input.map(|v| v.into());
|
4964 4879 | self
|
4965 4880 | }
|
4966 - | #[allow(missing_docs)] // documentation missing in model
|
4967 - | pub fn range_integer_set_header(
|
4968 - | mut self,
|
4969 - | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
4970 - | ) -> Self {
|
4971 - | self.range_integer_set_header = input;
|
4972 - | self
|
4881 + | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4882 + | ///
|
4883 + | /// The builder fails to construct a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput) if a [`ConstraintViolation`] occurs.
|
4884 + | ///
|
4885 + | pub fn build(
|
4886 + | self,
|
4887 + | ) -> Result<
|
4888 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4889 + | ConstraintViolation,
|
4890 + | > {
|
4891 + | self.build_enforcing_all_constraints()
|
4973 4892 | }
|
4974 - | #[allow(missing_docs)] // documentation missing in model
|
4975 - | pub fn range_long_set_header(
|
4976 - | mut self,
|
4977 - | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
4978 - | ) -> Self {
|
4979 - | self.range_long_set_header = input;
|
4980 - | self
|
4893 + | fn build_enforcing_all_constraints(
|
4894 + | self,
|
4895 + | ) -> Result<
|
4896 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput,
|
4897 + | ConstraintViolation,
|
4898 + | > {
|
4899 + | Ok(
|
4900 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
4901 + | length_map: self
|
4902 + | .length_map
|
4903 + | .map(|v| match v {
|
4904 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
4905 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
4906 + | })
|
4907 + | .map(|res| res.map_err(ConstraintViolation::LengthMap))
|
4908 + | .transpose()?
|
4909 + | .map(|v: crate::model::ConBMap| v.into()),
|
4910 + | },
|
4911 + | )
|
4981 4912 | }
|
4982 - | #[allow(missing_docs)] // documentation missing in model
|
4983 - | pub fn range_byte_list_header(
|
4984 - | mut self,
|
4985 - | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
4986 - | ) -> Self {
|
4987 - | self.range_byte_list_header = input;
|
4988 - | self
|
4913 + | }
|
4914 + | }
|
4915 + | /// See [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4916 + | pub mod http_prefix_headers_targeting_length_map_operation_input {
|
4917 + |
|
4918 + | impl ::std::convert::From<Builder>
|
4919 + | for crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput
|
4920 + | {
|
4921 + | fn from(builder: Builder) -> Self {
|
4922 + | builder.build()
|
4989 4923 | }
|
4924 + | }
|
4925 + | /// A builder for [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4926 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4927 + | pub struct Builder {
|
4928 + | pub(crate) length_map: ::std::option::Option<
|
4929 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4930 + | >,
|
4931 + | }
|
4932 + | impl Builder {
|
4990 4933 | #[allow(missing_docs)] // documentation missing in model
|
4991 - | pub fn range_short_list_header(
|
4934 + | pub fn length_map(
|
4992 4935 | mut self,
|
4993 - | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
4936 + | input: ::std::option::Option<
|
4937 + | ::std::collections::HashMap<::std::string::String, ::std::string::String>,
|
4938 + | >,
|
4994 4939 | ) -> Self {
|
4995 - | self.range_short_list_header = input;
|
4940 + | self.length_map = input;
|
4996 4941 | self
|
4997 4942 | }
|
4998 - | #[allow(missing_docs)] // documentation missing in model
|
4999 - | pub fn range_integer_list_header(
|
5000 - | mut self,
|
5001 - | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
5002 - | ) -> Self {
|
5003 - | self.range_integer_list_header = input;
|
5004 - | self
|
4943 + | /// Consumes the builder and constructs a [`HttpPrefixHeadersTargetingLengthMapOperationInput`](crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput).
|
4944 + | pub fn build(self) -> crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
4945 + | self.build_enforcing_required_and_enum_traits()
|
5005 4946 | }
|
5006 - | #[allow(missing_docs)] // documentation missing in model
|
5007 - | pub fn range_long_list_header(
|
5008 - | mut self,
|
5009 - | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
5010 - | ) -> Self {
|
5011 - | self.range_long_list_header = input;
|
5012 - | self
|
4947 + | fn build_enforcing_required_and_enum_traits(
|
4948 + | self,
|
4949 + | ) -> crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
4950 + | crate::input::HttpPrefixHeadersTargetingLengthMapOperationInput {
|
4951 + | length_map: self.length_map,
|
4952 + | }
|
5013 4953 | }
|
5014 - | #[allow(missing_docs)] // documentation missing in model
|
5015 - | pub fn length_string_query(
|
5016 - | mut self,
|
5017 - | input: ::std::option::Option<::std::string::String>,
|
5018 - | ) -> Self {
|
5019 - | self.length_string_query = input;
|
5020 - | self
|
4954 + | }
|
4955 + | }
|
4956 + | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
4957 + | pub(crate) mod query_params_targeting_map_of_enum_string_operation_input_internal {
|
4958 + |
|
4959 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4960 + | /// Holds one variant for each of the ways the builder can fail.
|
4961 + | #[non_exhaustive]
|
4962 + | #[allow(clippy::enum_variant_names)]
|
4963 + | pub(crate) enum ConstraintViolation {
|
4964 + | /// Constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`.
|
4965 + | #[doc(hidden)]
|
4966 + | MapOfEnumString(crate::model::map_of_enum_string_internal::ConstraintViolation),
|
4967 + | }
|
4968 + | impl ::std::fmt::Display for ConstraintViolation {
|
4969 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
4970 + | match self {
|
4971 + | ConstraintViolation::MapOfEnumString(_) => write!(f, "constraint violation occurred building member `map_of_enum_string` when building `QueryParamsTargetingMapOfEnumStringOperationInput`"),
|
4972 + | }
|
5021 4973 | }
|
5022 - | #[allow(missing_docs)] // documentation missing in model
|
5023 - | pub fn range_byte_query(mut self, input: i8) -> Self {
|
5024 - | self.range_byte_query = Some(input);
|
5025 - | self
|
4974 + | }
|
4975 + | impl ::std::error::Error for ConstraintViolation {}
|
4976 + | impl ConstraintViolation {
|
4977 + | pub(crate) fn as_validation_exception_field(
|
4978 + | self,
|
4979 + | path: ::std::string::String,
|
4980 + | ) -> crate::model::ValidationExceptionField {
|
4981 + | match self {
|
4982 + | ConstraintViolation::MapOfEnumString(inner) => {
|
4983 + | inner.as_validation_exception_field(path + "/mapOfEnumString")
|
4984 + | }
|
4985 + | }
|
5026 4986 | }
|
5027 - | #[allow(missing_docs)] // documentation missing in model
|
5028 - | pub fn range_short_query(mut self, input: i16) -> Self {
|
5029 - | self.range_short_query = Some(input);
|
5030 - | self
|
4987 + | }
|
4988 + | impl ::std::convert::From<ConstraintViolation>
|
4989 + | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
4990 + | {
|
4991 + | fn from(constraint_violation: ConstraintViolation) -> Self {
|
4992 + | let first_validation_exception_field =
|
4993 + | constraint_violation.as_validation_exception_field("".to_owned());
|
4994 + | let validation_exception = crate::error::ValidationException {
|
4995 + | message: format!(
|
4996 + | "1 validation error detected. {}",
|
4997 + | &first_validation_exception_field.message
|
4998 + | ),
|
4999 + | field_list: Some(vec![first_validation_exception_field]),
|
5000 + | };
|
5001 + | Self::ConstraintViolation(
|
5002 + | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
5003 + | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
5004 + | )
|
5031 5005 | }
|
5032 - | #[allow(missing_docs)] // documentation missing in model
|
5033 - | pub fn range_integer_query(mut self, input: i32) -> Self {
|
5034 - | self.range_integer_query = Some(input);
|
5035 - | self
|
5006 + | }
|
5007 + | impl ::std::convert::From<Builder>
|
5008 + | for crate::constrained::MaybeConstrained<
|
5009 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
5010 + | >
|
5011 + | {
|
5012 + | fn from(builder: Builder) -> Self {
|
5013 + | Self::Unconstrained(builder)
|
5036 5014 | }
|
5037 - | #[allow(missing_docs)] // documentation missing in model
|
5038 - | pub fn range_long_query(mut self, input: i64) -> Self {
|
5039 - | self.range_long_query = Some(input);
|
5040 - | self
|
5015 + | }
|
5016 + | impl ::std::convert::TryFrom<Builder>
|
5017 + | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
5018 + | {
|
5019 + | type Error = ConstraintViolation;
|
5020 + |
|
5021 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
5022 + | builder.build()
|
5041 5023 | }
|
5024 + | }
|
5025 + | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
5026 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5027 + | pub(crate) struct Builder {
|
5028 + | pub(crate) map_of_enum_string: ::std::option::Option<
|
5029 + | crate::constrained::MaybeConstrained<
|
5030 + | crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained,
|
5031 + | >,
|
5032 + | >,
|
5033 + | }
|
5034 + | impl Builder {
|
5042 5035 | #[allow(missing_docs)] // documentation missing in model
|
5043 - | pub fn enum_string_query(
|
5036 + | pub(crate) fn set_map_of_enum_string(
|
5044 5037 | mut self,
|
5045 - | input: ::std::option::Option<crate::model::EnumString>,
|
5038 + | input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_of_enum_string_constrained::MapOfEnumStringConstrained>>>,
|
5046 5039 | ) -> Self {
|
5047 - | self.enum_string_query = input;
|
5040 + | self.map_of_enum_string = input.map(|v| v.into());
|
5048 5041 | self
|
5049 5042 | }
|
5050 - | #[allow(missing_docs)] // documentation missing in model
|
5051 - | pub fn length_string_list_query(
|
5052 - | mut self,
|
5053 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
5054 - | ) -> Self {
|
5055 - | self.length_string_list_query = input;
|
5056 - | self
|
5043 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
5044 + | ///
|
5045 + | /// The builder fails to construct a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput) if a [`ConstraintViolation`] occurs.
|
5046 + | ///
|
5047 + | pub fn build(
|
5048 + | self,
|
5049 + | ) -> Result<
|
5050 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
5051 + | ConstraintViolation,
|
5052 + | > {
|
5053 + | self.build_enforcing_all_constraints()
|
5057 5054 | }
|
5058 - | #[allow(missing_docs)] // documentation missing in model
|
5059 - | pub fn length_list_pattern_string_query(
|
5060 - | mut self,
|
5061 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
5062 - | ) -> Self {
|
5063 - | self.length_list_pattern_string_query = input;
|
5064 - | self
|
5055 + | fn build_enforcing_all_constraints(
|
5056 + | self,
|
5057 + | ) -> Result<
|
5058 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput,
|
5059 + | ConstraintViolation,
|
5060 + | > {
|
5061 + | Ok(
|
5062 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
5063 + | map_of_enum_string: self
|
5064 + | .map_of_enum_string
|
5065 + | .map(|v| match v {
|
5066 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
5067 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
5068 + | })
|
5069 + | .map(|res| {
|
5070 + | res.map(|v| v.into())
|
5071 + | .map_err(ConstraintViolation::MapOfEnumString)
|
5072 + | })
|
5073 + | .transpose()?,
|
5074 + | },
|
5075 + | )
|
5065 5076 | }
|
5066 - | #[allow(missing_docs)] // documentation missing in model
|
5067 - | pub fn length_string_set_query(
|
5068 - | mut self,
|
5069 - | input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
5070 - | ) -> Self {
|
5071 - | self.length_string_set_query = input;
|
5072 - | self
|
5077 + | }
|
5078 + | }
|
5079 + | /// See [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
5080 + | pub mod query_params_targeting_map_of_enum_string_operation_input {
|
5081 + |
|
5082 + | impl ::std::convert::From<Builder>
|
5083 + | for crate::input::QueryParamsTargetingMapOfEnumStringOperationInput
|
5084 + | {
|
5085 + | fn from(builder: Builder) -> Self {
|
5086 + | builder.build()
|
5073 5087 | }
|
5088 + | }
|
5089 + | /// A builder for [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
5090 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5091 + | pub struct Builder {
|
5092 + | pub(crate) map_of_enum_string: ::std::option::Option<
|
5093 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
5094 + | >,
|
5095 + | }
|
5096 + | impl Builder {
|
5074 5097 | #[allow(missing_docs)] // documentation missing in model
|
5075 - | pub fn range_byte_list_query(
|
5098 + | pub fn map_of_enum_string(
|
5076 5099 | mut self,
|
5077 - | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
5100 + | input: ::std::option::Option<
|
5101 + | ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
|
5102 + | >,
|
5078 5103 | ) -> Self {
|
5079 - | self.range_byte_list_query = input;
|
5104 + | self.map_of_enum_string = input;
|
5080 5105 | self
|
5081 5106 | }
|
5082 - | #[allow(missing_docs)] // documentation missing in model
|
5083 - | pub fn range_short_list_query(
|
5084 - | mut self,
|
5085 - | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
5086 - | ) -> Self {
|
5087 - | self.range_short_list_query = input;
|
5088 - | self
|
5107 + | /// Consumes the builder and constructs a [`QueryParamsTargetingMapOfEnumStringOperationInput`](crate::input::QueryParamsTargetingMapOfEnumStringOperationInput).
|
5108 + | pub fn build(self) -> crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
5109 + | self.build_enforcing_required_and_enum_traits()
|
5089 5110 | }
|
5090 - | #[allow(missing_docs)] // documentation missing in model
|
5091 - | pub fn range_integer_list_query(
|
5092 - | mut self,
|
5093 - | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
5094 - | ) -> Self {
|
5095 - | self.range_integer_list_query = input;
|
5096 - | self
|
5111 + | fn build_enforcing_required_and_enum_traits(
|
5112 + | self,
|
5113 + | ) -> crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
5114 + | crate::input::QueryParamsTargetingMapOfEnumStringOperationInput {
|
5115 + | map_of_enum_string: self.map_of_enum_string,
|
5116 + | }
|
5097 5117 | }
|
5098 - | #[allow(missing_docs)] // documentation missing in model
|
5099 - | pub fn range_long_list_query(
|
5100 - | mut self,
|
5101 - | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
5102 - | ) -> Self {
|
5103 - | self.range_long_list_query = input;
|
5104 - | self
|
5118 + | }
|
5119 + | }
|
5120 + | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5121 + | pub(crate) mod non_streaming_blob_operation_input_internal {
|
5122 + |
|
5123 + | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
5124 + | fn from(builder: Builder) -> Self {
|
5125 + | builder.build()
|
5105 5126 | }
|
5127 + | }
|
5128 + | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5129 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5130 + | pub(crate) struct Builder {
|
5131 + | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
5132 + | }
|
5133 + | impl Builder {
|
5106 5134 | #[allow(missing_docs)] // documentation missing in model
|
5107 - | pub fn range_byte_set_query(
|
5135 + | pub(crate) fn set_non_streaming_blob(
|
5108 5136 | mut self,
|
5109 - | input: ::std::option::Option<::std::vec::Vec<i8>>,
|
5137 + | input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
|
5110 5138 | ) -> Self {
|
5111 - | self.range_byte_set_query = input;
|
5139 + | self.non_streaming_blob = input.map(|v| v.into());
|
5112 5140 | self
|
5113 5141 | }
|
5114 - | #[allow(missing_docs)] // documentation missing in model
|
5115 - | pub fn range_short_set_query(
|
5116 - | mut self,
|
5117 - | input: ::std::option::Option<::std::vec::Vec<i16>>,
|
5118 - | ) -> Self {
|
5119 - | self.range_short_set_query = input;
|
5120 - | self
|
5142 + | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5143 + | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
5144 + | self.build_enforcing_all_constraints()
|
5121 5145 | }
|
5122 - | #[allow(missing_docs)] // documentation missing in model
|
5123 - | pub fn range_integer_set_query(
|
5124 - | mut self,
|
5125 - | input: ::std::option::Option<::std::vec::Vec<i32>>,
|
5126 - | ) -> Self {
|
5127 - | self.range_integer_set_query = input;
|
5128 - | self
|
5146 + | fn build_enforcing_all_constraints(self) -> crate::input::NonStreamingBlobOperationInput {
|
5147 + | crate::input::NonStreamingBlobOperationInput {
|
5148 + | non_streaming_blob: self.non_streaming_blob,
|
5149 + | }
|
5129 5150 | }
|
5130 - | #[allow(missing_docs)] // documentation missing in model
|
5131 - | pub fn range_long_set_query(
|
5132 - | mut self,
|
5133 - | input: ::std::option::Option<::std::vec::Vec<i64>>,
|
5134 - | ) -> Self {
|
5135 - | self.range_long_set_query = input;
|
5136 - | self
|
5151 + | }
|
5152 + | }
|
5153 + | /// See [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5154 + | pub mod non_streaming_blob_operation_input {
|
5155 + |
|
5156 + | impl ::std::convert::From<Builder> for crate::input::NonStreamingBlobOperationInput {
|
5157 + | fn from(builder: Builder) -> Self {
|
5158 + | builder.build()
|
5137 5159 | }
|
5160 + | }
|
5161 + | /// A builder for [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5162 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5163 + | pub struct Builder {
|
5164 + | pub(crate) non_streaming_blob: ::std::option::Option<::aws_smithy_types::Blob>,
|
5165 + | }
|
5166 + | impl Builder {
|
5138 5167 | #[allow(missing_docs)] // documentation missing in model
|
5139 - | pub fn enum_string_list_query(
|
5140 - | mut self,
|
5141 - | input: ::std::option::Option<::std::vec::Vec<crate::model::EnumString>>,
|
5142 - | ) -> Self {
|
5143 - | self.enum_string_list_query = input;
|
5144 - | self
|
5145 - | }
|
5146 - | /// Consumes the builder and constructs a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput).
|
5147 - | ///
|
5148 - | /// The builder fails to construct a [`ConstrainedHttpBoundShapesOperationInput`](crate::input::ConstrainedHttpBoundShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
5149 - | ///
|
5150 - | pub fn build(
|
5151 - | self,
|
5152 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
5153 - | {
|
5168 + | pub fn non_streaming_blob(
|
5169 + | mut self,
|
5170 + | input: ::std::option::Option<::aws_smithy_types::Blob>,
|
5171 + | ) -> Self {
|
5172 + | self.non_streaming_blob = input;
|
5173 + | self
|
5174 + | }
|
5175 + | /// Consumes the builder and constructs a [`NonStreamingBlobOperationInput`](crate::input::NonStreamingBlobOperationInput).
|
5176 + | pub fn build(self) -> crate::input::NonStreamingBlobOperationInput {
|
5154 5177 | self.build_enforcing_required_and_enum_traits()
|
5155 5178 | }
|
5156 5179 | fn build_enforcing_required_and_enum_traits(
|
5157 5180 | self,
|
5158 - | ) -> Result<crate::input::ConstrainedHttpBoundShapesOperationInput, ConstraintViolation>
|
5159 - | {
|
5160 - | Ok(crate::input::ConstrainedHttpBoundShapesOperationInput {
|
5161 - | length_string_label: self
|
5162 - | .length_string_label
|
5163 - | .ok_or(ConstraintViolation::MissingLengthStringLabel)?,
|
5164 - | range_integer_label: self.range_integer_label.unwrap_or(0i32),
|
5165 - | range_short_label: self.range_short_label.unwrap_or(0i16),
|
5166 - | range_long_label: self.range_long_label.unwrap_or(0i64),
|
5167 - | range_byte_label: self.range_byte_label.unwrap_or(0i8),
|
5168 - | enum_string_label: self
|
5169 - | .enum_string_label
|
5170 - | .ok_or(ConstraintViolation::MissingEnumStringLabel)?,
|
5171 - | length_string_header_map: self
|
5172 - | .length_string_header_map
|
5173 - | .ok_or(ConstraintViolation::MissingLengthStringHeaderMap)?,
|
5174 - | length_string_header: self.length_string_header,
|
5175 - | range_integer_header: self.range_integer_header.unwrap_or(0i32),
|
5176 - | range_short_header: self.range_short_header.unwrap_or(0i16),
|
5177 - | range_long_header: self.range_long_header.unwrap_or(0i64),
|
5178 - | range_byte_header: self.range_byte_header.unwrap_or(0i8),
|
5179 - | length_string_set_header: self.length_string_set_header,
|
5180 - | list_length_string_header: self.list_length_string_header,
|
5181 - | length_list_pattern_string_header: self.length_list_pattern_string_header,
|
5182 - | length_set_pattern_string_header: self.length_set_pattern_string_header,
|
5183 - | range_byte_set_header: self.range_byte_set_header,
|
5184 - | range_short_set_header: self.range_short_set_header,
|
5185 - | range_integer_set_header: self.range_integer_set_header,
|
5186 - | range_long_set_header: self.range_long_set_header,
|
5187 - | range_byte_list_header: self.range_byte_list_header,
|
5188 - | range_short_list_header: self.range_short_list_header,
|
5189 - | range_integer_list_header: self.range_integer_list_header,
|
5190 - | range_long_list_header: self.range_long_list_header,
|
5191 - | length_string_query: self.length_string_query,
|
5192 - | range_byte_query: self.range_byte_query.unwrap_or(0i8),
|
5193 - | range_short_query: self.range_short_query.unwrap_or(0i16),
|
5194 - | range_integer_query: self.range_integer_query.unwrap_or(0i32),
|
5195 - | range_long_query: self.range_long_query.unwrap_or(0i64),
|
5196 - | enum_string_query: self.enum_string_query,
|
5197 - | length_string_list_query: self.length_string_list_query,
|
5198 - | length_list_pattern_string_query: self.length_list_pattern_string_query,
|
5199 - | length_string_set_query: self.length_string_set_query,
|
5200 - | range_byte_list_query: self.range_byte_list_query,
|
5201 - | range_short_list_query: self.range_short_list_query,
|
5202 - | range_integer_list_query: self.range_integer_list_query,
|
5203 - | range_long_list_query: self.range_long_list_query,
|
5204 - | range_byte_set_query: self.range_byte_set_query,
|
5205 - | range_short_set_query: self.range_short_set_query,
|
5206 - | range_integer_set_query: self.range_integer_set_query,
|
5207 - | range_long_set_query: self.range_long_set_query,
|
5208 - | enum_string_list_query: self.enum_string_list_query,
|
5209 - | })
|
5181 + | ) -> crate::input::NonStreamingBlobOperationInput {
|
5182 + | crate::input::NonStreamingBlobOperationInput {
|
5183 + | non_streaming_blob: self.non_streaming_blob,
|
5184 + | }
|
5210 5185 | }
|
5211 5186 | }
|
5212 5187 | }
|
5213 - | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5214 - | pub(crate) mod constrained_shapes_only_in_output_operation_input_internal {
|
5188 + | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5189 + | pub(crate) mod streaming_blob_operation_input_internal {
|
5215 5190 |
|
5216 - | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5191 + | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
5217 5192 | fn from(builder: Builder) -> Self {
|
5218 5193 | builder.build()
|
5219 5194 | }
|
5220 5195 | }
|
5221 - | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5222 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5223 - | pub(crate) struct Builder {}
|
5196 + | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5197 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
5198 + | pub(crate) struct Builder {
|
5199 + | pub(crate) streaming_blob:
|
5200 + | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
5201 + | }
|
5224 5202 | impl Builder {
|
5225 - | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5226 - | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5203 + | #[allow(missing_docs)] // documentation missing in model
|
5204 + | pub(crate) fn set_streaming_blob(
|
5205 + | mut self,
|
5206 + | input: impl ::std::convert::Into<::aws_smithy_types::byte_stream::ByteStream>,
|
5207 + | ) -> Self {
|
5208 + | self.streaming_blob = Some(input.into());
|
5209 + | self
|
5210 + | }
|
5211 + | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5212 + | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
5227 5213 | self.build_enforcing_all_constraints()
|
5228 5214 | }
|
5229 - | fn build_enforcing_all_constraints(
|
5230 - | self,
|
5231 - | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5232 - | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
5215 + | fn build_enforcing_all_constraints(self) -> crate::input::StreamingBlobOperationInput {
|
5216 + | crate::input::StreamingBlobOperationInput {
|
5217 + | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
5218 + | }
|
5233 5219 | }
|
5234 5220 | }
|
5235 5221 | }
|
5236 - | /// See [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5237 - | pub mod constrained_shapes_only_in_output_operation_input {
|
5222 + | /// See [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5223 + | pub mod streaming_blob_operation_input {
|
5238 5224 |
|
5239 - | impl ::std::convert::From<Builder> for crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5225 + | impl ::std::convert::From<Builder> for crate::input::StreamingBlobOperationInput {
|
5240 5226 | fn from(builder: Builder) -> Self {
|
5241 5227 | builder.build()
|
5242 5228 | }
|
5243 5229 | }
|
5244 - | /// A builder for [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5245 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5246 - | pub struct Builder {}
|
5230 + | /// A builder for [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5231 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
5232 + | pub struct Builder {
|
5233 + | pub(crate) streaming_blob:
|
5234 + | ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
|
5235 + | }
|
5247 5236 | impl Builder {
|
5248 - | /// Consumes the builder and constructs a [`ConstrainedShapesOnlyInOutputOperationInput`](crate::input::ConstrainedShapesOnlyInOutputOperationInput).
|
5249 - | pub fn build(self) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5237 + | #[allow(missing_docs)] // documentation missing in model
|
5238 + | pub fn streaming_blob(
|
5239 + | mut self,
|
5240 + | input: ::aws_smithy_types::byte_stream::ByteStream,
|
5241 + | ) -> Self {
|
5242 + | self.streaming_blob = Some(input);
|
5243 + | self
|
5244 + | }
|
5245 + | /// Consumes the builder and constructs a [`StreamingBlobOperationInput`](crate::input::StreamingBlobOperationInput).
|
5246 + | pub fn build(self) -> crate::input::StreamingBlobOperationInput {
|
5250 5247 | self.build_enforcing_required_and_enum_traits()
|
5251 5248 | }
|
5252 5249 | fn build_enforcing_required_and_enum_traits(
|
5253 5250 | self,
|
5254 - | ) -> crate::input::ConstrainedShapesOnlyInOutputOperationInput {
|
5255 - | crate::input::ConstrainedShapesOnlyInOutputOperationInput {}
|
5251 + | ) -> crate::input::StreamingBlobOperationInput {
|
5252 + | crate::input::StreamingBlobOperationInput {
|
5253 + | streaming_blob: self.streaming_blob.unwrap_or_default(),
|
5254 + | }
|
5256 5255 | }
|
5257 5256 | }
|
5258 5257 | }
|
5259 - | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5260 - | pub(crate) mod constrained_shapes_operation_input_internal {
|
5258 + | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5259 + | pub(crate) mod event_streams_operation_input_internal {
|
5261 5260 |
|
5262 5261 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5263 5262 | /// Holds one variant for each of the ways the builder can fail.
|
5264 5263 | #[non_exhaustive]
|
5265 5264 | #[allow(clippy::enum_variant_names)]
|
5266 5265 | pub(crate) enum ConstraintViolation {
|
5267 - | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
5268 - | MissingConA,
|
5269 - | /// Constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`.
|
5270 - | #[doc(hidden)]
|
5271 - | ConA(crate::model::con_a_internal::ConstraintViolation),
|
5266 + | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
5267 + | MissingEvents,
|
5272 5268 | }
|
5273 5269 | impl ::std::fmt::Display for ConstraintViolation {
|
5274 5270 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
5275 5271 | match self {
|
5276 - | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
5277 - | ConstraintViolation::ConA(_) => write!(f, "constraint violation occurred building member `con_a` when building `ConstrainedShapesOperationInput`"),
|
5272 + | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
5278 5273 | }
|
5279 5274 | }
|
5280 5275 | }
|
5281 5276 | impl ::std::error::Error for ConstraintViolation {}
|
5282 5277 | impl ConstraintViolation {
|
5283 5278 | pub(crate) fn as_validation_exception_field(
|
5284 5279 | self,
|
5285 5280 | path: ::std::string::String,
|
5286 5281 | ) -> crate::model::ValidationExceptionField {
|
5287 5282 | match self {
|
5288 - | ConstraintViolation::MissingConA => crate::model::ValidationExceptionField {
|
5289 - | message: format!(
|
5290 - | "Value at '{}/conA' failed to satisfy constraint: Member must not be null",
|
5291 - | path
|
5292 - | ),
|
5293 - | path: path + "/conA",
|
5294 - | },
|
5295 - | ConstraintViolation::ConA(inner) => {
|
5296 - | inner.as_validation_exception_field(path + "/conA")
|
5297 - | }
|
5298 - | }
|
5283 + | ConstraintViolation::MissingEvents => crate::model::ValidationExceptionField {
|
5284 + | message: format!("Value at '{}/events' failed to satisfy constraint: Member must not be null", path),
|
5285 + | path: path + "/events",
|
5286 + | },
|
5287 + | }
|
5299 5288 | }
|
5300 5289 | }
|
5301 5290 | impl ::std::convert::From<ConstraintViolation>
|
5302 5291 | for ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection
|
5303 5292 | {
|
5304 5293 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
5305 5294 | let first_validation_exception_field =
|
5306 5295 | constraint_violation.as_validation_exception_field("".to_owned());
|
5307 5296 | let validation_exception = crate::error::ValidationException {
|
5308 5297 | message: format!(
|
5309 5298 | "1 validation error detected. {}",
|
5310 5299 | &first_validation_exception_field.message
|
5311 5300 | ),
|
5312 5301 | field_list: Some(vec![first_validation_exception_field]),
|
5313 5302 | };
|
5314 5303 | Self::ConstraintViolation(
|
5315 5304 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
5316 5305 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
5317 5306 | )
|
5318 5307 | }
|
5319 5308 | }
|
5320 5309 | impl ::std::convert::From<Builder>
|
5321 - | for crate::constrained::MaybeConstrained<crate::input::ConstrainedShapesOperationInput>
|
5310 + | for crate::constrained::MaybeConstrained<crate::input::EventStreamsOperationInput>
|
5322 5311 | {
|
5323 5312 | fn from(builder: Builder) -> Self {
|
5324 5313 | Self::Unconstrained(builder)
|
5325 5314 | }
|
5326 5315 | }
|
5327 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
5316 + | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
5328 5317 | type Error = ConstraintViolation;
|
5329 5318 |
|
5330 5319 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
5331 5320 | builder.build()
|
5332 5321 | }
|
5333 5322 | }
|
5334 - | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5335 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5323 + | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5324 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
5336 5325 | pub(crate) struct Builder {
|
5337 - | pub(crate) con_a:
|
5338 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
5326 + | pub(crate) events: ::std::option::Option<
|
5327 + | ::aws_smithy_legacy_http::event_stream::Receiver<
|
5328 + | crate::model::Event,
|
5329 + | crate::error::EventError,
|
5330 + | >,
|
5331 + | >,
|
5339 5332 | }
|
5340 5333 | impl Builder {
|
5341 5334 | #[allow(missing_docs)] // documentation missing in model
|
5342 - | pub(crate) fn set_con_a(
|
5335 + | pub(crate) fn set_events(
|
5343 5336 | mut self,
|
5344 - | input: impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::ConA>>,
|
5337 + | input: impl ::std::convert::Into<
|
5338 + | ::aws_smithy_legacy_http::event_stream::Receiver<
|
5339 + | crate::model::Event,
|
5340 + | crate::error::EventError,
|
5341 + | >,
|
5342 + | >,
|
5345 5343 | ) -> Self {
|
5346 - | self.con_a = Some(input.into());
|
5344 + | self.events = Some(input.into());
|
5347 5345 | self
|
5348 5346 | }
|
5349 - | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5347 + | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5350 5348 | ///
|
5351 - | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if a [`ConstraintViolation`] occurs.
|
5349 + | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if a [`ConstraintViolation`] occurs.
|
5352 5350 | ///
|
5353 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
5354 5351 | pub fn build(
|
5355 5352 | self,
|
5356 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
5353 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
5357 5354 | self.build_enforcing_all_constraints()
|
5358 5355 | }
|
5359 5356 | fn build_enforcing_all_constraints(
|
5360 5357 | self,
|
5361 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
5362 - | Ok(crate::input::ConstrainedShapesOperationInput {
|
5363 - | con_a: self
|
5364 - | .con_a
|
5365 - | .map(|v| match v {
|
5366 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
5367 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
5368 - | })
|
5369 - | .map(|res| res.map_err(ConstraintViolation::ConA))
|
5370 - | .transpose()?
|
5371 - | .ok_or(ConstraintViolation::MissingConA)?,
|
5358 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
5359 + | Ok(crate::input::EventStreamsOperationInput {
|
5360 + | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
5372 5361 | })
|
5373 5362 | }
|
5374 5363 | }
|
5375 5364 | }
|
5376 - | /// See [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5377 - | pub mod constrained_shapes_operation_input {
|
5365 + | /// See [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5366 + | pub mod event_streams_operation_input {
|
5378 5367 |
|
5379 5368 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5380 5369 | /// Holds one variant for each of the ways the builder can fail.
|
5381 5370 | #[allow(clippy::enum_variant_names)]
|
5382 5371 | pub enum ConstraintViolation {
|
5383 - | /// `con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`.
|
5384 - | MissingConA,
|
5372 + | /// `events` was not provided but it is required when building `EventStreamsOperationInput`.
|
5373 + | MissingEvents,
|
5385 5374 | }
|
5386 5375 | impl ::std::fmt::Display for ConstraintViolation {
|
5387 5376 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
5388 5377 | match self {
|
5389 - | ConstraintViolation::MissingConA => write!(f, "`con_a` was not provided but it is required when building `ConstrainedShapesOperationInput`"),
|
5378 + | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `EventStreamsOperationInput`"),
|
5390 5379 | }
|
5391 5380 | }
|
5392 5381 | }
|
5393 5382 | impl ::std::error::Error for ConstraintViolation {}
|
5394 - | impl ::std::convert::TryFrom<Builder> for crate::input::ConstrainedShapesOperationInput {
|
5383 + | impl ::std::convert::TryFrom<Builder> for crate::input::EventStreamsOperationInput {
|
5395 5384 | type Error = ConstraintViolation;
|
5396 5385 |
|
5397 5386 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
5398 5387 | builder.build()
|
5399 5388 | }
|
5400 5389 | }
|
5401 - | /// A builder for [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5402 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
5390 + | /// A builder for [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5391 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
5403 5392 | pub struct Builder {
|
5404 - | pub(crate) con_a: ::std::option::Option<crate::model::ConA>,
|
5393 + | pub(crate) events: ::std::option::Option<
|
5394 + | ::aws_smithy_legacy_http::event_stream::Receiver<
|
5395 + | crate::model::Event,
|
5396 + | crate::error::EventError,
|
5397 + | >,
|
5398 + | >,
|
5405 5399 | }
|
5406 5400 | impl Builder {
|
5407 5401 | #[allow(missing_docs)] // documentation missing in model
|
5408 - | pub fn con_a(mut self, input: crate::model::ConA) -> Self {
|
5409 - | self.con_a = Some(input);
|
5402 + | pub fn events(
|
5403 + | mut self,
|
5404 + | input: ::aws_smithy_legacy_http::event_stream::Receiver<
|
5405 + | crate::model::Event,
|
5406 + | crate::error::EventError,
|
5407 + | >,
|
5408 + | ) -> Self {
|
5409 + | self.events = Some(input);
|
5410 5410 | self
|
5411 5411 | }
|
5412 - | /// Consumes the builder and constructs a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput).
|
5412 + | /// Consumes the builder and constructs a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput).
|
5413 5413 | ///
|
5414 - | /// The builder fails to construct a [`ConstrainedShapesOperationInput`](crate::input::ConstrainedShapesOperationInput) if you do not provide a value for all non-`Option`al members.
|
5414 + | /// The builder fails to construct a [`EventStreamsOperationInput`](crate::input::EventStreamsOperationInput) if you do not provide a value for all non-`Option`al members.
|
5415 5415 | ///
|
5416 5416 | pub fn build(
|
5417 5417 | self,
|
5418 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
5418 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
5419 5419 | self.build_enforcing_required_and_enum_traits()
|
5420 5420 | }
|
5421 5421 | fn build_enforcing_required_and_enum_traits(
|
5422 5422 | self,
|
5423 - | ) -> Result<crate::input::ConstrainedShapesOperationInput, ConstraintViolation> {
|
5424 - | Ok(crate::input::ConstrainedShapesOperationInput {
|
5425 - | con_a: self.con_a.ok_or(ConstraintViolation::MissingConA)?,
|
5423 + | ) -> Result<crate::input::EventStreamsOperationInput, ConstraintViolation> {
|
5424 + | Ok(crate::input::EventStreamsOperationInput {
|
5425 + | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
5426 5426 | })
|
5427 5427 | }
|
5428 5428 | }
|
5429 5429 | }
|