Server Test

Server Test

rev. a7fb2e3446d314cfbe48069306e4e0a389b39aeb (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/constraints/rust-server-codegen/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.0 {
          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.0 {
          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/constraints/rust-server-codegen/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/constraints/rust-server-codegen/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/constraints/rust-server-codegen/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/constraints/rust-server-codegen/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/constraints/rust-server-codegen/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::{ConstraintsService, ConstraintsServiceConfig};
         365  +
    ///
         366  +
    /// use constraints::{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::{ConstraintsService, ConstraintsServiceConfig};
         431  +
    ///
         432  +
    /// use constraints::{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::{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/constraints/rust-server-codegen/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::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::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 {
@@ -587,589 +646,781 @@
  607    609   
                            Err(Self::Error::Value(k, inner_constraint_violation))
  608    610   
                        }
  609    611   
                    }
  610    612   
                })
  611    613   
                .collect();
  612    614   
            let hm = res?;
  613    615   
            Ok(Self(hm))
  614    616   
        }
  615    617   
    }
  616    618   
}
         619  +
pub(crate) mod list_with_indirectly_constrained_map_unconstrained {
         620  +
         621  +
    #[derive(Debug, Clone)]
         622  +
    pub(crate) struct ListWithIndirectlyConstrainedMapUnconstrained(pub(crate) std::vec::Vec<crate::unconstrained::indirectly_constrained_map_unconstrained::IndirectlyConstrainedMapUnconstrained>);
         623  +
         624  +
    impl From<ListWithIndirectlyConstrainedMapUnconstrained>
         625  +
        for crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedMap>
         626  +
    {
         627  +
        fn from(value: ListWithIndirectlyConstrainedMapUnconstrained) -> Self {
         628  +
            Self::Unconstrained(value)
         629  +
        }
         630  +
    }
         631  +
    impl std::convert::TryFrom<ListWithIndirectlyConstrainedMapUnconstrained>
         632  +
        for crate::model::ListWithIndirectlyConstrainedMap
         633  +
    {
         634  +
        type Error = crate::model::list_with_indirectly_constrained_map::ConstraintViolation;
         635  +
        fn try_from(
         636  +
            value: ListWithIndirectlyConstrainedMapUnconstrained,
         637  +
        ) -> Result<Self, Self::Error> {
         638  +
            let res: Result<::std::vec::Vec<::std::collections::HashMap::<crate::model::LengthString, crate::model::LengthString>>, (usize, crate::model::indirectly_constrained_map::ConstraintViolation) > = value
         639  +
                                        .0
         640  +
                                        .into_iter()
         641  +
                                        .enumerate()
         642  +
                                        .map(|(idx, inner)| {
         643  +
                                            inner.try_into()
         644  +
                                                    .map(|c : crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained| c.into())
         645  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         646  +
                                        })
         647  +
                                        .collect();
         648  +
            let inner =
         649  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         650  +
            Self::try_from(inner)
         651  +
        }
         652  +
    }
         653  +
}
         654  +
pub(crate) mod indirectly_constrained_map_unconstrained {
         655  +
         656  +
    #[derive(Debug, Clone)]
         657  +
    pub(crate) struct IndirectlyConstrainedMapUnconstrained(
         658  +
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
         659  +
    );
         660  +
         661  +
    impl From<IndirectlyConstrainedMapUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained> {
         662  +
                        fn from(value: IndirectlyConstrainedMapUnconstrained) -> Self {
         663  +
                            Self::Unconstrained(value)
         664  +
                        }
         665  +
                    }
         666  +
    impl std::convert::TryFrom<IndirectlyConstrainedMapUnconstrained> for crate::constrained::indirectly_constrained_map_constrained::IndirectlyConstrainedMapConstrained {
         667  +
        type Error = crate::model::indirectly_constrained_map::ConstraintViolation;
         668  +
        fn try_from(value: IndirectlyConstrainedMapUnconstrained) -> Result<Self, Self::Error> {
         669  +
            let res: Result<::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>, Self::Error> = value.0
         670  +
                                        .into_iter()
         671  +
                                        .map(|(k, v)| {
         672  +
                                            let k: crate::model::LengthString = k.try_into().map_err(Self::Error::Key)?;
         673  +
            
         674  +
            match crate::model::LengthString::try_from(v) {
         675  +
                                                    Ok(v) => Ok((k, v)),
         676  +
                                                    Err(inner_constraint_violation) => Err(Self::Error::Value(k, inner_constraint_violation)),
         677  +
                                                }
         678  +
                                        })
         679  +
                                        .collect();
         680  +
                                    let hm = res?;
         681  +
            Ok(Self(hm))
         682  +
        }
         683  +
    }
         684  +
}
         685  +
pub(crate) mod list_with_indirectly_constrained_list_unconstrained {
         686  +
         687  +
    #[derive(Debug, Clone)]
         688  +
    pub(crate) struct ListWithIndirectlyConstrainedListUnconstrained(pub(crate) std::vec::Vec<crate::unconstrained::indirectly_constrained_list_unconstrained::IndirectlyConstrainedListUnconstrained>);
         689  +
         690  +
    impl From<ListWithIndirectlyConstrainedListUnconstrained>
         691  +
        for crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedList>
         692  +
    {
         693  +
        fn from(value: ListWithIndirectlyConstrainedListUnconstrained) -> Self {
         694  +
            Self::Unconstrained(value)
         695  +
        }
         696  +
    }
         697  +
    impl std::convert::TryFrom<ListWithIndirectlyConstrainedListUnconstrained>
         698  +
        for crate::model::ListWithIndirectlyConstrainedList
         699  +
    {
         700  +
        type Error = crate::model::list_with_indirectly_constrained_list::ConstraintViolation;
         701  +
        fn try_from(
         702  +
            value: ListWithIndirectlyConstrainedListUnconstrained,
         703  +
        ) -> Result<Self, Self::Error> {
         704  +
            let res: Result<::std::vec::Vec<::std::vec::Vec::<crate::model::LengthString>>, (usize, crate::model::indirectly_constrained_list::ConstraintViolation) > = value
         705  +
                                        .0
         706  +
                                        .into_iter()
         707  +
                                        .enumerate()
         708  +
                                        .map(|(idx, inner)| {
         709  +
                                            inner.try_into()
         710  +
                                                    .map(|c : crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained| c.into())
         711  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         712  +
                                        })
         713  +
                                        .collect();
         714  +
            let inner =
         715  +
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         716  +
            Self::try_from(inner)
         717  +
        }
         718  +
    }
         719  +
}
         720  +
pub(crate) mod indirectly_constrained_list_unconstrained {
         721  +
         722  +
    #[derive(Debug, Clone)]
         723  +
    pub(crate) struct IndirectlyConstrainedListUnconstrained(
         724  +
        pub(crate) std::vec::Vec<::std::string::String>,
         725  +
    );
         726  +
         727  +
    impl From<IndirectlyConstrainedListUnconstrained> for crate::constrained::MaybeConstrained<crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained> {
         728  +
                        fn from(value: IndirectlyConstrainedListUnconstrained) -> Self {
         729  +
                            Self::Unconstrained(value)
         730  +
                        }
         731  +
                    }
         732  +
    impl std::convert::TryFrom<IndirectlyConstrainedListUnconstrained> for crate::constrained::indirectly_constrained_list_constrained::IndirectlyConstrainedListConstrained {
         733  +
        type Error = crate::model::indirectly_constrained_list::ConstraintViolation;
         734  +
        fn try_from(value: IndirectlyConstrainedListUnconstrained) -> Result<Self, Self::Error> {
         735  +
            let res: Result<::std::vec::Vec<crate::model::LengthString>, (usize, crate::model::length_string::ConstraintViolation) > = value
         736  +
                                        .0
         737  +
                                        .into_iter()
         738  +
                                        .enumerate()
         739  +
                                        .map(|(idx, inner)| {
         740  +
                                            inner.try_into()
         741  +
                                                    
         742  +
                                                    .map_err(|inner_violation| (idx, inner_violation))
         743  +
                                        })
         744  +
                                        .collect();
         745  +
                                    let inner = res
         746  +
                                        
         747  +
                                        .map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         748  +
            Ok(Self(inner))
         749  +
        }
         750  +
    }
         751  +
}
  617    752   
pub(crate) mod recursive_list_unconstrained {
  618    753   
  619    754   
    #[derive(Debug, Clone)]
  620    755   
    pub(crate) struct RecursiveListUnconstrained(
  621    756   
        pub(crate) std::vec::Vec<crate::model::recursive_shapes_input_output_nested1::Builder>,
  622    757   
    );
  623    758   
  624    759   
    impl From<RecursiveListUnconstrained>
  625    760   
        for crate::constrained::MaybeConstrained<
  626    761   
            crate::constrained::recursive_list_constrained::RecursiveListConstrained,

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

@@ -313,313 +372,414 @@
  333    333   
            v.0.into_iter()
  334    334   
                .map(|(k, v)| {
  335    335   
                    let k = k.into();
  336    336   
                    let v = { v.into() };
  337    337   
                    (k, v)
  338    338   
                })
  339    339   
                .collect()
  340    340   
        }
  341    341   
    }
  342    342   
}
         343  +
pub(crate) mod indirectly_constrained_map_constrained {
         344  +
         345  +
    #[derive(Debug, Clone)]
         346  +
    pub(crate) struct IndirectlyConstrainedMapConstrained(
         347  +
        pub(crate) std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         348  +
    );
         349  +
         350  +
    impl crate::constrained::Constrained for IndirectlyConstrainedMapConstrained {
         351  +
        type Unconstrained = crate::unconstrained::indirectly_constrained_map_unconstrained::IndirectlyConstrainedMapUnconstrained;
         352  +
    }
         353  +
    impl ::std::convert::From<IndirectlyConstrainedMapConstrained>
         354  +
        for ::std::collections::HashMap<::std::string::String, ::std::string::String>
         355  +
    {
         356  +
        fn from(v: IndirectlyConstrainedMapConstrained) -> Self {
         357  +
            v.0.into_iter()
         358  +
                .map(|(k, v)| {
         359  +
                    let k = k.into();
         360  +
                    let v = { v.into() };
         361  +
                    (k, v)
         362  +
                })
         363  +
                .collect()
         364  +
        }
         365  +
    }
         366  +
}
         367  +
pub(crate) mod indirectly_constrained_list_constrained {
         368  +
         369  +
    #[derive(Debug, Clone)]
         370  +
    pub(crate) struct IndirectlyConstrainedListConstrained(
         371  +
        pub(crate) std::vec::Vec<crate::model::LengthString>,
         372  +
    );
         373  +
         374  +
    impl crate::constrained::Constrained for IndirectlyConstrainedListConstrained {
         375  +
        type Unconstrained = crate::unconstrained::indirectly_constrained_list_unconstrained::IndirectlyConstrainedListUnconstrained;
         376  +
    }
         377  +
    impl ::std::convert::From<IndirectlyConstrainedListConstrained>
         378  +
        for ::std::vec::Vec<::std::string::String>
         379  +
    {
         380  +
        fn from(v: IndirectlyConstrainedListConstrained) -> Self {
         381  +
            v.0.into_iter().map(|item| item.into()).collect()
         382  +
        }
         383  +
    }
         384  +
}
  343    385   
pub(crate) mod recursive_list_constrained {
  344    386   
  345    387   
    #[derive(Debug, Clone)]
  346    388   
    pub(crate) struct RecursiveListConstrained(
  347    389   
        pub(crate) std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
  348    390   
    );
  349    391   
  350    392   
    impl crate::constrained::Constrained for RecursiveListConstrained {
  351    393   
        type Unconstrained =
  352    394   
            crate::unconstrained::recursive_list_unconstrained::RecursiveListUnconstrained;

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

@@ -785,785 +844,896 @@
  805    805   
impl ::std::convert::From<crate::error::ValidationException>
  806    806   
    for crate::error::QueryParamsTargetingLengthMapOperationError
  807    807   
{
  808    808   
    fn from(
  809    809   
        variant: crate::error::ValidationException,
  810    810   
    ) -> crate::error::QueryParamsTargetingLengthMapOperationError {
  811    811   
        Self::ValidationException(variant)
  812    812   
    }
  813    813   
}
  814    814   
         815  +
/// Error type for the `ConstrainedListWithIndirectlyConstrainedAggregateOperation` operation.
         816  +
/// Each variant represents an error that can occur for the `ConstrainedListWithIndirectlyConstrainedAggregateOperation` operation.
         817  +
#[derive(::std::fmt::Debug)]
         818  +
pub enum ConstrainedListWithIndirectlyConstrainedAggregateOperationError {
         819  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         820  +
    ValidationException(crate::error::ValidationException),
         821  +
}
         822  +
impl ::std::fmt::Display for ConstrainedListWithIndirectlyConstrainedAggregateOperationError {
         823  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         824  +
        match &self {
         825  +
            ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException(_inner) =>
         826  +
            _inner.fmt(f)
         827  +
            ,
         828  +
        }
         829  +
    }
         830  +
}
         831  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationError {
         832  +
    /// Returns `true` if the error kind is `ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException`.
         833  +
    pub fn is_validation_exception(&self) -> bool {
         834  +
        matches!(
         835  +
            &self,
         836  +
            ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException(_)
         837  +
        )
         838  +
    }
         839  +
    /// Returns the error name string by matching the correct variant.
         840  +
    pub fn name(&self) -> &'static str {
         841  +
        match &self {
         842  +
            ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException(_inner) =>
         843  +
            _inner.name()
         844  +
            ,
         845  +
        }
         846  +
    }
         847  +
}
         848  +
impl ::std::error::Error for ConstrainedListWithIndirectlyConstrainedAggregateOperationError {
         849  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         850  +
        match &self {
         851  +
            ConstrainedListWithIndirectlyConstrainedAggregateOperationError::ValidationException(_inner) =>
         852  +
            Some(_inner)
         853  +
            ,
         854  +
        }
         855  +
    }
         856  +
}
         857  +
impl ::std::convert::From<crate::error::ValidationException>
         858  +
    for crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError
         859  +
{
         860  +
    fn from(
         861  +
        variant: crate::error::ValidationException,
         862  +
    ) -> crate::error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError {
         863  +
        Self::ValidationException(variant)
         864  +
    }
         865  +
}
         866  +
  815    867   
/// Error type for the `ConstrainedRecursiveShapesOperation` operation.
  816    868   
/// Each variant represents an error that can occur for the `ConstrainedRecursiveShapesOperation` operation.
  817    869   
#[derive(::std::fmt::Debug)]
  818    870   
pub enum ConstrainedRecursiveShapesOperationError {
  819    871   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  820    872   
    ValidationException(crate::error::ValidationException),
  821    873   
}
  822    874   
impl ::std::fmt::Display for ConstrainedRecursiveShapesOperationError {
  823    875   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  824    876   
        match &self {

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

@@ -428,428 +487,525 @@
  448    448   
    type Unconstrained =
  449    449   
        crate::input::query_params_targeting_length_map_operation_input_internal::Builder;
  450    450   
}
  451    451   
impl QueryParamsTargetingLengthMapOperationInput {
  452    452   
    /// Creates a new builder-style object to manufacture [`QueryParamsTargetingLengthMapOperationInput`](crate::input::QueryParamsTargetingLengthMapOperationInput).
  453    453   
    pub fn builder() -> crate::input::query_params_targeting_length_map_operation_input::Builder {
  454    454   
        crate::input::query_params_targeting_length_map_operation_input::Builder::default()
  455    455   
    }
  456    456   
}
  457    457   
         458  +
#[allow(missing_docs)] // documentation missing in model
         459  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         460  +
pub struct ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
         461  +
    #[allow(missing_docs)] // documentation missing in model
         462  +
    pub a: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
         463  +
    #[allow(missing_docs)] // documentation missing in model
         464  +
    pub b: ::std::option::Option<
         465  +
        ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         466  +
    >,
         467  +
}
         468  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
         469  +
    #[allow(missing_docs)] // documentation missing in model
         470  +
    pub fn a(&self) -> ::std::option::Option<&[::std::vec::Vec<::std::string::String>]> {
         471  +
        self.a.as_deref()
         472  +
    }
         473  +
    #[allow(missing_docs)] // documentation missing in model
         474  +
    pub fn b(
         475  +
        &self,
         476  +
    ) -> ::std::option::Option<
         477  +
        &[::std::collections::HashMap<::std::string::String, ::std::string::String>],
         478  +
    > {
         479  +
        self.b.as_deref()
         480  +
    }
         481  +
}
         482  +
impl crate::constrained::Constrained
         483  +
    for crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput
         484  +
{
         485  +
    type Unconstrained = crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input_internal::Builder;
         486  +
}
         487  +
impl ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
         488  +
    /// Creates a new builder-style object to manufacture [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
         489  +
    pub fn builder(
         490  +
    ) -> crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input::Builder
         491  +
    {
         492  +
        crate::input::constrained_list_with_indirectly_constrained_aggregate_operation_input::Builder::default()
         493  +
    }
         494  +
}
         495  +
  458    496   
#[allow(missing_docs)] // documentation missing in model
  459    497   
#[derive(
  460    498   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  461    499   
)]
  462    500   
pub struct ConstrainedRecursiveShapesOperationInput {
  463    501   
    #[allow(missing_docs)] // documentation missing in model
  464    502   
    pub nested: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
  465    503   
    #[allow(missing_docs)] // documentation missing in model
  466    504   
    pub recursive_list: ::std::vec::Vec<crate::model::RecursiveShapesInputOutputNested1>,
  467    505   
}
@@ -3112,3150 +3171,3422 @@
 3132   3170   
        }
 3133   3171   
        fn build_enforcing_required_and_enum_traits(
 3134   3172   
            self,
 3135   3173   
        ) -> crate::input::QueryParamsTargetingLengthMapOperationInput {
 3136   3174   
            crate::input::QueryParamsTargetingLengthMapOperationInput {
 3137   3175   
                length_map: self.length_map,
 3138   3176   
            }
 3139   3177   
        }
 3140   3178   
    }
 3141   3179   
}
        3180  +
/// See [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3181  +
pub(crate) mod constrained_list_with_indirectly_constrained_aggregate_operation_input_internal {
        3182  +
        3183  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        3184  +
    /// Holds one variant for each of the ways the builder can fail.
        3185  +
    #[non_exhaustive]
        3186  +
    #[allow(clippy::enum_variant_names)]
        3187  +
    pub(crate) enum ConstraintViolation {
        3188  +
        /// Constraint violation occurred building member `a` when building `ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`.
        3189  +
        #[doc(hidden)]
        3190  +
        A(crate::model::list_with_indirectly_constrained_list_internal::ConstraintViolation),
        3191  +
        /// Constraint violation occurred building member `b` when building `ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`.
        3192  +
        #[doc(hidden)]
        3193  +
        B(crate::model::list_with_indirectly_constrained_map_internal::ConstraintViolation),
        3194  +
    }
        3195  +
    impl ::std::fmt::Display for ConstraintViolation {
        3196  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3197  +
            match self {
        3198  +
                ConstraintViolation::A(_) => write!(f, "constraint violation occurred building member `a` when building `ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`"),
        3199  +
                ConstraintViolation::B(_) => write!(f, "constraint violation occurred building member `b` when building `ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`"),
        3200  +
            }
        3201  +
        }
        3202  +
    }
        3203  +
    impl ::std::error::Error for ConstraintViolation {}
        3204  +
    impl ConstraintViolation {
        3205  +
        pub(crate) fn as_validation_exception_field(
        3206  +
            self,
        3207  +
            path: ::std::string::String,
        3208  +
        ) -> crate::model::ValidationExceptionField {
        3209  +
            match self {
        3210  +
                ConstraintViolation::A(inner) => inner.as_validation_exception_field(path + "/a"),
        3211  +
                ConstraintViolation::B(inner) => inner.as_validation_exception_field(path + "/b"),
        3212  +
            }
        3213  +
        }
        3214  +
    }
        3215  +
    impl ::std::convert::From<ConstraintViolation>
        3216  +
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
        3217  +
    {
        3218  +
        fn from(constraint_violation: ConstraintViolation) -> Self {
        3219  +
            let first_validation_exception_field =
        3220  +
                constraint_violation.as_validation_exception_field("".to_owned());
        3221  +
            let validation_exception = crate::error::ValidationException {
        3222  +
                message: format!(
        3223  +
                    "1 validation error detected. {}",
        3224  +
                    &first_validation_exception_field.message
        3225  +
                ),
        3226  +
                field_list: Some(vec![first_validation_exception_field]),
        3227  +
            };
        3228  +
            Self::ConstraintViolation(
        3229  +
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
        3230  +
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
        3231  +
                            )
        3232  +
        }
        3233  +
    }
        3234  +
    impl ::std::convert::From<Builder>
        3235  +
        for crate::constrained::MaybeConstrained<
        3236  +
            crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
        3237  +
        >
        3238  +
    {
        3239  +
        fn from(builder: Builder) -> Self {
        3240  +
            Self::Unconstrained(builder)
        3241  +
        }
        3242  +
    }
        3243  +
    impl ::std::convert::TryFrom<Builder>
        3244  +
        for crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput
        3245  +
    {
        3246  +
        type Error = ConstraintViolation;
        3247  +
        3248  +
        fn try_from(builder: Builder) -> Result<Self, Self::Error> {
        3249  +
            builder.build()
        3250  +
        }
        3251  +
    }
        3252  +
    /// A builder for [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3253  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3254  +
    pub(crate) struct Builder {
        3255  +
        pub(crate) a: ::std::option::Option<
        3256  +
            crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedList>,
        3257  +
        >,
        3258  +
        pub(crate) b: ::std::option::Option<
        3259  +
            crate::constrained::MaybeConstrained<crate::model::ListWithIndirectlyConstrainedMap>,
        3260  +
        >,
        3261  +
    }
        3262  +
    impl Builder {
        3263  +
        #[allow(missing_docs)] // documentation missing in model
        3264  +
        pub(crate) fn set_a(
        3265  +
            mut self,
        3266  +
            input: Option<
        3267  +
                impl ::std::convert::Into<
        3268  +
                    crate::constrained::MaybeConstrained<
        3269  +
                        crate::model::ListWithIndirectlyConstrainedList,
        3270  +
                    >,
        3271  +
                >,
        3272  +
            >,
        3273  +
        ) -> Self {
        3274  +
            self.a = input.map(|v| v.into());
        3275  +
            self
        3276  +
        }
        3277  +
        #[allow(missing_docs)] // documentation missing in model
        3278  +
        pub(crate) fn set_b(
        3279  +
            mut self,
        3280  +
            input: Option<
        3281  +
                impl ::std::convert::Into<
        3282  +
                    crate::constrained::MaybeConstrained<
        3283  +
                        crate::model::ListWithIndirectlyConstrainedMap,
        3284  +
                    >,
        3285  +
                >,
        3286  +
            >,
        3287  +
        ) -> Self {
        3288  +
            self.b = input.map(|v| v.into());
        3289  +
            self
        3290  +
        }
        3291  +
        /// Consumes the builder and constructs a [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3292  +
        ///
        3293  +
        /// The builder fails to construct a [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput) if a [`ConstraintViolation`] occurs.
        3294  +
        ///
        3295  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        3296  +
        pub fn build(
        3297  +
            self,
        3298  +
        ) -> Result<
        3299  +
            crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
        3300  +
            ConstraintViolation,
        3301  +
        > {
        3302  +
            self.build_enforcing_all_constraints()
        3303  +
        }
        3304  +
        fn build_enforcing_all_constraints(
        3305  +
            self,
        3306  +
        ) -> Result<
        3307  +
            crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput,
        3308  +
            ConstraintViolation,
        3309  +
        > {
        3310  +
            Ok(
        3311  +
                crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
        3312  +
                    a: self
        3313  +
                        .a
        3314  +
                        .map(|v| match v {
        3315  +
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        3316  +
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        3317  +
                        })
        3318  +
                        .map(|res| res.map_err(ConstraintViolation::A))
        3319  +
                        .transpose()?
        3320  +
                        .map(|v: crate::model::ListWithIndirectlyConstrainedList| v.into()),
        3321  +
                    b: self
        3322  +
                        .b
        3323  +
                        .map(|v| match v {
        3324  +
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        3325  +
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        3326  +
                        })
        3327  +
                        .map(|res| res.map_err(ConstraintViolation::B))
        3328  +
                        .transpose()?
        3329  +
                        .map(|v: crate::model::ListWithIndirectlyConstrainedMap| v.into()),
        3330  +
                },
        3331  +
            )
        3332  +
        }
        3333  +
    }
        3334  +
}
        3335  +
/// See [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3336  +
pub mod constrained_list_with_indirectly_constrained_aggregate_operation_input {
        3337  +
        3338  +
    impl ::std::convert::From<Builder>
        3339  +
        for crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput
        3340  +
    {
        3341  +
        fn from(builder: Builder) -> Self {
        3342  +
            builder.build()
        3343  +
        }
        3344  +
    }
        3345  +
    /// A builder for [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3346  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3347  +
    pub struct Builder {
        3348  +
        pub(crate) a:
        3349  +
            ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        3350  +
        pub(crate) b: ::std::option::Option<
        3351  +
            ::std::vec::Vec<
        3352  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        3353  +
            >,
        3354  +
        >,
        3355  +
    }
        3356  +
    impl Builder {
        3357  +
        #[allow(missing_docs)] // documentation missing in model
        3358  +
        pub fn a(
        3359  +
            mut self,
        3360  +
            input: ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
        3361  +
        ) -> Self {
        3362  +
            self.a = input;
        3363  +
            self
        3364  +
        }
        3365  +
        #[allow(missing_docs)] // documentation missing in model
        3366  +
        pub fn b(
        3367  +
            mut self,
        3368  +
            input: ::std::option::Option<
        3369  +
                ::std::vec::Vec<
        3370  +
                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        3371  +
                >,
        3372  +
            >,
        3373  +
        ) -> Self {
        3374  +
            self.b = input;
        3375  +
            self
        3376  +
        }
        3377  +
        /// Consumes the builder and constructs a [`ConstrainedListWithIndirectlyConstrainedAggregateOperationInput`](crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput).
        3378  +
        pub fn build(
        3379  +
            self,
        3380  +
        ) -> crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
        3381  +
            self.build_enforcing_required_and_enum_traits()
        3382  +
        }
        3383  +
        fn build_enforcing_required_and_enum_traits(
        3384  +
            self,
        3385  +
        ) -> crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
        3386  +
            crate::input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput {
        3387  +
                a: self.a,
        3388  +
                b: self.b,
        3389  +
            }
        3390  +
        }
        3391  +
    }
        3392  +
}
 3142   3393   
/// See [`ConstrainedRecursiveShapesOperationInput`](crate::input::ConstrainedRecursiveShapesOperationInput).
 3143   3394   
pub(crate) mod constrained_recursive_shapes_operation_input_internal {
 3144   3395   
 3145   3396   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 3146   3397   
    /// Holds one variant for each of the ways the builder can fail.
 3147   3398   
    #[non_exhaustive]
 3148   3399   
    #[allow(clippy::enum_variant_names)]
 3149   3400   
    pub(crate) enum ConstraintViolation {
 3150   3401   
        /// Constraint violation occurred building member `nested` when building `ConstrainedRecursiveShapesOperationInput`.
 3151   3402   
        #[doc(hidden)]

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

@@ -139,139 +240,245 @@
  159    159   
//! ```rust,no_run
  160    160   
//! # use std::net::SocketAddr;
  161    161   
//! use constraints_without_public_constrained_types::{ConstraintsService, ConstraintsServiceConfig};
  162    162   
//!
  163    163   
//! #[::tokio::main]
  164    164   
//! pub async fn main() {
  165    165   
//!    let config = ConstraintsServiceConfig::builder().build();
  166    166   
//!    let app = ConstraintsService::builder(config)
  167    167   
//!        .constrained_http_bound_shapes_operation(constrained_http_bound_shapes_operation)
  168    168   
//!        .constrained_http_payload_bound_shape_operation(constrained_http_payload_bound_shape_operation)
         169  +
//!        .constrained_list_with_indirectly_constrained_aggregate_operation(constrained_list_with_indirectly_constrained_aggregate_operation)
  169    170   
//!        .constrained_recursive_shapes_operation(constrained_recursive_shapes_operation)
  170    171   
//!        .constrained_shapes_only_in_output_operation(constrained_shapes_only_in_output_operation)
  171    172   
//!        .constrained_shapes_operation(constrained_shapes_operation)
  172    173   
//!        .event_streams_operation(event_streams_operation)
  173    174   
//!        .http_prefix_headers_targeting_length_map_operation(http_prefix_headers_targeting_length_map_operation)
  174    175   
//!        .non_streaming_blob_operation(non_streaming_blob_operation)
  175    176   
//!        .query_params_targeting_length_map_operation(query_params_targeting_length_map_operation)
  176    177   
//!        .query_params_targeting_map_of_enum_string_operation(query_params_targeting_map_of_enum_string_operation)
  177    178   
//!        .query_params_targeting_map_of_length_list_of_pattern_string_operation(query_params_targeting_map_of_length_list_of_pattern_string_operation)
  178    179   
//!        .query_params_targeting_map_of_length_pattern_string_operation(query_params_targeting_map_of_length_pattern_string_operation)
  179    180   
//!        .query_params_targeting_map_of_length_string_operation(query_params_targeting_map_of_length_string_operation)
  180    181   
//!        .query_params_targeting_map_of_list_of_enum_string_operation(query_params_targeting_map_of_list_of_enum_string_operation)
  181    182   
//!        .query_params_targeting_map_of_list_of_length_pattern_string_operation(query_params_targeting_map_of_list_of_length_pattern_string_operation)
  182    183   
//!        .query_params_targeting_map_of_list_of_length_string_operation(query_params_targeting_map_of_list_of_length_string_operation)
  183    184   
//!        .query_params_targeting_map_of_list_of_pattern_string_operation(query_params_targeting_map_of_list_of_pattern_string_operation)
  184    185   
//!        .query_params_targeting_map_of_pattern_string_operation(query_params_targeting_map_of_pattern_string_operation)
  185    186   
//!        .query_params_targeting_map_of_set_of_length_string_operation(query_params_targeting_map_of_set_of_length_string_operation)
  186    187   
//!        .streaming_blob_operation(streaming_blob_operation)
  187    188   
//!        .build()
  188    189   
//!        .expect("failed to build an instance of ConstraintsService");
  189    190   
//!
  190    191   
//!    let bind: SocketAddr = "127.0.0.1:6969".parse()
  191    192   
//!        .expect("unable to parse the server bind address and port");
  192    193   
//!    let server = ::hyper::Server::bind(&bind).serve(app.into_make_service());
  193    194   
//!    # let server = async { Ok::<_, ()>(()) };
  194    195   
//!
  195    196   
//!    // Run your service!
  196    197   
//!    if let Err(err) = server.await {
  197    198   
//!        eprintln!("server error: {:?}", err);
  198    199   
//!    }
  199    200   
//! }
  200    201   
//!
  201    202   
//! use constraints_without_public_constrained_types::{input, output, error};
  202    203   
//!
  203    204   
//! async fn constrained_http_bound_shapes_operation(input: input::ConstrainedHttpBoundShapesOperationInput) -> Result<output::ConstrainedHttpBoundShapesOperationOutput, error::ConstrainedHttpBoundShapesOperationError> {
  204    205   
//!     todo!()
  205    206   
//! }
  206    207   
//!
  207    208   
//! async fn constrained_http_payload_bound_shape_operation(input: input::ConstrainedHttpPayloadBoundShapeOperationInput) -> Result<output::ConstrainedHttpPayloadBoundShapeOperationOutput, error::ConstrainedHttpPayloadBoundShapeOperationError> {
  208    209   
//!     todo!()
  209    210   
//! }
  210    211   
//!
         212  +
//! async fn constrained_list_with_indirectly_constrained_aggregate_operation(input: input::ConstrainedListWithIndirectlyConstrainedAggregateOperationInput) -> Result<output::ConstrainedListWithIndirectlyConstrainedAggregateOperationOutput, error::ConstrainedListWithIndirectlyConstrainedAggregateOperationError> {
         213  +
//!     todo!()
         214  +
//! }
         215  +
//!
  211    216   
//! async fn constrained_recursive_shapes_operation(input: input::ConstrainedRecursiveShapesOperationInput) -> Result<output::ConstrainedRecursiveShapesOperationOutput, error::ConstrainedRecursiveShapesOperationError> {
  212    217   
//!     todo!()
  213    218   
//! }
  214    219   
//!
  215    220   
//! async fn constrained_shapes_only_in_output_operation(input: input::ConstrainedShapesOnlyInOutputOperationInput) -> output::ConstrainedShapesOnlyInOutputOperationOutput {
  216    221   
//!     todo!()
  217    222   
//! }
  218    223   
//!
  219    224   
//! async fn constrained_shapes_operation(input: input::ConstrainedShapesOperationInput) -> Result<output::ConstrainedShapesOperationOutput, error::ConstrainedShapesOperationError> {
  220    225   
//!     todo!()

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

@@ -643,643 +702,840 @@
  663    663   
impl ::std::convert::From<SetOfLengthString> for ::std::vec::Vec<::std::string::String> {
  664    664   
    fn from(value: SetOfLengthString) -> Self {
  665    665   
        value.into_inner().into_iter().map(|v| v.into()).collect()
  666    666   
    }
  667    667   
}
  668    668   
impl crate::constrained::Constrained for SetOfLengthString {
  669    669   
    type Unconstrained =
  670    670   
        crate::unconstrained::set_of_length_string_unconstrained::SetOfLengthStringUnconstrained;
  671    671   
}
  672    672   
         673  +
#[allow(missing_docs)] // documentation missing in model
         674  +
///
         675  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         676  +
/// [constraint traits]. Use [`ListWithIndirectlyConstrainedMap::try_from`] to construct values of this type.
         677  +
///
         678  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         679  +
///
         680  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         681  +
pub(crate) struct ListWithIndirectlyConstrainedMap(
         682  +
    pub(crate)  ::std::vec::Vec<
         683  +
        ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         684  +
    >,
         685  +
);
         686  +
impl ListWithIndirectlyConstrainedMap {
         687  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::collections::HashMap::<crate::model::LengthString, crate::model::LengthString>>`].
         688  +
    pub fn into_inner(
         689  +
        self,
         690  +
    ) -> ::std::vec::Vec<
         691  +
        ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         692  +
    > {
         693  +
        self.0
         694  +
    }
         695  +
         696  +
    fn check_length(
         697  +
        length: usize,
         698  +
    ) -> Result<(), crate::model::list_with_indirectly_constrained_map_internal::ConstraintViolation>
         699  +
    {
         700  +
        if (1..=10).contains(&length) {
         701  +
            Ok(())
         702  +
        } else {
         703  +
            Err(crate::model::list_with_indirectly_constrained_map_internal::ConstraintViolation::Length(length))
         704  +
        }
         705  +
    }
         706  +
}
         707  +
impl
         708  +
    ::std::convert::TryFrom<
         709  +
        ::std::vec::Vec<
         710  +
            ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         711  +
        >,
         712  +
    > for ListWithIndirectlyConstrainedMap
         713  +
{
         714  +
    type Error = crate::model::list_with_indirectly_constrained_map_internal::ConstraintViolation;
         715  +
         716  +
    /// Constructs a `ListWithIndirectlyConstrainedMap` from an [`::std::vec::Vec<::std::collections::HashMap::<crate::model::LengthString, crate::model::LengthString>>`], failing when the provided value does not satisfy the modeled constraints.
         717  +
    fn try_from(
         718  +
        value: ::std::vec::Vec<
         719  +
            ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         720  +
        >,
         721  +
    ) -> Result<Self, Self::Error> {
         722  +
        Self::check_length(value.len())?;
         723  +
         724  +
        Ok(Self(value))
         725  +
    }
         726  +
}
         727  +
         728  +
impl ::std::convert::From<ListWithIndirectlyConstrainedMap>
         729  +
    for ::std::vec::Vec<
         730  +
        ::std::collections::HashMap<crate::model::LengthString, crate::model::LengthString>,
         731  +
    >
         732  +
{
         733  +
    fn from(value: ListWithIndirectlyConstrainedMap) -> Self {
         734  +
        value.into_inner()
         735  +
    }
         736  +
}
         737  +
impl ::std::convert::From<ListWithIndirectlyConstrainedMap>
         738  +
    for ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>
         739  +
{
         740  +
    fn from(value: ListWithIndirectlyConstrainedMap) -> Self {
         741  +
        value.into_inner().into_iter().map(|v| v.into()).collect()
         742  +
    }
         743  +
}
         744  +
impl crate::constrained::Constrained for ListWithIndirectlyConstrainedMap {
         745  +
    type Unconstrained = crate::unconstrained::list_with_indirectly_constrained_map_unconstrained::ListWithIndirectlyConstrainedMapUnconstrained;
         746  +
}
         747  +
         748  +
#[allow(missing_docs)] // documentation missing in model
         749  +
///
         750  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         751  +
/// [constraint traits]. Use [`ListWithIndirectlyConstrainedList::try_from`] to construct values of this type.
         752  +
///
         753  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         754  +
///
         755  +
#[derive(
         756  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         757  +
)]
         758  +
pub(crate) struct ListWithIndirectlyConstrainedList(
         759  +
    pub(crate) ::std::vec::Vec<::std::vec::Vec<crate::model::LengthString>>,
         760  +
);
         761  +
impl ListWithIndirectlyConstrainedList {
         762  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::vec::Vec::<crate::model::LengthString>>`].
         763  +
    pub fn into_inner(self) -> ::std::vec::Vec<::std::vec::Vec<crate::model::LengthString>> {
         764  +
        self.0
         765  +
    }
         766  +
         767  +
    fn check_length(
         768  +
        length: usize,
         769  +
    ) -> Result<(), crate::model::list_with_indirectly_constrained_list_internal::ConstraintViolation>
         770  +
    {
         771  +
        if (1..=10).contains(&length) {
         772  +
            Ok(())
         773  +
        } else {
         774  +
            Err(crate::model::list_with_indirectly_constrained_list_internal::ConstraintViolation::Length(length))
         775  +
        }
         776  +
    }
         777  +
}
         778  +
impl ::std::convert::TryFrom<::std::vec::Vec<::std::vec::Vec<crate::model::LengthString>>>
         779  +
    for ListWithIndirectlyConstrainedList
         780  +
{
         781  +
    type Error = crate::model::list_with_indirectly_constrained_list_internal::ConstraintViolation;
         782  +
         783  +
    /// Constructs a `ListWithIndirectlyConstrainedList` from an [`::std::vec::Vec<::std::vec::Vec::<crate::model::LengthString>>`], failing when the provided value does not satisfy the modeled constraints.
         784  +
    fn try_from(
         785  +
        value: ::std::vec::Vec<::std::vec::Vec<crate::model::LengthString>>,
         786  +
    ) -> Result<Self, Self::Error> {
         787  +
        Self::check_length(value.len())?;
         788  +
         789  +
        Ok(Self(value))
         790  +
    }
         791  +
}
         792  +
         793  +
impl ::std::convert::From<ListWithIndirectlyConstrainedList>
         794  +
    for ::std::vec::Vec<::std::vec::Vec<crate::model::LengthString>>
         795  +
{
         796  +
    fn from(value: ListWithIndirectlyConstrainedList) -> Self {
         797  +
        value.into_inner()
         798  +
    }
         799  +
}
         800  +
impl ::std::convert::From<ListWithIndirectlyConstrainedList>
         801  +
    for ::std::vec::Vec<::std::vec::Vec<::std::string::String>>
         802  +
{
         803  +
    fn from(value: ListWithIndirectlyConstrainedList) -> Self {
         804  +
        value.into_inner().into_iter().map(|v| v.into()).collect()
         805  +
    }
         806  +
}
         807  +
impl crate::constrained::Constrained for ListWithIndirectlyConstrainedList {
         808  +
    type Unconstrained = crate::unconstrained::list_with_indirectly_constrained_list_unconstrained::ListWithIndirectlyConstrainedListUnconstrained;
         809  +
}
         810  +
  673    811   
#[allow(missing_docs)] // documentation missing in model
  674    812   
#[derive(
  675    813   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  676    814   
)]
  677    815   
pub struct RecursiveShapesInputOutputNested1 {
  678    816   
    #[allow(missing_docs)] // documentation missing in model
  679    817   
    pub recursive_member: ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
  680    818   
}
  681    819   
impl RecursiveShapesInputOutputNested1 {
  682    820   
    #[allow(missing_docs)] // documentation missing in model
@@ -5141,5279 +5200,5517 @@
 5161   5299   
            match self {
 5162   5300   
                Self::Key(key_constraint_violation) => {
 5163   5301   
                    key_constraint_violation.as_validation_exception_field(path)
 5164   5302   
                }
 5165   5303   
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 5166   5304   
                    .as_validation_exception_field(path + "/" + key.as_str()),
 5167   5305   
            }
 5168   5306   
        }
 5169   5307   
    }
 5170   5308   
}
        5309  +
pub(crate) mod list_with_indirectly_constrained_map_internal {
        5310  +
        5311  +
    #[allow(clippy::enum_variant_names)]
        5312  +
    #[derive(Debug, PartialEq)]
        5313  +
    pub(crate) enum ConstraintViolation {
        5314  +
        /// Constraint violation error when the list doesn't have the required length
        5315  +
        Length(usize),
        5316  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        5317  +
        /// The first component of the tuple is the index in the collection where the
        5318  +
        /// first constraint violation was found.
        5319  +
        #[doc(hidden)]
        5320  +
        Member(
        5321  +
            usize,
        5322  +
            crate::model::indirectly_constrained_map_internal::ConstraintViolation,
        5323  +
        ),
        5324  +
    }
        5325  +
        5326  +
    impl ::std::fmt::Display for ConstraintViolation {
        5327  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5328  +
            let message = match self {
        5329  +
                Self::Length(length) => {
        5330  +
                    format!("Value with length {} provided for 'com.amazonaws.constraints#ListWithIndirectlyConstrainedMap' failed to satisfy constraint: Member must have length between 1 and 10, inclusive", length)
        5331  +
                }
        5332  +
                Self::Member(index, failing_member) => format!(
        5333  +
                    "Value at index {index} failed to satisfy constraint. {}",
        5334  +
                    failing_member
        5335  +
                ),
        5336  +
            };
        5337  +
            write!(f, "{message}")
        5338  +
        }
        5339  +
    }
        5340  +
        5341  +
    impl ::std::error::Error for ConstraintViolation {}
        5342  +
    impl ConstraintViolation {
        5343  +
        pub(crate) fn as_validation_exception_field(
        5344  +
            self,
        5345  +
            path: ::std::string::String,
        5346  +
        ) -> crate::model::ValidationExceptionField {
        5347  +
            match self {
        5348  +
                        Self::Length(length) => crate::model::ValidationExceptionField {
        5349  +
                                message: format!("Value with length {} at '{}' failed to satisfy constraint: Member must have length between 1 and 10, inclusive", length, &path),
        5350  +
                                path,
        5351  +
                            },
        5352  +
    Self::Member(index, member_constraint_violation) =>
        5353  +
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
        5354  +
                    }
        5355  +
        }
        5356  +
    }
        5357  +
}
        5358  +
pub(crate) mod indirectly_constrained_map_internal {
        5359  +
        5360  +
    #[allow(clippy::enum_variant_names)]
        5361  +
    #[derive(Debug, PartialEq)]
        5362  +
    pub(crate) enum ConstraintViolation {
        5363  +
        #[doc(hidden)]
        5364  +
        Key(crate::model::length_string_internal::ConstraintViolation),
        5365  +
        #[doc(hidden)]
        5366  +
        Value(
        5367  +
            crate::model::LengthString,
        5368  +
            crate::model::length_string_internal::ConstraintViolation,
        5369  +
        ),
        5370  +
    }
        5371  +
        5372  +
    impl ::std::fmt::Display for ConstraintViolation {
        5373  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5374  +
            match self {
        5375  +
                Self::Key(key_constraint_violation) => write!(f, "{}", key_constraint_violation),
        5376  +
                Self::Value(_, value_constraint_violation) => {
        5377  +
                    write!(f, "{}", value_constraint_violation)
        5378  +
                }
        5379  +
            }
        5380  +
        }
        5381  +
    }
        5382  +
        5383  +
    impl ::std::error::Error for ConstraintViolation {}
        5384  +
    impl ConstraintViolation {
        5385  +
        pub(crate) fn as_validation_exception_field(
        5386  +
            self,
        5387  +
            path: ::std::string::String,
        5388  +
        ) -> crate::model::ValidationExceptionField {
        5389  +
            match self {
        5390  +
                Self::Key(key_constraint_violation) => {
        5391  +
                    key_constraint_violation.as_validation_exception_field(path)
        5392  +
                }
        5393  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        5394  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
        5395  +
            }
        5396  +
        }
        5397  +
    }
        5398  +
}
        5399  +
pub(crate) mod list_with_indirectly_constrained_list_internal {
        5400  +
        5401  +
    #[allow(clippy::enum_variant_names)]
        5402  +
    #[derive(Debug, PartialEq)]
        5403  +
    pub(crate) enum ConstraintViolation {
        5404  +
        /// Constraint violation error when the list doesn't have the required length
        5405  +
        Length(usize),
        5406  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        5407  +
        /// The first component of the tuple is the index in the collection where the
        5408  +
        /// first constraint violation was found.
        5409  +
        #[doc(hidden)]
        5410  +
        Member(
        5411  +
            usize,
        5412  +
            crate::model::indirectly_constrained_list_internal::ConstraintViolation,
        5413  +
        ),
        5414  +
    }
        5415  +
        5416  +
    impl ::std::fmt::Display for ConstraintViolation {
        5417  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5418  +
            let message = match self {
        5419  +
                Self::Length(length) => {
        5420  +
                    format!("Value with length {} provided for 'com.amazonaws.constraints#ListWithIndirectlyConstrainedList' failed to satisfy constraint: Member must have length between 1 and 10, inclusive", length)
        5421  +
                }
        5422  +
                Self::Member(index, failing_member) => format!(
        5423  +
                    "Value at index {index} failed to satisfy constraint. {}",
        5424  +
                    failing_member
        5425  +
                ),
        5426  +
            };
        5427  +
            write!(f, "{message}")
        5428  +
        }
        5429  +
    }
        5430  +
        5431  +
    impl ::std::error::Error for ConstraintViolation {}
        5432  +
    impl ConstraintViolation {
        5433  +
        pub(crate) fn as_validation_exception_field(
        5434  +
            self,
        5435  +
            path: ::std::string::String,
        5436  +
        ) -> crate::model::ValidationExceptionField {
        5437  +
            match self {
        5438  +
                        Self::Length(length) => crate::model::ValidationExceptionField {
        5439  +
                                message: format!("Value with length {} at '{}' failed to satisfy constraint: Member must have length between 1 and 10, inclusive", length, &path),
        5440  +
                                path,
        5441  +
                            },
        5442  +
    Self::Member(index, member_constraint_violation) =>
        5443  +
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
        5444  +
                    }
        5445  +
        }
        5446  +
    }
        5447  +
}
        5448  +
pub(crate) mod indirectly_constrained_list_internal {
        5449  +
        5450  +
    #[allow(clippy::enum_variant_names)]
        5451  +
    #[derive(Debug, PartialEq)]
        5452  +
    pub(crate) enum ConstraintViolation {
        5453  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        5454  +
        /// The first component of the tuple is the index in the collection where the
        5455  +
        /// first constraint violation was found.
        5456  +
        #[doc(hidden)]
        5457  +
        Member(
        5458  +
            usize,
        5459  +
            crate::model::length_string_internal::ConstraintViolation,
        5460  +
        ),
        5461  +
    }
        5462  +
        5463  +
    impl ::std::fmt::Display for ConstraintViolation {
        5464  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5465  +
            let message = match self {
        5466  +
                Self::Member(index, failing_member) => format!(
        5467  +
                    "Value at index {index} failed to satisfy constraint. {}",
        5468  +
                    failing_member
        5469  +
                ),
        5470  +
            };
        5471  +
            write!(f, "{message}")
        5472  +
        }
        5473  +
    }
        5474  +
        5475  +
    impl ::std::error::Error for ConstraintViolation {}
        5476  +
    impl ConstraintViolation {
        5477  +
        pub(crate) fn as_validation_exception_field(
        5478  +
            self,
        5479  +
            path: ::std::string::String,
        5480  +
        ) -> crate::model::ValidationExceptionField {
        5481  +
            match self {
        5482  +
                Self::Member(index, member_constraint_violation) => member_constraint_violation
        5483  +
                    .as_validation_exception_field(path + "/" + &index.to_string()),
        5484  +
            }
        5485  +
        }
        5486  +
    }
        5487  +
}
 5171   5488   
pub(crate) mod recursive_list_internal {
 5172   5489   
 5173   5490   
    #[allow(clippy::enum_variant_names)]
 5174   5491   
    #[derive(Debug, PartialEq)]
 5175   5492   
    pub(crate) enum ConstraintViolation {
 5176   5493   
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 5177   5494   
        /// The first component of the tuple is the index in the collection where the
 5178   5495   
        /// first constraint violation was found.
 5179   5496   
        #[doc(hidden)]
 5180   5497   
        Member(