Server Test Python

Server Test Python

rev. a7fb2e3446d314cfbe48069306e4e0a389b39aeb

Files changed:

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/operation.rs

@@ -1487,1487 +1546,1647 @@
 1507   1507   
                response
 1508   1508   
            },
 1509   1509   
            Err(e) => {
 1510   1510   
                ::tracing::error!(error = %e, "failed to serialize response");
 1511   1511   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1512   1512   
            }
 1513   1513   
        }
 1514   1514   
    }
 1515   1515   
}
 1516   1516   
        1517  +
const CONTENT_TYPE_CONSTRAINEDLISTWITHINDIRECTLYCONSTRAINEDAGGREGATEOPERATION: ::mime::Mime =
        1518  +
    ::mime::APPLICATION_JSON;
        1519  +
::pin_project_lite::pin_project! {
        1520  +
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
        1521  +
    /// [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput) using modelled bindings.
        1522  +
    pub struct ConstrainedListWithIndirectlyConstrainedAggregateOperationInputFuture {
        1523  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
        1524  +
    }
        1525  +
}
        1526  +
        1527  +
impl std::future::Future for ConstrainedListWithIndirectlyConstrainedAggregateOperationInputFuture {
        1528  +
    type Output = Result<
        1529  +
        crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
        1530  +
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
        1531  +
    >;
        1532  +
        1533  +
    fn poll(
        1534  +
        self: std::pin::Pin<&mut Self>,
        1535  +
        cx: &mut std::task::Context<'_>,
        1536  +
    ) -> std::task::Poll<Self::Output> {
        1537  +
        let this = self.project();
        1538  +
        this.inner.as_mut().poll(cx)
        1539  +
    }
        1540  +
}
        1541  +
        1542  +
impl<B>
        1543  +
    ::aws_smithy_http_server::request::FromRequest<
        1544  +
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1545  +
        B,
        1546  +
    > for crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput
        1547  +
where
        1548  +
    B: ::aws_smithy_http_server::body::HttpBody + Send,
        1549  +
    B: 'static,
        1550  +
        1551  +
    B::Data: Send,
        1552  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
        1553  +
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
        1554  +
{
        1555  +
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
        1556  +
    type Future = ConstrainedListWithIndirectlyConstrainedAggregateOperationInputFuture;
        1557  +
        1558  +
    fn from_request(request: ::http::Request<B>) -> Self::Future {
        1559  +
        let fut = async move {
        1560  +
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
        1561  +
                request.headers(),
        1562  +
                &CONTENT_TYPE_CONSTRAINEDLISTWITHINDIRECTLYCONSTRAINEDAGGREGATEOPERATION,
        1563  +
            ) {
        1564  +
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
        1565  +
            }
        1566  +
            crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation::de_constrained_list_with_indirectly_constrained_aggregate_operation_http_request(request)
        1567  +
                            .await
        1568  +
                            .map_err(Into::into)
        1569  +
        };
        1570  +
        use ::futures_util::future::TryFutureExt;
        1571  +
        let fut = fut.map_err(
        1572  +
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
        1573  +
                ::tracing::debug!(error = %e, "failed to deserialize request");
        1574  +
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
        1575  +
                    e,
        1576  +
                )
        1577  +
            },
        1578  +
        );
        1579  +
        ConstrainedListWithIndirectlyConstrainedAggregateOperationInputFuture {
        1580  +
            inner: Box::pin(fut),
        1581  +
        }
        1582  +
    }
        1583  +
}
        1584  +
impl
        1585  +
    ::aws_smithy_http_server::response::IntoResponse<
        1586  +
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1587  +
    > for crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput
        1588  +
{
        1589  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
        1590  +
        match crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation::ser_constrained_list_with_indirectly_constrained_aggregate_operation_http_response(self) {
        1591  +
                        Ok(response) => response,
        1592  +
                        Err(e) => {
        1593  +
                            ::tracing::error!(error = %e, "failed to serialize response");
        1594  +
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
        1595  +
                        }
        1596  +
                    }
        1597  +
    }
        1598  +
}
        1599  +
impl
        1600  +
    ::aws_smithy_http_server::response::IntoResponse<
        1601  +
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
        1602  +
    > for crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError
        1603  +
{
        1604  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
        1605  +
        match crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation::ser_constrained_list_with_indirectly_constrained_aggregate_operation_http_error(&self) {
        1606  +
            Ok(mut response) => {
        1607  +
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
        1608  +
                response
        1609  +
            },
        1610  +
            Err(e) => {
        1611  +
                ::tracing::error!(error = %e, "failed to serialize response");
        1612  +
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
        1613  +
            }
        1614  +
        }
        1615  +
    }
        1616  +
}
        1617  +
 1517   1618   
const CONTENT_TYPE_CONSTRAINEDRECURSIVESHAPESOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
 1518   1619   
::pin_project_lite::pin_project! {
 1519   1620   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 1520   1621   
    /// [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput) using modelled bindings.
 1521   1622   
    pub struct ConstrainedRecursiveShapesOperationInputFuture {
 1522   1623   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ConstrainedRecursiveShapesOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
 1523   1624   
    }
 1524   1625   
}
 1525   1626   
 1526   1627   
impl std::future::Future for ConstrainedRecursiveShapesOperationInputFuture {

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/operation_shape.rs

@@ -594,594 +653,695 @@
  614    614   
  615    615   
    fn request_fmt() -> Self::RequestFmt {
  616    616   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  617    617   
    }
  618    618   
  619    619   
    fn response_fmt() -> Self::ResponseFmt {
  620    620   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  621    621   
    }
  622    622   
}
  623    623   
         624  +
#[allow(missing_docs)] // documentation missing in model
         625  +
pub struct ConstrainedListWithIndirectlyConstrainedAggregateOperation;
         626  +
         627  +
impl ::aws_smithy_http_server::operation::OperationShape
         628  +
    for ConstrainedListWithIndirectlyConstrainedAggregateOperation
         629  +
{
         630  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
         631  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         632  +
            "com.amazonaws.constraints#ConstrainedListWithIndirectlyConstrainedAggregateOperation",
         633  +
            "com.amazonaws.constraints",
         634  +
            "ConstrainedListWithIndirectlyConstrainedAggregateOperation",
         635  +
        );
         636  +
         637  +
    type Input = crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput;
         638  +
    type Output = crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput;
         639  +
    type Error = crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError;
         640  +
}
         641  +
         642  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
         643  +
    for ConstrainedListWithIndirectlyConstrainedAggregateOperation
         644  +
{
         645  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
         646  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         647  +
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
         648  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         649  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         650  +
        >,
         651  +
    >;
         652  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
         653  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         654  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         655  +
    >;
         656  +
         657  +
    fn request_fmt() -> Self::RequestFmt {
         658  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         659  +
    }
         660  +
         661  +
    fn response_fmt() -> Self::ResponseFmt {
         662  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         663  +
    }
         664  +
}
         665  +
  624    666   
#[allow(missing_docs)] // documentation missing in model
  625    667   
pub struct ConstrainedRecursiveShapesOperation;
  626    668   
  627    669   
impl ::aws_smithy_http_server::operation::OperationShape for ConstrainedRecursiveShapesOperation {
  628    670   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  629    671   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  630    672   
            "com.amazonaws.constraints#ConstrainedRecursiveShapesOperation",
  631    673   
            "com.amazonaws.constraints",
  632    674   
            "ConstrainedRecursiveShapesOperation",
  633    675   
        );

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/output.rs

@@ -970,970 +1029,1106 @@
  990    990   
        (*self).into_py(py)
  991    991   
    }
  992    992   
}
  993    993   
impl QueryParamsTargetingLengthMapOperationOutput {
  994    994   
    /// Creates a new builder-style object to manufacture [`QueryParamsTargetingLengthMapOperationOutput`](crate::output::QueryParamsTargetingLengthMapOperationOutput).
  995    995   
    pub fn builder() -> crate::output::query_params_targeting_length_map_operation_output::Builder {
  996    996   
        crate::output::query_params_targeting_length_map_operation_output::Builder::default()
  997    997   
    }
  998    998   
}
  999    999   
        1000  +
#[::pyo3::pyclass]
        1001  +
/// :param a typing.Optional\[typing.List\[typing.List\[str\]\]\]:
        1002  +
/// :param b typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
        1003  +
/// :rtype None:
        1004  +
#[allow(missing_docs)] // documentation missing in model
        1005  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1006  +
pub struct ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput {
        1007  +
    #[pyo3(get, set)]
        1008  +
    /// :type typing.Optional\[typing.List\[typing.List\[str\]\]\]:
        1009  +
    #[allow(missing_docs)] // documentation missing in model
        1010  +
    pub a: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        1011  +
    #[pyo3(get, set)]
        1012  +
    /// :type typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
        1013  +
    #[allow(missing_docs)] // documentation missing in model
        1014  +
    pub b: ::std::option::Option<
        1015  +
        ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
        1016  +
    >,
        1017  +
}
        1018  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput {
        1019  +
    #[allow(missing_docs)] // documentation missing in model
        1020  +
    pub fn a(&self) -> ::std::option::Option<&[::std::vec::Vec<::std::string::String>]> {
        1021  +
        self.a.as_deref()
        1022  +
    }
        1023  +
    #[allow(missing_docs)] // documentation missing in model
        1024  +
    pub fn b(
        1025  +
        &self,
        1026  +
    ) -> ::std::option::Option<
        1027  +
        &[::std::collections::HashMap<::std::string::String, ::std::string::String>],
        1028  +
    > {
        1029  +
        self.b.as_deref()
        1030  +
    }
        1031  +
}
        1032  +
#[allow(clippy::new_without_default)]
        1033  +
#[allow(clippy::too_many_arguments)]
        1034  +
#[::pyo3::pymethods]
        1035  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput {
        1036  +
    #[new]
        1037  +
    pub fn new(
        1038  +
        a: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        1039  +
        b: ::std::option::Option<
        1040  +
            ::std::vec::Vec<
        1041  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        1042  +
            >,
        1043  +
        >,
        1044  +
    ) -> Self {
        1045  +
        Self { a, b }
        1046  +
    }
        1047  +
    fn __repr__(&self) -> String {
        1048  +
        format!("{self:?}")
        1049  +
    }
        1050  +
    fn __str__(&self) -> String {
        1051  +
        format!("{self:?}")
        1052  +
    }
        1053  +
}
        1054  +
impl<'source> ::pyo3::FromPyObject<'source>
        1055  +
    for std::boxed::Box<ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>
        1056  +
{
        1057  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1058  +
        ob.extract::<ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>()
        1059  +
            .map(Box::new)
        1060  +
    }
        1061  +
}
        1062  +
        1063  +
impl ::pyo3::IntoPy<::pyo3::PyObject>
        1064  +
    for std::boxed::Box<ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>
        1065  +
{
        1066  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1067  +
        (*self).into_py(py)
        1068  +
    }
        1069  +
}
        1070  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput {
        1071  +
    /// Creates a new builder-style object to manufacture [`ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput`](crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput).
        1072  +
    pub fn builder() -> crate::output::constrained_list_with_indirectly_constrained_aggregate_operation_output::Builder{
        1073  +
        crate::output::constrained_list_with_indirectly_constrained_aggregate_operation_output::Builder::default()
        1074  +
    }
        1075  +
}
        1076  +
 1000   1077   
#[::pyo3::pyclass]
 1001   1078   
/// :param nested typing.Optional\[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1\]:
 1002   1079   
/// :param recursive_list typing.List\[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1\]:
 1003   1080   
/// :rtype None:
 1004   1081   
#[allow(missing_docs)] // documentation missing in model
 1005   1082   
#[derive(
 1006   1083   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1007   1084   
)]
 1008   1085   
pub struct ConstrainedRecursiveShapesOperationOutput {
 1009   1086   
    #[pyo3(get, set)]
@@ -2459,2536 +2518,2655 @@
 2479   2556   
        }
 2480   2557   
        fn build_enforcing_required_and_enum_traits(
 2481   2558   
            self,
 2482   2559   
        ) -> crate::output::QueryParamsTargetingLengthMapOperationOutput {
 2483   2560   
            crate::output::QueryParamsTargetingLengthMapOperationOutput {
 2484   2561   
                length_map: self.length_map,
 2485   2562   
            }
 2486   2563   
        }
 2487   2564   
    }
 2488   2565   
}
        2566  +
/// See [`ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput`](crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput).
        2567  +
pub mod constrained_list_with_indirectly_constrained_aggregate_operation_output {
        2568  +
        2569  +
    impl ::std::convert::From<Builder>
        2570  +
        for crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput
        2571  +
    {
        2572  +
        fn from(builder: Builder) -> Self {
        2573  +
            builder.build()
        2574  +
        }
        2575  +
    }
        2576  +
    /// A builder for [`ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput`](crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput).
        2577  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2578  +
    pub struct Builder {
        2579  +
        pub(crate) a:
        2580  +
            ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        2581  +
        pub(crate) b: ::std::option::Option<
        2582  +
            ::std::vec::Vec<
        2583  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        2584  +
            >,
        2585  +
        >,
        2586  +
    }
        2587  +
    impl Builder {
        2588  +
        #[allow(missing_docs)] // documentation missing in model
        2589  +
        pub fn a(
        2590  +
            mut self,
        2591  +
            input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        2592  +
        ) -> Self {
        2593  +
            self.a = input;
        2594  +
            self
        2595  +
        }
        2596  +
        #[allow(missing_docs)] // documentation missing in model
        2597  +
        pub fn b(
        2598  +
            mut self,
        2599  +
            input: ::std::option::Option<
        2600  +
                ::std::vec::Vec<
        2601  +
                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        2602  +
                >,
        2603  +
            >,
        2604  +
        ) -> Self {
        2605  +
            self.b = input;
        2606  +
            self
        2607  +
        }
        2608  +
        /// Consumes the builder and constructs a [`ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput`](crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput).
        2609  +
        pub fn build(
        2610  +
            self,
        2611  +
        ) -> crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput
        2612  +
        {
        2613  +
            self.build_enforcing_required_and_enum_traits()
        2614  +
        }
        2615  +
        fn build_enforcing_required_and_enum_traits(
        2616  +
            self,
        2617  +
        ) -> crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput
        2618  +
        {
        2619  +
            crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput {
        2620  +
                a: self.a,
        2621  +
                b: self.b,
        2622  +
            }
        2623  +
        }
        2624  +
    }
        2625  +
}
 2489   2626   
/// See [`ConstrainedRecursiveShapesOperationOutput`](crate::output::ConstrainedRecursiveShapesOperationOutput).
 2490   2627   
pub mod constrained_recursive_shapes_operation_output {
 2491   2628   
 2492   2629   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2493   2630   
    /// Holds one variant for each of the ways the builder can fail.
 2494   2631   
 2495   2632   
    #[allow(clippy::enum_variant_names)]
 2496   2633   
    pub enum ConstraintViolation {
 2497   2634   
        /// `recursive_list` was not provided but it is required when building `ConstrainedRecursiveShapesOperationOutput`.
 2498   2635   
        MissingRecursiveList,

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde.rs

@@ -1,1 +157,169 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) mod shape_constrained_http_bound_shapes_operation;
    3      3   
    4      4   
pub(crate) mod shape_constrained_http_payload_bound_shape_operation;
    5      5   
           6  +
pub(crate) mod shape_constrained_list_with_indirectly_constrained_aggregate_operation;
           7  +
    6      8   
pub(crate) mod shape_constrained_recursive_shapes_operation;
    7      9   
    8     10   
pub(crate) mod shape_constrained_shapes_only_in_output_operation;
    9     11   
   10     12   
pub(crate) mod shape_constrained_shapes_operation;
   11     13   
   12     14   
pub(crate) mod shape_event_streams_operation;
   13     15   
   14     16   
pub(crate) mod shape_http_prefix_headers_targeting_length_map_operation;
   15     17   
   16     18   
pub(crate) mod shape_non_streaming_blob_operation;
   17     19   
   18     20   
pub(crate) mod shape_query_params_targeting_length_map_operation;
   19     21   
   20     22   
pub(crate) mod shape_query_params_targeting_map_of_enum_string_operation;
   21     23   
   22     24   
pub(crate) mod shape_query_params_targeting_map_of_length_list_of_pattern_string_operation;
   23     25   
   24     26   
pub(crate) mod shape_query_params_targeting_map_of_length_pattern_string_operation;
   25     27   
   26     28   
pub(crate) mod shape_query_params_targeting_map_of_length_string_operation;
   27     29   
   28     30   
pub(crate) mod shape_query_params_targeting_map_of_list_of_enum_string_operation;
   29     31   
   30     32   
pub(crate) mod shape_query_params_targeting_map_of_list_of_length_pattern_string_operation;
   31     33   
   32     34   
pub(crate) mod shape_query_params_targeting_map_of_list_of_length_string_operation;
   33     35   
   34     36   
pub(crate) mod shape_query_params_targeting_map_of_list_of_pattern_string_operation;
   35     37   
   36     38   
pub(crate) mod shape_query_params_targeting_map_of_pattern_string_operation;
   37     39   
   38     40   
pub(crate) mod shape_query_params_targeting_map_of_set_of_length_string_operation;
   39     41   
   40     42   
pub(crate) mod shape_streaming_blob_operation;
   41     43   
   42     44   
pub(crate) mod shape_constrained_http_bound_shapes_operation_input;
   43     45   
   44     46   
pub(crate) mod shape_constrained_http_bound_shapes_operation_output;
   45     47   
   46     48   
pub(crate) mod shape_constrained_http_payload_bound_shape_operation_input;
   47     49   
   48     50   
pub(crate) mod shape_constrained_http_payload_bound_shape_operation_output;
   49     51   
   50     52   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   51     53   
    if data.is_empty() {
   52     54   
        b"{}"
   53     55   
    } else {
   54     56   
        data
   55     57   
    }
   56     58   
}
   57     59   
          60  +
pub(crate) mod shape_constrained_list_with_indirectly_constrained_aggregate_operation_output;
          61  +
   58     62   
pub(crate) mod shape_constrained_recursive_shapes_operation_output;
   59     63   
   60     64   
pub(crate) mod shape_constrained_shapes_only_in_output_operation_output;
   61     65   
   62     66   
pub(crate) mod shape_constrained_shapes_operation_output;
   63     67   
   64     68   
pub(crate) mod shape_event_stream_error_message;
   65     69   
   66     70   
pub(crate) mod shape_event_streams_operation_input;
   67     71   
   68     72   
pub(crate) mod shape_http_prefix_headers_targeting_length_map_operation_input;
   69     73   
   70     74   
pub(crate) mod shape_http_prefix_headers_targeting_length_map_operation_output;
   71     75   
   72     76   
pub(crate) mod shape_internal_server_error;
   73     77   
   74     78   
pub(crate) mod shape_non_streaming_blob_operation_input;
   75     79   
   76     80   
pub(crate) mod shape_non_streaming_blob_operation_output;
   77     81   
   78     82   
pub(crate) mod shape_query_params_targeting_length_map_operation_output;
   79     83   
   80     84   
pub(crate) mod shape_query_params_targeting_map_of_enum_string_operation_output;
   81     85   
   82     86   
pub(crate) mod shape_query_params_targeting_map_of_length_list_of_pattern_string_operation_output;
   83     87   
   84     88   
pub(crate) mod shape_query_params_targeting_map_of_length_pattern_string_operation_output;
   85     89   
   86     90   
pub(crate) mod shape_query_params_targeting_map_of_length_string_operation_output;
   87     91   
   88     92   
pub(crate) mod shape_query_params_targeting_map_of_list_of_enum_string_operation_output;
   89     93   
   90     94   
pub(crate) mod shape_query_params_targeting_map_of_list_of_length_pattern_string_operation_output;
   91     95   
   92     96   
pub(crate) mod shape_query_params_targeting_map_of_list_of_length_string_operation_output;
   93     97   
   94     98   
pub(crate) mod shape_query_params_targeting_map_of_list_of_pattern_string_operation_output;
   95     99   
   96    100   
pub(crate) mod shape_query_params_targeting_map_of_pattern_string_operation_output;
   97    101   
   98    102   
pub(crate) mod shape_query_params_targeting_map_of_set_of_length_string_operation_output;
   99    103   
  100    104   
pub(crate) mod shape_streaming_blob_operation_input;
  101    105   
  102    106   
pub(crate) mod shape_streaming_blob_operation_output;
  103    107   
  104    108   
pub(crate) mod shape_validation_exception;
  105    109   
  106    110   
pub(crate) mod shape_con_a;
  107    111   
  108    112   
pub(crate) mod shape_event;
  109    113   
         114  +
pub(crate) mod shape_list_with_indirectly_constrained_list;
         115  +
         116  +
pub(crate) mod shape_list_with_indirectly_constrained_map;
         117  +
  110    118   
pub(crate) mod shape_recursive_list;
  111    119   
  112    120   
pub(crate) mod shape_recursive_shapes_input_output_nested1;
  113    121   
  114    122   
pub(crate) mod shape_con_b;
  115    123   
  116    124   
pub(crate) mod shape_con_b_list;
  117    125   
  118    126   
pub(crate) mod shape_con_b_map;
  119    127   
  120    128   
pub(crate) mod shape_con_b_set;
  121    129   
  122    130   
pub(crate) mod shape_constrained_union;
  123    131   
  124    132   
pub(crate) mod shape_constrained_union_in_output;
  125    133   
  126    134   
pub(crate) mod shape_event_stream_regular_message;
  127    135   
         136  +
pub(crate) mod shape_indirectly_constrained_list;
         137  +
         138  +
pub(crate) mod shape_indirectly_constrained_map;
         139  +
  128    140   
pub(crate) mod shape_length_list;
  129    141   
  130    142   
pub(crate) mod shape_length_list_of_pattern_string;
  131    143   
  132    144   
pub(crate) mod shape_length_map;
  133    145   
  134    146   
pub(crate) mod shape_length_set_of_pattern_string;
  135    147   
  136    148   
pub(crate) mod shape_list_of_length_blob;
  137    149   

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_constrained_list_with_indirectly_constrained_aggregate_operation.rs

@@ -0,1 +0,157 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_constrained_list_with_indirectly_constrained_aggregate_operation_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
           7  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input_internal::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
        if !bytes.is_empty() {
          24  +
            ::aws_smithy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
                &headers,
          26  +
                Some("application/json"),
          27  +
            )?;
          28  +
            input = crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation::de_constrained_list_with_indirectly_constrained_aggregate_operation(bytes.as_ref(), input)?;
          29  +
        }
          30  +
        input.build()?
          31  +
    })
          32  +
}
          33  +
          34  +
#[allow(clippy::unnecessary_wraps)]
          35  +
pub fn ser_constrained_list_with_indirectly_constrained_aggregate_operation_http_response(
          36  +
    #[allow(unused_variables)]
          37  +
    output: crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput,
          38  +
) -> std::result::Result<
          39  +
    ::aws_smithy_http_server::response::Response,
          40  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          41  +
> {
          42  +
    Ok({
          43  +
        #[allow(unused_mut)]
          44  +
        let mut builder = ::http::Response::builder();
          45  +
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          46  +
            builder,
          47  +
            ::http::header::CONTENT_TYPE,
          48  +
            "application/json",
          49  +
        );
          50  +
        let http_status: u16 = 200;
          51  +
        builder = builder.status(http_status);
          52  +
        let payload =
          53  +
            crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation_output::ser_constrained_list_with_indirectly_constrained_aggregate_operation_output_output_output(&output)?
          54  +
        ;
          55  +
        let content_length = payload.len();
          56  +
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          57  +
            builder,
          58  +
            ::http::header::CONTENT_LENGTH,
          59  +
            content_length,
          60  +
        );
          61  +
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          62  +
        builder.body(body)?
          63  +
    })
          64  +
}
          65  +
          66  +
#[allow(clippy::unnecessary_wraps)]
          67  +
pub fn ser_constrained_list_with_indirectly_constrained_aggregate_operation_http_error(
          68  +
    error: &crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError,
          69  +
) -> std::result::Result<
          70  +
    ::aws_smithy_http_server::response::Response,
          71  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          72  +
> {
          73  +
    Ok({
          74  +
        match error {
          75  +
            crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException(output) => {
          76  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          77  +
                #[allow(unused_mut)]
          78  +
                let mut builder = ::http::Response::builder();
          79  +
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          80  +
                                builder,
          81  +
                                ::http::header::CONTENT_TYPE,
          82  +
                                "application/json",
          83  +
                            );
          84  +
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          85  +
                                builder,
          86  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
          87  +
                                "ValidationException",
          88  +
                            );
          89  +
                let content_length = payload.len();
          90  +
                            builder = ::aws_smithy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
          91  +
                builder.status(400).body(::aws_smithy_http_server::body::to_boxed(payload))?
          92  +
            }
          93  +
            crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError::InternalServerError(output) => {
          94  +
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
          95  +
                #[allow(unused_mut)]
          96  +
                let mut builder = ::http::Response::builder();
          97  +
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
          98  +
                                builder,
          99  +
                                ::http::header::CONTENT_TYPE,
         100  +
                                "application/json",
         101  +
                            );
         102  +
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
         103  +
                                builder,
         104  +
                                ::http::header::HeaderName::from_static("x-amzn-errortype"),
         105  +
                                "InternalServerError",
         106  +
                            );
         107  +
                let content_length = payload.len();
         108  +
                            builder = ::aws_smithy_http::header::set_response_header_if_absent(builder, ::http::header::CONTENT_LENGTH, content_length);
         109  +
                builder.status(500).body(::aws_smithy_http_server::body::to_boxed(payload))?
         110  +
            }
         111  +
        }
         112  +
    })
         113  +
}
         114  +
         115  +
pub(crate) fn de_constrained_list_with_indirectly_constrained_aggregate_operation(value: &[u8], mut builder: crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input_internal::Builder) -> Result<crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input_internal::Builder, ::aws_smithy_json::deserialize::error::DeserializeError>{
         116  +
    let mut tokens_owned =
         117  +
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
         118  +
            .peekable();
         119  +
    let tokens = &mut tokens_owned;
         120  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         121  +
    loop {
         122  +
        match tokens.next().transpose()? {
         123  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
         124  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         125  +
                match key.to_unescaped()?.as_ref() {
         126  +
                    "a" => {
         127  +
                        builder = builder.set_a(
         128  +
                            crate::protocol_serde::shape_list_with_indirectly_constrained_list::de_list_with_indirectly_constrained_list(tokens)?
         129  +
                        );
         130  +
                    }
         131  +
                    "b" => {
         132  +
                        builder = builder.set_b(
         133  +
                            crate::protocol_serde::shape_list_with_indirectly_constrained_map::de_list_with_indirectly_constrained_map(tokens)?
         134  +
                        );
         135  +
                    }
         136  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         137  +
                }
         138  +
            }
         139  +
            other => {
         140  +
                return Err(
         141  +
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
         142  +
                        "expected object key or end object, found: {:?}",
         143  +
                        other
         144  +
                    )),
         145  +
                )
         146  +
            }
         147  +
        }
         148  +
    }
         149  +
    if tokens.next().is_some() {
         150  +
        return Err(
         151  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         152  +
                "found more JSON tokens after completing parsing",
         153  +
            ),
         154  +
        );
         155  +
    }
         156  +
    Ok(builder)
         157  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_constrained_list_with_indirectly_constrained_aggregate_operation_output.rs

@@ -0,1 +0,48 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_constrained_list_with_indirectly_constrained_aggregate_operation_output_output_output(
           3  +
    value: &crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput,
           4  +
) -> Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_constrained_list_with_indirectly_constrained_aggregate_operation_output::ser_constrained_list_with_indirectly_constrained_aggregate_operation_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_constrained_list_with_indirectly_constrained_aggregate_operation_output_output(
          13  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    input: &crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput,
          15  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    if let Some(var_1) = &input.a {
          17  +
        let mut array_2 = object.key("a").start_array();
          18  +
        for item_3 in var_1 {
          19  +
            {
          20  +
                let mut array_4 = array_2.value().start_array();
          21  +
                for item_5 in item_3 {
          22  +
                    {
          23  +
                        array_4.value().string(item_5.as_str());
          24  +
                    }
          25  +
                }
          26  +
                array_4.finish();
          27  +
            }
          28  +
        }
          29  +
        array_2.finish();
          30  +
    }
          31  +
    if let Some(var_6) = &input.b {
          32  +
        let mut array_7 = object.key("b").start_array();
          33  +
        for item_8 in var_6 {
          34  +
            {
          35  +
                #[allow(unused_mut)]
          36  +
                let mut object_9 = array_7.value().start_object();
          37  +
                for (key_10, value_11) in item_8 {
          38  +
                    {
          39  +
                        object_9.key(key_10.as_str()).string(value_11.as_str());
          40  +
                    }
          41  +
                }
          42  +
                object_9.finish();
          43  +
            }
          44  +
        }
          45  +
        array_7.finish();
          46  +
    }
          47  +
    Ok(())
          48  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_indirectly_constrained_list.rs

@@ -0,1 +0,40 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_indirectly_constrained_list<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> Result<Option<crate::unconstrained::indirectly_constrained_list_unconstrained::IndirectlyConstrainedListUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          15  +
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
          16  +
                            tokens.next(),
          17  +
                        )?
          18  +
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          19  +
                        .transpose()?;
          20  +
                        if let Some(value) = value {
          21  +
                            items.push(value);
          22  +
                        } else {
          23  +
                            return Err(
          24  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                    "dense list cannot contain null values",
          26  +
                                ),
          27  +
                            );
          28  +
                        }
          29  +
                    }
          30  +
                }
          31  +
            }
          32  +
            Ok(Some(crate::unconstrained::indirectly_constrained_list_unconstrained::IndirectlyConstrainedListUnconstrained(items)))
          33  +
        }
          34  +
        _ => Err(
          35  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          36  +
                "expected start array or null",
          37  +
            ),
          38  +
        ),
          39  +
    }
          40  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_indirectly_constrained_map.rs

@@ -0,1 +0,48 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_indirectly_constrained_map<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> Result<Option<crate::unconstrained::indirectly_constrained_map_unconstrained::IndirectlyConstrainedMapUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
           7  +
            let mut map = ::std::collections::HashMap::new();
           8  +
            loop {
           9  +
                match tokens.next().transpose()? {
          10  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          11  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          12  +
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          13  +
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
          14  +
                            tokens.next(),
          15  +
                        )?
          16  +
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          17  +
                        .transpose()?;
          18  +
                        match value {
          19  +
                            Some(value) => {
          20  +
                                map.insert(key, value);
          21  +
                            }
          22  +
                            None => {
          23  +
                                return Err(
          24  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          25  +
                                        "dense map cannot contain null values",
          26  +
                                    ),
          27  +
                                )
          28  +
                            }
          29  +
                        }
          30  +
                    }
          31  +
                    other => {
          32  +
                        return Err(
          33  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          34  +
                                format!("expected object key or end object, found: {:?}", other),
          35  +
                            ),
          36  +
                        )
          37  +
                    }
          38  +
                }
          39  +
            }
          40  +
            Ok(Some(crate::unconstrained::indirectly_constrained_map_unconstrained::IndirectlyConstrainedMapUnconstrained(map)))
          41  +
        }
          42  +
        _ => Err(
          43  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          44  +
                "expected start object or null",
          45  +
            ),
          46  +
        ),
          47  +
    }
          48  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_list_with_indirectly_constrained_list.rs

@@ -0,1 +0,38 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_with_indirectly_constrained_list<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> Result<Option<crate::unconstrained::list_with_indirectly_constrained_list_unconstrained::ListWithIndirectlyConstrainedListUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          15  +
                        let value =
          16  +
                            crate::protocol_serde::shape_indirectly_constrained_list::de_indirectly_constrained_list(tokens)?
          17  +
                        ;
          18  +
                        if let Some(value) = value {
          19  +
                            items.push(value);
          20  +
                        } else {
          21  +
                            return Err(
          22  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          23  +
                                    "dense list cannot contain null values",
          24  +
                                ),
          25  +
                            );
          26  +
                        }
          27  +
                    }
          28  +
                }
          29  +
            }
          30  +
            Ok(Some(crate::unconstrained::list_with_indirectly_constrained_list_unconstrained::ListWithIndirectlyConstrainedListUnconstrained(items)))
          31  +
        }
          32  +
        _ => Err(
          33  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          34  +
                "expected start array or null",
          35  +
            ),
          36  +
        ),
          37  +
    }
          38  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/protocol_serde/shape_list_with_indirectly_constrained_map.rs

@@ -0,1 +0,38 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_list_with_indirectly_constrained_map<'a, I>(tokens: &mut ::std::iter::Peekable<I>) -> Result<Option<crate::unconstrained::list_with_indirectly_constrained_map_unconstrained::ListWithIndirectlyConstrainedMapUnconstrained>, ::aws_smithy_json::deserialize::error::DeserializeError>
           3  +
where I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>{
           4  +
    match tokens.next().transpose()? {
           5  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
           6  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
           7  +
            let mut items = Vec::new();
           8  +
            loop {
           9  +
                match tokens.peek() {
          10  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          11  +
                        tokens.next().transpose().unwrap();
          12  +
                        break;
          13  +
                    }
          14  +
                    _ => {
          15  +
                        let value =
          16  +
                            crate::protocol_serde::shape_indirectly_constrained_map::de_indirectly_constrained_map(tokens)?
          17  +
                        ;
          18  +
                        if let Some(value) = value {
          19  +
                            items.push(value);
          20  +
                        } else {
          21  +
                            return Err(
          22  +
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          23  +
                                    "dense list cannot contain null values",
          24  +
                                ),
          25  +
                            );
          26  +
                        }
          27  +
                    }
          28  +
                }
          29  +
            }
          30  +
            Ok(Some(crate::unconstrained::list_with_indirectly_constrained_map_unconstrained::ListWithIndirectlyConstrainedMapUnconstrained(items)))
          31  +
        }
          32  +
        _ => Err(
          33  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          34  +
                "expected start array or null",
          35  +
            ),
          36  +
        ),
          37  +
    }
          38  +
}

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/python_module_export.rs

@@ -25,25 +84,88 @@
   45     45   
    output
   46     46   
        .add_class::<crate::output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput>()?;
   47     47   
    input.add_class::<crate::input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput>()?;
   48     48   
    output
   49     49   
        .add_class::<crate::output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput>()?;
   50     50   
    input.add_class::<crate::input::QueryParamsTargetingMapOfListOfLengthStringOperationInput>()?;
   51     51   
    output.add_class::<crate::output::QueryParamsTargetingMapOfLengthStringOperationOutput>()?;
   52     52   
    input.add_class::<crate::input::QueryParamsTargetingMapOfLengthStringOperationInput>()?;
   53     53   
    output.add_class::<crate::output::QueryParamsTargetingLengthMapOperationOutput>()?;
   54     54   
    input.add_class::<crate::input::QueryParamsTargetingLengthMapOperationInput>()?;
          55  +
    output.add_class::<crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>()?;
          56  +
    input
          57  +
        .add_class::<crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput>(
          58  +
        )?;
   55     59   
    output.add_class::<crate::output::ConstrainedRecursiveShapesOperationOutput>()?;
   56     60   
    model.add_class::<crate::model::RecursiveShapesInputOutputNested1>()?;
   57     61   
    model.add_class::<crate::model::RecursiveShapesInputOutputNested2>()?;
   58     62   
    input.add_class::<crate::input::ConstrainedRecursiveShapesOperationInput>()?;
   59     63   
    output.add_class::<crate::output::ConstrainedHttpPayloadBoundShapeOperationOutput>()?;
   60     64   
    model.add_class::<crate::model::ConA>()?;
   61     65   
    model.add_class::<crate::model::PyUnionMarkerConstrainedUnion>()?;
   62     66   
    model.add_class::<crate::model::ConB>()?;
   63     67   
    model.add_class::<crate::model::SensitiveStructure>()?;
   64     68   
    input.add_class::<crate::input::ConstrainedHttpPayloadBoundShapeOperationInput>()?;

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/python_operation_adaptor.rs

@@ -773,773 +832,883 @@
  793    793   
    result.map_err(|e| {
  794    794   
        let rich_py_err =
  795    795   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  796    796   
                e.clone_ref(py)
  797    797   
            }));
  798    798   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  799    799   
        e.into()
  800    800   
    })
  801    801   
}
  802    802   
         803  +
/// Python handler for operation `ConstrainedListWithIndirectlyConstrainedAggregateOperation`.
         804  +
pub(crate) async fn constrained_list_with_indirectly_constrained_aggregate_operation(
         805  +
    input: crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
         806  +
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
         807  +
    handler: ::aws_smithy_http_server_python::PyHandler,
         808  +
) -> std::result::Result<
         809  +
    crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput,
         810  +
    crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError,
         811  +
> {
         812  +
    // Async block used to run the handler and catch any Python error.
         813  +
    let result = if handler.is_coroutine {
         814  +
        ::tracing::trace!(
         815  +
            name = "constrained_list_with_indirectly_constrained_aggregate_operation",
         816  +
            "executing python handler coroutine"
         817  +
        );
         818  +
        let result = ::pyo3::Python::with_gil(|py| {
         819  +
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
         820  +
            let coroutine = if handler.args == 1 {
         821  +
                pyhandler.call1((input,))?
         822  +
            } else {
         823  +
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
         824  +
            };
         825  +
            ::pyo3_asyncio::tokio::into_future(coroutine)
         826  +
        })?;
         827  +
        result.await.and_then(|r| ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>(py)))
         828  +
    } else {
         829  +
        ::tracing::trace!(
         830  +
            name = "constrained_list_with_indirectly_constrained_aggregate_operation",
         831  +
            "executing python handler function"
         832  +
        );
         833  +
        ::pyo3::Python::with_gil(|py| {
         834  +
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
         835  +
            let output = if handler.args == 1 {
         836  +
                pyhandler.call1((input,))?
         837  +
            } else {
         838  +
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
         839  +
            };
         840  +
            output.extract::<crate::output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput>()
         841  +
        })
         842  +
    };
         843  +
    // Catch and record a Python traceback.
         844  +
    result.map_err(|e| {
         845  +
        let rich_py_err =
         846  +
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
         847  +
                e.clone_ref(py)
         848  +
            }));
         849  +
        ::tracing::error!(error = ?rich_py_err, "handler error");
         850  +
        e.into()
         851  +
    })
         852  +
}
         853  +
  803    854   
/// Python handler for operation `ConstrainedRecursiveShapesOperation`.
  804    855   
pub(crate) async fn constrained_recursive_shapes_operation(
  805    856   
    input: crate::input::ConstrainedRecursiveShapesOperationInput,
  806    857   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  807    858   
    handler: ::aws_smithy_http_server_python::PyHandler,
  808    859   
) -> std::result::Result<
  809    860   
    crate::output::ConstrainedRecursiveShapesOperationOutput,
  810    861   
    crate::error::ConstrainedRecursiveShapesOperationError,
  811    862   
> {
  812    863   
    // Async block used to run the handler and catch any Python error.

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/python_server_application.rs

@@ -7,7 +66,70 @@
   27     27   
///         raise middleware.MiddlewareException("Unsupported `x-amz-id` header", 401)
   28     28   
///
   29     29   
/// @app.constrained_http_bound_shapes_operation
   30     30   
/// def constrained_http_bound_shapes_operation(input: input::ConstrainedHttpBoundShapesOperationInput, ctx: Context) -> output::ConstrainedHttpBoundShapesOperationOutput:
   31     31   
///     raise NotImplementedError
   32     32   
///
   33     33   
/// @app.constrained_http_payload_bound_shape_operation
   34     34   
/// def constrained_http_payload_bound_shape_operation(input: input::ConstrainedHttpPayloadBoundShapeOperationInput, ctx: Context) -> output::ConstrainedHttpPayloadBoundShapeOperationOutput:
   35     35   
///     raise NotImplementedError
   36     36   
///
          37  +
/// @app.constrained_list_with_indirectly_constrained_aggregate_operation
          38  +
/// def constrained_list_with_indirectly_constrained_aggregate_operation(input: input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput, ctx: Context) -> output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput:
          39  +
///     raise NotImplementedError
          40  +
///
   37     41   
/// @app.constrained_recursive_shapes_operation
   38     42   
/// def constrained_recursive_shapes_operation(input: input::ConstrainedRecursiveShapesOperationInput, ctx: Context) -> output::ConstrainedRecursiveShapesOperationOutput:
   39     43   
///     raise NotImplementedError
   40     44   
///
   41     45   
/// @app.constrained_shapes_only_in_output_operation
   42     46   
/// def constrained_shapes_only_in_output_operation(input: input::ConstrainedShapesOnlyInOutputOperationInput, ctx: Context) -> output::ConstrainedShapesOnlyInOutputOperationOutput:
   43     47   
///     raise NotImplementedError
   44     48   
///
   45     49   
/// @app.constrained_shapes_operation
   46     50   
/// def constrained_shapes_operation(input: input::ConstrainedShapesOperationInput, ctx: Context) -> output::ConstrainedShapesOperationOutput:
@@ -171,175 +230,240 @@
  191    195   
            builder.constrained_http_payload_bound_shape_operation(move |input, state| {
  192    196   
                ::pyo3_asyncio::tokio::scope(
  193    197   
                    constrained_http_payload_bound_shape_operation_locals.clone(),
  194    198   
                    crate::python_operation_adaptor::constrained_http_payload_bound_shape_operation(
  195    199   
                        input,
  196    200   
                        state,
  197    201   
                        handler.clone(),
  198    202   
                    ),
  199    203   
                )
  200    204   
            });
         205  +
        let constrained_list_with_indirectly_constrained_aggregate_operation_locals =
         206  +
            ::pyo3_asyncio::TaskLocals::new(event_loop);
         207  +
        let handler = self.handlers.get("constrained_list_with_indirectly_constrained_aggregate_operation").expect("Python handler for operation `constrained_list_with_indirectly_constrained_aggregate_operation` not found").clone();
         208  +
        let builder = builder.constrained_list_with_indirectly_constrained_aggregate_operation(move |input, state| {
         209  +
                                    ::pyo3_asyncio::tokio::scope(constrained_list_with_indirectly_constrained_aggregate_operation_locals.clone(), crate::python_operation_adaptor::constrained_list_with_indirectly_constrained_aggregate_operation(input, state, handler.clone()))
         210  +
                                });
  201    211   
        let constrained_recursive_shapes_operation_locals =
  202    212   
            ::pyo3_asyncio::TaskLocals::new(event_loop);
  203    213   
        let handler = self
  204    214   
            .handlers
  205    215   
            .get("constrained_recursive_shapes_operation")
  206    216   
            .expect(
  207    217   
                "Python handler for operation `constrained_recursive_shapes_operation` not found",
  208    218   
            )
  209    219   
            .clone();
  210    220   
        let builder = builder.constrained_recursive_shapes_operation(move |input, state| {
@@ -478,488 +537,565 @@
  498    508   
    /// :rtype None:
  499    509   
    #[pyo3(text_signature = "($self, func)")]
  500    510   
    pub fn constrained_http_payload_bound_shape_operation(
  501    511   
        &mut self,
  502    512   
        py: ::pyo3::Python,
  503    513   
        func: ::pyo3::PyObject,
  504    514   
    ) -> ::pyo3::PyResult<()> {
  505    515   
        use ::aws_smithy_http_server_python::PyApp;
  506    516   
        self.register_operation(py, "constrained_http_payload_bound_shape_operation", func)
  507    517   
    }
         518  +
    /// Method to register `constrained_list_with_indirectly_constrained_aggregate_operation` Python implementation inside the handlers map.
         519  +
    /// It can be used as a function decorator in Python.
         520  +
    ///
         521  +
    /// :param func typing.Union\[typing.Callable\[\[constraints_without_public_constrained_types.input.ConstrainedListWithIndirectlyConstrainedAggregateOperationInput, Ctx\], typing.Union\[constraints_without_public_constrained_types.output.ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput, typing.Awaitable\[constraints_without_public_constrained_types.output.ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput\]\]\], typing.Callable\[\[constraints_without_public_constrained_types.input.ConstrainedListWithIndirectlyConstrainedAggregateOperationInput\], typing.Union\[constraints_without_public_constrained_types.output.ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput, typing.Awaitable\[constraints_without_public_constrained_types.output.ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput\]\]\]\]:
         522  +
    /// :rtype None:
         523  +
    #[pyo3(text_signature = "($self, func)")]
         524  +
    pub fn constrained_list_with_indirectly_constrained_aggregate_operation(
         525  +
        &mut self,
         526  +
        py: ::pyo3::Python,
         527  +
        func: ::pyo3::PyObject,
         528  +
    ) -> ::pyo3::PyResult<()> {
         529  +
        use ::aws_smithy_http_server_python::PyApp;
         530  +
        self.register_operation(
         531  +
            py,
         532  +
            "constrained_list_with_indirectly_constrained_aggregate_operation",
         533  +
            func,
         534  +
        )
         535  +
    }
  508    536   
    /// Method to register `constrained_recursive_shapes_operation` Python implementation inside the handlers map.
  509    537   
    /// It can be used as a function decorator in Python.
  510    538   
    ///
  511    539   
    /// :param func typing.Union\[typing.Callable\[\[constraints_without_public_constrained_types.input.ConstrainedRecursiveShapesOperationInput, Ctx\], typing.Union\[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable\[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput\]\]\], typing.Callable\[\[constraints_without_public_constrained_types.input.ConstrainedRecursiveShapesOperationInput\], typing.Union\[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable\[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput\]\]\]\]:
  512    540   
    /// :rtype None:
  513    541   
    #[pyo3(text_signature = "($self, func)")]
  514    542   
    pub fn constrained_recursive_shapes_operation(
  515    543   
        &mut self,
  516    544   
        py: ::pyo3::Python,
  517    545   
        func: ::pyo3::PyObject,

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/service.rs

@@ -1,1 +38,40 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`ConstraintsService`].
    3      3   
///
    4      4   
/// Constructed via [`ConstraintsService::builder`].
    5      5   
pub struct ConstraintsServiceBuilder<Body, L, HttpPl, ModelPl> {
    6      6   
    constrained_http_bound_shapes_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      7   
    constrained_http_payload_bound_shape_operation:
    8      8   
        Option<::aws_smithy_http_server::routing::Route<Body>>,
           9  +
    constrained_list_with_indirectly_constrained_aggregate_operation:
          10  +
        Option<::aws_smithy_http_server::routing::Route<Body>>,
    9     11   
    constrained_recursive_shapes_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10     12   
    constrained_shapes_only_in_output_operation:
   11     13   
        Option<::aws_smithy_http_server::routing::Route<Body>>,
   12     14   
    constrained_shapes_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   13     15   
    event_streams_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   14     16   
    http_prefix_headers_targeting_length_map_operation:
   15     17   
        Option<::aws_smithy_http_server::routing::Route<Body>>,
   16     18   
    non_streaming_blob_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   17     19   
    query_params_targeting_length_map_operation:
   18     20   
        Option<::aws_smithy_http_server::routing::Route<Body>>,
@@ -324,326 +383,539 @@
  344    346   
            > + Clone
  345    347   
            + Send
  346    348   
            + 'static,
  347    349   
        S::Future: Send + 'static,
  348    350   
    {
  349    351   
        self.constrained_http_payload_bound_shape_operation =
  350    352   
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  351    353   
        self
  352    354   
    }
  353    355   
         356  +
    /// Sets the [`ConstrainedListWithIndirectlyConstrainedAggregateOperation`](crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation) operation.
         357  +
    ///
         358  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
         359  +
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         360  +
    ///
         361  +
    /// # Example
         362  +
    ///
         363  +
    /// ```no_run
         364  +
    /// use constraints_without_public_constrained_types::{ConstraintsService, ConstraintsServiceConfig};
         365  +
    ///
         366  +
    /// use constraints_without_public_constrained_types::{input, output, error};
         367  +
    ///
         368  +
    /// async fn handler(input: input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput) -> Result<output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput, error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError> {
         369  +
    ///     todo!()
         370  +
    /// }
         371  +
    ///
         372  +
    /// let config = ConstraintsServiceConfig::builder().build();
         373  +
    /// let app = ConstraintsService::builder(config)
         374  +
    ///     .constrained_list_with_indirectly_constrained_aggregate_operation(handler)
         375  +
    ///     /* Set other handlers */
         376  +
    ///     .build()
         377  +
    ///     .unwrap();
         378  +
    /// # let app: ConstraintsService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         379  +
    /// ```
         380  +
    ///
         381  +
                    pub fn constrained_list_with_indirectly_constrained_aggregate_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
         382  +
                    where
         383  +
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation, HandlerExtractors>,
         384  +
         385  +
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         386  +
                            ConstraintsService<L>,
         387  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         388  +
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation, HandlerType>
         389  +
                        >,
         390  +
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         391  +
                            ConstraintsService<L>,
         392  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         393  +
                            ModelPl::Output
         394  +
                        >,
         395  +
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         396  +
                            ConstraintsService<L>,
         397  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         398  +
                            <
         399  +
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         400  +
                                as ::aws_smithy_http_server::plugin::Plugin<
         401  +
                                    ConstraintsService<L>,
         402  +
                                    crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         403  +
                                    ModelPl::Output
         404  +
                                >
         405  +
                            >::Output
         406  +
                        >,
         407  +
         408  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         409  +
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         410  +
         411  +
                    {
         412  +
        use ::aws_smithy_http_server::operation::OperationShapeExt;
         413  +
        use ::aws_smithy_http_server::plugin::Plugin;
         414  +
        let svc = crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation::from_handler(handler);
         415  +
        let svc = self.model_plugin.apply(svc);
         416  +
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         417  +
            .apply(svc);
         418  +
        let svc = self.http_plugin.apply(svc);
         419  +
        self.constrained_list_with_indirectly_constrained_aggregate_operation_custom(svc)
         420  +
    }
         421  +
         422  +
    /// Sets the [`ConstrainedListWithIndirectlyConstrainedAggregateOperation`](crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation) operation.
         423  +
    ///
         424  +
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
         425  +
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
         426  +
    ///
         427  +
    /// # Example
         428  +
    ///
         429  +
    /// ```no_run
         430  +
    /// use constraints_without_public_constrained_types::{ConstraintsService, ConstraintsServiceConfig};
         431  +
    ///
         432  +
    /// use constraints_without_public_constrained_types::{input, output, error};
         433  +
    ///
         434  +
    /// async fn handler(input: input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput) -> Result<output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput, error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError> {
         435  +
    ///     todo!()
         436  +
    /// }
         437  +
    ///
         438  +
    /// let config = ConstraintsServiceConfig::builder().build();
         439  +
    /// let svc = ::tower::util::service_fn(handler);
         440  +
    /// let app = ConstraintsService::builder(config)
         441  +
    ///     .constrained_list_with_indirectly_constrained_aggregate_operation_service(svc)
         442  +
    ///     /* Set other handlers */
         443  +
    ///     .build()
         444  +
    ///     .unwrap();
         445  +
    /// # let app: ConstraintsService<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
         446  +
    /// ```
         447  +
    ///
         448  +
                    pub fn constrained_list_with_indirectly_constrained_aggregate_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
         449  +
                    where
         450  +
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation, ServiceExtractors>,
         451  +
         452  +
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
         453  +
                            ConstraintsService<L>,
         454  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         455  +
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation, S>
         456  +
                        >,
         457  +
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
         458  +
                            ConstraintsService<L>,
         459  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         460  +
                            ModelPl::Output
         461  +
                        >,
         462  +
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
         463  +
                            ConstraintsService<L>,
         464  +
                            crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         465  +
                            <
         466  +
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
         467  +
                                as ::aws_smithy_http_server::plugin::Plugin<
         468  +
                                    ConstraintsService<L>,
         469  +
                                    crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
         470  +
                                    ModelPl::Output
         471  +
                                >
         472  +
                            >::Output
         473  +
                        >,
         474  +
         475  +
                        HttpPl::Output: ::tower::Service<::http::Request<Body>, Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
         476  +
                        <HttpPl::Output as ::tower::Service<::http::Request<Body>>>::Future: Send + 'static,
         477  +
         478  +
                    {
         479  +
        use ::aws_smithy_http_server::operation::OperationShapeExt;
         480  +
        use ::aws_smithy_http_server::plugin::Plugin;
         481  +
        let svc = crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation::from_service(service);
         482  +
        let svc = self.model_plugin.apply(svc);
         483  +
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
         484  +
            .apply(svc);
         485  +
        let svc = self.http_plugin.apply(svc);
         486  +
        self.constrained_list_with_indirectly_constrained_aggregate_operation_custom(svc)
         487  +
    }
         488  +
         489  +
    /// Sets the [`ConstrainedListWithIndirectlyConstrainedAggregateOperation`](crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation) to a custom [`Service`](tower::Service).
         490  +
    /// not constrained by the Smithy contract.
         491  +
    fn constrained_list_with_indirectly_constrained_aggregate_operation_custom<S>(
         492  +
        mut self,
         493  +
        svc: S,
         494  +
    ) -> Self
         495  +
    where
         496  +
        S: ::tower::Service<
         497  +
                ::http::Request<Body>,
         498  +
                Response = ::http::Response<::aws_smithy_http_server::body::BoxBody>,
         499  +
                Error = ::std::convert::Infallible,
         500  +
            > + Clone
         501  +
            + Send
         502  +
            + 'static,
         503  +
        S::Future: Send + 'static,
         504  +
    {
         505  +
        self.constrained_list_with_indirectly_constrained_aggregate_operation =
         506  +
            Some(::aws_smithy_http_server::routing::Route::new(svc));
         507  +
        self
         508  +
    }
         509  +
  354    510   
    /// Sets the [`ConstrainedRecursiveShapesOperation`](crate::operation_shape::ConstrainedRecursiveShapesOperation) operation.
  355    511   
    ///
  356    512   
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  357    513   
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  358    514   
    ///
  359    515   
    /// # Example
  360    516   
    ///
  361    517   
    /// ```no_run
  362    518   
    /// use constraints_without_public_constrained_types::{ConstraintsService, ConstraintsServiceConfig};
  363    519   
    ///
@@ -3131,3287 +3190,3352 @@
 3151   3307   
            }
 3152   3308   
            if self
 3153   3309   
                .constrained_http_payload_bound_shape_operation
 3154   3310   
                .is_none()
 3155   3311   
            {
 3156   3312   
                missing_operation_names.insert(
 3157   3313   
                    crate::operation_shape::ConstrainedHttpPayloadBoundShapeOperation::ID,
 3158   3314   
                    ".constrained_http_payload_bound_shape_operation()",
 3159   3315   
                );
 3160   3316   
            }
        3317  +
            if self
        3318  +
                .constrained_list_with_indirectly_constrained_aggregate_operation
        3319  +
                .is_none()
        3320  +
            {
        3321  +
                missing_operation_names.insert(crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation::ID, ".constrained_list_with_indirectly_constrained_aggregate_operation()");
        3322  +
            }
 3161   3323   
            if self.constrained_recursive_shapes_operation.is_none() {
 3162   3324   
                missing_operation_names.insert(
 3163   3325   
                    crate::operation_shape::ConstrainedRecursiveShapesOperation::ID,
 3164   3326   
                    ".constrained_recursive_shapes_operation()",
 3165   3327   
                );
 3166   3328   
            }
 3167   3329   
            if self.constrained_shapes_only_in_output_operation.is_none() {
 3168   3330   
                missing_operation_names.insert(
 3169   3331   
                    crate::operation_shape::ConstrainedShapesOnlyInOutputOperation::ID,
 3170   3332   
                    ".constrained_shapes_only_in_output_operation()",
@@ -3269,3431 +3383,3553 @@
 3289   3451   
                    operation_names2setter_methods: missing_operation_names,
 3290   3452   
                });
 3291   3453   
            }
 3292   3454   
            let unexpected_error_msg = "this should never panic since we are supposed to check beforehand that a handler has been registered for this operation; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues";
 3293   3455   
 3294   3456   
            crate::model::LengthPatternString::compile_regex();
 3295   3457   
            crate::model::PatternString::compile_regex();
 3296   3458   
 3297   3459   
            ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([(request_specs::constrained_http_bound_shapes_operation(), self.constrained_http_bound_shapes_operation.expect(unexpected_error_msg)),
 3298   3460   
(request_specs::constrained_http_payload_bound_shape_operation(), self.constrained_http_payload_bound_shape_operation.expect(unexpected_error_msg)),
        3461  +
(request_specs::constrained_list_with_indirectly_constrained_aggregate_operation(), self.constrained_list_with_indirectly_constrained_aggregate_operation.expect(unexpected_error_msg)),
 3299   3462   
(request_specs::constrained_recursive_shapes_operation(), self.constrained_recursive_shapes_operation.expect(unexpected_error_msg)),
 3300   3463   
(request_specs::constrained_shapes_only_in_output_operation(), self.constrained_shapes_only_in_output_operation.expect(unexpected_error_msg)),
 3301   3464   
(request_specs::constrained_shapes_operation(), self.constrained_shapes_operation.expect(unexpected_error_msg)),
 3302   3465   
(request_specs::event_streams_operation(), self.event_streams_operation.expect(unexpected_error_msg)),
 3303   3466   
(request_specs::http_prefix_headers_targeting_length_map_operation(), self.http_prefix_headers_targeting_length_map_operation.expect(unexpected_error_msg)),
 3304   3467   
(request_specs::non_streaming_blob_operation(), self.non_streaming_blob_operation.expect(unexpected_error_msg)),
 3305   3468   
(request_specs::query_params_targeting_length_map_operation(), self.query_params_targeting_length_map_operation.expect(unexpected_error_msg)),
 3306   3469   
(request_specs::query_params_targeting_map_of_enum_string_operation(), self.query_params_targeting_map_of_enum_string_operation.expect(unexpected_error_msg)),
 3307   3470   
(request_specs::query_params_targeting_map_of_length_list_of_pattern_string_operation(), self.query_params_targeting_map_of_length_list_of_pattern_string_operation.expect(unexpected_error_msg)),
 3308   3471   
(request_specs::query_params_targeting_map_of_length_pattern_string_operation(), self.query_params_targeting_map_of_length_pattern_string_operation.expect(unexpected_error_msg)),
 3309   3472   
(request_specs::query_params_targeting_map_of_length_string_operation(), self.query_params_targeting_map_of_length_string_operation.expect(unexpected_error_msg)),
 3310   3473   
(request_specs::query_params_targeting_map_of_list_of_enum_string_operation(), self.query_params_targeting_map_of_list_of_enum_string_operation.expect(unexpected_error_msg)),
 3311   3474   
(request_specs::query_params_targeting_map_of_list_of_length_pattern_string_operation(), self.query_params_targeting_map_of_list_of_length_pattern_string_operation.expect(unexpected_error_msg)),
 3312   3475   
(request_specs::query_params_targeting_map_of_list_of_length_string_operation(), self.query_params_targeting_map_of_list_of_length_string_operation.expect(unexpected_error_msg)),
 3313   3476   
(request_specs::query_params_targeting_map_of_list_of_pattern_string_operation(), self.query_params_targeting_map_of_list_of_pattern_string_operation.expect(unexpected_error_msg)),
 3314   3477   
(request_specs::query_params_targeting_map_of_pattern_string_operation(), self.query_params_targeting_map_of_pattern_string_operation.expect(unexpected_error_msg)),
 3315   3478   
(request_specs::query_params_targeting_map_of_set_of_length_string_operation(), self.query_params_targeting_map_of_set_of_length_string_operation.expect(unexpected_error_msg)),
 3316   3479   
(request_specs::streaming_blob_operation(), self.streaming_blob_operation.expect(unexpected_error_msg)),])
 3317   3480   
        };
 3318   3481   
        let svc = ::aws_smithy_http_server::routing::RoutingService::new(router);
 3319   3482   
        let svc = svc.map(|s| s.layer(self.layer));
 3320   3483   
        Ok(ConstraintsService { svc })
 3321   3484   
    }
 3322   3485   
 3323   3486   
    /// Constructs a [`ConstraintsService`] from the arguments provided to the builder.
 3324   3487   
    /// Operations without a handler default to returning 500 Internal Server Error to the caller.
 3325   3488   
    ///
 3326   3489   
    /// Check out [`ConstraintsServiceBuilder::build`] if you'd prefer the builder to fail if one or more operations do
 3327   3490   
    /// not have a registered handler.
 3328   3491   
    pub fn build_unchecked(self) -> ConstraintsService<L::Service>
 3329   3492   
    where
 3330   3493   
        Body: Send + 'static,
 3331   3494   
        L: ::tower::Layer<
 3332   3495   
            ::aws_smithy_http_server::routing::RoutingService<
 3333   3496   
                ::aws_smithy_http_server::protocol::rest::router::RestRouter<
 3334   3497   
                    ::aws_smithy_http_server::routing::Route<Body>,
 3335   3498   
                >,
 3336   3499   
                ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 3337   3500   
            >,
 3338   3501   
        >,
 3339   3502   
    {
 3340   3503   
        let router = ::aws_smithy_http_server::protocol::rest::router::RestRouter::from_iter([(
 3341   3504   
                                request_specs::constrained_http_bound_shapes_operation(),
 3342   3505   
                                self.constrained_http_bound_shapes_operation.unwrap_or_else(|| {
 3343   3506   
                                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::default();
 3344   3507   
                                    ::aws_smithy_http_server::routing::Route::new(svc)
 3345   3508   
                                })
 3346   3509   
                            ),
 3347   3510   
(
 3348   3511   
                                request_specs::constrained_http_payload_bound_shape_operation(),
 3349   3512   
                                self.constrained_http_payload_bound_shape_operation.unwrap_or_else(|| {
 3350   3513   
                                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::default();
 3351   3514   
                                    ::aws_smithy_http_server::routing::Route::new(svc)
 3352   3515   
                                })
 3353   3516   
                            ),
        3517  +
(
        3518  +
                                request_specs::constrained_list_with_indirectly_constrained_aggregate_operation(),
        3519  +
                                self.constrained_list_with_indirectly_constrained_aggregate_operation.unwrap_or_else(|| {
        3520  +
                                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::default();
        3521  +
                                    ::aws_smithy_http_server::routing::Route::new(svc)
        3522  +
                                })
        3523  +
                            ),
 3354   3524   
(
 3355   3525   
                                request_specs::constrained_recursive_shapes_operation(),
 3356   3526   
                                self.constrained_recursive_shapes_operation.unwrap_or_else(|| {
 3357   3527   
                                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::default();
 3358   3528   
                                    ::aws_smithy_http_server::routing::Route::new(svc)
 3359   3529   
                                })
 3360   3530   
                            ),
 3361   3531   
(
 3362   3532   
                                request_specs::constrained_shapes_only_in_output_operation(),
 3363   3533   
                                self.constrained_shapes_only_in_output_operation.unwrap_or_else(|| {
@@ -3520,3690 +3579,3764 @@
 3540   3710   
    pub(super) fn constrained_http_payload_bound_shape_operation(
 3541   3711   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 3542   3712   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 3543   3713   
                    ::http::Method::POST,
 3544   3714   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 3545   3715   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 3546   3716   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 3547   3717   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("constrained-http-payload-bound-shape-operation")),
 3548   3718   
]),
 3549   3719   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
        3720  +
])
        3721  +
                        )
        3722  +
                    ),
        3723  +
                )
        3724  +
    }
        3725  +
    pub(super) fn constrained_list_with_indirectly_constrained_aggregate_operation(
        3726  +
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
        3727  +
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
        3728  +
                    ::http::Method::POST,
        3729  +
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
        3730  +
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
        3731  +
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
        3732  +
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("constrained-list-with-indirectly-constrained-aggregate")),
        3733  +
]),
        3734  +
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 3550   3735   
])
 3551   3736   
                        )
 3552   3737   
                    ),
 3553   3738   
                )
 3554   3739   
    }
 3555   3740   
    pub(super) fn constrained_recursive_shapes_operation(
 3556   3741   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 3557   3742   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 3558   3743   
                    ::http::Method::POST,
 3559   3744   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
@@ -3828,4013 +3934,4121 @@
 3848   4033   
        Body,
 3849   4034   
        L,
 3850   4035   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 3851   4036   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 3852   4037   
    >(
 3853   4038   
        config: ConstraintsServiceConfig<L, HttpPl, ModelPl>,
 3854   4039   
    ) -> ConstraintsServiceBuilder<Body, L, HttpPl, ModelPl> {
 3855   4040   
        ConstraintsServiceBuilder {
 3856   4041   
            constrained_http_bound_shapes_operation: None,
 3857   4042   
            constrained_http_payload_bound_shape_operation: None,
        4043  +
            constrained_list_with_indirectly_constrained_aggregate_operation: None,
 3858   4044   
            constrained_recursive_shapes_operation: None,
 3859   4045   
            constrained_shapes_only_in_output_operation: None,
 3860   4046   
            constrained_shapes_operation: None,
 3861   4047   
            event_streams_operation: None,
 3862   4048   
            http_prefix_headers_targeting_length_map_operation: None,
 3863   4049   
            non_streaming_blob_operation: None,
 3864   4050   
            query_params_targeting_length_map_operation: None,
 3865   4051   
            query_params_targeting_map_of_enum_string_operation: None,
 3866   4052   
            query_params_targeting_map_of_length_list_of_pattern_string_operation: None,
 3867   4053   
            query_params_targeting_map_of_length_pattern_string_operation: None,
 3868   4054   
            query_params_targeting_map_of_length_string_operation: None,
 3869   4055   
            query_params_targeting_map_of_list_of_enum_string_operation: None,
 3870   4056   
            query_params_targeting_map_of_list_of_length_pattern_string_operation: None,
 3871   4057   
            query_params_targeting_map_of_list_of_length_string_operation: None,
 3872   4058   
            query_params_targeting_map_of_list_of_pattern_string_operation: None,
 3873   4059   
            query_params_targeting_map_of_pattern_string_operation: None,
 3874   4060   
            query_params_targeting_map_of_set_of_length_string_operation: None,
 3875   4061   
            streaming_blob_operation: None,
 3876   4062   
            layer: config.layers,
 3877   4063   
            http_plugin: config.http_plugins,
 3878   4064   
            model_plugin: config.model_plugins,
 3879   4065   
        }
 3880   4066   
    }
 3881   4067   
 3882   4068   
    /// Constructs a builder for [`ConstraintsService`].
 3883   4069   
    /// You must specify what plugins should be applied to the operations in this service.
 3884   4070   
    ///
 3885   4071   
    /// Use [`ConstraintsService::builder_without_plugins`] if you don't need to apply plugins.
 3886   4072   
    ///
 3887   4073   
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
 3888   4074   
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
 3889   4075   
    /// multiple plugins.
 3890   4076   
    #[deprecated(
 3891   4077   
        since = "0.57.0",
 3892   4078   
        note = "please use the `builder` constructor and register plugins on the `ConstraintsServiceConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 3893   4079   
    )]
 3894   4080   
    pub fn builder_with_plugins<
 3895   4081   
        Body,
 3896   4082   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 3897   4083   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 3898   4084   
    >(
 3899   4085   
        http_plugin: HttpPl,
 3900   4086   
        model_plugin: ModelPl,
 3901   4087   
    ) -> ConstraintsServiceBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
 3902   4088   
        ConstraintsServiceBuilder {
 3903   4089   
            constrained_http_bound_shapes_operation: None,
 3904   4090   
            constrained_http_payload_bound_shape_operation: None,
        4091  +
            constrained_list_with_indirectly_constrained_aggregate_operation: None,
 3905   4092   
            constrained_recursive_shapes_operation: None,
 3906   4093   
            constrained_shapes_only_in_output_operation: None,
 3907   4094   
            constrained_shapes_operation: None,
 3908   4095   
            event_streams_operation: None,
 3909   4096   
            http_prefix_headers_targeting_length_map_operation: None,
 3910   4097   
            non_streaming_blob_operation: None,
 3911   4098   
            query_params_targeting_length_map_operation: None,
 3912   4099   
            query_params_targeting_map_of_enum_string_operation: None,
 3913   4100   
            query_params_targeting_map_of_length_list_of_pattern_string_operation: None,
 3914   4101   
            query_params_targeting_map_of_length_pattern_string_operation: None,
@@ -4017,4204 +4137,4333 @@
 4037   4224   
        self.svc.call(request)
 4038   4225   
    }
 4039   4226   
}
 4040   4227   
 4041   4228   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in ConstraintsService.
 4042   4229   
#[allow(clippy::enum_variant_names)]
 4043   4230   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
 4044   4231   
pub enum Operation {
 4045   4232   
    ConstrainedHttpBoundShapesOperation,
 4046   4233   
    ConstrainedHttpPayloadBoundShapeOperation,
        4234  +
    ConstrainedListWithIndirectlyConstrainedAggregateOperation,
 4047   4235   
    ConstrainedRecursiveShapesOperation,
 4048   4236   
    ConstrainedShapesOnlyInOutputOperation,
 4049   4237   
    ConstrainedShapesOperation,
 4050   4238   
    EventStreamsOperation,
 4051   4239   
    HttpPrefixHeadersTargetingLengthMapOperation,
 4052   4240   
    NonStreamingBlobOperation,
 4053   4241   
    QueryParamsTargetingLengthMapOperation,
 4054   4242   
    QueryParamsTargetingMapOfEnumStringOperation,
 4055   4243   
    QueryParamsTargetingMapOfLengthListOfPatternStringOperation,
 4056   4244   
    QueryParamsTargetingMapOfLengthPatternStringOperation,
 4057   4245   
    QueryParamsTargetingMapOfLengthStringOperation,
 4058   4246   
    QueryParamsTargetingMapOfListOfEnumStringOperation,
 4059   4247   
    QueryParamsTargetingMapOfListOfLengthPatternStringOperation,
 4060   4248   
    QueryParamsTargetingMapOfListOfLengthStringOperation,
 4061   4249   
    QueryParamsTargetingMapOfListOfPatternStringOperation,
 4062   4250   
    QueryParamsTargetingMapOfPatternStringOperation,
 4063   4251   
    QueryParamsTargetingMapOfSetOfLengthStringOperation,
 4064   4252   
    StreamingBlobOperation,
 4065   4253   
}
 4066   4254   
 4067   4255   
impl Operation {
 4068   4256   
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
 4069   4257   
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
 4070   4258   
        match self {
 4071   4259   
                            Operation::ConstrainedHttpBoundShapesOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedHttpBoundShapesOperation", "com.amazonaws.constraints", "ConstrainedHttpBoundShapesOperation")
 4072   4260   
,Operation::ConstrainedHttpPayloadBoundShapeOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedHttpPayloadBoundShapeOperation", "com.amazonaws.constraints", "ConstrainedHttpPayloadBoundShapeOperation")
        4261  +
,Operation::ConstrainedListWithIndirectlyConstrainedAggregateOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedListWithIndirectlyConstrainedAggregateOperation", "com.amazonaws.constraints", "ConstrainedListWithIndirectlyConstrainedAggregateOperation")
 4073   4262   
,Operation::ConstrainedRecursiveShapesOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedRecursiveShapesOperation", "com.amazonaws.constraints", "ConstrainedRecursiveShapesOperation")
 4074   4263   
,Operation::ConstrainedShapesOnlyInOutputOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedShapesOnlyInOutputOperation", "com.amazonaws.constraints", "ConstrainedShapesOnlyInOutputOperation")
 4075   4264   
,Operation::ConstrainedShapesOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#ConstrainedShapesOperation", "com.amazonaws.constraints", "ConstrainedShapesOperation")
 4076   4265   
,Operation::EventStreamsOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#EventStreamsOperation", "com.amazonaws.constraints", "EventStreamsOperation")
 4077   4266   
,Operation::HttpPrefixHeadersTargetingLengthMapOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#HttpPrefixHeadersTargetingLengthMapOperation", "com.amazonaws.constraints", "HttpPrefixHeadersTargetingLengthMapOperation")
 4078   4267   
,Operation::NonStreamingBlobOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#NonStreamingBlobOperation", "com.amazonaws.constraints", "NonStreamingBlobOperation")
 4079   4268   
,Operation::QueryParamsTargetingLengthMapOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingLengthMapOperation", "com.amazonaws.constraints", "QueryParamsTargetingLengthMapOperation")
 4080   4269   
,Operation::QueryParamsTargetingMapOfEnumStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfEnumStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfEnumStringOperation")
 4081   4270   
,Operation::QueryParamsTargetingMapOfLengthListOfPatternStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfLengthListOfPatternStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfLengthListOfPatternStringOperation")
 4082   4271   
,Operation::QueryParamsTargetingMapOfLengthPatternStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfLengthPatternStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfLengthPatternStringOperation")
 4083   4272   
,Operation::QueryParamsTargetingMapOfLengthStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfLengthStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfLengthStringOperation")
 4084   4273   
,Operation::QueryParamsTargetingMapOfListOfEnumStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfListOfEnumStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfListOfEnumStringOperation")
 4085   4274   
,Operation::QueryParamsTargetingMapOfListOfLengthPatternStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfListOfLengthPatternStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfListOfLengthPatternStringOperation")
 4086   4275   
,Operation::QueryParamsTargetingMapOfListOfLengthStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfListOfLengthStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfListOfLengthStringOperation")
 4087   4276   
,Operation::QueryParamsTargetingMapOfListOfPatternStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfListOfPatternStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfListOfPatternStringOperation")
 4088   4277   
,Operation::QueryParamsTargetingMapOfPatternStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfPatternStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfPatternStringOperation")
 4089   4278   
,Operation::QueryParamsTargetingMapOfSetOfLengthStringOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#QueryParamsTargetingMapOfSetOfLengthStringOperation", "com.amazonaws.constraints", "QueryParamsTargetingMapOfSetOfLengthStringOperation")
 4090   4279   
,Operation::StreamingBlobOperation => ::aws_smithy_http_server::shape_id::ShapeId::new("com.amazonaws.constraints#StreamingBlobOperation", "com.amazonaws.constraints", "StreamingBlobOperation")
 4091   4280   
                        }
 4092   4281   
    }
 4093   4282   
}
 4094   4283   
impl<L>
 4095   4284   
    ::aws_smithy_http_server::service::ContainsOperation<
 4096   4285   
        crate::operation_shape::ConstrainedHttpBoundShapesOperation,
 4097   4286   
    > for ConstraintsService<L>
 4098   4287   
{
 4099   4288   
    const VALUE: Operation = Operation::ConstrainedHttpBoundShapesOperation;
 4100   4289   
}
 4101   4290   
impl<L>
 4102   4291   
    ::aws_smithy_http_server::service::ContainsOperation<
 4103   4292   
        crate::operation_shape::ConstrainedHttpPayloadBoundShapeOperation,
 4104   4293   
    > for ConstraintsService<L>
 4105   4294   
{
 4106   4295   
    const VALUE: Operation = Operation::ConstrainedHttpPayloadBoundShapeOperation;
 4107   4296   
}
        4297  +
impl<L>
        4298  +
    ::aws_smithy_http_server::service::ContainsOperation<
        4299  +
        crate::operation_shape::ConstrainedListWithIndirectlyConstrainedAggregateOperation,
        4300  +
    > for ConstraintsService<L>
        4301  +
{
        4302  +
    const VALUE: Operation = Operation::ConstrainedListWithIndirectlyConstrainedAggregateOperation;
        4303  +
}
 4108   4304   
impl<L>
 4109   4305   
    ::aws_smithy_http_server::service::ContainsOperation<
 4110   4306   
        crate::operation_shape::ConstrainedRecursiveShapesOperation,
 4111   4307   
    > for ConstraintsService<L>
 4112   4308   
{
 4113   4309   
    const VALUE: Operation = Operation::ConstrainedRecursiveShapesOperation;
 4114   4310   
}
 4115   4311   
impl<L>
 4116   4312   
    ::aws_smithy_http_server::service::ContainsOperation<
 4117   4313   
        crate::operation_shape::ConstrainedShapesOnlyInOutputOperation,
@@ -4411,4607 +4470,4675 @@
 4431   4627   
 4432   4628   
                        // ConstrainedHttpPayloadBoundShapeOperation match found, pop from both `member` and `not_member`
 4433   4629   
                        (@ $ name: ident, $ contains: ident (ConstrainedHttpPayloadBoundShapeOperation $($ member: ident)*) ($($ temp: ident)*) (ConstrainedHttpPayloadBoundShapeOperation $($ not_member: ident)*)) => {
 4434   4630   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 4435   4631   
                        };
 4436   4632   
                        // ConstrainedHttpPayloadBoundShapeOperation match not found, pop from `not_member` into `temp` stack
 4437   4633   
                        (@ $ name: ident, $ contains: ident (ConstrainedHttpPayloadBoundShapeOperation $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 4438   4634   
                            scope! { @ $ name, $ contains (ConstrainedHttpPayloadBoundShapeOperation $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 4439   4635   
                        };
 4440   4636   
        4637  +
                        // ConstrainedListWithIndirectlyConstrainedAggregateOperation match found, pop from both `member` and `not_member`
        4638  +
                        (@ $ name: ident, $ contains: ident (ConstrainedListWithIndirectlyConstrainedAggregateOperation $($ member: ident)*) ($($ temp: ident)*) (ConstrainedListWithIndirectlyConstrainedAggregateOperation $($ not_member: ident)*)) => {
        4639  +
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
        4640  +
                        };
        4641  +
                        // ConstrainedListWithIndirectlyConstrainedAggregateOperation match not found, pop from `not_member` into `temp` stack
        4642  +
                        (@ $ name: ident, $ contains: ident (ConstrainedListWithIndirectlyConstrainedAggregateOperation $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
        4643  +
                            scope! { @ $ name, $ contains (ConstrainedListWithIndirectlyConstrainedAggregateOperation $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
        4644  +
                        };
        4645  +
 4441   4646   
                        // ConstrainedRecursiveShapesOperation match found, pop from both `member` and `not_member`
 4442   4647   
                        (@ $ name: ident, $ contains: ident (ConstrainedRecursiveShapesOperation $($ member: ident)*) ($($ temp: ident)*) (ConstrainedRecursiveShapesOperation $($ not_member: ident)*)) => {
 4443   4648   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 4444   4649   
                        };
 4445   4650   
                        // ConstrainedRecursiveShapesOperation match not found, pop from `not_member` into `temp` stack
 4446   4651   
                        (@ $ name: ident, $ contains: ident (ConstrainedRecursiveShapesOperation $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 4447   4652   
                            scope! { @ $ name, $ contains (ConstrainedRecursiveShapesOperation $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 4448   4653   
                        };
 4449   4654   
 4450   4655   
                        // ConstrainedShapesOnlyInOutputOperation match found, pop from both `member` and `not_member`
@@ -4587,4792 +4636,4841 @@
 4607   4812   
                        }
 4608   4813   
                    ) => {
 4609   4814   
                        use $ crate::operation_shape::*;
 4610   4815   
                        $ crate::server::scope! {
 4611   4816   
                            $(#[$ attrs])*
 4612   4817   
                            $ vis struct $ name {
 4613   4818   
                                includes: [$($ include),*],
 4614   4819   
                                excludes: []
 4615   4820   
                            }
 4616   4821   
                        }
 4617         -
                        scope! { @ $ name, False ($($ include)*) () (ConstrainedHttpBoundShapesOperation ConstrainedHttpPayloadBoundShapeOperation ConstrainedRecursiveShapesOperation ConstrainedShapesOnlyInOutputOperation ConstrainedShapesOperation EventStreamsOperation HttpPrefixHeadersTargetingLengthMapOperation NonStreamingBlobOperation QueryParamsTargetingLengthMapOperation QueryParamsTargetingMapOfEnumStringOperation QueryParamsTargetingMapOfLengthListOfPatternStringOperation QueryParamsTargetingMapOfLengthPatternStringOperation QueryParamsTargetingMapOfLengthStringOperation QueryParamsTargetingMapOfListOfEnumStringOperation QueryParamsTargetingMapOfListOfLengthPatternStringOperation QueryParamsTargetingMapOfListOfLengthStringOperation QueryParamsTargetingMapOfListOfPatternStringOperation QueryParamsTargetingMapOfPatternStringOperation QueryParamsTargetingMapOfSetOfLengthStringOperation StreamingBlobOperation) }
        4822  +
                        scope! { @ $ name, False ($($ include)*) () (ConstrainedHttpBoundShapesOperation ConstrainedHttpPayloadBoundShapeOperation ConstrainedListWithIndirectlyConstrainedAggregateOperation ConstrainedRecursiveShapesOperation ConstrainedShapesOnlyInOutputOperation ConstrainedShapesOperation EventStreamsOperation HttpPrefixHeadersTargetingLengthMapOperation NonStreamingBlobOperation QueryParamsTargetingLengthMapOperation QueryParamsTargetingMapOfEnumStringOperation QueryParamsTargetingMapOfLengthListOfPatternStringOperation QueryParamsTargetingMapOfLengthPatternStringOperation QueryParamsTargetingMapOfLengthStringOperation QueryParamsTargetingMapOfListOfEnumStringOperation QueryParamsTargetingMapOfListOfLengthPatternStringOperation QueryParamsTargetingMapOfListOfLengthStringOperation QueryParamsTargetingMapOfListOfPatternStringOperation QueryParamsTargetingMapOfPatternStringOperation QueryParamsTargetingMapOfSetOfLengthStringOperation StreamingBlobOperation) }
 4618   4823   
                    };
 4619   4824   
                    (
 4620   4825   
                        $(#[$ attrs:meta])*
 4621   4826   
                        $ vis:vis struct $ name:ident {
 4622   4827   
                            excludes: [$($ exclude:ident),*]
 4623   4828   
                        }
 4624   4829   
                    ) => {
 4625   4830   
                        use $ crate::operation_shape::*;
 4626   4831   
 4627   4832   
                        $ crate::server::scope! {
 4628   4833   
                            $(#[$ attrs])*
 4629   4834   
                            $ vis struct $ name {
 4630   4835   
                                includes: [],
 4631   4836   
                                excludes: [$($ exclude),*]
 4632   4837   
                            }
 4633   4838   
                        }
 4634         -
                        scope! { @ $ name, True ($($ exclude)*) () (ConstrainedHttpBoundShapesOperation ConstrainedHttpPayloadBoundShapeOperation ConstrainedRecursiveShapesOperation ConstrainedShapesOnlyInOutputOperation ConstrainedShapesOperation EventStreamsOperation HttpPrefixHeadersTargetingLengthMapOperation NonStreamingBlobOperation QueryParamsTargetingLengthMapOperation QueryParamsTargetingMapOfEnumStringOperation QueryParamsTargetingMapOfLengthListOfPatternStringOperation QueryParamsTargetingMapOfLengthPatternStringOperation QueryParamsTargetingMapOfLengthStringOperation QueryParamsTargetingMapOfListOfEnumStringOperation QueryParamsTargetingMapOfListOfLengthPatternStringOperation QueryParamsTargetingMapOfListOfLengthStringOperation QueryParamsTargetingMapOfListOfPatternStringOperation QueryParamsTargetingMapOfPatternStringOperation QueryParamsTargetingMapOfSetOfLengthStringOperation StreamingBlobOperation) }
        4839  +
                        scope! { @ $ name, True ($($ exclude)*) () (ConstrainedHttpBoundShapesOperation ConstrainedHttpPayloadBoundShapeOperation ConstrainedListWithIndirectlyConstrainedAggregateOperation ConstrainedRecursiveShapesOperation ConstrainedShapesOnlyInOutputOperation ConstrainedShapesOperation EventStreamsOperation HttpPrefixHeadersTargetingLengthMapOperation NonStreamingBlobOperation QueryParamsTargetingLengthMapOperation QueryParamsTargetingMapOfEnumStringOperation QueryParamsTargetingMapOfLengthListOfPatternStringOperation QueryParamsTargetingMapOfLengthPatternStringOperation QueryParamsTargetingMapOfLengthStringOperation QueryParamsTargetingMapOfListOfEnumStringOperation QueryParamsTargetingMapOfListOfLengthPatternStringOperation QueryParamsTargetingMapOfListOfLengthStringOperation QueryParamsTargetingMapOfListOfPatternStringOperation QueryParamsTargetingMapOfPatternStringOperation QueryParamsTargetingMapOfSetOfLengthStringOperation StreamingBlobOperation) }
 4635   4840   
                    };
 4636   4841   
                }

tmp-codegen-diff/codegen-server-test-python/constraints_without_public_constrained_types/rust-server-codegen-python/src/unconstrained.rs

@@ -113,113 +173,175 @@
  133    133   
                        }
  134    134   
                    }
  135    135   
    impl std::convert::TryFrom<ListOfLengthPatternStringUnconstrained> for crate::constrained::list_of_length_pattern_string_constrained::ListOfLengthPatternStringConstrained {
  136    136   
        type Error = crate::model::list_of_length_pattern_string_internal::ConstraintViolation;
  137    137   
        fn try_from(value: ListOfLengthPatternStringUnconstrained) -> Result<Self, Self::Error> {
  138    138   
            let res: Result<::std::vec::Vec<crate::model::LengthPatternString>, (usize, crate::model::length_pattern_string_internal::ConstraintViolation) > = value
  139    139   
                                        .0
  140    140   
                                        .into_iter()
  141    141   
                                        .enumerate()
  142    142   
                                        .map(|(idx, inner)| {
  143         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         143  +
                                            inner.try_into()
         144  +
                                                    
         145  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  144    146   
                                        })
  145    147   
                                        .collect();
  146    148   
                                    let inner = res
  147    149   
                                        
  148    150   
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  149    151   
            Ok(Self(inner))
  150    152   
        }
  151    153   
    }
  152    154   
}
  153    155   
pub(crate) mod map_of_length_pattern_string_unconstrained {
@@ -602,604 +689,828 @@
  622    624   
                            Err(Self::Error::Value(k, inner_constraint_violation))
  623    625   
                        }
  624    626   
                    }
  625    627   
                })
  626    628   
                .collect();
  627    629   
            let hm = res?;
  628    630   
            Ok(Self(hm))
  629    631   
        }
  630    632   
    }
  631    633   
}
         634  +
pub(crate) mod list_with_indirectly_constrained_map_unconstrained {
         635  +
         636  +
    #[derive(Debug, Clone)]
         637  +
    pub(crate) struct ListWithIndirectlyConstrainedMapUnconstrained(pub(crate) std::vec::Vec<crate::unconstrained::indirectly_constrained_map_unconstrained::IndirectlyConstrainedMapUnconstrained>);
         638  +
         639  +
    impl From<ListWithIndirectlyConstrainedMapUnconstrained>
         640  +
        for crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedMap>
         641  +
    {
         642  +
        fn from(value: ListWithIndirectlyConstrainedMapUnconstrained) -> Self {
         643  +
            Self::Unconstrained(value)
         644  +
        }
         645  +
    }
         646  +
    impl std::convert::TryFrom<ListWithIndirectlyConstrainedMapUnconstrained>
         647  +
        for crate::model::ListWithIndirectlyConstrainedMap
         648  +
    {
         649  +
        type Error =
         650  +
            crate::model::list_with_indirectly_constrained_map_internal::ConstraintViolation;
         651  +
        fn try_from(
         652  +
            value: ListWithIndirectlyConstrainedMapUnconstrained,
         653  +
        ) -> Result<Self, Self::Error> {
         654  +
            let res: Result<::std::vec::Vec<::std::collections::HashMap::<crate::model::LengthString, crate::model::LengthString>>, (usize, crate::model::indirectly_constrained_map_internal::ConstraintViolation) > = value
         655  +
                                        .0
         656  +
                                        .into_iter()
         657  +
                                        .enumerate()
         658  +
                                        .map(|(idx, inner)| {
         659  +
                                            inner.try_into()
         660  +
                                                    .map(|c : crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained| c.into())
         661  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         662  +
                                        })
         663  +
                                        .collect();
         664  +
            let inner =
         665  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         666  +
            Self::try_from(inner)
         667  +
        }
         668  +
    }
         669  +
}
         670  +
pub(crate) mod indirectly_constrained_map_unconstrained {
         671  +
         672  +
    #[derive(Debug, Clone)]
         673  +
    pub(crate) struct IndirectlyConstrainedMapUnconstrained(
         674  +
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
         675  +
    );
         676  +
         677  +
    impl From<IndirectlyConstrainedMapUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained> {
         678  +
                        fn from(value: IndirectlyConstrainedMapUnconstrained) -> Self {
         679  +
                            Self::Unconstrained(value)
         680  +
                        }
         681  +
                    }
         682  +
    impl std::convert::TryFrom<IndirectlyConstrainedMapUnconstrained> for crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained {
         683  +
        type Error = crate::model::indirectly_constrained_map_internal::ConstraintViolation;
         684  +
        fn try_from(value: IndirectlyConstrainedMapUnconstrained) -> Result<Self, Self::Error> {
         685  +
            let res: Result<::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>, Self::Error> = value.0
         686  +
                                        .into_iter()
         687  +
                                        .map(|(k, v)| {
         688  +
                                            let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
         689  +
            
         690  +
            match crate::model::LengthString::try_from(v) {
         691  +
                                                    Ok(v) => Ok((k, v)),
         692  +
                                                    Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
         693  +
                                                }
         694  +
                                        })
         695  +
                                        .collect();
         696  +
                                    let hm = res?;
         697  +
            Ok(Self(hm))
         698  +
        }
         699  +
    }
         700  +
}
         701  +
pub(crate) mod list_with_indirectly_constrained_list_unconstrained {
         702  +
         703  +
    #[derive(Debug, Clone)]
         704  +
    pub(crate) struct ListWithIndirectlyConstrainedListUnconstrained(pub(crate) std::vec::Vec<crate::unconstrained::indirectly_constrained_list_unconstrained::IndirectlyConstrainedListUnconstrained>);
         705  +
         706  +
    impl From<ListWithIndirectlyConstrainedListUnconstrained>
         707  +
        for crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedList>
         708  +
    {
         709  +
        fn from(value: ListWithIndirectlyConstrainedListUnconstrained) -> Self {
         710  +
            Self::Unconstrained(value)
         711  +
        }
         712  +
    }
         713  +
    impl std::convert::TryFrom<ListWithIndirectlyConstrainedListUnconstrained>
         714  +
        for crate::model::ListWithIndirectlyConstrainedList
         715  +
    {
         716  +
        type Error =
         717  +
            crate::model::list_with_indirectly_constrained_list_internal::ConstraintViolation;
         718  +
        fn try_from(
         719  +
            value: ListWithIndirectlyConstrainedListUnconstrained,
         720  +
        ) -> Result<Self, Self::Error> {
         721  +
            let res: Result<::std::vec::Vec<::std::vec::Vec::<crate::model::LengthString>>, (usize, crate::model::indirectly_constrained_list_internal::ConstraintViolation) > = value
         722  +
                                        .0
         723  +
                                        .into_iter()
         724  +
                                        .enumerate()
         725  +
                                        .map(|(idx, inner)| {
         726  +
                                            inner.try_into()
         727  +
                                                    .map(|c : crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained| c.into())
         728  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         729  +
                                        })
         730  +
                                        .collect();
         731  +
            let inner =
         732  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         733  +
            Self::try_from(inner)
         734  +
        }
         735  +
    }
         736  +
}
         737  +
pub(crate) mod indirectly_constrained_list_unconstrained {
         738  +
         739  +
    #[derive(Debug, Clone)]
         740  +
    pub(crate) struct IndirectlyConstrainedListUnconstrained(
         741  +
        pub(crate) std::vec::Vec<::std::string::String>,
         742  +
    );
         743  +
         744  +
    impl From<IndirectlyConstrainedListUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained> {
         745  +
                        fn from(value: IndirectlyConstrainedListUnconstrained) -> Self {
         746  +
                            Self::Unconstrained(value)
         747  +
                        }
         748  +
                    }
         749  +
    impl std::convert::TryFrom<IndirectlyConstrainedListUnconstrained> for crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained {
         750  +
        type Error = crate::model::indirectly_constrained_list_internal::ConstraintViolation;
         751  +
        fn try_from(value: IndirectlyConstrainedListUnconstrained) -> Result<Self, Self::Error> {
         752  +
            let res: Result<::std::vec::Vec<crate::model::LengthString>, (usize, crate::model::length_string_internal::ConstraintViolation) > = value
         753  +
                                        .0
         754  +
                                        .into_iter()
         755  +
                                        .enumerate()
         756  +
                                        .map(|(idx, inner)| {
         757  +
                                            inner.try_into()
         758  +
                                                    
         759  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         760  +
                                        })
         761  +
                                        .collect();
         762  +
                                    let inner = res
         763  +
                                        
         764  +
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         765  +
            Ok(Self(inner))
         766  +
        }
         767  +
    }
         768  +
}
  632    769   
pub(crate) mod recursive_list_unconstrained {
  633    770   
  634    771   
    #[derive(Debug, Clone)]
  635    772   
    pub(crate) struct RecursiveListUnconstrained(
  636    773   
        pub(crate) 
  637    774   
            std::vec::Vec<crate::model::recursive_shapes_input_output_nested1_internal::Builder>,
  638    775   
    );
  639    776   
  640    777   
    impl From<RecursiveListUnconstrained>
  641    778   
        for crate::constrained::MaybeConstrained<
  642    779   
            crate::constrained::recursive_list_constrained::RecursiveListConstrained,
  643    780   
        >
  644    781   
    {
  645    782   
        fn from(value: RecursiveListUnconstrained) -> Self {
  646    783   
            Self::Unconstrained(value)
  647    784   
        }
  648    785   
    }
  649    786   
    impl std::convert::TryFrom<RecursiveListUnconstrained>
  650    787   
        for crate::constrained::recursive_list_constrained::RecursiveListConstrained
  651    788   
    {
  652    789   
        type Error = crate::model::recursive_list_internal::ConstraintViolation;
  653    790   
        fn try_from(value: RecursiveListUnconstrained) -> Result<Self, Self::Error> {
  654    791   
            let res: Result<::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>, (usize, crate::model::recursive_shapes_input_output_nested1_internal::ConstraintViolation) > = value
  655    792   
                                        .0
  656    793   
                                        .into_iter()
  657    794   
                                        .enumerate()
  658    795   
                                        .map(|(idx, inner)| {
  659         -
                                            inner.try_into().map_err(|inner_violation| (idx, inner_violation))
         796  +
                                            inner.try_into()
         797  +
                                                    
         798  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
  660    799   
                                        })
  661    800   
                                        .collect();
  662    801   
            let inner =
  663    802   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
  664    803   
            Ok(Self(inner))
  665    804   
        }
  666    805   
    }
  667    806   
}
  668    807   
pub(crate) mod length_set_of_pattern_string_unconstrained {
  669    808