Server Test Python

Server Test Python

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +866,883 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* PythonServerOperationHandlerGenerator.kt:61 */
    2      3   
/// Python handler for operation `ContentTypeParameters`.
    3      4   
pub(crate) async fn content_type_parameters(
    4      5   
    input: crate::input::ContentTypeParametersInput,
    5      6   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
    6      7   
    handler: ::aws_smithy_http_server_python::PyHandler,
    7      8   
) -> std::result::Result<
    8      9   
    crate::output::ContentTypeParametersOutput,
    9     10   
    crate::error::ContentTypeParametersError,
   10     11   
> {
   11     12   
    // Async block used to run the handler and catch any Python error.
   12     13   
    let result = if handler.is_coroutine {
   13     14   
        ::tracing::trace!(
   14     15   
            name = "content_type_parameters",
   15     16   
            "executing python handler coroutine"
   16     17   
        );
   17     18   
        let result = ::pyo3::Python::with_gil(|py| {
   18     19   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   19     20   
            let coroutine = if handler.args == 1 {
   20     21   
                pyhandler.call1((input,))?
   21     22   
            } else {
   22     23   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   23     24   
            };
   24     25   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   25     26   
        })?;
   26     27   
        result.await.and_then(|r| {
   27     28   
            ::pyo3::Python::with_gil(|py| {
   28     29   
                r.extract::<crate::output::ContentTypeParametersOutput>(py)
   29     30   
            })
   30     31   
        })
   31     32   
    } else {
   32     33   
        ::tracing::trace!(
   33     34   
            name = "content_type_parameters",
   34     35   
            "executing python handler function"
   35     36   
        );
   36     37   
        ::pyo3::Python::with_gil(|py| {
   37     38   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   38     39   
            let output = if handler.args == 1 {
   39     40   
                pyhandler.call1((input,))?
   40     41   
            } else {
   41     42   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   42     43   
            };
   43     44   
            output.extract::<crate::output::ContentTypeParametersOutput>()
   44     45   
        })
   45     46   
    };
   46     47   
    // Catch and record a Python traceback.
   47     48   
    result.map_err(|e| {
   48     49   
        let rich_py_err =
   49     50   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   50     51   
                e.clone_ref(py)
   51     52   
            }));
   52     53   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   53     54   
        e.into()
   54     55   
    })
   55     56   
}
   56     57   
          58  +
/* PythonServerOperationHandlerGenerator.kt:61 */
   57     59   
/// Python handler for operation `PutWithContentEncoding`.
   58     60   
pub(crate) async fn put_with_content_encoding(
   59     61   
    input: crate::input::PutWithContentEncodingInput,
   60     62   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
   61     63   
    handler: ::aws_smithy_http_server_python::PyHandler,
   62     64   
) -> std::result::Result<
   63     65   
    crate::output::PutWithContentEncodingOutput,
   64     66   
    crate::error::PutWithContentEncodingError,
   65     67   
> {
   66     68   
    // Async block used to run the handler and catch any Python error.
   67     69   
    let result = if handler.is_coroutine {
   68     70   
        ::tracing::trace!(
   69     71   
            name = "put_with_content_encoding",
   70     72   
            "executing python handler coroutine"
   71     73   
        );
   72     74   
        let result = ::pyo3::Python::with_gil(|py| {
   73     75   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   74     76   
            let coroutine = if handler.args == 1 {
   75     77   
                pyhandler.call1((input,))?
   76     78   
            } else {
   77     79   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   78     80   
            };
   79     81   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   80     82   
        })?;
   81     83   
        result.await.and_then(|r| {
   82     84   
            ::pyo3::Python::with_gil(|py| {
   83     85   
                r.extract::<crate::output::PutWithContentEncodingOutput>(py)
   84     86   
            })
   85     87   
        })
   86     88   
    } else {
   87     89   
        ::tracing::trace!(
   88     90   
            name = "put_with_content_encoding",
   89     91   
            "executing python handler function"
   90     92   
        );
   91     93   
        ::pyo3::Python::with_gil(|py| {
   92     94   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   93     95   
            let output = if handler.args == 1 {
   94     96   
                pyhandler.call1((input,))?
   95     97   
            } else {
   96     98   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   97     99   
            };
   98    100   
            output.extract::<crate::output::PutWithContentEncodingOutput>()
   99    101   
        })
  100    102   
    };
  101    103   
    // Catch and record a Python traceback.
  102    104   
    result.map_err(|e| {
  103    105   
        let rich_py_err =
  104    106   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  105    107   
                e.clone_ref(py)
  106    108   
            }));
  107    109   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  108    110   
        e.into()
  109    111   
    })
  110    112   
}
  111    113   
         114  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  112    115   
/// Python handler for operation `FractionalSeconds`.
  113    116   
pub(crate) async fn fractional_seconds(
  114    117   
    input: crate::input::FractionalSecondsInput,
  115    118   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  116    119   
    handler: ::aws_smithy_http_server_python::PyHandler,
  117    120   
) -> std::result::Result<crate::output::FractionalSecondsOutput, crate::error::FractionalSecondsError>
  118    121   
{
  119    122   
    // Async block used to run the handler and catch any Python error.
  120    123   
    let result = if handler.is_coroutine {
  121    124   
        ::tracing::trace!(
  122    125   
            name = "fractional_seconds",
  123    126   
            "executing python handler coroutine"
  124    127   
        );
  125    128   
        let result = ::pyo3::Python::with_gil(|py| {
  126    129   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  127    130   
            let coroutine = if handler.args == 1 {
  128    131   
                pyhandler.call1((input,))?
  129    132   
            } else {
  130    133   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  131    134   
            };
  132    135   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  133    136   
        })?;
  134    137   
        result.await.and_then(|r| {
  135    138   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::FractionalSecondsOutput>(py))
  136    139   
        })
  137    140   
    } else {
  138    141   
        ::tracing::trace!(
  139    142   
            name = "fractional_seconds",
  140    143   
            "executing python handler function"
  141    144   
        );
  142    145   
        ::pyo3::Python::with_gil(|py| {
  143    146   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  144    147   
            let output = if handler.args == 1 {
  145    148   
                pyhandler.call1((input,))?
  146    149   
            } else {
  147    150   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  148    151   
            };
  149    152   
            output.extract::<crate::output::FractionalSecondsOutput>()
  150    153   
        })
  151    154   
    };
  152    155   
    // Catch and record a Python traceback.
  153    156   
    result.map_err(|e| {
  154    157   
        let rich_py_err =
  155    158   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  156    159   
                e.clone_ref(py)
  157    160   
            }));
  158    161   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  159    162   
        e.into()
  160    163   
    })
  161    164   
}
  162    165   
         166  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  163    167   
/// Python handler for operation `DatetimeOffsets`.
  164    168   
pub(crate) async fn datetime_offsets(
  165    169   
    input: crate::input::DatetimeOffsetsInput,
  166    170   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  167    171   
    handler: ::aws_smithy_http_server_python::PyHandler,
  168    172   
) -> std::result::Result<crate::output::DatetimeOffsetsOutput, crate::error::DatetimeOffsetsError> {
  169    173   
    // Async block used to run the handler and catch any Python error.
  170    174   
    let result = if handler.is_coroutine {
  171    175   
        ::tracing::trace!(
  172    176   
            name = "datetime_offsets",
  173    177   
            "executing python handler coroutine"
  174    178   
        );
  175    179   
        let result = ::pyo3::Python::with_gil(|py| {
  176    180   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  177    181   
            let coroutine = if handler.args == 1 {
  178    182   
                pyhandler.call1((input,))?
  179    183   
            } else {
  180    184   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  181    185   
            };
  182    186   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  183    187   
        })?;
  184    188   
        result.await.and_then(|r| {
  185    189   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::DatetimeOffsetsOutput>(py))
  186    190   
        })
  187    191   
    } else {
  188    192   
        ::tracing::trace!(
  189    193   
            name = "datetime_offsets",
  190    194   
            "executing python handler function"
  191    195   
        );
  192    196   
        ::pyo3::Python::with_gil(|py| {
  193    197   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  194    198   
            let output = if handler.args == 1 {
  195    199   
                pyhandler.call1((input,))?
  196    200   
            } else {
  197    201   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  198    202   
            };
  199    203   
            output.extract::<crate::output::DatetimeOffsetsOutput>()
  200    204   
        })
  201    205   
    };
  202    206   
    // Catch and record a Python traceback.
  203    207   
    result.map_err(|e| {
  204    208   
        let rich_py_err =
  205    209   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  206    210   
                e.clone_ref(py)
  207    211   
            }));
  208    212   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  209    213   
        e.into()
  210    214   
    })
  211    215   
}
  212    216   
         217  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  213    218   
/// Python handler for operation `HostWithPathOperation`.
  214    219   
pub(crate) async fn host_with_path_operation(
  215    220   
    input: crate::input::HostWithPathOperationInput,
  216    221   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  217    222   
    handler: ::aws_smithy_http_server_python::PyHandler,
  218    223   
) -> std::result::Result<
  219    224   
    crate::output::HostWithPathOperationOutput,
  220    225   
    crate::error::HostWithPathOperationError,
  221    226   
> {
  222    227   
    // Async block used to run the handler and catch any Python error.
  223    228   
    let result = if handler.is_coroutine {
  224    229   
        ::tracing::trace!(
  225    230   
            name = "host_with_path_operation",
  226    231   
            "executing python handler coroutine"
  227    232   
        );
  228    233   
        let result = ::pyo3::Python::with_gil(|py| {
  229    234   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  230    235   
            let coroutine = if handler.args == 1 {
  231    236   
                pyhandler.call1((input,))?
  232    237   
            } else {
  233    238   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  234    239   
            };
  235    240   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  236    241   
        })?;
  237    242   
        result.await.and_then(|r| {
  238    243   
            ::pyo3::Python::with_gil(|py| {
  239    244   
                r.extract::<crate::output::HostWithPathOperationOutput>(py)
  240    245   
            })
  241    246   
        })
  242    247   
    } else {
  243    248   
        ::tracing::trace!(
  244    249   
            name = "host_with_path_operation",
  245    250   
            "executing python handler function"
  246    251   
        );
  247    252   
        ::pyo3::Python::with_gil(|py| {
  248    253   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  249    254   
            let output = if handler.args == 1 {
  250    255   
                pyhandler.call1((input,))?
  251    256   
            } else {
  252    257   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  253    258   
            };
  254    259   
            output.extract::<crate::output::HostWithPathOperationOutput>()
  255    260   
        })
  256    261   
    };
  257    262   
    // Catch and record a Python traceback.
  258    263   
    result.map_err(|e| {
  259    264   
        let rich_py_err =
  260    265   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  261    266   
                e.clone_ref(py)
  262    267   
            }));
  263    268   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  264    269   
        e.into()
  265    270   
    })
  266    271   
}
  267    272   
         273  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  268    274   
/// Python handler for operation `EndpointWithHostLabelOperation`.
  269    275   
pub(crate) async fn endpoint_with_host_label_operation(
  270    276   
    input: crate::input::EndpointWithHostLabelOperationInput,
  271    277   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  272    278   
    handler: ::aws_smithy_http_server_python::PyHandler,
  273    279   
) -> std::result::Result<
  274    280   
    crate::output::EndpointWithHostLabelOperationOutput,
  275    281   
    crate::error::EndpointWithHostLabelOperationError,
  276    282   
> {
  277    283   
    // Async block used to run the handler and catch any Python error.
  278    284   
    let result = if handler.is_coroutine {
  279    285   
        ::tracing::trace!(
  280    286   
            name = "endpoint_with_host_label_operation",
  281    287   
            "executing python handler coroutine"
  282    288   
        );
  283    289   
        let result = ::pyo3::Python::with_gil(|py| {
  284    290   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  285    291   
            let coroutine = if handler.args == 1 {
  286    292   
                pyhandler.call1((input,))?
  287    293   
            } else {
  288    294   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  289    295   
            };
  290    296   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  291    297   
        })?;
  292    298   
        result.await.and_then(|r| {
  293    299   
            ::pyo3::Python::with_gil(|py| {
  294    300   
                r.extract::<crate::output::EndpointWithHostLabelOperationOutput>(py)
  295    301   
            })
  296    302   
        })
  297    303   
    } else {
  298    304   
        ::tracing::trace!(
  299    305   
            name = "endpoint_with_host_label_operation",
  300    306   
            "executing python handler function"
  301    307   
        );
  302    308   
        ::pyo3::Python::with_gil(|py| {
  303    309   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  304    310   
            let output = if handler.args == 1 {
  305    311   
                pyhandler.call1((input,))?
  306    312   
            } else {
  307    313   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  308    314   
            };
  309    315   
            output.extract::<crate::output::EndpointWithHostLabelOperationOutput>()
  310    316   
        })
  311    317   
    };
  312    318   
    // Catch and record a Python traceback.
  313    319   
    result.map_err(|e| {
  314    320   
        let rich_py_err =
  315    321   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  316    322   
                e.clone_ref(py)
  317    323   
            }));
  318    324   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  319    325   
        e.into()
  320    326   
    })
  321    327   
}
  322    328   
         329  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  323    330   
/// Python handler for operation `EndpointOperation`.
  324    331   
pub(crate) async fn endpoint_operation(
  325    332   
    input: crate::input::EndpointOperationInput,
  326    333   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  327    334   
    handler: ::aws_smithy_http_server_python::PyHandler,
  328    335   
) -> std::result::Result<crate::output::EndpointOperationOutput, crate::error::EndpointOperationError>
  329    336   
{
  330    337   
    // Async block used to run the handler and catch any Python error.
  331    338   
    let result = if handler.is_coroutine {
  332    339   
        ::tracing::trace!(
  333    340   
            name = "endpoint_operation",
  334    341   
            "executing python handler coroutine"
  335    342   
        );
  336    343   
        let result = ::pyo3::Python::with_gil(|py| {
  337    344   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  338    345   
            let coroutine = if handler.args == 1 {
  339    346   
                pyhandler.call1((input,))?
  340    347   
            } else {
  341    348   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  342    349   
            };
  343    350   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  344    351   
        })?;
  345    352   
        result.await.and_then(|r| {
  346    353   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::EndpointOperationOutput>(py))
  347    354   
        })
  348    355   
    } else {
  349    356   
        ::tracing::trace!(
  350    357   
            name = "endpoint_operation",
  351    358   
            "executing python handler function"
  352    359   
        );
  353    360   
        ::pyo3::Python::with_gil(|py| {
  354    361   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  355    362   
            let output = if handler.args == 1 {
  356    363   
                pyhandler.call1((input,))?
  357    364   
            } else {
  358    365   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  359    366   
            };
  360    367   
            output.extract::<crate::output::EndpointOperationOutput>()
  361    368   
        })
  362    369   
    };
  363    370   
    // Catch and record a Python traceback.
  364    371   
    result.map_err(|e| {
  365    372   
        let rich_py_err =
  366    373   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  367    374   
                e.clone_ref(py)
  368    375   
            }));
  369    376   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  370    377   
        e.into()
  371    378   
    })
  372    379   
}
  373    380   
         381  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  374    382   
/// Python handler for operation `JsonUnions`.
  375    383   
pub(crate) async fn json_unions(
  376    384   
    input: crate::input::JsonUnionsInput,
  377    385   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  378    386   
    handler: ::aws_smithy_http_server_python::PyHandler,
  379    387   
) -> std::result::Result<crate::output::JsonUnionsOutput, crate::error::JsonUnionsError> {
  380    388   
    // Async block used to run the handler and catch any Python error.
  381    389   
    let result = if handler.is_coroutine {
  382    390   
        ::tracing::trace!(name = "json_unions", "executing python handler coroutine");
  383    391   
        let result = ::pyo3::Python::with_gil(|py| {
  384    392   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  385    393   
            let coroutine = if handler.args == 1 {
  386    394   
                pyhandler.call1((input,))?
  387    395   
            } else {
  388    396   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  389    397   
            };
  390    398   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  391    399   
        })?;
  392    400   
        result.await.and_then(|r| {
  393    401   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonUnionsOutput>(py))
  394    402   
        })
  395    403   
    } else {
  396    404   
        ::tracing::trace!(name = "json_unions", "executing python handler function");
  397    405   
        ::pyo3::Python::with_gil(|py| {
  398    406   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  399    407   
            let output = if handler.args == 1 {
  400    408   
                pyhandler.call1((input,))?
  401    409   
            } else {
  402    410   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  403    411   
            };
  404    412   
            output.extract::<crate::output::JsonUnionsOutput>()
  405    413   
        })
  406    414   
    };
  407    415   
    // Catch and record a Python traceback.
  408    416   
    result.map_err(|e| {
  409    417   
        let rich_py_err =
  410    418   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  411    419   
                e.clone_ref(py)
  412    420   
            }));
  413    421   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  414    422   
        e.into()
  415    423   
    })
  416    424   
}
  417    425   
         426  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  418    427   
/// Python handler for operation `GreetingWithErrors`.
  419    428   
pub(crate) async fn greeting_with_errors(
  420    429   
    input: crate::input::GreetingWithErrorsInput,
  421    430   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  422    431   
    handler: ::aws_smithy_http_server_python::PyHandler,
  423    432   
) -> std::result::Result<
  424    433   
    crate::output::GreetingWithErrorsOutput,
  425    434   
    crate::error::GreetingWithErrorsError,
  426    435   
> {
  427    436   
    // Async block used to run the handler and catch any Python error.
  428    437   
    let result = if handler.is_coroutine {
  429    438   
        ::tracing::trace!(
  430    439   
            name = "greeting_with_errors",
  431    440   
            "executing python handler coroutine"
  432    441   
        );
  433    442   
        let result = ::pyo3::Python::with_gil(|py| {
  434    443   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  435    444   
            let coroutine = if handler.args == 1 {
  436    445   
                pyhandler.call1((input,))?
  437    446   
            } else {
  438    447   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  439    448   
            };
  440    449   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  441    450   
        })?;
  442    451   
        result.await.and_then(|r| {
  443    452   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GreetingWithErrorsOutput>(py))
  444    453   
        })
  445    454   
    } else {
  446    455   
        ::tracing::trace!(
  447    456   
            name = "greeting_with_errors",
  448    457   
            "executing python handler function"
  449    458   
        );
  450    459   
        ::pyo3::Python::with_gil(|py| {
  451    460   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  452    461   
            let output = if handler.args == 1 {
  453    462   
                pyhandler.call1((input,))?
  454    463   
            } else {
  455    464   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  456    465   
            };
  457    466   
            output.extract::<crate::output::GreetingWithErrorsOutput>()
  458    467   
        })
  459    468   
    };
  460    469   
    // Catch and record a Python traceback.
  461    470   
    result.map_err(|e| {
  462    471   
        let rich_py_err =
  463    472   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  464    473   
                e.clone_ref(py)
  465    474   
            }));
  466    475   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  467    476   
        e.into()
  468    477   
    })
  469    478   
}
  470    479   
         480  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  471    481   
/// Python handler for operation `SparseNullsOperation`.
  472    482   
pub(crate) async fn sparse_nulls_operation(
  473    483   
    input: crate::input::SparseNullsOperationInput,
  474    484   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  475    485   
    handler: ::aws_smithy_http_server_python::PyHandler,
  476    486   
) -> std::result::Result<
  477    487   
    crate::output::SparseNullsOperationOutput,
  478    488   
    crate::error::SparseNullsOperationError,
  479    489   
> {
  480    490   
    // Async block used to run the handler and catch any Python error.
  481    491   
    let result = if handler.is_coroutine {
  482    492   
        ::tracing::trace!(
  483    493   
            name = "sparse_nulls_operation",
  484    494   
            "executing python handler coroutine"
  485    495   
        );
  486    496   
        let result = ::pyo3::Python::with_gil(|py| {
  487    497   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  488    498   
            let coroutine = if handler.args == 1 {
  489    499   
                pyhandler.call1((input,))?
  490    500   
            } else {
  491    501   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  492    502   
            };
  493    503   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  494    504   
        })?;
  495    505   
        result.await.and_then(|r| {
  496    506   
            ::pyo3::Python::with_gil(|py| {
  497    507   
                r.extract::<crate::output::SparseNullsOperationOutput>(py)
  498    508   
            })
  499    509   
        })
  500    510   
    } else {
  501    511   
        ::tracing::trace!(
  502    512   
            name = "sparse_nulls_operation",
  503    513   
            "executing python handler function"
  504    514   
        );
  505    515   
        ::pyo3::Python::with_gil(|py| {
  506    516   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  507    517   
            let output = if handler.args == 1 {
  508    518   
                pyhandler.call1((input,))?
  509    519   
            } else {
  510    520   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  511    521   
            };
  512    522   
            output.extract::<crate::output::SparseNullsOperationOutput>()
  513    523   
        })
  514    524   
    };
  515    525   
    // Catch and record a Python traceback.
  516    526   
    result.map_err(|e| {
  517    527   
        let rich_py_err =
  518    528   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  519    529   
                e.clone_ref(py)
  520    530   
            }));
  521    531   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  522    532   
        e.into()
  523    533   
    })
  524    534   
}
  525    535   
         536  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  526    537   
/// Python handler for operation `NullOperation`.
  527    538   
pub(crate) async fn null_operation(
  528    539   
    input: crate::input::NullOperationInput,
  529    540   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  530    541   
    handler: ::aws_smithy_http_server_python::PyHandler,
  531    542   
) -> std::result::Result<crate::output::NullOperationOutput, crate::error::NullOperationError> {
  532    543   
    // Async block used to run the handler and catch any Python error.
  533    544   
    let result = if handler.is_coroutine {
  534    545   
        ::tracing::trace!(
  535    546   
            name = "null_operation",
  536    547   
            "executing python handler coroutine"
  537    548   
        );
  538    549   
        let result = ::pyo3::Python::with_gil(|py| {
  539    550   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  540    551   
            let coroutine = if handler.args == 1 {
  541    552   
                pyhandler.call1((input,))?
  542    553   
            } else {
  543    554   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  544    555   
            };
  545    556   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  546    557   
        })?;
  547    558   
        result.await.and_then(|r| {
  548    559   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::NullOperationOutput>(py))
  549    560   
        })
  550    561   
    } else {
  551    562   
        ::tracing::trace!(name = "null_operation", "executing python handler function");
  552    563   
        ::pyo3::Python::with_gil(|py| {
  553    564   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  554    565   
            let output = if handler.args == 1 {
  555    566   
                pyhandler.call1((input,))?
  556    567   
            } else {
  557    568   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  558    569   
            };
  559    570   
            output.extract::<crate::output::NullOperationOutput>()
  560    571   
        })
  561    572   
    };
  562    573   
    // Catch and record a Python traceback.
  563    574   
    result.map_err(|e| {
  564    575   
        let rich_py_err =
  565    576   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  566    577   
                e.clone_ref(py)
  567    578   
            }));
  568    579   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  569    580   
        e.into()
  570    581   
    })
  571    582   
}
  572    583   
         584  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  573    585   
/// Python handler for operation `JsonEnums`.
  574    586   
pub(crate) async fn json_enums(
  575    587   
    input: crate::input::JsonEnumsInput,
  576    588   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  577    589   
    handler: ::aws_smithy_http_server_python::PyHandler,
  578    590   
) -> std::result::Result<crate::output::JsonEnumsOutput, crate::error::JsonEnumsError> {
  579    591   
    // Async block used to run the handler and catch any Python error.
  580    592   
    let result = if handler.is_coroutine {
  581    593   
        ::tracing::trace!(name = "json_enums", "executing python handler coroutine");
  582    594   
        let result = ::pyo3::Python::with_gil(|py| {
  583    595   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  584    596   
            let coroutine = if handler.args == 1 {
  585    597   
                pyhandler.call1((input,))?
  586    598   
            } else {
  587    599   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  588    600   
            };
  589    601   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  590    602   
        })?;
  591    603   
        result.await.and_then(|r| {
  592    604   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::JsonEnumsOutput>(py))
  593    605   
        })
  594    606   
    } else {
  595    607   
        ::tracing::trace!(name = "json_enums", "executing python handler function");
  596    608   
        ::pyo3::Python::with_gil(|py| {
  597    609   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  598    610   
            let output = if handler.args == 1 {
  599    611   
                pyhandler.call1((input,))?
  600    612   
            } else {
  601    613   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  602    614   
            };
  603    615   
            output.extract::<crate::output::JsonEnumsOutput>()
  604    616   
        })
  605    617   
    };
  606    618   
    // Catch and record a Python traceback.
  607    619   
    result.map_err(|e| {
  608    620   
        let rich_py_err =
  609    621   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  610    622   
                e.clone_ref(py)
  611    623   
            }));
  612    624   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  613    625   
        e.into()
  614    626   
    })
  615    627   
}
  616    628   
         629  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  617    630   
/// Python handler for operation `PutAndGetInlineDocuments`.
  618    631   
pub(crate) async fn put_and_get_inline_documents(
  619    632   
    input: crate::input::PutAndGetInlineDocumentsInput,
  620    633   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  621    634   
    handler: ::aws_smithy_http_server_python::PyHandler,
  622    635   
) -> std::result::Result<
  623    636   
    crate::output::PutAndGetInlineDocumentsOutput,
  624    637   
    crate::error::PutAndGetInlineDocumentsError,
  625    638   
> {
  626    639   
    // Async block used to run the handler and catch any Python error.
  627    640   
    let result = if handler.is_coroutine {
  628    641   
        ::tracing::trace!(
  629    642   
            name = "put_and_get_inline_documents",
  630    643   
            "executing python handler coroutine"
  631    644   
        );
  632    645   
        let result = ::pyo3::Python::with_gil(|py| {
  633    646   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  634    647   
            let coroutine = if handler.args == 1 {
  635    648   
                pyhandler.call1((input,))?
  636    649   
            } else {
  637    650   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  638    651   
            };
  639    652   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  640    653   
        })?;
  641    654   
        result.await.and_then(|r| {
  642    655   
            ::pyo3::Python::with_gil(|py| {
  643    656   
                r.extract::<crate::output::PutAndGetInlineDocumentsOutput>(py)
  644    657   
            })
  645    658   
        })
  646    659   
    } else {
  647    660   
        ::tracing::trace!(
  648    661   
            name = "put_and_get_inline_documents",
  649    662   
            "executing python handler function"
  650    663   
        );
  651    664   
        ::pyo3::Python::with_gil(|py| {
  652    665   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  653    666   
            let output = if handler.args == 1 {
  654    667   
                pyhandler.call1((input,))?
  655    668   
            } else {
  656    669   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  657    670   
            };
  658    671   
            output.extract::<crate::output::PutAndGetInlineDocumentsOutput>()
  659    672   
        })
  660    673   
    };
  661    674   
    // Catch and record a Python traceback.
  662    675   
    result.map_err(|e| {
  663    676   
        let rich_py_err =
  664    677   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  665    678   
                e.clone_ref(py)
  666    679   
            }));
  667    680   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  668    681   
        e.into()
  669    682   
    })
  670    683   
}
  671    684   
         685  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  672    686   
/// Python handler for operation `OperationWithOptionalInputOutput`.
  673    687   
pub(crate) async fn operation_with_optional_input_output(
  674    688   
    input: crate::input::OperationWithOptionalInputOutputInput,
  675    689   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  676    690   
    handler: ::aws_smithy_http_server_python::PyHandler,
  677    691   
) -> std::result::Result<
  678    692   
    crate::output::OperationWithOptionalInputOutputOutput,
  679    693   
    crate::error::OperationWithOptionalInputOutputError,
  680    694   
> {
  681    695   
    // Async block used to run the handler and catch any Python error.
  682    696   
    let result = if handler.is_coroutine {
  683    697   
        ::tracing::trace!(
  684    698   
            name = "operation_with_optional_input_output",
  685    699   
            "executing python handler coroutine"
  686    700   
        );
  687    701   
        let result = ::pyo3::Python::with_gil(|py| {
  688    702   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  689    703   
            let coroutine = if handler.args == 1 {
  690    704   
                pyhandler.call1((input,))?
  691    705   
            } else {
  692    706   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  693    707   
            };
  694    708   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  695    709   
        })?;
  696    710   
        result.await.and_then(|r| {
  697    711   
            ::pyo3::Python::with_gil(|py| {
  698    712   
                r.extract::<crate::output::OperationWithOptionalInputOutputOutput>(py)
  699    713   
            })
  700    714   
        })
  701    715   
    } else {
  702    716   
        ::tracing::trace!(
  703    717   
            name = "operation_with_optional_input_output",
  704    718   
            "executing python handler function"
  705    719   
        );
  706    720   
        ::pyo3::Python::with_gil(|py| {
  707    721   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  708    722   
            let output = if handler.args == 1 {
  709    723   
                pyhandler.call1((input,))?
  710    724   
            } else {
  711    725   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  712    726   
            };
  713    727   
            output.extract::<crate::output::OperationWithOptionalInputOutputOutput>()
  714    728   
        })
  715    729   
    };
  716    730   
    // Catch and record a Python traceback.
  717    731   
    result.map_err(|e| {
  718    732   
        let rich_py_err =
  719    733   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  720    734   
                e.clone_ref(py)
  721    735   
            }));
  722    736   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  723    737   
        e.into()
  724    738   
    })
  725    739   
}
  726    740   
         741  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  727    742   
/// Python handler for operation `SimpleScalarProperties`.
  728    743   
pub(crate) async fn simple_scalar_properties(
  729    744   
    input: crate::input::SimpleScalarPropertiesInput,
  730    745   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  731    746   
    handler: ::aws_smithy_http_server_python::PyHandler,
  732    747   
) -> std::result::Result<
  733    748   
    crate::output::SimpleScalarPropertiesOutput,
  734    749   
    crate::error::SimpleScalarPropertiesError,
  735    750   
> {
  736    751   
    // Async block used to run the handler and catch any Python error.
  737    752   
    let result = if handler.is_coroutine {
  738    753   
        ::tracing::trace!(
  739    754   
            name = "simple_scalar_properties",
  740    755   
            "executing python handler coroutine"
  741    756   
        );
  742    757   
        let result = ::pyo3::Python::with_gil(|py| {
  743    758   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  744    759   
            let coroutine = if handler.args == 1 {
  745    760   
                pyhandler.call1((input,))?
  746    761   
            } else {
  747    762   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  748    763   
            };
  749    764   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  750    765   
        })?;
  751    766   
        result.await.and_then(|r| {
  752    767   
            ::pyo3::Python::with_gil(|py| {
  753    768   
                r.extract::<crate::output::SimpleScalarPropertiesOutput>(py)
  754    769   
            })
  755    770   
        })
  756    771   
    } else {
  757    772   
        ::tracing::trace!(
  758    773   
            name = "simple_scalar_properties",
  759    774   
            "executing python handler function"
  760    775   
        );
  761    776   
        ::pyo3::Python::with_gil(|py| {
  762    777   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  763    778   
            let output = if handler.args == 1 {
  764    779   
                pyhandler.call1((input,))?
  765    780   
            } else {
  766    781   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  767    782   
            };
  768    783   
            output.extract::<crate::output::SimpleScalarPropertiesOutput>()
  769    784   
        })
  770    785   
    };
  771    786   
    // Catch and record a Python traceback.
  772    787   
    result.map_err(|e| {
  773    788   
        let rich_py_err =
  774    789   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  775    790   
                e.clone_ref(py)
  776    791   
            }));
  777    792   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  778    793   
        e.into()
  779    794   
    })
  780    795   
}
  781    796   
         797  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  782    798   
/// Python handler for operation `KitchenSinkOperation`.
  783    799   
pub(crate) async fn kitchen_sink_operation(
  784    800   
    input: crate::input::KitchenSinkOperationInput,
  785    801   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  786    802   
    handler: ::aws_smithy_http_server_python::PyHandler,
  787    803   
) -> std::result::Result<
  788    804   
    crate::output::KitchenSinkOperationOutput,
  789    805   
    crate::error::KitchenSinkOperationError,
  790    806   
> {
  791    807   
    // Async block used to run the handler and catch any Python error.
  792    808   
    let result = if handler.is_coroutine {
  793    809   
        ::tracing::trace!(
  794    810   
            name = "kitchen_sink_operation",
  795    811   
            "executing python handler coroutine"
  796    812   
        );
  797    813   
        let result = ::pyo3::Python::with_gil(|py| {
  798    814   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  799    815   
            let coroutine = if handler.args == 1 {
  800    816   
                pyhandler.call1((input,))?
  801    817   
            } else {
  802    818   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  803    819   
            };
  804    820   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  805    821   
        })?;
  806    822   
        result.await.and_then(|r| {
  807    823   
            ::pyo3::Python::with_gil(|py| {
  808    824   
                r.extract::<crate::output::KitchenSinkOperationOutput>(py)
  809    825   
            })
  810    826   
        })
  811    827   
    } else {
  812    828   
        ::tracing::trace!(
  813    829   
            name = "kitchen_sink_operation",
  814    830   
            "executing python handler function"
  815    831   
        );
  816    832   
        ::pyo3::Python::with_gil(|py| {
  817    833   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  818    834   
            let output = if handler.args == 1 {
  819    835   
                pyhandler.call1((input,))?
  820    836   
            } else {
  821    837   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  822    838   
            };
  823    839   
            output.extract::<crate::output::KitchenSinkOperationOutput>()
  824    840   
        })
  825    841   
    };
  826    842   
    // Catch and record a Python traceback.
  827    843   
    result.map_err(|e| {
  828    844   
        let rich_py_err =
  829    845   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  830    846   
                e.clone_ref(py)
  831    847   
            }));
  832    848   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  833    849   
        e.into()
  834    850   
    })
  835    851   
}
  836    852   
         853  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  837    854   
/// Python handler for operation `EmptyOperation`.
  838    855   
pub(crate) async fn empty_operation(
  839    856   
    input: crate::input::EmptyOperationInput,
  840    857   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  841    858   
    handler: ::aws_smithy_http_server_python::PyHandler,
  842    859   
) -> std::result::Result<crate::output::EmptyOperationOutput, crate::error::EmptyOperationError> {
  843    860   
    // Async block used to run the handler and catch any Python error.
  844    861   
    let result = if handler.is_coroutine {
  845    862   
        ::tracing::trace!(
  846    863   
            name = "empty_operation",

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

@@ -1,1 +58,63 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* PythonApplicationGenerator.kt:386 */
    2      3   
#[allow(clippy::tabs_in_doc_comments)]
    3      4   
/// Main Python application, used to register operations and context and start multiple
    4      5   
/// workers on the same shared socket.
    5      6   
///
    6      7   
/// Operations can be registered using the application object as a decorator (`@app.operation_name`).
    7      8   
///
    8      9   
/// Here's a full example to get you started:
    9     10   
///
   10     11   
/// ```python
          12  +
/* PythonApplicationGenerator.kt:399 */
   11     13   
/// from json_rpc11 import input
   12     14   
/// from json_rpc11 import output
          15  +
/* PythonApplicationGenerator.kt:406 */
   13     16   
/// from json_rpc11 import error
          17  +
/* PythonApplicationGenerator.kt:408 */
   14     18   
/// from json_rpc11 import middleware
   15     19   
/// from json_rpc11 import App
   16     20   
///
   17     21   
/// @dataclass
   18     22   
/// class Context:
   19     23   
///     counter: int = 0
   20     24   
///
   21     25   
/// app = App()
   22     26   
/// app.context(Context())
   23     27   
///
   24     28   
/// @app.request_middleware
   25     29   
/// def request_middleware(request: middleware::Request):
   26     30   
///     if request.get_header("x-amzn-id") != "secret":
   27     31   
///         raise middleware.MiddlewareException("Unsupported `x-amz-id` header", 401)
   28     32   
///
          33  +
/* PythonApplicationGenerator.kt:441 */
   29     34   
/// # The example tests how servers must support requests
   30     35   
/// # containing a `Content-Type` header with parameters.
   31     36   
/// @app.content_type_parameters
   32     37   
/// def content_type_parameters(input: input::ContentTypeParametersInput, ctx: Context) -> output::ContentTypeParametersOutput:
   33     38   
///     raise NotImplementedError
   34     39   
///
   35     40   
/// @app.datetime_offsets
   36     41   
/// def datetime_offsets(input: input::DatetimeOffsetsInput, ctx: Context) -> output::DatetimeOffsetsOutput:
   37     42   
///     raise NotImplementedError
   38     43   
///
@@ -79,84 +465,500 @@
   99    104   
/// def put_with_content_encoding(input: input::PutWithContentEncodingInput, ctx: Context) -> output::PutWithContentEncodingOutput:
  100    105   
///     raise NotImplementedError
  101    106   
///
  102    107   
/// @app.simple_scalar_properties
  103    108   
/// def simple_scalar_properties(input: input::SimpleScalarPropertiesInput, ctx: Context) -> output::SimpleScalarPropertiesOutput:
  104    109   
///     raise NotImplementedError
  105    110   
///
  106    111   
/// @app.sparse_nulls_operation
  107    112   
/// def sparse_nulls_operation(input: input::SparseNullsOperationInput, ctx: Context) -> output::SparseNullsOperationOutput:
  108    113   
///     raise NotImplementedError
         114  +
/* PythonApplicationGenerator.kt:428 */
  109    115   
///
  110    116   
/// app.run()
  111    117   
/// ```
  112    118   
///
  113    119   
/// Any of operations above can be written as well prepending the `async` keyword and
  114    120   
/// the Python application will automatically handle it and schedule it on the event loop for you.
         121  +
/* PythonApplicationGenerator.kt:112 */
  115    122   
#[::pyo3::pyclass]
  116    123   
#[derive(Debug)]
  117    124   
/// :generic Ctx:
  118    125   
/// :extends typing.Generic\[Ctx\]:
  119    126   
/// :rtype None:
  120    127   
pub struct App {
  121    128   
    handlers: ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler>,
  122    129   
    middlewares: Vec<::aws_smithy_http_server_python::PyMiddlewareHandler>,
  123    130   
    context: Option<::pyo3::PyObject>,
  124    131   
    workers: ::parking_lot::Mutex<Vec<::pyo3::PyObject>>,
  125    132   
}
         133  +
/* PythonApplicationGenerator.kt:149 */
  126    134   
impl Default for App {
  127    135   
    fn default() -> Self {
  128    136   
        Self {
  129    137   
            handlers: Default::default(),
  130    138   
            middlewares: vec![],
  131    139   
            context: None,
  132    140   
            workers: ::parking_lot::Mutex::new(vec![]),
  133    141   
        }
  134    142   
    }
  135    143   
}
         144  +
/* PythonApplicationGenerator.kt:131 */
  136    145   
impl Clone for App {
  137    146   
    fn clone(&self) -> Self {
  138    147   
        Self {
  139    148   
            handlers: self.handlers.clone(),
  140    149   
            middlewares: self.middlewares.clone(),
  141    150   
            context: self.context.clone(),
  142    151   
            workers: ::parking_lot::Mutex::new(vec![]),
  143    152   
        }
  144    153   
    }
  145    154   
}
         155  +
/* PythonApplicationGenerator.kt:168 */
  146    156   
impl ::aws_smithy_http_server_python::PyApp for App {
         157  +
    /* PythonApplicationGenerator.kt:174 */
  147    158   
    fn workers(&self) -> &::parking_lot::Mutex<Vec<::pyo3::PyObject>> {
  148    159   
        &self.workers
  149    160   
    }
  150    161   
    fn context(&self) -> &Option<::pyo3::PyObject> {
  151    162   
        &self.context
  152    163   
    }
  153    164   
    fn handlers(
  154    165   
        &mut self,
  155    166   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
  156    167   
        &mut self.handlers
  157    168   
    }
         169  +
    /* PythonApplicationGenerator.kt:189 */
  158    170   
    fn build_service(
  159    171   
        &mut self,
  160    172   
        event_loop: &::pyo3::PyAny,
  161    173   
    ) -> ::pyo3::PyResult<
  162    174   
        ::tower::util::BoxCloneService<
  163    175   
            ::http::Request<::aws_smithy_http_server::body::Body>,
  164    176   
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
  165    177   
            std::convert::Infallible,
  166    178   
        >,
  167    179   
    > {
         180  +
        /* PythonApplicationGenerator.kt:201 */
  168    181   
        let builder = crate::service::JsonProtocol::builder_without_plugins();
         182  +
        /* PythonApplicationGenerator.kt:209 */
  169    183   
        let content_type_parameters_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  170    184   
        let handler = self
  171    185   
            .handlers
  172    186   
            .get("content_type_parameters")
  173    187   
            .expect("Python handler for operation `content_type_parameters` not found")
  174    188   
            .clone();
  175    189   
        let builder = builder.content_type_parameters(move |input, state| {
  176    190   
            ::pyo3_asyncio::tokio::scope(
  177    191   
                content_type_parameters_locals.clone(),
  178    192   
                crate::python_operation_adaptor::content_type_parameters(
  179    193   
                    input,
  180    194   
                    state,
  181    195   
                    handler.clone(),
  182    196   
                ),
  183    197   
            )
  184    198   
        });
         199  +
        /* PythonApplicationGenerator.kt:209 */
  185    200   
        let datetime_offsets_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  186    201   
        let handler = self
  187    202   
            .handlers
  188    203   
            .get("datetime_offsets")
  189    204   
            .expect("Python handler for operation `datetime_offsets` not found")
  190    205   
            .clone();
  191    206   
        let builder = builder.datetime_offsets(move |input, state| {
  192    207   
            ::pyo3_asyncio::tokio::scope(
  193    208   
                datetime_offsets_locals.clone(),
  194    209   
                crate::python_operation_adaptor::datetime_offsets(input, state, handler.clone()),
  195    210   
            )
  196    211   
        });
         212  +
        /* PythonApplicationGenerator.kt:209 */
  197    213   
        let empty_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  198    214   
        let handler = self
  199    215   
            .handlers
  200    216   
            .get("empty_operation")
  201    217   
            .expect("Python handler for operation `empty_operation` not found")
  202    218   
            .clone();
  203    219   
        let builder = builder.empty_operation(move |input, state| {
  204    220   
            ::pyo3_asyncio::tokio::scope(
  205    221   
                empty_operation_locals.clone(),
  206    222   
                crate::python_operation_adaptor::empty_operation(input, state, handler.clone()),
  207    223   
            )
  208    224   
        });
         225  +
        /* PythonApplicationGenerator.kt:209 */
  209    226   
        let endpoint_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  210    227   
        let handler = self
  211    228   
            .handlers
  212    229   
            .get("endpoint_operation")
  213    230   
            .expect("Python handler for operation `endpoint_operation` not found")
  214    231   
            .clone();
  215    232   
        let builder = builder.endpoint_operation(move |input, state| {
  216    233   
            ::pyo3_asyncio::tokio::scope(
  217    234   
                endpoint_operation_locals.clone(),
  218    235   
                crate::python_operation_adaptor::endpoint_operation(input, state, handler.clone()),
  219    236   
            )
  220    237   
        });
         238  +
        /* PythonApplicationGenerator.kt:209 */
  221    239   
        let endpoint_with_host_label_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  222    240   
        let handler = self
  223    241   
            .handlers
  224    242   
            .get("endpoint_with_host_label_operation")
  225    243   
            .expect("Python handler for operation `endpoint_with_host_label_operation` not found")
  226    244   
            .clone();
  227    245   
        let builder = builder.endpoint_with_host_label_operation(move |input, state| {
  228    246   
            ::pyo3_asyncio::tokio::scope(
  229    247   
                endpoint_with_host_label_operation_locals.clone(),
  230    248   
                crate::python_operation_adaptor::endpoint_with_host_label_operation(
  231    249   
                    input,
  232    250   
                    state,
  233    251   
                    handler.clone(),
  234    252   
                ),
  235    253   
            )
  236    254   
        });
         255  +
        /* PythonApplicationGenerator.kt:209 */
  237    256   
        let fractional_seconds_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  238    257   
        let handler = self
  239    258   
            .handlers
  240    259   
            .get("fractional_seconds")
  241    260   
            .expect("Python handler for operation `fractional_seconds` not found")
  242    261   
            .clone();
  243    262   
        let builder = builder.fractional_seconds(move |input, state| {
  244    263   
            ::pyo3_asyncio::tokio::scope(
  245    264   
                fractional_seconds_locals.clone(),
  246    265   
                crate::python_operation_adaptor::fractional_seconds(input, state, handler.clone()),
  247    266   
            )
  248    267   
        });
         268  +
        /* PythonApplicationGenerator.kt:209 */
  249    269   
        let greeting_with_errors_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  250    270   
        let handler = self
  251    271   
            .handlers
  252    272   
            .get("greeting_with_errors")
  253    273   
            .expect("Python handler for operation `greeting_with_errors` not found")
  254    274   
            .clone();
  255    275   
        let builder = builder.greeting_with_errors(move |input, state| {
  256    276   
            ::pyo3_asyncio::tokio::scope(
  257    277   
                greeting_with_errors_locals.clone(),
  258    278   
                crate::python_operation_adaptor::greeting_with_errors(
  259    279   
                    input,
  260    280   
                    state,
  261    281   
                    handler.clone(),
  262    282   
                ),
  263    283   
            )
  264    284   
        });
         285  +
        /* PythonApplicationGenerator.kt:209 */
  265    286   
        let host_with_path_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  266    287   
        let handler = self
  267    288   
            .handlers
  268    289   
            .get("host_with_path_operation")
  269    290   
            .expect("Python handler for operation `host_with_path_operation` not found")
  270    291   
            .clone();
  271    292   
        let builder = builder.host_with_path_operation(move |input, state| {
  272    293   
            ::pyo3_asyncio::tokio::scope(
  273    294   
                host_with_path_operation_locals.clone(),
  274    295   
                crate::python_operation_adaptor::host_with_path_operation(
  275    296   
                    input,
  276    297   
                    state,
  277    298   
                    handler.clone(),
  278    299   
                ),
  279    300   
            )
  280    301   
        });
         302  +
        /* PythonApplicationGenerator.kt:209 */
  281    303   
        let json_enums_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  282    304   
        let handler = self
  283    305   
            .handlers
  284    306   
            .get("json_enums")
  285    307   
            .expect("Python handler for operation `json_enums` not found")
  286    308   
            .clone();
  287    309   
        let builder = builder.json_enums(move |input, state| {
  288    310   
            ::pyo3_asyncio::tokio::scope(
  289    311   
                json_enums_locals.clone(),
  290    312   
                crate::python_operation_adaptor::json_enums(input, state, handler.clone()),
  291    313   
            )
  292    314   
        });
         315  +
        /* PythonApplicationGenerator.kt:209 */
  293    316   
        let json_unions_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  294    317   
        let handler = self
  295    318   
            .handlers
  296    319   
            .get("json_unions")
  297    320   
            .expect("Python handler for operation `json_unions` not found")
  298    321   
            .clone();
  299    322   
        let builder = builder.json_unions(move |input, state| {
  300    323   
            ::pyo3_asyncio::tokio::scope(
  301    324   
                json_unions_locals.clone(),
  302    325   
                crate::python_operation_adaptor::json_unions(input, state, handler.clone()),
  303    326   
            )
  304    327   
        });
         328  +
        /* PythonApplicationGenerator.kt:209 */
  305    329   
        let kitchen_sink_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  306    330   
        let handler = self
  307    331   
            .handlers
  308    332   
            .get("kitchen_sink_operation")
  309    333   
            .expect("Python handler for operation `kitchen_sink_operation` not found")
  310    334   
            .clone();
  311    335   
        let builder = builder.kitchen_sink_operation(move |input, state| {
  312    336   
            ::pyo3_asyncio::tokio::scope(
  313    337   
                kitchen_sink_operation_locals.clone(),
  314    338   
                crate::python_operation_adaptor::kitchen_sink_operation(
  315    339   
                    input,
  316    340   
                    state,
  317    341   
                    handler.clone(),
  318    342   
                ),
  319    343   
            )
  320    344   
        });
         345  +
        /* PythonApplicationGenerator.kt:209 */
  321    346   
        let null_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  322    347   
        let handler = self
  323    348   
            .handlers
  324    349   
            .get("null_operation")
  325    350   
            .expect("Python handler for operation `null_operation` not found")
  326    351   
            .clone();
  327    352   
        let builder = builder.null_operation(move |input, state| {
  328    353   
            ::pyo3_asyncio::tokio::scope(
  329    354   
                null_operation_locals.clone(),
  330    355   
                crate::python_operation_adaptor::null_operation(input, state, handler.clone()),
  331    356   
            )
  332    357   
        });
         358  +
        /* PythonApplicationGenerator.kt:209 */
  333    359   
        let operation_with_optional_input_output_locals =
  334    360   
            ::pyo3_asyncio::TaskLocals::new(event_loop);
  335    361   
        let handler = self
  336    362   
            .handlers
  337    363   
            .get("operation_with_optional_input_output")
  338    364   
            .expect("Python handler for operation `operation_with_optional_input_output` not found")
  339    365   
            .clone();
  340    366   
        let builder = builder.operation_with_optional_input_output(move |input, state| {
  341    367   
            ::pyo3_asyncio::tokio::scope(
  342    368   
                operation_with_optional_input_output_locals.clone(),
  343    369   
                crate::python_operation_adaptor::operation_with_optional_input_output(
  344    370   
                    input,
  345    371   
                    state,
  346    372   
                    handler.clone(),
  347    373   
                ),
  348    374   
            )
  349    375   
        });
         376  +
        /* PythonApplicationGenerator.kt:209 */
  350    377   
        let put_and_get_inline_documents_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  351    378   
        let handler = self
  352    379   
            .handlers
  353    380   
            .get("put_and_get_inline_documents")
  354    381   
            .expect("Python handler for operation `put_and_get_inline_documents` not found")
  355    382   
            .clone();
  356    383   
        let builder = builder.put_and_get_inline_documents(move |input, state| {
  357    384   
            ::pyo3_asyncio::tokio::scope(
  358    385   
                put_and_get_inline_documents_locals.clone(),
  359    386   
                crate::python_operation_adaptor::put_and_get_inline_documents(
  360    387   
                    input,
  361    388   
                    state,
  362    389   
                    handler.clone(),
  363    390   
                ),
  364    391   
            )
  365    392   
        });
         393  +
        /* PythonApplicationGenerator.kt:209 */
  366    394   
        let put_with_content_encoding_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  367    395   
        let handler = self
  368    396   
            .handlers
  369    397   
            .get("put_with_content_encoding")
  370    398   
            .expect("Python handler for operation `put_with_content_encoding` not found")
  371    399   
            .clone();
  372    400   
        let builder = builder.put_with_content_encoding(move |input, state| {
  373    401   
            ::pyo3_asyncio::tokio::scope(
  374    402   
                put_with_content_encoding_locals.clone(),
  375    403   
                crate::python_operation_adaptor::put_with_content_encoding(
  376    404   
                    input,
  377    405   
                    state,
  378    406   
                    handler.clone(),
  379    407   
                ),
  380    408   
            )
  381    409   
        });
         410  +
        /* PythonApplicationGenerator.kt:209 */
  382    411   
        let simple_scalar_properties_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  383    412   
        let handler = self
  384    413   
            .handlers
  385    414   
            .get("simple_scalar_properties")
  386    415   
            .expect("Python handler for operation `simple_scalar_properties` not found")
  387    416   
            .clone();
  388    417   
        let builder = builder.simple_scalar_properties(move |input, state| {
  389    418   
            ::pyo3_asyncio::tokio::scope(
  390    419   
                simple_scalar_properties_locals.clone(),
  391    420   
                crate::python_operation_adaptor::simple_scalar_properties(
  392    421   
                    input,
  393    422   
                    state,
  394    423   
                    handler.clone(),
  395    424   
                ),
  396    425   
            )
  397    426   
        });
         427  +
        /* PythonApplicationGenerator.kt:209 */
  398    428   
        let sparse_nulls_operation_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  399    429   
        let handler = self
  400    430   
            .handlers
  401    431   
            .get("sparse_nulls_operation")
  402    432   
            .expect("Python handler for operation `sparse_nulls_operation` not found")
  403    433   
            .clone();
  404    434   
        let builder = builder.sparse_nulls_operation(move |input, state| {
  405    435   
            ::pyo3_asyncio::tokio::scope(
  406    436   
                sparse_nulls_operation_locals.clone(),
  407    437   
                crate::python_operation_adaptor::sparse_nulls_operation(
  408    438   
                    input,
  409    439   
                    state,
  410    440   
                    handler.clone(),
  411    441   
                ),
  412    442   
            )
  413    443   
        });
         444  +
        /* PythonApplicationGenerator.kt:220 */
  414    445   
        let mut service = ::tower::util::BoxCloneService::new(builder.build().expect("one or more operations do not have a registered handler; this is a bug in the Python code generator, please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"));
  415    446   
  416    447   
        {
  417    448   
            use ::tower::Layer;
  418    449   
            ::tracing::trace!("adding middlewares to rust python router");
  419    450   
            let mut middlewares = self.middlewares.clone();
  420    451   
            // Reverse the middlewares, so they run with same order as they defined
  421    452   
            middlewares.reverse();
  422    453   
            for handler in middlewares {
  423    454   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  424    455   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  425    456   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  426    457   
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  427    458   
                >::new(handler, locals);
  428    459   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  429    460   
            }
  430    461   
        }
  431    462   
        Ok(service)
         463  +
        /* PythonApplicationGenerator.kt:189 */
  432    464   
    }
         465  +
    /* PythonApplicationGenerator.kt:168 */
  433    466   
}
         467  +
/* PythonApplicationGenerator.kt:247 */
  434    468   
#[::pyo3::pymethods]
  435    469   
impl App {
         470  +
    /* PythonApplicationGenerator.kt:260 */
  436    471   
    /// Create a new [App].
  437    472   
    #[new]
  438    473   
    pub fn new() -> Self {
  439    474   
        Self::default()
  440    475   
    }
  441    476   
  442    477   
    /// Register a context object that will be shared between handlers.
  443    478   
    ///
  444    479   
    /// :param context Ctx:
  445    480   
    /// :rtype None:
@@ -488,523 +756,809 @@
  508    543   
        py: pyo3::Python,
  509    544   
        socket: &pyo3::PyCell<::aws_smithy_http_server_python::PySocket>,
  510    545   
        worker_number: isize,
  511    546   
        tls: Option<::aws_smithy_http_server_python::tls::PyTlsConfig>,
  512    547   
    ) -> pyo3::PyResult<()> {
  513    548   
        use ::aws_smithy_http_server_python::PyApp;
  514    549   
        let event_loop = self.configure_python_event_loop(py)?;
  515    550   
        let service = self.build_and_configure_service(py, event_loop)?;
  516    551   
        self.start_hyper_worker(py, socket, event_loop, service, worker_number, tls)
  517    552   
    }
         553  +
    /* PythonApplicationGenerator.kt:366 */
  518    554   
    /// Method to register `content_type_parameters` Python implementation inside the handlers map.
  519    555   
    /// It can be used as a function decorator in Python.
  520    556   
    ///
  521    557   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.ContentTypeParametersInput, Ctx\], typing.Union\[json_rpc11.output.ContentTypeParametersOutput, typing.Awaitable\[json_rpc11.output.ContentTypeParametersOutput\]\]\], typing.Callable\[\[json_rpc11.input.ContentTypeParametersInput\], typing.Union\[json_rpc11.output.ContentTypeParametersOutput, typing.Awaitable\[json_rpc11.output.ContentTypeParametersOutput\]\]\]\]:
  522    558   
    /// :rtype None:
  523    559   
    #[pyo3(text_signature = "($self, func)")]
  524    560   
    pub fn content_type_parameters(
  525    561   
        &mut self,
  526    562   
        py: ::pyo3::Python,
  527    563   
        func: ::pyo3::PyObject,
  528    564   
    ) -> ::pyo3::PyResult<()> {
  529    565   
        use ::aws_smithy_http_server_python::PyApp;
  530    566   
        self.register_operation(py, "content_type_parameters", func)
  531    567   
    }
         568  +
    /* PythonApplicationGenerator.kt:366 */
  532    569   
    /// Method to register `datetime_offsets` Python implementation inside the handlers map.
  533    570   
    /// It can be used as a function decorator in Python.
  534    571   
    ///
  535    572   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.DatetimeOffsetsInput, Ctx\], typing.Union\[json_rpc11.output.DatetimeOffsetsOutput, typing.Awaitable\[json_rpc11.output.DatetimeOffsetsOutput\]\]\], typing.Callable\[\[json_rpc11.input.DatetimeOffsetsInput\], typing.Union\[json_rpc11.output.DatetimeOffsetsOutput, typing.Awaitable\[json_rpc11.output.DatetimeOffsetsOutput\]\]\]\]:
  536    573   
    /// :rtype None:
  537    574   
    #[pyo3(text_signature = "($self, func)")]
  538    575   
    pub fn datetime_offsets(
  539    576   
        &mut self,
  540    577   
        py: ::pyo3::Python,
  541    578   
        func: ::pyo3::PyObject,
  542    579   
    ) -> ::pyo3::PyResult<()> {
  543    580   
        use ::aws_smithy_http_server_python::PyApp;
  544    581   
        self.register_operation(py, "datetime_offsets", func)
  545    582   
    }
         583  +
    /* PythonApplicationGenerator.kt:366 */
  546    584   
    /// Method to register `empty_operation` Python implementation inside the handlers map.
  547    585   
    /// It can be used as a function decorator in Python.
  548    586   
    ///
  549    587   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.EmptyOperationInput, Ctx\], typing.Union\[json_rpc11.output.EmptyOperationOutput, typing.Awaitable\[json_rpc11.output.EmptyOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.EmptyOperationInput\], typing.Union\[json_rpc11.output.EmptyOperationOutput, typing.Awaitable\[json_rpc11.output.EmptyOperationOutput\]\]\]\]:
  550    588   
    /// :rtype None:
  551    589   
    #[pyo3(text_signature = "($self, func)")]
  552    590   
    pub fn empty_operation(
  553    591   
        &mut self,
  554    592   
        py: ::pyo3::Python,
  555    593   
        func: ::pyo3::PyObject,
  556    594   
    ) -> ::pyo3::PyResult<()> {
  557    595   
        use ::aws_smithy_http_server_python::PyApp;
  558    596   
        self.register_operation(py, "empty_operation", func)
  559    597   
    }
         598  +
    /* PythonApplicationGenerator.kt:366 */
  560    599   
    /// Method to register `endpoint_operation` Python implementation inside the handlers map.
  561    600   
    /// It can be used as a function decorator in Python.
  562    601   
    ///
  563    602   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.EndpointOperationInput, Ctx\], typing.Union\[json_rpc11.output.EndpointOperationOutput, typing.Awaitable\[json_rpc11.output.EndpointOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.EndpointOperationInput\], typing.Union\[json_rpc11.output.EndpointOperationOutput, typing.Awaitable\[json_rpc11.output.EndpointOperationOutput\]\]\]\]:
  564    603   
    /// :rtype None:
  565    604   
    #[pyo3(text_signature = "($self, func)")]
  566    605   
    pub fn endpoint_operation(
  567    606   
        &mut self,
  568    607   
        py: ::pyo3::Python,
  569    608   
        func: ::pyo3::PyObject,
  570    609   
    ) -> ::pyo3::PyResult<()> {
  571    610   
        use ::aws_smithy_http_server_python::PyApp;
  572    611   
        self.register_operation(py, "endpoint_operation", func)
  573    612   
    }
         613  +
    /* PythonApplicationGenerator.kt:366 */
  574    614   
    /// Method to register `endpoint_with_host_label_operation` Python implementation inside the handlers map.
  575    615   
    /// It can be used as a function decorator in Python.
  576    616   
    ///
  577    617   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.EndpointWithHostLabelOperationInput, Ctx\], typing.Union\[json_rpc11.output.EndpointWithHostLabelOperationOutput, typing.Awaitable\[json_rpc11.output.EndpointWithHostLabelOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.EndpointWithHostLabelOperationInput\], typing.Union\[json_rpc11.output.EndpointWithHostLabelOperationOutput, typing.Awaitable\[json_rpc11.output.EndpointWithHostLabelOperationOutput\]\]\]\]:
  578    618   
    /// :rtype None:
  579    619   
    #[pyo3(text_signature = "($self, func)")]
  580    620   
    pub fn endpoint_with_host_label_operation(
  581    621   
        &mut self,
  582    622   
        py: ::pyo3::Python,
  583    623   
        func: ::pyo3::PyObject,
  584    624   
    ) -> ::pyo3::PyResult<()> {
  585    625   
        use ::aws_smithy_http_server_python::PyApp;
  586    626   
        self.register_operation(py, "endpoint_with_host_label_operation", func)
  587    627   
    }
         628  +
    /* PythonApplicationGenerator.kt:366 */
  588    629   
    /// Method to register `fractional_seconds` Python implementation inside the handlers map.
  589    630   
    /// It can be used as a function decorator in Python.
  590    631   
    ///
  591    632   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.FractionalSecondsInput, Ctx\], typing.Union\[json_rpc11.output.FractionalSecondsOutput, typing.Awaitable\[json_rpc11.output.FractionalSecondsOutput\]\]\], typing.Callable\[\[json_rpc11.input.FractionalSecondsInput\], typing.Union\[json_rpc11.output.FractionalSecondsOutput, typing.Awaitable\[json_rpc11.output.FractionalSecondsOutput\]\]\]\]:
  592    633   
    /// :rtype None:
  593    634   
    #[pyo3(text_signature = "($self, func)")]
  594    635   
    pub fn fractional_seconds(
  595    636   
        &mut self,
  596    637   
        py: ::pyo3::Python,
  597    638   
        func: ::pyo3::PyObject,
  598    639   
    ) -> ::pyo3::PyResult<()> {
  599    640   
        use ::aws_smithy_http_server_python::PyApp;
  600    641   
        self.register_operation(py, "fractional_seconds", func)
  601    642   
    }
         643  +
    /* PythonApplicationGenerator.kt:366 */
  602    644   
    /// Method to register `greeting_with_errors` Python implementation inside the handlers map.
  603    645   
    /// It can be used as a function decorator in Python.
  604    646   
    ///
  605    647   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.GreetingWithErrorsInput, Ctx\], typing.Union\[json_rpc11.output.GreetingWithErrorsOutput, typing.Awaitable\[json_rpc11.output.GreetingWithErrorsOutput\]\]\], typing.Callable\[\[json_rpc11.input.GreetingWithErrorsInput\], typing.Union\[json_rpc11.output.GreetingWithErrorsOutput, typing.Awaitable\[json_rpc11.output.GreetingWithErrorsOutput\]\]\]\]:
  606    648   
    /// :rtype None:
  607    649   
    #[pyo3(text_signature = "($self, func)")]
  608    650   
    pub fn greeting_with_errors(
  609    651   
        &mut self,
  610    652   
        py: ::pyo3::Python,
  611    653   
        func: ::pyo3::PyObject,
  612    654   
    ) -> ::pyo3::PyResult<()> {
  613    655   
        use ::aws_smithy_http_server_python::PyApp;
  614    656   
        self.register_operation(py, "greeting_with_errors", func)
  615    657   
    }
         658  +
    /* PythonApplicationGenerator.kt:366 */
  616    659   
    /// Method to register `host_with_path_operation` Python implementation inside the handlers map.
  617    660   
    /// It can be used as a function decorator in Python.
  618    661   
    ///
  619    662   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.HostWithPathOperationInput, Ctx\], typing.Union\[json_rpc11.output.HostWithPathOperationOutput, typing.Awaitable\[json_rpc11.output.HostWithPathOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.HostWithPathOperationInput\], typing.Union\[json_rpc11.output.HostWithPathOperationOutput, typing.Awaitable\[json_rpc11.output.HostWithPathOperationOutput\]\]\]\]:
  620    663   
    /// :rtype None:
  621    664   
    #[pyo3(text_signature = "($self, func)")]
  622    665   
    pub fn host_with_path_operation(
  623    666   
        &mut self,
  624    667   
        py: ::pyo3::Python,
  625    668   
        func: ::pyo3::PyObject,
  626    669   
    ) -> ::pyo3::PyResult<()> {
  627    670   
        use ::aws_smithy_http_server_python::PyApp;
  628    671   
        self.register_operation(py, "host_with_path_operation", func)
  629    672   
    }
         673  +
    /* PythonApplicationGenerator.kt:366 */
  630    674   
    /// Method to register `json_enums` Python implementation inside the handlers map.
  631    675   
    /// It can be used as a function decorator in Python.
  632    676   
    ///
  633    677   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.JsonEnumsInput, Ctx\], typing.Union\[json_rpc11.output.JsonEnumsOutput, typing.Awaitable\[json_rpc11.output.JsonEnumsOutput\]\]\], typing.Callable\[\[json_rpc11.input.JsonEnumsInput\], typing.Union\[json_rpc11.output.JsonEnumsOutput, typing.Awaitable\[json_rpc11.output.JsonEnumsOutput\]\]\]\]:
  634    678   
    /// :rtype None:
  635    679   
    #[pyo3(text_signature = "($self, func)")]
  636    680   
    pub fn json_enums(
  637    681   
        &mut self,
  638    682   
        py: ::pyo3::Python,
  639    683   
        func: ::pyo3::PyObject,
  640    684   
    ) -> ::pyo3::PyResult<()> {
  641    685   
        use ::aws_smithy_http_server_python::PyApp;
  642    686   
        self.register_operation(py, "json_enums", func)
  643    687   
    }
         688  +
    /* PythonApplicationGenerator.kt:366 */
  644    689   
    /// Method to register `json_unions` Python implementation inside the handlers map.
  645    690   
    /// It can be used as a function decorator in Python.
  646    691   
    ///
  647    692   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.JsonUnionsInput, Ctx\], typing.Union\[json_rpc11.output.JsonUnionsOutput, typing.Awaitable\[json_rpc11.output.JsonUnionsOutput\]\]\], typing.Callable\[\[json_rpc11.input.JsonUnionsInput\], typing.Union\[json_rpc11.output.JsonUnionsOutput, typing.Awaitable\[json_rpc11.output.JsonUnionsOutput\]\]\]\]:
  648    693   
    /// :rtype None:
  649    694   
    #[pyo3(text_signature = "($self, func)")]
  650    695   
    pub fn json_unions(
  651    696   
        &mut self,
  652    697   
        py: ::pyo3::Python,
  653    698   
        func: ::pyo3::PyObject,
  654    699   
    ) -> ::pyo3::PyResult<()> {
  655    700   
        use ::aws_smithy_http_server_python::PyApp;
  656    701   
        self.register_operation(py, "json_unions", func)
  657    702   
    }
         703  +
    /* PythonApplicationGenerator.kt:366 */
  658    704   
    /// Method to register `kitchen_sink_operation` Python implementation inside the handlers map.
  659    705   
    /// It can be used as a function decorator in Python.
  660    706   
    ///
  661    707   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.KitchenSinkOperationInput, Ctx\], typing.Union\[json_rpc11.output.KitchenSinkOperationOutput, typing.Awaitable\[json_rpc11.output.KitchenSinkOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.KitchenSinkOperationInput\], typing.Union\[json_rpc11.output.KitchenSinkOperationOutput, typing.Awaitable\[json_rpc11.output.KitchenSinkOperationOutput\]\]\]\]:
  662    708   
    /// :rtype None:
  663    709   
    #[pyo3(text_signature = "($self, func)")]
  664    710   
    pub fn kitchen_sink_operation(
  665    711   
        &mut self,
  666    712   
        py: ::pyo3::Python,
  667    713   
        func: ::pyo3::PyObject,
  668    714   
    ) -> ::pyo3::PyResult<()> {
  669    715   
        use ::aws_smithy_http_server_python::PyApp;
  670    716   
        self.register_operation(py, "kitchen_sink_operation", func)
  671    717   
    }
         718  +
    /* PythonApplicationGenerator.kt:366 */
  672    719   
    /// Method to register `null_operation` Python implementation inside the handlers map.
  673    720   
    /// It can be used as a function decorator in Python.
  674    721   
    ///
  675    722   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.NullOperationInput, Ctx\], typing.Union\[json_rpc11.output.NullOperationOutput, typing.Awaitable\[json_rpc11.output.NullOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.NullOperationInput\], typing.Union\[json_rpc11.output.NullOperationOutput, typing.Awaitable\[json_rpc11.output.NullOperationOutput\]\]\]\]:
  676    723   
    /// :rtype None:
  677    724   
    #[pyo3(text_signature = "($self, func)")]
  678    725   
    pub fn null_operation(
  679    726   
        &mut self,
  680    727   
        py: ::pyo3::Python,
  681    728   
        func: ::pyo3::PyObject,
  682    729   
    ) -> ::pyo3::PyResult<()> {
  683    730   
        use ::aws_smithy_http_server_python::PyApp;
  684    731   
        self.register_operation(py, "null_operation", func)
  685    732   
    }
         733  +
    /* PythonApplicationGenerator.kt:366 */
  686    734   
    /// Method to register `operation_with_optional_input_output` Python implementation inside the handlers map.
  687    735   
    /// It can be used as a function decorator in Python.
  688    736   
    ///
  689    737   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.OperationWithOptionalInputOutputInput, Ctx\], typing.Union\[json_rpc11.output.OperationWithOptionalInputOutputOutput, typing.Awaitable\[json_rpc11.output.OperationWithOptionalInputOutputOutput\]\]\], typing.Callable\[\[json_rpc11.input.OperationWithOptionalInputOutputInput\], typing.Union\[json_rpc11.output.OperationWithOptionalInputOutputOutput, typing.Awaitable\[json_rpc11.output.OperationWithOptionalInputOutputOutput\]\]\]\]:
  690    738   
    /// :rtype None:
  691    739   
    #[pyo3(text_signature = "($self, func)")]
  692    740   
    pub fn operation_with_optional_input_output(
  693    741   
        &mut self,
  694    742   
        py: ::pyo3::Python,
  695    743   
        func: ::pyo3::PyObject,
  696    744   
    ) -> ::pyo3::PyResult<()> {
  697    745   
        use ::aws_smithy_http_server_python::PyApp;
  698    746   
        self.register_operation(py, "operation_with_optional_input_output", func)
  699    747   
    }
         748  +
    /* PythonApplicationGenerator.kt:366 */
  700    749   
    /// Method to register `put_and_get_inline_documents` Python implementation inside the handlers map.
  701    750   
    /// It can be used as a function decorator in Python.
  702    751   
    ///
  703    752   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.PutAndGetInlineDocumentsInput, Ctx\], typing.Union\[json_rpc11.output.PutAndGetInlineDocumentsOutput, typing.Awaitable\[json_rpc11.output.PutAndGetInlineDocumentsOutput\]\]\], typing.Callable\[\[json_rpc11.input.PutAndGetInlineDocumentsInput\], typing.Union\[json_rpc11.output.PutAndGetInlineDocumentsOutput, typing.Awaitable\[json_rpc11.output.PutAndGetInlineDocumentsOutput\]\]\]\]:
  704    753   
    /// :rtype None:
  705    754   
    #[pyo3(text_signature = "($self, func)")]
  706    755   
    pub fn put_and_get_inline_documents(
  707    756   
        &mut self,
  708    757   
        py: ::pyo3::Python,
  709    758   
        func: ::pyo3::PyObject,
  710    759   
    ) -> ::pyo3::PyResult<()> {
  711    760   
        use ::aws_smithy_http_server_python::PyApp;
  712    761   
        self.register_operation(py, "put_and_get_inline_documents", func)
  713    762   
    }
         763  +
    /* PythonApplicationGenerator.kt:366 */
  714    764   
    /// Method to register `put_with_content_encoding` Python implementation inside the handlers map.
  715    765   
    /// It can be used as a function decorator in Python.
  716    766   
    ///
  717    767   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.PutWithContentEncodingInput, Ctx\], typing.Union\[json_rpc11.output.PutWithContentEncodingOutput, typing.Awaitable\[json_rpc11.output.PutWithContentEncodingOutput\]\]\], typing.Callable\[\[json_rpc11.input.PutWithContentEncodingInput\], typing.Union\[json_rpc11.output.PutWithContentEncodingOutput, typing.Awaitable\[json_rpc11.output.PutWithContentEncodingOutput\]\]\]\]:
  718    768   
    /// :rtype None:
  719    769   
    #[pyo3(text_signature = "($self, func)")]
  720    770   
    pub fn put_with_content_encoding(
  721    771   
        &mut self,
  722    772   
        py: ::pyo3::Python,
  723    773   
        func: ::pyo3::PyObject,
  724    774   
    ) -> ::pyo3::PyResult<()> {
  725    775   
        use ::aws_smithy_http_server_python::PyApp;
  726    776   
        self.register_operation(py, "put_with_content_encoding", func)
  727    777   
    }
         778  +
    /* PythonApplicationGenerator.kt:366 */
  728    779   
    /// Method to register `simple_scalar_properties` Python implementation inside the handlers map.
  729    780   
    /// It can be used as a function decorator in Python.
  730    781   
    ///
  731    782   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.SimpleScalarPropertiesInput, Ctx\], typing.Union\[json_rpc11.output.SimpleScalarPropertiesOutput, typing.Awaitable\[json_rpc11.output.SimpleScalarPropertiesOutput\]\]\], typing.Callable\[\[json_rpc11.input.SimpleScalarPropertiesInput\], typing.Union\[json_rpc11.output.SimpleScalarPropertiesOutput, typing.Awaitable\[json_rpc11.output.SimpleScalarPropertiesOutput\]\]\]\]:
  732    783   
    /// :rtype None:
  733    784   
    #[pyo3(text_signature = "($self, func)")]
  734    785   
    pub fn simple_scalar_properties(
  735    786   
        &mut self,
  736    787   
        py: ::pyo3::Python,
  737    788   
        func: ::pyo3::PyObject,
  738    789   
    ) -> ::pyo3::PyResult<()> {
  739    790   
        use ::aws_smithy_http_server_python::PyApp;
  740    791   
        self.register_operation(py, "simple_scalar_properties", func)
  741    792   
    }
         793  +
    /* PythonApplicationGenerator.kt:366 */
  742    794   
    /// Method to register `sparse_nulls_operation` Python implementation inside the handlers map.
  743    795   
    /// It can be used as a function decorator in Python.
  744    796   
    ///
  745    797   
    /// :param func typing.Union\[typing.Callable\[\[json_rpc11.input.SparseNullsOperationInput, Ctx\], typing.Union\[json_rpc11.output.SparseNullsOperationOutput, typing.Awaitable\[json_rpc11.output.SparseNullsOperationOutput\]\]\], typing.Callable\[\[json_rpc11.input.SparseNullsOperationInput\], typing.Union\[json_rpc11.output.SparseNullsOperationOutput, typing.Awaitable\[json_rpc11.output.SparseNullsOperationOutput\]\]\]\]:
  746    798   
    /// :rtype None:
  747    799   
    #[pyo3(text_signature = "($self, func)")]
  748    800   
    pub fn sparse_nulls_operation(
  749    801   
        &mut self,
  750    802   
        py: ::pyo3::Python,
  751    803   
        func: ::pyo3::PyObject,
  752    804   
    ) -> ::pyo3::PyResult<()> {
  753    805   
        use ::aws_smithy_http_server_python::PyApp;
  754    806   
        self.register_operation(py, "sparse_nulls_operation", func)
  755    807   
    }
         808  +
    /* PythonApplicationGenerator.kt:247 */
  756    809   
}

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

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerServiceGenerator.kt:795 */
    2      3   
/// The service builder for [`JsonProtocol`].
    3      4   
///
    4      5   
/// Constructed via [`JsonProtocol::builder`].
    5      6   
pub struct JsonProtocolBuilder<Body, L, HttpPl, ModelPl> {
    6      7   
    content_type_parameters: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      8   
    datetime_offsets: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8      9   
    empty_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9     10   
    endpoint_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10     11   
    endpoint_with_host_label_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11     12   
    fractional_seconds: Option<::aws_smithy_http_server::routing::Route<Body>>,
@@ -3478,3479 +3537,3539 @@
 3498   3499   
            "aws.protocoltests.json",
 3499   3500   
            "JsonProtocol",
 3500   3501   
        );
 3501   3502   
 3502   3503   
    const VERSION: Option<&'static str> = Some("2018-01-01");
 3503   3504   
 3504   3505   
    type Protocol = ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1;
 3505   3506   
 3506   3507   
    type Operations = Operation;
 3507   3508   
}
        3509  +
/* ServiceConfigGenerator.kt:178 */
 3508   3510   
/// Configuration for the [`JsonProtocol`]. This is the central place where to register and
 3509   3511   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
 3510   3512   
///
 3511   3513   
/// ```rust,no_run
 3512   3514   
/// # use json_rpc11::JsonProtocolConfig;
 3513   3515   
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
 3514   3516   
/// # use ::tower::layer::util::Identity;
 3515   3517   
/// # let authentication_plugin = IdentityPlugin;
 3516   3518   
/// # let authorization_plugin = IdentityPlugin;
 3517   3519   
/// # let server_request_id_provider_layer = Identity::new();
@@ -3593,3595 +3652,3655 @@
 3613   3615   
 3614   3616   
    /// Build the configuration.
 3615   3617   
    pub fn build(self) -> super::JsonProtocolConfig<L, H, M> {
 3616   3618   
        super::JsonProtocolConfig {
 3617   3619   
            layers: self.layers,
 3618   3620   
            http_plugins: self.http_plugins,
 3619   3621   
            model_plugins: self.model_plugins,
 3620   3622   
        }
 3621   3623   
    }
 3622   3624   
}
        3625  +
/* ScopeMacroGenerator.kt:81 */
 3623   3626   
/// A macro to help with scoping [plugins](crate::server::plugin) to a subset of all operations.
 3624   3627   
///
 3625   3628   
/// In contrast to [`crate::server::scope`](crate::server::scope), this macro has knowledge
 3626   3629   
/// of the service and any operations _not_ specified will be placed in the opposing group.
 3627   3630   
///
 3628   3631   
/// # Example
 3629   3632   
///
 3630   3633   
/// ```rust
 3631   3634   
/// scope! {
 3632   3635   
///     /// Includes [`ContentTypeParameters`], excluding all other operations.

tmp-codegen-diff/codegen-server-test-python/json_rpc11/rust-server-codegen-python/src/types.rs

@@ -1,1 +0,7 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
           4  +
/* ServerRequiredCustomizations.kt:69 */
    3      5   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
    4      6   
pub use ::aws_smithy_types::Blob;
    5         -
pub use ::aws_smithy_types::DateTime;
           7  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;

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

@@ -1,1 +182,223 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* UnconstrainedUnionGenerator.kt:121 */
    3      4   
impl crate::constrained::Constrained for crate::model::MyUnion {
    4      5   
    type Unconstrained = crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained;
    5      6   
}
    6      7   
    7      8   
impl From<crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained>
    8      9   
    for crate::constrained::MaybeConstrained<crate::model::MyUnion>
    9     10   
{
   10     11   
    fn from(value: crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained) -> Self {
   11     12   
        Self::Unconstrained(value)
   12     13   
    }
   13     14   
}
   14     15   
   15     16   
pub(crate) mod my_union_unconstrained {
   16     17   
          18  +
    /* UnconstrainedUnionGenerator.kt:82 */
   17     19   
    #[allow(clippy::enum_variant_names)]
   18     20   
    #[derive(Debug, Clone)]
   19     21   
    pub(crate) enum MyUnionUnconstrained {
          22  +
        /* UnconstrainedUnionGenerator.kt:95 */
   20     23   
        BlobValue(::aws_smithy_http_server_python::types::Blob),
   21         -
        BooleanValue(bool),
   22         -
        EnumValue(::std::string::String),
          24  +
        /* UnconstrainedUnionGenerator.kt:95 */ BooleanValue(bool),
          25  +
        /* UnconstrainedUnionGenerator.kt:95 */ EnumValue(::std::string::String),
          26  +
        /* UnconstrainedUnionGenerator.kt:95 */
   23     27   
        ListValue(::std::vec::Vec<::std::string::String>),
          28  +
        /* UnconstrainedUnionGenerator.kt:95 */
   24     29   
        MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
   25         -
        NumberValue(i32),
   26         -
        StringValue(::std::string::String),
          30  +
        /* UnconstrainedUnionGenerator.kt:95 */ NumberValue(i32),
          31  +
        /* UnconstrainedUnionGenerator.kt:95 */ StringValue(::std::string::String),
          32  +
        /* UnconstrainedUnionGenerator.kt:95 */
   27     33   
        StructureValue(crate::model::GreetingStruct),
          34  +
        /* UnconstrainedUnionGenerator.kt:95 */
   28     35   
        TimestampValue(::aws_smithy_http_server_python::types::DateTime),
          36  +
        /* UnconstrainedUnionGenerator.kt:82 */
   29     37   
    }
          38  +
    /* UnconstrainedUnionGenerator.kt:103 */
   30     39   
    impl ::std::convert::TryFrom<MyUnionUnconstrained> for crate::model::MyUnion {
   31     40   
        type Error = crate::model::my_union_internal::ConstraintViolation;
   32     41   
   33     42   
        fn try_from(value: MyUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
   34     43   
            Ok(
   35     44   
        match value {
   36     45   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(unconstrained) => Self::BlobValue(
   37     46   
                unconstrained
   38     47   
            ),
   39     48   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(unconstrained) => Self::BooleanValue(
   40     49   
                unconstrained
   41     50   
            ),
   42     51   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(unconstrained) => Self::EnumValue(
   43     52   
                unconstrained
   44     53   
                                        .try_into()
   45     54   
                                        
   46     55   
                                        
   47     56   
                                        .map_err(Self::Error::EnumValue)?
   48     57   
            ),
   49     58   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(unconstrained) => Self::ListValue(
   50     59   
                unconstrained
   51     60   
            ),
   52     61   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(unconstrained) => Self::MapValue(
   53     62   
                unconstrained
   54     63   
            ),
   55     64   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(unconstrained) => Self::NumberValue(
   56     65   
                unconstrained
   57     66   
            ),
   58     67   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(unconstrained) => Self::StringValue(
   59     68   
                unconstrained
   60     69   
            ),
   61     70   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(unconstrained) => Self::StructureValue(
   62     71   
                unconstrained
   63     72   
            ),
   64     73   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(unconstrained) => Self::TimestampValue(
   65     74   
                unconstrained
   66     75   
            ),
   67     76   
        }
   68     77   
    )
   69     78   
        }
   70     79   
    }
          80  +
          81  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   71     82   
}
   72     83   
pub(crate) mod foo_enum_map_unconstrained {
   73     84   
          85  +
    /* UnconstrainedMapGenerator.kt:79 */
   74     86   
    #[derive(Debug, Clone)]
   75     87   
    pub(crate) struct FooEnumMapUnconstrained(
   76     88   
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
   77     89   
    );
   78     90   
   79     91   
    impl From<FooEnumMapUnconstrained>
   80     92   
        for crate::constrained::MaybeConstrained<
   81     93   
            crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
   82     94   
        >
   83     95   
    {
   84     96   
        fn from(value: FooEnumMapUnconstrained) -> Self {
   85     97   
            Self::Unconstrained(value)
   86     98   
        }
   87     99   
    }
         100  +
    /* UnconstrainedMapGenerator.kt:101 */
   88    101   
    impl std::convert::TryFrom<FooEnumMapUnconstrained>
   89    102   
        for crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained
   90    103   
    {
         104  +
        /* UnconstrainedMapGenerator.kt:102 */
   91    105   
        type Error = crate::model::foo_enum_map_internal::ConstraintViolation;
         106  +
        /* UnconstrainedMapGenerator.kt:104 */
   92    107   
        fn try_from(value: FooEnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         108  +
            /* UnconstrainedMapGenerator.kt:186 */
   93    109   
            let res: ::std::result::Result<
   94    110   
                ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
   95    111   
                Self::Error,
   96    112   
            > = value
   97    113   
                .0
   98    114   
                .into_iter()
   99    115   
                .map(|(k, v)| match crate::model::FooEnum::try_from(v) {
  100    116   
                    Ok(v) => Ok((k, v)),
  101    117   
                    Err(inner_constraint_violation) => {
  102    118   
                        Err(Self::Error::Value(k, inner_constraint_violation))
  103    119   
                    }
  104    120   
                })
  105    121   
                .collect();
  106    122   
            let hm = res?;
         123  +
            /* UnconstrainedMapGenerator.kt:247 */
  107    124   
            Ok(Self(hm))
         125  +
            /* UnconstrainedMapGenerator.kt:104 */
  108    126   
        }
         127  +
        /* UnconstrainedMapGenerator.kt:101 */
  109    128   
    }
         129  +
         130  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  110    131   
}
  111    132   
pub(crate) mod foo_enum_set_unconstrained {
  112    133   
         134  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  113    135   
    #[derive(Debug, Clone)]
  114    136   
    pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
  115    137   
  116    138   
    impl From<FooEnumSetUnconstrained>
  117    139   
        for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
  118    140   
    {
  119    141   
        fn from(value: FooEnumSetUnconstrained) -> Self {
  120    142   
            Self::Unconstrained(value)
  121    143   
        }
  122    144   
    }
         145  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  123    146   
    impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
         147  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  124    148   
        type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
         149  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  125    150   
        fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
         151  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  126    152   
            let res: ::std::result::Result<
  127    153   
                ::std::vec::Vec<crate::model::FooEnum>,
  128    154   
                (usize, crate::model::foo_enum_internal::ConstraintViolation),
  129    155   
            > = value
  130    156   
                .0
  131    157   
                .into_iter()
  132    158   
                .enumerate()
  133    159   
                .map(|(idx, inner)| {
  134    160   
                    inner
  135    161   
                        .try_into()
  136    162   
                        .map_err(|inner_violation| (idx, inner_violation))
  137    163   
                })
  138    164   
                .collect();
  139    165   
            let inner =
  140    166   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         167  +
            /* UnconstrainedCollectionGenerator.kt:189 */
  141    168   
            Self::try_from(inner)
         169  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  142    170   
        }
         171  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  143    172   
    }
         173  +
         174  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  144    175   
}
  145    176   
pub(crate) mod foo_enum_list_unconstrained {
  146    177   
         178  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  147    179   
    #[derive(Debug, Clone)]
  148    180   
    pub(crate) struct FooEnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
  149    181   
  150    182   
    impl From<FooEnumListUnconstrained>
  151    183   
        for crate::constrained::MaybeConstrained<
  152    184   
            crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
  153    185   
        >
  154    186   
    {
  155    187   
        fn from(value: FooEnumListUnconstrained) -> Self {
  156    188   
            Self::Unconstrained(value)
  157    189   
        }
  158    190   
    }
         191  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  159    192   
    impl std::convert::TryFrom<FooEnumListUnconstrained>
  160    193   
        for crate::constrained::foo_enum_list_constrained::FooEnumListConstrained
  161    194   
    {
         195  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  162    196   
        type Error = crate::model::foo_enum_list_internal::ConstraintViolation;
         197  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  163    198   
        fn try_from(value: FooEnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
         199  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  164    200   
            let res: ::std::result::Result<
  165    201   
                ::std::vec::Vec<crate::model::FooEnum>,
  166    202   
                (usize, crate::model::foo_enum_internal::ConstraintViolation),
  167    203   
            > = value
  168    204   
                .0
  169    205   
                .into_iter()
  170    206   
                .enumerate()
  171    207   
                .map(|(idx, inner)| {
  172    208   
                    inner
  173    209   
                        .try_into()
  174    210   
                        .map_err(|inner_violation| (idx, inner_violation))
  175    211   
                })
  176    212   
                .collect();
  177    213   
            let inner =
  178    214   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         215  +
            /* UnconstrainedCollectionGenerator.kt:191 */
  179    216   
            Ok(Self(inner))
         217  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  180    218   
        }
         219  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  181    220   
    }
         221  +
         222  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  182    223   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/Cargo.toml

@@ -6,6 +58,58 @@
   26     26   
version = "0.2.9"
   27     27   
[dependencies.hyper]
   28     28   
version = "0.14.26"
   29     29   
[dependencies.mime]
   30     30   
version = "0.3"
   31     31   
[dependencies.parking_lot]
   32     32   
version = "0.12"
   33     33   
[dependencies.pin-project-lite]
   34     34   
version = "0.2"
   35     35   
[dependencies.pyo3]
   36         -
version = "0.18"
          36  +
version = "0.20"
   37     37   
[dependencies.pyo3-asyncio]
   38         -
version = "0.18"
          38  +
version = "0.20"
   39     39   
features = ["attributes", "tokio-runtime"]
   40     40   
[dependencies.tower]
   41     41   
version = "0.4"
   42     42   
[dependencies.tracing]
   43     43   
version = "0.1"
   44     44   
[dev-dependencies.hyper]
   45     45   
version = "0.14.12"
   46     46   
[dev-dependencies.tokio]
   47     47   
version = "1.23.1"
   48     48   
[features]

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/python/misc/error/__init__.pyi

@@ -1,1 +28,28 @@
    3      3   
    4      4   
class InternalServerError(Exception):
    5      5   
    message: str
    6      6   
    7      7   
    def __init__(self, message: str) -> None:
    8      8   
        ...
    9      9   
   10     10   
   11     11   
class ValidationException(Exception):
   12     12   
    """
   13         -
    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.
          13  +
    /* StructureGenerator.kt:197 */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.
   14     14   
    """
   15     15   
   16     16   
    field_list: typing.Optional[typing.List[misc.model.ValidationExceptionField]]
   17     17   
    """
   18         -
    A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
          18  +
    /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   19     19   
    """
   20     20   
   21     21   
    message: str
   22     22   
    """
   23         -
    A summary of the validation failure.
          23  +
    /* StructureGenerator.kt:231 */A summary of the validation failure.
   24     24   
    """
   25     25   
   26     26   
    def __init__(self, message: str, field_list: typing.Optional[typing.List[misc.model.ValidationExceptionField]] = ...) -> None:
   27     27   
        ...
   28     28   

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/python/misc/model/__init__.pyi

@@ -91,91 +136,136 @@
  111    111   
    a_union: misc.model.AUnion
  112    112   
  113    113   
    an_int: int
  114    114   
  115    115   
    def __init__(self, a_string: str, a_boolean: bool, a_byte: int, a_short: int, an_int: int, a_long: int, a_float: float, a_double: float, a_timestamp: misc.types.DateTime, a_document: misc.types.DateTime, a_string_list: typing.List[str], a_string_map: typing.Dict[str, misc.types.DateTime], a_string_set: typing.List[str], a_blob: misc.types.Blob, a_union: misc.model.AUnion) -> None:
  116    116   
        ...
  117    117   
  118    118   
  119    119   
class ValidationExceptionField:
  120    120   
    """
  121         -
    Describes one specific validation failure for an input member.
         121  +
    /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
  122    122   
    """
  123    123   
  124    124   
    message: str
  125    125   
    """
  126         -
    A detailed description of the validation failure.
         126  +
    /* StructureGenerator.kt:231 */A detailed description of the validation failure.
  127    127   
    """
  128    128   
  129    129   
    path: str
  130    130   
    """
  131         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         131  +
    /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  132    132   
    """
  133    133   
  134    134   
    def __init__(self, path: str, message: str) -> None:
  135    135   
        ...
  136    136   

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

@@ -1,1 +643,1148 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerOperationErrorGenerator.kt:63 */
    2      3   
/// Error type for the `ResponseCodeDefaultOperation` operation.
           4  +
/* ServerOperationErrorGenerator.kt:64 */
    3      5   
/// Each variant represents an error that can occur for the `ResponseCodeDefaultOperation` operation.
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::fmt::Debug)]
    5         -
pub enum ResponseCodeDefaultOperationError {
           8  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum ResponseCodeDefaultOperationError {
           9  +
    /* ServerOperationErrorGenerator.kt:68 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
          11  +
    /* ServerOperationErrorGenerator.kt:71 */
    7     12   
    InternalServerError(crate::error::InternalServerError),
          13  +
    /* ServerOperationErrorGenerator.kt:66 */
    8     14   
}
          15  +
/* ServerOperationErrorGenerator.kt:75 */
    9     16   
impl ::std::fmt::Display for ResponseCodeDefaultOperationError {
          17  +
    /* ServerOperationErrorGenerator.kt:76 */
   10     18   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          19  +
        /* ServerOperationErrorGenerator.kt:139 */
   11     20   
        match &self {
   12         -
            ResponseCodeDefaultOperationError::InternalServerError(_inner) => _inner.fmt(f),
          21  +
            /* ServerOperationErrorGenerator.kt:142 */
          22  +
            ResponseCodeDefaultOperationError::InternalServerError(_inner) =>
          23  +
            /* ServerOperationErrorGenerator.kt:78 */
          24  +
            {
          25  +
                _inner.fmt(f)
          26  +
            }
          27  +
            /* ServerOperationErrorGenerator.kt:139 */
   13     28   
        }
          29  +
        /* ServerOperationErrorGenerator.kt:76 */
   14     30   
    }
          31  +
    /* ServerOperationErrorGenerator.kt:75 */
   15     32   
}
          33  +
/* ServerOperationErrorGenerator.kt:83 */
   16     34   
impl ResponseCodeDefaultOperationError {
          35  +
    /* ServerOperationErrorGenerator.kt:87 */
   17     36   
    /// Returns `true` if the error kind is `ResponseCodeDefaultOperationError::InternalServerError`.
          37  +
    /* ServerOperationErrorGenerator.kt:88 */
   18     38   
    pub fn is_internal_server_error(&self) -> bool {
          39  +
        /* ServerOperationErrorGenerator.kt:89 */
   19     40   
        matches!(
   20     41   
            &self,
   21     42   
            ResponseCodeDefaultOperationError::InternalServerError(_)
   22     43   
        )
          44  +
        /* ServerOperationErrorGenerator.kt:88 */
   23     45   
    }
          46  +
    /* ServerOperationErrorGenerator.kt:92 */
   24     47   
    /// Returns the error name string by matching the correct variant.
          48  +
    /* ServerOperationErrorGenerator.kt:93 */
   25     49   
    pub fn name(&self) -> &'static str {
          50  +
        /* ServerOperationErrorGenerator.kt:139 */
   26     51   
        match &self {
   27         -
            ResponseCodeDefaultOperationError::InternalServerError(_inner) => _inner.name(),
          52  +
            /* ServerOperationErrorGenerator.kt:142 */
          53  +
            ResponseCodeDefaultOperationError::InternalServerError(_inner) =>
          54  +
            /* ServerOperationErrorGenerator.kt:95 */
          55  +
            {
          56  +
                _inner.name()
          57  +
            }
          58  +
            /* ServerOperationErrorGenerator.kt:139 */
   28     59   
        }
          60  +
        /* ServerOperationErrorGenerator.kt:93 */
   29     61   
    }
          62  +
    /* ServerOperationErrorGenerator.kt:83 */
   30     63   
}
          64  +
/* ServerOperationErrorGenerator.kt:100 */
   31     65   
impl ::std::error::Error for ResponseCodeDefaultOperationError {
          66  +
    /* ServerOperationErrorGenerator.kt:101 */
   32     67   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          68  +
        /* ServerOperationErrorGenerator.kt:139 */
   33     69   
        match &self {
   34         -
            ResponseCodeDefaultOperationError::InternalServerError(_inner) => Some(_inner),
          70  +
            /* ServerOperationErrorGenerator.kt:142 */
          71  +
            ResponseCodeDefaultOperationError::InternalServerError(_inner) =>
          72  +
            /* ServerOperationErrorGenerator.kt:103 */
          73  +
            {
          74  +
                Some(_inner)
          75  +
            }
          76  +
            /* ServerOperationErrorGenerator.kt:139 */
   35     77   
        }
          78  +
        /* ServerOperationErrorGenerator.kt:101 */
   36     79   
    }
          80  +
    /* ServerOperationErrorGenerator.kt:100 */
   37     81   
}
          82  +
/* ServerOperationErrorGenerator.kt:110 */
   38     83   
impl ::std::convert::From<crate::error::InternalServerError>
   39     84   
    for crate::error::ResponseCodeDefaultOperationError
   40     85   
{
          86  +
    /* ServerOperationErrorGenerator.kt:111 */
   41     87   
    fn from(
   42     88   
        variant: crate::error::InternalServerError,
   43     89   
    ) -> crate::error::ResponseCodeDefaultOperationError {
          90  +
        /* ServerOperationErrorGenerator.kt:112 */
   44     91   
        Self::InternalServerError(variant)
          92  +
        /* ServerOperationErrorGenerator.kt:111 */
   45     93   
    }
          94  +
    /* ServerOperationErrorGenerator.kt:110 */
   46     95   
}
   47     96   
          97  +
/* PythonServerOperationErrorGenerator.kt:38 */
   48     98   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ResponseCodeDefaultOperationError {
   49     99   
    fn from(variant: ::pyo3::PyErr) -> crate::error::ResponseCodeDefaultOperationError {
   50    100   
        ::pyo3::Python::with_gil(|py| {
   51    101   
            let error = variant.value(py);
   52    102   
   53    103   
            crate::error::InternalServerError {
   54    104   
                message: error.to_string(),
   55    105   
            }
   56    106   
            .into()
   57    107   
        })
   58    108   
    }
   59    109   
}
   60    110   
         111  +
/* RustType.kt:516 */
   61    112   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
         113  +
/* PythonServerStructureGenerator.kt:63 */
   62    114   
/// :param message str:
   63    115   
/// :rtype None:
         116  +
/* StructureGenerator.kt:197 */
   64    117   
#[allow(missing_docs)] // documentation missing in model
         118  +
/* RustType.kt:516 */
   65    119   
#[derive(
   66    120   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   67    121   
)]
   68         -
pub struct InternalServerError {
         122  +
pub /* StructureGenerator.kt:201 */ struct InternalServerError {
         123  +
    /* RustType.kt:516 */
   69    124   
    #[pyo3(get, set)]
         125  +
    /* PythonServerStructureGenerator.kt:80 */
   70    126   
    /// :type str:
         127  +
    /* StructureGenerator.kt:231 */
   71    128   
    #[allow(missing_docs)] // documentation missing in model
   72    129   
    pub message: ::std::string::String,
         130  +
    /* StructureGenerator.kt:201 */
   73    131   
}
         132  +
/* RustType.kt:516 */
   74    133   
#[allow(clippy::new_without_default)]
         134  +
/* RustType.kt:516 */
   75    135   
#[allow(clippy::too_many_arguments)]
         136  +
/* RustType.kt:516 */
   76    137   
#[::pyo3::pymethods]
         138  +
/* PythonServerStructureGenerator.kt:88 */
   77    139   
impl InternalServerError {
   78    140   
    #[new]
   79    141   
    pub fn new(message: ::std::string::String) -> Self {
   80    142   
        Self { message }
   81    143   
    }
   82    144   
    fn __repr__(&self) -> String {
   83    145   
        format!("{self:?}")
   84    146   
    }
   85    147   
    fn __str__(&self) -> String {
   86    148   
        format!("{self:?}")
   87    149   
    }
   88    150   
}
         151  +
/* ErrorImplGenerator.kt:99 */
   89    152   
impl InternalServerError {
         153  +
    /* ErrorImplGenerator.kt:128 */
   90    154   
    /// Returns the error message.
   91    155   
    pub fn message(&self) -> &str {
   92    156   
        &self.message
   93    157   
    }
         158  +
    /* ErrorImplGenerator.kt:141 */
   94    159   
    #[doc(hidden)]
   95    160   
    /// Returns the error name.
   96    161   
    pub fn name(&self) -> &'static str {
   97    162   
        "InternalServerError"
   98    163   
    }
         164  +
    /* ErrorImplGenerator.kt:99 */
   99    165   
}
         166  +
/* ErrorImplGenerator.kt:153 */
  100    167   
impl ::std::fmt::Display for InternalServerError {
         168  +
    /* ErrorImplGenerator.kt:154 */
  101    169   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         170  +
        /* ErrorImplGenerator.kt:161 */
  102    171   
        ::std::write!(f, "InternalServerError")?;
         172  +
        /* ErrorImplGenerator.kt:166 */
  103    173   
        {
         174  +
            /* ErrorImplGenerator.kt:167 */
  104    175   
            ::std::write!(f, ": {}", &self.message)?;
         176  +
            /* ErrorImplGenerator.kt:166 */
  105    177   
        }
         178  +
        /* ErrorImplGenerator.kt:171 */
  106    179   
        Ok(())
         180  +
        /* ErrorImplGenerator.kt:154 */
  107    181   
    }
         182  +
    /* ErrorImplGenerator.kt:153 */
  108    183   
}
         184  +
/* ErrorImplGenerator.kt:175 */
  109    185   
impl ::std::error::Error for InternalServerError {}
         186  +
/* ServerCodegenVisitor.kt:370 */
  110    187   
impl InternalServerError {
  111         -
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
         188  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
         189  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  112    190   
    pub fn builder() -> crate::error::internal_server_error::Builder {
         191  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  113    192   
        crate::error::internal_server_error::Builder::default()
         193  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  114    194   
    }
         195  +
    /* ServerCodegenVisitor.kt:370 */
  115    196   
}
  116    197   
         198  +
/* ServerOperationErrorGenerator.kt:63 */
  117    199   
/// Error type for the `ResponseCodeHttpFallbackOperation` operation.
         200  +
/* ServerOperationErrorGenerator.kt:64 */
  118    201   
/// Each variant represents an error that can occur for the `ResponseCodeHttpFallbackOperation` operation.
         202  +
/* RustType.kt:516 */
  119    203   
#[derive(::std::fmt::Debug)]
  120         -
pub enum ResponseCodeHttpFallbackOperationError {
         204  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum ResponseCodeHttpFallbackOperationError {
         205  +
    /* ServerOperationErrorGenerator.kt:68 */
  121    206   
    #[allow(missing_docs)] // documentation missing in model
         207  +
    /* ServerOperationErrorGenerator.kt:71 */
  122    208   
    InternalServerError(crate::error::InternalServerError),
         209  +
    /* ServerOperationErrorGenerator.kt:66 */
  123    210   
}
         211  +
/* ServerOperationErrorGenerator.kt:75 */
  124    212   
impl ::std::fmt::Display for ResponseCodeHttpFallbackOperationError {
         213  +
    /* ServerOperationErrorGenerator.kt:76 */
  125    214   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         215  +
        /* ServerOperationErrorGenerator.kt:139 */
  126    216   
        match &self {
  127         -
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) => _inner.fmt(f),
         217  +
            /* ServerOperationErrorGenerator.kt:142 */
         218  +
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) =>
         219  +
            /* ServerOperationErrorGenerator.kt:78 */
         220  +
            {
         221  +
                _inner.fmt(f)
         222  +
            }
         223  +
            /* ServerOperationErrorGenerator.kt:139 */
  128    224   
        }
         225  +
        /* ServerOperationErrorGenerator.kt:76 */
  129    226   
    }
         227  +
    /* ServerOperationErrorGenerator.kt:75 */
  130    228   
}
         229  +
/* ServerOperationErrorGenerator.kt:83 */
  131    230   
impl ResponseCodeHttpFallbackOperationError {
         231  +
    /* ServerOperationErrorGenerator.kt:87 */
  132    232   
    /// Returns `true` if the error kind is `ResponseCodeHttpFallbackOperationError::InternalServerError`.
         233  +
    /* ServerOperationErrorGenerator.kt:88 */
  133    234   
    pub fn is_internal_server_error(&self) -> bool {
         235  +
        /* ServerOperationErrorGenerator.kt:89 */
  134    236   
        matches!(
  135    237   
            &self,
  136    238   
            ResponseCodeHttpFallbackOperationError::InternalServerError(_)
  137    239   
        )
         240  +
        /* ServerOperationErrorGenerator.kt:88 */
  138    241   
    }
         242  +
    /* ServerOperationErrorGenerator.kt:92 */
  139    243   
    /// Returns the error name string by matching the correct variant.
         244  +
    /* ServerOperationErrorGenerator.kt:93 */
  140    245   
    pub fn name(&self) -> &'static str {
         246  +
        /* ServerOperationErrorGenerator.kt:139 */
  141    247   
        match &self {
  142         -
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) => _inner.name(),
         248  +
            /* ServerOperationErrorGenerator.kt:142 */
         249  +
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) =>
         250  +
            /* ServerOperationErrorGenerator.kt:95 */
         251  +
            {
         252  +
                _inner.name()
         253  +
            }
         254  +
            /* ServerOperationErrorGenerator.kt:139 */
  143    255   
        }
         256  +
        /* ServerOperationErrorGenerator.kt:93 */
  144    257   
    }
         258  +
    /* ServerOperationErrorGenerator.kt:83 */
  145    259   
}
         260  +
/* ServerOperationErrorGenerator.kt:100 */
  146    261   
impl ::std::error::Error for ResponseCodeHttpFallbackOperationError {
         262  +
    /* ServerOperationErrorGenerator.kt:101 */
  147    263   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         264  +
        /* ServerOperationErrorGenerator.kt:139 */
  148    265   
        match &self {
  149         -
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) => Some(_inner),
         266  +
            /* ServerOperationErrorGenerator.kt:142 */
         267  +
            ResponseCodeHttpFallbackOperationError::InternalServerError(_inner) =>
         268  +
            /* ServerOperationErrorGenerator.kt:103 */
         269  +
            {
         270  +
                Some(_inner)
         271  +
            }
         272  +
            /* ServerOperationErrorGenerator.kt:139 */
  150    273   
        }
         274  +
        /* ServerOperationErrorGenerator.kt:101 */
  151    275   
    }
         276  +
    /* ServerOperationErrorGenerator.kt:100 */
  152    277   
}
         278  +
/* ServerOperationErrorGenerator.kt:110 */
  153    279   
impl ::std::convert::From<crate::error::InternalServerError>
  154    280   
    for crate::error::ResponseCodeHttpFallbackOperationError
  155    281   
{
         282  +
    /* ServerOperationErrorGenerator.kt:111 */
  156    283   
    fn from(
  157    284   
        variant: crate::error::InternalServerError,
  158    285   
    ) -> crate::error::ResponseCodeHttpFallbackOperationError {
         286  +
        /* ServerOperationErrorGenerator.kt:112 */
  159    287   
        Self::InternalServerError(variant)
         288  +
        /* ServerOperationErrorGenerator.kt:111 */
  160    289   
    }
         290  +
    /* ServerOperationErrorGenerator.kt:110 */
  161    291   
}
  162    292   
         293  +
/* PythonServerOperationErrorGenerator.kt:38 */
  163    294   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ResponseCodeHttpFallbackOperationError {
  164    295   
    fn from(variant: ::pyo3::PyErr) -> crate::error::ResponseCodeHttpFallbackOperationError {
  165    296   
        ::pyo3::Python::with_gil(|py| {
  166    297   
            let error = variant.value(py);
  167    298   
  168    299   
            crate::error::InternalServerError {
  169    300   
                message: error.to_string(),
  170    301   
            }
  171    302   
            .into()
  172    303   
        })
  173    304   
    }
  174    305   
}
  175    306   
         307  +
/* ServerOperationErrorGenerator.kt:63 */
  176    308   
/// Error type for the `ResponseCodeRequiredOperation` operation.
         309  +
/* ServerOperationErrorGenerator.kt:64 */
  177    310   
/// Each variant represents an error that can occur for the `ResponseCodeRequiredOperation` operation.
         311  +
/* RustType.kt:516 */
  178    312   
#[derive(::std::fmt::Debug)]
  179         -
pub enum ResponseCodeRequiredOperationError {
         313  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum ResponseCodeRequiredOperationError {
         314  +
    /* ServerOperationErrorGenerator.kt:68 */
  180    315   
    #[allow(missing_docs)] // documentation missing in model
         316  +
    /* ServerOperationErrorGenerator.kt:71 */
  181    317   
    InternalServerError(crate::error::InternalServerError),
         318  +
    /* ServerOperationErrorGenerator.kt:66 */
  182    319   
}
         320  +
/* ServerOperationErrorGenerator.kt:75 */
  183    321   
impl ::std::fmt::Display for ResponseCodeRequiredOperationError {
         322  +
    /* ServerOperationErrorGenerator.kt:76 */
  184    323   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         324  +
        /* ServerOperationErrorGenerator.kt:139 */
  185    325   
        match &self {
  186         -
            ResponseCodeRequiredOperationError::InternalServerError(_inner) => _inner.fmt(f),
         326  +
            /* ServerOperationErrorGenerator.kt:142 */
         327  +
            ResponseCodeRequiredOperationError::InternalServerError(_inner) =>
         328  +
            /* ServerOperationErrorGenerator.kt:78 */
         329  +
            {
         330  +
                _inner.fmt(f)
         331  +
            }
         332  +
            /* ServerOperationErrorGenerator.kt:139 */
  187    333   
        }
         334  +
        /* ServerOperationErrorGenerator.kt:76 */
  188    335   
    }
         336  +
    /* ServerOperationErrorGenerator.kt:75 */
  189    337   
}
         338  +
/* ServerOperationErrorGenerator.kt:83 */
  190    339   
impl ResponseCodeRequiredOperationError {
         340  +
    /* ServerOperationErrorGenerator.kt:87 */
  191    341   
    /// Returns `true` if the error kind is `ResponseCodeRequiredOperationError::InternalServerError`.
         342  +
    /* ServerOperationErrorGenerator.kt:88 */
  192    343   
    pub fn is_internal_server_error(&self) -> bool {
         344  +
        /* ServerOperationErrorGenerator.kt:89 */
  193    345   
        matches!(
  194    346   
            &self,
  195    347   
            ResponseCodeRequiredOperationError::InternalServerError(_)
  196    348   
        )
         349  +
        /* ServerOperationErrorGenerator.kt:88 */
  197    350   
    }
         351  +
    /* ServerOperationErrorGenerator.kt:92 */
  198    352   
    /// Returns the error name string by matching the correct variant.
         353  +
    /* ServerOperationErrorGenerator.kt:93 */
  199    354   
    pub fn name(&self) -> &'static str {
         355  +
        /* ServerOperationErrorGenerator.kt:139 */
  200    356   
        match &self {
  201         -
            ResponseCodeRequiredOperationError::InternalServerError(_inner) => _inner.name(),
         357  +
            /* ServerOperationErrorGenerator.kt:142 */
         358  +
            ResponseCodeRequiredOperationError::InternalServerError(_inner) =>
         359  +
            /* ServerOperationErrorGenerator.kt:95 */
         360  +
            {
         361  +
                _inner.name()
         362  +
            }
         363  +
            /* ServerOperationErrorGenerator.kt:139 */
  202    364   
        }
         365  +
        /* ServerOperationErrorGenerator.kt:93 */
  203    366   
    }
         367  +
    /* ServerOperationErrorGenerator.kt:83 */
  204    368   
}
         369  +
/* ServerOperationErrorGenerator.kt:100 */
  205    370   
impl ::std::error::Error for ResponseCodeRequiredOperationError {
         371  +
    /* ServerOperationErrorGenerator.kt:101 */
  206    372   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         373  +
        /* ServerOperationErrorGenerator.kt:139 */
  207    374   
        match &self {
  208         -
            ResponseCodeRequiredOperationError::InternalServerError(_inner) => Some(_inner),
         375  +
            /* ServerOperationErrorGenerator.kt:142 */
         376  +
            ResponseCodeRequiredOperationError::InternalServerError(_inner) =>
         377  +
            /* ServerOperationErrorGenerator.kt:103 */
         378  +
            {
         379  +
                Some(_inner)
         380  +
            }
         381  +
            /* ServerOperationErrorGenerator.kt:139 */
  209    382   
        }
         383  +
        /* ServerOperationErrorGenerator.kt:101 */
  210    384   
    }
         385  +
    /* ServerOperationErrorGenerator.kt:100 */
  211    386   
}
         387  +
/* ServerOperationErrorGenerator.kt:110 */
  212    388   
impl ::std::convert::From<crate::error::InternalServerError>
  213    389   
    for crate::error::ResponseCodeRequiredOperationError
  214    390   
{
         391  +
    /* ServerOperationErrorGenerator.kt:111 */
  215    392   
    fn from(
  216    393   
        variant: crate::error::InternalServerError,
  217    394   
    ) -> crate::error::ResponseCodeRequiredOperationError {
         395  +
        /* ServerOperationErrorGenerator.kt:112 */
  218    396   
        Self::InternalServerError(variant)
         397  +
        /* ServerOperationErrorGenerator.kt:111 */
  219    398   
    }
         399  +
    /* ServerOperationErrorGenerator.kt:110 */
  220    400   
}
  221    401   
         402  +
/* PythonServerOperationErrorGenerator.kt:38 */
  222    403   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ResponseCodeRequiredOperationError {
  223    404   
    fn from(variant: ::pyo3::PyErr) -> crate::error::ResponseCodeRequiredOperationError {
  224    405   
        ::pyo3::Python::with_gil(|py| {
  225    406   
            let error = variant.value(py);
  226    407   
  227    408   
            crate::error::InternalServerError {
  228    409   
                message: error.to_string(),
  229    410   
            }
  230    411   
            .into()
  231    412   
        })
  232    413   
    }
  233    414   
}
  234    415   
         416  +
/* ServerOperationErrorGenerator.kt:63 */
  235    417   
/// Error type for the `RequiredHeaderCollectionOperation` operation.
         418  +
/* ServerOperationErrorGenerator.kt:64 */
  236    419   
/// Each variant represents an error that can occur for the `RequiredHeaderCollectionOperation` operation.
         420  +
/* RustType.kt:516 */
  237    421   
#[derive(::std::fmt::Debug)]
  238         -
pub enum RequiredHeaderCollectionOperationError {
  239         -
    /// 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.
         422  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum RequiredHeaderCollectionOperationError {
         423  +
    /// /* ServerOperationErrorGenerator.kt:68 */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.
         424  +
    /* ServerOperationErrorGenerator.kt:71 */
  240    425   
    ValidationException(crate::error::ValidationException),
         426  +
    /* ServerOperationErrorGenerator.kt:68 */
  241    427   
    #[allow(missing_docs)] // documentation missing in model
         428  +
    /* ServerOperationErrorGenerator.kt:71 */
  242    429   
    InternalServerError(crate::error::InternalServerError),
         430  +
    /* ServerOperationErrorGenerator.kt:66 */
  243    431   
}
         432  +
/* ServerOperationErrorGenerator.kt:75 */
  244    433   
impl ::std::fmt::Display for RequiredHeaderCollectionOperationError {
         434  +
    /* ServerOperationErrorGenerator.kt:76 */
  245    435   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         436  +
        /* ServerOperationErrorGenerator.kt:139 */
  246    437   
        match &self {
  247         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => _inner.fmt(f),
  248         -
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) => _inner.fmt(f),
         438  +
            /* ServerOperationErrorGenerator.kt:142 */
         439  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
         440  +
            /* ServerOperationErrorGenerator.kt:78 */
         441  +
            {
         442  +
                _inner.fmt(f)
         443  +
            }
         444  +
            ,
         445  +
            /* ServerOperationErrorGenerator.kt:142 */
         446  +
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) =>
         447  +
            /* ServerOperationErrorGenerator.kt:78 */
         448  +
            {
         449  +
                _inner.fmt(f)
         450  +
            }
         451  +
            /* ServerOperationErrorGenerator.kt:139 */
  249    452   
        }
         453  +
        /* ServerOperationErrorGenerator.kt:76 */
  250    454   
    }
         455  +
    /* ServerOperationErrorGenerator.kt:75 */
  251    456   
}
         457  +
/* ServerOperationErrorGenerator.kt:83 */
  252    458   
impl RequiredHeaderCollectionOperationError {
         459  +
    /* ServerOperationErrorGenerator.kt:87 */
  253    460   
    /// Returns `true` if the error kind is `RequiredHeaderCollectionOperationError::ValidationException`.
         461  +
    /* ServerOperationErrorGenerator.kt:88 */
  254    462   
    pub fn is_validation_exception(&self) -> bool {
         463  +
        /* ServerOperationErrorGenerator.kt:89 */
  255    464   
        matches!(
  256    465   
            &self,
  257    466   
            RequiredHeaderCollectionOperationError::ValidationException(_)
  258    467   
        )
         468  +
        /* ServerOperationErrorGenerator.kt:88 */
  259    469   
    }
         470  +
    /* ServerOperationErrorGenerator.kt:87 */
  260    471   
    /// Returns `true` if the error kind is `RequiredHeaderCollectionOperationError::InternalServerError`.
         472  +
    /* ServerOperationErrorGenerator.kt:88 */
  261    473   
    pub fn is_internal_server_error(&self) -> bool {
         474  +
        /* ServerOperationErrorGenerator.kt:89 */
  262    475   
        matches!(
  263    476   
            &self,
  264    477   
            RequiredHeaderCollectionOperationError::InternalServerError(_)
  265    478   
        )
         479  +
        /* ServerOperationErrorGenerator.kt:88 */
  266    480   
    }
         481  +
    /* ServerOperationErrorGenerator.kt:92 */
  267    482   
    /// Returns the error name string by matching the correct variant.
         483  +
    /* ServerOperationErrorGenerator.kt:93 */
  268    484   
    pub fn name(&self) -> &'static str {
         485  +
        /* ServerOperationErrorGenerator.kt:139 */
  269    486   
        match &self {
  270         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => _inner.name(),
  271         -
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) => _inner.name(),
         487  +
            /* ServerOperationErrorGenerator.kt:142 */
         488  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
         489  +
            /* ServerOperationErrorGenerator.kt:95 */
         490  +
            {
         491  +
                _inner.name()
  272    492   
            }
         493  +
            ,
         494  +
            /* ServerOperationErrorGenerator.kt:142 */
         495  +
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) =>
         496  +
            /* ServerOperationErrorGenerator.kt:95 */
         497  +
            {
         498  +
                _inner.name()
  273    499   
            }
         500  +
            /* ServerOperationErrorGenerator.kt:139 */
         501  +
        }
         502  +
        /* ServerOperationErrorGenerator.kt:93 */
         503  +
    }
         504  +
    /* ServerOperationErrorGenerator.kt:83 */
  274    505   
}
         506  +
/* ServerOperationErrorGenerator.kt:100 */
  275    507   
impl ::std::error::Error for RequiredHeaderCollectionOperationError {
         508  +
    /* ServerOperationErrorGenerator.kt:101 */
  276    509   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         510  +
        /* ServerOperationErrorGenerator.kt:139 */
  277    511   
        match &self {
  278         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => Some(_inner),
  279         -
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) => Some(_inner),
         512  +
            /* ServerOperationErrorGenerator.kt:142 */
         513  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
         514  +
            /* ServerOperationErrorGenerator.kt:103 */
         515  +
            {
         516  +
                Some(_inner)
  280    517   
            }
         518  +
            ,
         519  +
            /* ServerOperationErrorGenerator.kt:142 */
         520  +
            RequiredHeaderCollectionOperationError::InternalServerError(_inner) =>
         521  +
            /* ServerOperationErrorGenerator.kt:103 */
         522  +
            {
         523  +
                Some(_inner)
  281    524   
            }
         525  +
            /* ServerOperationErrorGenerator.kt:139 */
         526  +
        }
         527  +
        /* ServerOperationErrorGenerator.kt:101 */
         528  +
    }
         529  +
    /* ServerOperationErrorGenerator.kt:100 */
  282    530   
}
         531  +
/* ServerOperationErrorGenerator.kt:110 */
  283    532   
impl ::std::convert::From<crate::error::ValidationException>
  284    533   
    for crate::error::RequiredHeaderCollectionOperationError
  285    534   
{
         535  +
    /* ServerOperationErrorGenerator.kt:111 */
  286    536   
    fn from(
  287    537   
        variant: crate::error::ValidationException,
  288    538   
    ) -> crate::error::RequiredHeaderCollectionOperationError {
         539  +
        /* ServerOperationErrorGenerator.kt:112 */
  289    540   
        Self::ValidationException(variant)
         541  +
        /* ServerOperationErrorGenerator.kt:111 */
  290    542   
    }
         543  +
    /* ServerOperationErrorGenerator.kt:110 */
  291    544   
}
         545  +
/* ServerOperationErrorGenerator.kt:110 */
  292    546   
impl ::std::convert::From<crate::error::InternalServerError>
  293    547   
    for crate::error::RequiredHeaderCollectionOperationError
  294    548   
{
         549  +
    /* ServerOperationErrorGenerator.kt:111 */
  295    550   
    fn from(
  296    551   
        variant: crate::error::InternalServerError,
  297    552   
    ) -> crate::error::RequiredHeaderCollectionOperationError {
         553  +
        /* ServerOperationErrorGenerator.kt:112 */
  298    554   
        Self::InternalServerError(variant)
         555  +
        /* ServerOperationErrorGenerator.kt:111 */
  299    556   
    }
         557  +
    /* ServerOperationErrorGenerator.kt:110 */
  300    558   
}
  301    559   
         560  +
/* PythonServerOperationErrorGenerator.kt:38 */
  302    561   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::RequiredHeaderCollectionOperationError {
  303    562   
    fn from(variant: ::pyo3::PyErr) -> crate::error::RequiredHeaderCollectionOperationError {
  304    563   
        ::pyo3::Python::with_gil(|py| {
  305    564   
            let error = variant.value(py);
  306    565   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  307    566   
                return error.into();
  308    567   
            }
  309    568   
            crate::error::InternalServerError {
  310    569   
                message: error.to_string(),
  311    570   
            }
  312    571   
            .into()
  313    572   
        })
  314    573   
    }
  315    574   
}
  316    575   
         576  +
/* RustType.kt:516 */
  317    577   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
         578  +
/* PythonServerStructureGenerator.kt:63 */
  318    579   
/// :param message str:
  319    580   
/// :param field_list typing.Optional\[typing.List\[misc.model.ValidationExceptionField\]\]:
  320    581   
/// :rtype None:
  321         -
/// 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.
         582  +
/// /* StructureGenerator.kt:197 */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.
         583  +
/* RustType.kt:516 */
  322    584   
#[derive(
  323    585   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  324    586   
)]
  325         -
pub struct ValidationException {
         587  +
pub /* StructureGenerator.kt:201 */ struct ValidationException {
         588  +
    /* RustType.kt:516 */
  326    589   
    #[pyo3(get, set)]
         590  +
    /* PythonServerStructureGenerator.kt:80 */
  327    591   
    /// :type str:
  328         -
    /// A summary of the validation failure.
         592  +
    /// /* StructureGenerator.kt:231 */A summary of the validation failure.
  329    593   
    pub message: ::std::string::String,
         594  +
    /* RustType.kt:516 */
  330    595   
    #[pyo3(get, set)]
         596  +
    /* PythonServerStructureGenerator.kt:80 */
  331    597   
    /// :type typing.Optional\[typing.List\[misc.model.ValidationExceptionField\]\]:
  332         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         598  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
  333    599   
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         600  +
    /* StructureGenerator.kt:201 */
  334    601   
}
         602  +
/* StructureGenerator.kt:135 */
  335    603   
impl ValidationException {
  336         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         604  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         605  +
    /* StructureGenerator.kt:166 */
  337    606   
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         607  +
        /* StructureGenerator.kt:169 */
  338    608   
        self.field_list.as_deref()
         609  +
        /* StructureGenerator.kt:166 */
  339    610   
    }
         611  +
    /* StructureGenerator.kt:135 */
  340    612   
}
         613  +
/* RustType.kt:516 */
  341    614   
#[allow(clippy::new_without_default)]
         615  +
/* RustType.kt:516 */
  342    616   
#[allow(clippy::too_many_arguments)]
         617  +
/* RustType.kt:516 */
  343    618   
#[::pyo3::pymethods]
         619  +
/* PythonServerStructureGenerator.kt:88 */
  344    620   
impl ValidationException {
  345    621   
    #[new]
  346    622   
    pub fn new(
  347    623   
        message: ::std::string::String,
  348    624   
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  349    625   
    ) -> Self {
  350    626   
        Self {
  351    627   
            message,
  352    628   
            field_list,
  353    629   
        }
  354    630   
    }
  355    631   
    fn __repr__(&self) -> String {
  356    632   
        format!("{self:?}")
  357    633   
    }
  358    634   
    fn __str__(&self) -> String {
  359    635   
        format!("{self:?}")
  360    636   
    }
  361    637   
}
         638  +
/* ErrorImplGenerator.kt:99 */
  362    639   
impl ValidationException {
         640  +
    /* ErrorImplGenerator.kt:128 */
  363    641   
    /// Returns the error message.
  364    642   
    pub fn message(&self) -> &str {
  365    643   
        &self.message
  366    644   
    }
         645  +
    /* ErrorImplGenerator.kt:141 */
  367    646   
    #[doc(hidden)]
  368    647   
    /// Returns the error name.
  369    648   
    pub fn name(&self) -> &'static str {
  370    649   
        "ValidationException"
  371    650   
    }
         651  +
    /* ErrorImplGenerator.kt:99 */
  372    652   
}
         653  +
/* ErrorImplGenerator.kt:153 */
  373    654   
impl ::std::fmt::Display for ValidationException {
         655  +
    /* ErrorImplGenerator.kt:154 */
  374    656   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         657  +
        /* ErrorImplGenerator.kt:161 */
  375    658   
        ::std::write!(f, "ValidationException")?;
         659  +
        /* ErrorImplGenerator.kt:166 */
  376    660   
        {
         661  +
            /* ErrorImplGenerator.kt:167 */
  377    662   
            ::std::write!(f, ": {}", &self.message)?;
         663  +
            /* ErrorImplGenerator.kt:166 */
  378    664   
        }
         665  +
        /* ErrorImplGenerator.kt:171 */
  379    666   
        Ok(())
         667  +
        /* ErrorImplGenerator.kt:154 */
  380    668   
    }
         669  +
    /* ErrorImplGenerator.kt:153 */
  381    670   
}
         671  +
/* ErrorImplGenerator.kt:175 */
  382    672   
impl ::std::error::Error for ValidationException {}
         673  +
/* ServerCodegenVisitor.kt:370 */
  383    674   
impl ValidationException {
  384         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         675  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         676  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  385    677   
    pub fn builder() -> crate::error::validation_exception::Builder {
         678  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  386    679   
        crate::error::validation_exception::Builder::default()
         680  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  387    681   
    }
         682  +
    /* ServerCodegenVisitor.kt:370 */
  388    683   
}
  389    684   
         685  +
/* ServerOperationErrorGenerator.kt:63 */
  390    686   
/// Error type for the `RequiredInnerShapeOperation` operation.
         687  +
/* ServerOperationErrorGenerator.kt:64 */
  391    688   
/// Each variant represents an error that can occur for the `RequiredInnerShapeOperation` operation.
         689  +
/* RustType.kt:516 */
  392    690   
#[derive(::std::fmt::Debug)]
  393         -
pub enum RequiredInnerShapeOperationError {
  394         -
    /// 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.
         691  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum RequiredInnerShapeOperationError {
         692  +
    /// /* ServerOperationErrorGenerator.kt:68 */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.
         693  +
    /* ServerOperationErrorGenerator.kt:71 */
  395    694   
    ValidationException(crate::error::ValidationException),
         695  +
    /* ServerOperationErrorGenerator.kt:68 */
  396    696   
    #[allow(missing_docs)] // documentation missing in model
         697  +
    /* ServerOperationErrorGenerator.kt:71 */
  397    698   
    InternalServerError(crate::error::InternalServerError),
         699  +
    /* ServerOperationErrorGenerator.kt:66 */
  398    700   
}
         701  +
/* ServerOperationErrorGenerator.kt:75 */
  399    702   
impl ::std::fmt::Display for RequiredInnerShapeOperationError {
         703  +
    /* ServerOperationErrorGenerator.kt:76 */
  400    704   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         705  +
        /* ServerOperationErrorGenerator.kt:139 */
  401    706   
        match &self {
  402         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => _inner.fmt(f),
  403         -
            RequiredInnerShapeOperationError::InternalServerError(_inner) => _inner.fmt(f),
         707  +
            /* ServerOperationErrorGenerator.kt:142 */
         708  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         709  +
            /* ServerOperationErrorGenerator.kt:78 */
         710  +
            {
         711  +
                _inner.fmt(f)
  404    712   
            }
         713  +
            ,
         714  +
            /* ServerOperationErrorGenerator.kt:142 */
         715  +
            RequiredInnerShapeOperationError::InternalServerError(_inner) =>
         716  +
            /* ServerOperationErrorGenerator.kt:78 */
         717  +
            {
         718  +
                _inner.fmt(f)
         719  +
            }
         720  +
            /* ServerOperationErrorGenerator.kt:139 */
  405    721   
        }
         722  +
        /* ServerOperationErrorGenerator.kt:76 */
         723  +
    }
         724  +
    /* ServerOperationErrorGenerator.kt:75 */
  406    725   
}
         726  +
/* ServerOperationErrorGenerator.kt:83 */
  407    727   
impl RequiredInnerShapeOperationError {
         728  +
    /* ServerOperationErrorGenerator.kt:87 */
  408    729   
    /// Returns `true` if the error kind is `RequiredInnerShapeOperationError::ValidationException`.
         730  +
    /* ServerOperationErrorGenerator.kt:88 */
  409    731   
    pub fn is_validation_exception(&self) -> bool {
         732  +
        /* ServerOperationErrorGenerator.kt:89 */
  410    733   
        matches!(
  411    734   
            &self,
  412    735   
            RequiredInnerShapeOperationError::ValidationException(_)
  413    736   
        )
         737  +
        /* ServerOperationErrorGenerator.kt:88 */
  414    738   
    }
         739  +
    /* ServerOperationErrorGenerator.kt:87 */
  415    740   
    /// Returns `true` if the error kind is `RequiredInnerShapeOperationError::InternalServerError`.
         741  +
    /* ServerOperationErrorGenerator.kt:88 */
  416    742   
    pub fn is_internal_server_error(&self) -> bool {
         743  +
        /* ServerOperationErrorGenerator.kt:89 */
  417    744   
        matches!(
  418    745   
            &self,
  419    746   
            RequiredInnerShapeOperationError::InternalServerError(_)
  420    747   
        )
         748  +
        /* ServerOperationErrorGenerator.kt:88 */
  421    749   
    }
         750  +
    /* ServerOperationErrorGenerator.kt:92 */
  422    751   
    /// Returns the error name string by matching the correct variant.
         752  +
    /* ServerOperationErrorGenerator.kt:93 */
  423    753   
    pub fn name(&self) -> &'static str {
         754  +
        /* ServerOperationErrorGenerator.kt:139 */
  424    755   
        match &self {
  425         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => _inner.name(),
  426         -
            RequiredInnerShapeOperationError::InternalServerError(_inner) => _inner.name(),
         756  +
            /* ServerOperationErrorGenerator.kt:142 */
         757  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         758  +
            /* ServerOperationErrorGenerator.kt:95 */
         759  +
            {
         760  +
                _inner.name()
  427    761   
            }
         762  +
            ,
         763  +
            /* ServerOperationErrorGenerator.kt:142 */
         764  +
            RequiredInnerShapeOperationError::InternalServerError(_inner) =>
         765  +
            /* ServerOperationErrorGenerator.kt:95 */
         766  +
            {
         767  +
                _inner.name()
         768  +
            }
         769  +
            /* ServerOperationErrorGenerator.kt:139 */
  428    770   
        }
         771  +
        /* ServerOperationErrorGenerator.kt:93 */
         772  +
    }
         773  +
    /* ServerOperationErrorGenerator.kt:83 */
  429    774   
}
         775  +
/* ServerOperationErrorGenerator.kt:100 */
  430    776   
impl ::std::error::Error for RequiredInnerShapeOperationError {
         777  +
    /* ServerOperationErrorGenerator.kt:101 */
  431    778   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         779  +
        /* ServerOperationErrorGenerator.kt:139 */
  432    780   
        match &self {
  433         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => Some(_inner),
  434         -
            RequiredInnerShapeOperationError::InternalServerError(_inner) => Some(_inner),
         781  +
            /* ServerOperationErrorGenerator.kt:142 */
         782  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         783  +
            /* ServerOperationErrorGenerator.kt:103 */
         784  +
            {
         785  +
                Some(_inner)
  435    786   
            }
         787  +
            ,
         788  +
            /* ServerOperationErrorGenerator.kt:142 */
         789  +
            RequiredInnerShapeOperationError::InternalServerError(_inner) =>
         790  +
            /* ServerOperationErrorGenerator.kt:103 */
         791  +
            {
         792  +
                Some(_inner)
         793  +
            }
         794  +
            /* ServerOperationErrorGenerator.kt:139 */
  436    795   
        }
         796  +
        /* ServerOperationErrorGenerator.kt:101 */
         797  +
    }
         798  +
    /* ServerOperationErrorGenerator.kt:100 */
  437    799   
}
         800  +
/* ServerOperationErrorGenerator.kt:110 */
  438    801   
impl ::std::convert::From<crate::error::ValidationException>
  439    802   
    for crate::error::RequiredInnerShapeOperationError
  440    803   
{
         804  +
    /* ServerOperationErrorGenerator.kt:111 */
  441    805   
    fn from(
  442    806   
        variant: crate::error::ValidationException,
  443    807   
    ) -> crate::error::RequiredInnerShapeOperationError {
         808  +
        /* ServerOperationErrorGenerator.kt:112 */
  444    809   
        Self::ValidationException(variant)
         810  +
        /* ServerOperationErrorGenerator.kt:111 */
  445    811   
    }
         812  +
    /* ServerOperationErrorGenerator.kt:110 */
  446    813   
}
         814  +
/* ServerOperationErrorGenerator.kt:110 */
  447    815   
impl ::std::convert::From<crate::error::InternalServerError>
  448    816   
    for crate::error::RequiredInnerShapeOperationError
  449    817   
{
         818  +
    /* ServerOperationErrorGenerator.kt:111 */
  450    819   
    fn from(
  451    820   
        variant: crate::error::InternalServerError,
  452    821   
    ) -> crate::error::RequiredInnerShapeOperationError {
         822  +
        /* ServerOperationErrorGenerator.kt:112 */
  453    823   
        Self::InternalServerError(variant)
         824  +
        /* ServerOperationErrorGenerator.kt:111 */
  454    825   
    }
         826  +
    /* ServerOperationErrorGenerator.kt:110 */
  455    827   
}
  456    828   
         829  +
/* PythonServerOperationErrorGenerator.kt:38 */
  457    830   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::RequiredInnerShapeOperationError {
  458    831   
    fn from(variant: ::pyo3::PyErr) -> crate::error::RequiredInnerShapeOperationError {
  459    832   
        ::pyo3::Python::with_gil(|py| {
  460    833   
            let error = variant.value(py);
  461    834   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  462    835   
                return error.into();
  463    836   
            }
  464    837   
            crate::error::InternalServerError {
  465    838   
                message: error.to_string(),
  466    839   
            }
  467    840   
            .into()
  468    841   
        })
  469    842   
    }
  470    843   
}
  471    844   
         845  +
/* ServerOperationErrorGenerator.kt:63 */
  472    846   
/// Error type for the `TypeComplexityOperation` operation.
         847  +
/* ServerOperationErrorGenerator.kt:64 */
  473    848   
/// Each variant represents an error that can occur for the `TypeComplexityOperation` operation.
         849  +
/* RustType.kt:516 */
  474    850   
#[derive(::std::fmt::Debug)]
  475         -
pub enum TypeComplexityOperationError {
         851  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum TypeComplexityOperationError {
         852  +
    /* ServerOperationErrorGenerator.kt:68 */
  476    853   
    #[allow(missing_docs)] // documentation missing in model
         854  +
    /* ServerOperationErrorGenerator.kt:71 */
  477    855   
    InternalServerError(crate::error::InternalServerError),
         856  +
    /* ServerOperationErrorGenerator.kt:66 */
  478    857   
}
         858  +
/* ServerOperationErrorGenerator.kt:75 */
  479    859   
impl ::std::fmt::Display for TypeComplexityOperationError {
         860  +
    /* ServerOperationErrorGenerator.kt:76 */
  480    861   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         862  +
        /* ServerOperationErrorGenerator.kt:139 */
  481    863   
        match &self {
  482         -
            TypeComplexityOperationError::InternalServerError(_inner) => _inner.fmt(f),
         864  +
            /* ServerOperationErrorGenerator.kt:142 */
         865  +
            TypeComplexityOperationError::InternalServerError(_inner) =>
         866  +
            /* ServerOperationErrorGenerator.kt:78 */
         867  +
            {
         868  +
                _inner.fmt(f)
  483    869   
            }
         870  +
            /* ServerOperationErrorGenerator.kt:139 */
  484    871   
        }
         872  +
        /* ServerOperationErrorGenerator.kt:76 */
         873  +
    }
         874  +
    /* ServerOperationErrorGenerator.kt:75 */
  485    875   
}
         876  +
/* ServerOperationErrorGenerator.kt:83 */
  486    877   
impl TypeComplexityOperationError {
         878  +
    /* ServerOperationErrorGenerator.kt:87 */
  487    879   
    /// Returns `true` if the error kind is `TypeComplexityOperationError::InternalServerError`.
         880  +
    /* ServerOperationErrorGenerator.kt:88 */
  488    881   
    pub fn is_internal_server_error(&self) -> bool {
         882  +
        /* ServerOperationErrorGenerator.kt:89 */
  489    883   
        matches!(&self, TypeComplexityOperationError::InternalServerError(_))
         884  +
        /* ServerOperationErrorGenerator.kt:88 */
  490    885   
    }
         886  +
    /* ServerOperationErrorGenerator.kt:92 */
  491    887   
    /// Returns the error name string by matching the correct variant.
         888  +
    /* ServerOperationErrorGenerator.kt:93 */
  492    889   
    pub fn name(&self) -> &'static str {
         890  +
        /* ServerOperationErrorGenerator.kt:139 */
  493    891   
        match &self {
  494         -
            TypeComplexityOperationError::InternalServerError(_inner) => _inner.name(),
         892  +
            /* ServerOperationErrorGenerator.kt:142 */
         893  +
            TypeComplexityOperationError::InternalServerError(_inner) =>
         894  +
            /* ServerOperationErrorGenerator.kt:95 */
         895  +
            {
         896  +
                _inner.name()
         897  +
            }
         898  +
            /* ServerOperationErrorGenerator.kt:139 */
  495    899   
        }
         900  +
        /* ServerOperationErrorGenerator.kt:93 */
  496    901   
    }
         902  +
    /* ServerOperationErrorGenerator.kt:83 */
  497    903   
}
         904  +
/* ServerOperationErrorGenerator.kt:100 */
  498    905   
impl ::std::error::Error for TypeComplexityOperationError {
         906  +
    /* ServerOperationErrorGenerator.kt:101 */
  499    907   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         908  +
        /* ServerOperationErrorGenerator.kt:139 */
  500    909   
        match &self {
  501         -
            TypeComplexityOperationError::InternalServerError(_inner) => Some(_inner),
         910  +
            /* ServerOperationErrorGenerator.kt:142 */
         911  +
            TypeComplexityOperationError::InternalServerError(_inner) =>
         912  +
            /* ServerOperationErrorGenerator.kt:103 */
         913  +
            {
         914  +
                Some(_inner)
         915  +
            }
         916  +
            /* ServerOperationErrorGenerator.kt:139 */
  502    917   
        }
         918  +
        /* ServerOperationErrorGenerator.kt:101 */
  503    919   
    }
         920  +
    /* ServerOperationErrorGenerator.kt:100 */
  504    921   
}
         922  +
/* ServerOperationErrorGenerator.kt:110 */
  505    923   
impl ::std::convert::From<crate::error::InternalServerError>
  506    924   
    for crate::error::TypeComplexityOperationError
  507    925   
{
         926  +
    /* ServerOperationErrorGenerator.kt:111 */
  508    927   
    fn from(
  509    928   
        variant: crate::error::InternalServerError,
  510    929   
    ) -> crate::error::TypeComplexityOperationError {
         930  +
        /* ServerOperationErrorGenerator.kt:112 */
  511    931   
        Self::InternalServerError(variant)
         932  +
        /* ServerOperationErrorGenerator.kt:111 */
  512    933   
    }
         934  +
    /* ServerOperationErrorGenerator.kt:110 */
  513    935   
}
  514    936   
         937  +
/* PythonServerOperationErrorGenerator.kt:38 */
  515    938   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::TypeComplexityOperationError {
  516    939   
    fn from(variant: ::pyo3::PyErr) -> crate::error::TypeComplexityOperationError {
  517    940   
        ::pyo3::Python::with_gil(|py| {
  518    941   
            let error = variant.value(py);
  519    942   
  520    943   
            crate::error::InternalServerError {
  521    944   
                message: error.to_string(),
  522    945   
            }
  523    946   
            .into()
  524    947   
        })
  525    948   
    }
  526    949   
}
  527         -
/// See [`InternalServerError`](crate::error::InternalServerError).
         950  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InternalServerError`](crate::error::InternalServerError).
  528    951   
pub mod internal_server_error {
  529    952   
         953  +
    /* RustType.kt:516 */
  530    954   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  531         -
    /// Holds one variant for each of the ways the builder can fail.
  532         -
         955  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         956  +
    /* ServerBuilderConstraintViolations.kt:75 */
  533    957   
    #[allow(clippy::enum_variant_names)]
  534    958   
    pub enum ConstraintViolation {
  535         -
        /// `message` was not provided but it is required when building `InternalServerError`.
         959  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `InternalServerError`.
         960  +
        /* ServerBuilderConstraintViolations.kt:143 */
  536    961   
        MissingMessage,
         962  +
        /* ServerBuilderConstraintViolations.kt:75 */
  537    963   
    }
         964  +
    /* ServerBuilderConstraintViolations.kt:117 */
  538    965   
    impl ::std::fmt::Display for ConstraintViolation {
         966  +
        /* ServerBuilderConstraintViolations.kt:118 */
  539    967   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         968  +
            /* ServerBuilderConstraintViolations.kt:119 */
  540    969   
            match self {
  541         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
  542         -
            }
         970  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
         971  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         972  +
            /* ServerBuilderConstraintViolations.kt:118 */
  543    973   
        }
         974  +
        /* ServerBuilderConstraintViolations.kt:117 */
  544    975   
    }
         976  +
    /* ServerBuilderConstraintViolations.kt:84 */
  545    977   
    impl ::std::error::Error for ConstraintViolation {}
         978  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  546    979   
    impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
  547    980   
        type Error = ConstraintViolation;
  548    981   
  549    982   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  550    983   
            builder.build()
  551    984   
        }
  552    985   
    }
  553         -
    /// A builder for [`InternalServerError`](crate::error::InternalServerError).
         986  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InternalServerError`](crate::error::InternalServerError).
         987  +
    /* RustType.kt:516 */
  554    988   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         989  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  555    990   
    pub struct Builder {
         991  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  556    992   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         993  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  557    994   
    }
         995  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  558    996   
    impl Builder {
         997  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  559    998   
        #[allow(missing_docs)] // documentation missing in model
         999  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  560   1000   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  561         -
            self.message = Some(input);
        1001  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        1002  +
            self.message =
        1003  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
        1004  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        1005  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
        1006  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  562   1007   
            self
        1008  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  563   1009   
        }
  564         -
        /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
  565         -
        ///
        1010  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
        1011  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  566   1012   
        /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
  567   1013   
        ///
        1014  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  568   1015   
        pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
  569   1016   
            self.build_enforcing_required_and_enum_traits()
  570   1017   
        }
        1018  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  571   1019   
        fn build_enforcing_required_and_enum_traits(
  572   1020   
            self,
  573   1021   
        ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
  574         -
            Ok(crate::error::InternalServerError {
  575         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  576         -
            })
        1022  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        1023  +
            Ok(
        1024  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1025  +
                crate::error::InternalServerError {
        1026  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        1027  +
                    message: self
        1028  +
                        .message
        1029  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
        1030  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
        1031  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1032  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        1033  +
            )
        1034  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  577   1035   
        }
        1036  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  578   1037   
    }
        1038  +
        1039  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  579   1040   
}
  580         -
/// See [`ValidationException`](crate::error::ValidationException).
        1041  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationException`](crate::error::ValidationException).
  581   1042   
pub mod validation_exception {
  582   1043   
        1044  +
    /* RustType.kt:516 */
  583   1045   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  584         -
    /// Holds one variant for each of the ways the builder can fail.
  585         -
        1046  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        1047  +
    /* ServerBuilderConstraintViolations.kt:75 */
  586   1048   
    #[allow(clippy::enum_variant_names)]
  587   1049   
    pub enum ConstraintViolation {
  588         -
        /// `message` was not provided but it is required when building `ValidationException`.
        1050  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
        1051  +
        /* ServerBuilderConstraintViolations.kt:143 */
  589   1052   
        MissingMessage,
        1053  +
        /* ServerBuilderConstraintViolations.kt:75 */
  590   1054   
    }
        1055  +
    /* ServerBuilderConstraintViolations.kt:117 */
  591   1056   
    impl ::std::fmt::Display for ConstraintViolation {
        1057  +
        /* ServerBuilderConstraintViolations.kt:118 */
  592   1058   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1059  +
            /* ServerBuilderConstraintViolations.kt:119 */
  593   1060   
            match self {
  594         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
  595         -
            }
        1061  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
        1062  +
            /* ServerBuilderConstraintViolations.kt:119 */}
        1063  +
            /* ServerBuilderConstraintViolations.kt:118 */
  596   1064   
        }
        1065  +
        /* ServerBuilderConstraintViolations.kt:117 */
  597   1066   
    }
        1067  +
    /* ServerBuilderConstraintViolations.kt:84 */
  598   1068   
    impl ::std::error::Error for ConstraintViolation {}
        1069  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  599   1070   
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
  600   1071   
        type Error = ConstraintViolation;
  601   1072   
  602   1073   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  603   1074   
            builder.build()
  604   1075   
        }
  605   1076   
    }
  606         -
    /// A builder for [`ValidationException`](crate::error::ValidationException).
        1077  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationException`](crate::error::ValidationException).
        1078  +
    /* RustType.kt:516 */
  607   1079   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1080  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  608   1081   
    pub struct Builder {
        1082  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  609   1083   
        pub(crate) message: ::std::option::Option<::std::string::String>,
        1084  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  610   1085   
        pub(crate) field_list:
  611   1086   
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
        1087  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  612   1088   
    }
        1089  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  613   1090   
    impl Builder {
  614         -
        /// A summary of the validation failure.
        1091  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A summary of the validation failure.
        1092  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  615   1093   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  616         -
            self.message = Some(input);
        1094  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        1095  +
            self.message =
        1096  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
        1097  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        1098  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
        1099  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  617   1100   
            self
        1101  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  618   1102   
        }
  619         -
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
        1103  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
        1104  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  620   1105   
        pub fn field_list(
  621   1106   
            mut self,
  622   1107   
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  623   1108   
        ) -> Self {
  624         -
            self.field_list = input;
        1109  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        1110  +
            self.field_list =
        1111  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        1112  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  625   1113   
            self
        1114  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  626   1115   
        }
  627         -
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
  628         -
        ///
        1116  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
        1117  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  629   1118   
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
  630   1119   
        ///
        1120  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  631   1121   
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
  632   1122   
            self.build_enforcing_required_and_enum_traits()
  633   1123   
        }
        1124  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  634   1125   
        fn build_enforcing_required_and_enum_traits(
  635   1126   
            self,
  636   1127   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  637         -
            Ok(crate::error::ValidationException {
  638         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
        1128  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        1129  +
            Ok(
        1130  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1131  +
                crate::error::ValidationException {
        1132  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        1133  +
                    message: self
        1134  +
                        .message
        1135  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
        1136  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
        1137  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
  639   1138   
                    field_list: self.field_list,
  640         -
            })
        1139  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1140  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        1141  +
            )
        1142  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  641   1143   
        }
        1144  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  642   1145   
    }
        1146  +
        1147  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  643   1148   
}

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

@@ -1,1 +956,1359 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[::pyo3::pyclass]
           4  +
/* PythonServerStructureGenerator.kt:63 */
    3      5   
/// :rtype None:
           6  +
/* StructureGenerator.kt:197 */
    4      7   
#[allow(missing_docs)] // documentation missing in model
           8  +
/* RustType.kt:516 */
    5      9   
#[derive(
    6     10   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    7     11   
)]
    8         -
pub struct ResponseCodeDefaultOperationInput {}
          12  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeDefaultOperationInput {/* StructureGenerator.kt:201 */}
          13  +
/* RustType.kt:516 */
    9     14   
#[allow(clippy::new_without_default)]
          15  +
/* RustType.kt:516 */
   10     16   
#[allow(clippy::too_many_arguments)]
          17  +
/* RustType.kt:516 */
   11     18   
#[::pyo3::pymethods]
          19  +
/* PythonServerStructureGenerator.kt:88 */
   12     20   
impl ResponseCodeDefaultOperationInput {
   13     21   
    #[new]
   14     22   
    pub fn new() -> Self {
   15     23   
        Self {}
   16     24   
    }
   17     25   
    fn __repr__(&self) -> String {
   18     26   
        format!("{self:?}")
   19     27   
    }
   20     28   
    fn __str__(&self) -> String {
   21     29   
        format!("{self:?}")
   22     30   
    }
   23     31   
}
          32  +
/* PythonServerStructureGenerator.kt:111 */
   24     33   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ResponseCodeDefaultOperationInput> {
   25     34   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   26     35   
        ob.extract::<ResponseCodeDefaultOperationInput>()
   27     36   
            .map(Box::new)
   28     37   
    }
   29     38   
}
   30     39   
   31     40   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeDefaultOperationInput> {
   32     41   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   33     42   
        (*self).into_py(py)
   34     43   
    }
   35     44   
}
          45  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   36     46   
impl crate::constrained::Constrained for crate::input::ResponseCodeDefaultOperationInput {
   37     47   
    type Unconstrained = crate::input::response_code_default_operation_input_internal::Builder;
   38     48   
}
          49  +
/* ServerCodegenVisitor.kt:370 */
   39     50   
impl ResponseCodeDefaultOperationInput {
   40         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
          51  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
          52  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   41     53   
    pub fn builder() -> crate::input::response_code_default_operation_input::Builder {
          54  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   42     55   
        crate::input::response_code_default_operation_input::Builder::default()
          56  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   43     57   
    }
          58  +
    /* ServerCodegenVisitor.kt:370 */
   44     59   
}
   45     60   
          61  +
/* RustType.kt:516 */
   46     62   
#[::pyo3::pyclass]
          63  +
/* PythonServerStructureGenerator.kt:63 */
   47     64   
/// :rtype None:
          65  +
/* StructureGenerator.kt:197 */
   48     66   
#[allow(missing_docs)] // documentation missing in model
          67  +
/* RustType.kt:516 */
   49     68   
#[derive(
   50     69   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   51     70   
)]
   52         -
pub struct ResponseCodeHttpFallbackOperationInput {}
          71  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeHttpFallbackOperationInput {/* StructureGenerator.kt:201 */}
          72  +
/* RustType.kt:516 */
   53     73   
#[allow(clippy::new_without_default)]
          74  +
/* RustType.kt:516 */
   54     75   
#[allow(clippy::too_many_arguments)]
          76  +
/* RustType.kt:516 */
   55     77   
#[::pyo3::pymethods]
          78  +
/* PythonServerStructureGenerator.kt:88 */
   56     79   
impl ResponseCodeHttpFallbackOperationInput {
   57     80   
    #[new]
   58     81   
    pub fn new() -> Self {
   59     82   
        Self {}
   60     83   
    }
   61     84   
    fn __repr__(&self) -> String {
   62     85   
        format!("{self:?}")
   63     86   
    }
   64     87   
    fn __str__(&self) -> String {
   65     88   
        format!("{self:?}")
   66     89   
    }
   67     90   
}
          91  +
/* PythonServerStructureGenerator.kt:111 */
   68     92   
impl<'source> ::pyo3::FromPyObject<'source>
   69     93   
    for std::boxed::Box<ResponseCodeHttpFallbackOperationInput>
   70     94   
{
   71     95   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   72     96   
        ob.extract::<ResponseCodeHttpFallbackOperationInput>()
   73     97   
            .map(Box::new)
   74     98   
    }
   75     99   
}
   76    100   
   77    101   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeHttpFallbackOperationInput> {
   78    102   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   79    103   
        (*self).into_py(py)
   80    104   
    }
   81    105   
}
         106  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   82    107   
impl crate::constrained::Constrained for crate::input::ResponseCodeHttpFallbackOperationInput {
   83    108   
    type Unconstrained =
   84    109   
        crate::input::response_code_http_fallback_operation_input_internal::Builder;
   85    110   
}
         111  +
/* ServerCodegenVisitor.kt:370 */
   86    112   
impl ResponseCodeHttpFallbackOperationInput {
   87         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         113  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         114  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   88    115   
    pub fn builder() -> crate::input::response_code_http_fallback_operation_input::Builder {
         116  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   89    117   
        crate::input::response_code_http_fallback_operation_input::Builder::default()
         118  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   90    119   
    }
         120  +
    /* ServerCodegenVisitor.kt:370 */
   91    121   
}
   92    122   
         123  +
/* RustType.kt:516 */
   93    124   
#[::pyo3::pyclass]
         125  +
/* PythonServerStructureGenerator.kt:63 */
   94    126   
/// :rtype None:
         127  +
/* StructureGenerator.kt:197 */
   95    128   
#[allow(missing_docs)] // documentation missing in model
         129  +
/* RustType.kt:516 */
   96    130   
#[derive(
   97    131   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   98    132   
)]
   99         -
pub struct ResponseCodeRequiredOperationInput {}
         133  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeRequiredOperationInput {/* StructureGenerator.kt:201 */}
         134  +
/* RustType.kt:516 */
  100    135   
#[allow(clippy::new_without_default)]
         136  +
/* RustType.kt:516 */
  101    137   
#[allow(clippy::too_many_arguments)]
         138  +
/* RustType.kt:516 */
  102    139   
#[::pyo3::pymethods]
         140  +
/* PythonServerStructureGenerator.kt:88 */
  103    141   
impl ResponseCodeRequiredOperationInput {
  104    142   
    #[new]
  105    143   
    pub fn new() -> Self {
  106    144   
        Self {}
  107    145   
    }
  108    146   
    fn __repr__(&self) -> String {
  109    147   
        format!("{self:?}")
  110    148   
    }
  111    149   
    fn __str__(&self) -> String {
  112    150   
        format!("{self:?}")
  113    151   
    }
  114    152   
}
         153  +
/* PythonServerStructureGenerator.kt:111 */
  115    154   
impl<'source> ::pyo3::FromPyObject<'source>
  116    155   
    for std::boxed::Box<ResponseCodeRequiredOperationInput>
  117    156   
{
  118    157   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  119    158   
        ob.extract::<ResponseCodeRequiredOperationInput>()
  120    159   
            .map(Box::new)
  121    160   
    }
  122    161   
}
  123    162   
  124    163   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeRequiredOperationInput> {
  125    164   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  126    165   
        (*self).into_py(py)
  127    166   
    }
  128    167   
}
         168  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  129    169   
impl crate::constrained::Constrained for crate::input::ResponseCodeRequiredOperationInput {
  130    170   
    type Unconstrained = crate::input::response_code_required_operation_input_internal::Builder;
  131    171   
}
         172  +
/* ServerCodegenVisitor.kt:370 */
  132    173   
impl ResponseCodeRequiredOperationInput {
  133         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         174  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         175  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  134    176   
    pub fn builder() -> crate::input::response_code_required_operation_input::Builder {
         177  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  135    178   
        crate::input::response_code_required_operation_input::Builder::default()
         179  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  136    180   
    }
         181  +
    /* ServerCodegenVisitor.kt:370 */
  137    182   
}
  138    183   
         184  +
/* RustType.kt:516 */
  139    185   
#[::pyo3::pyclass]
         186  +
/* PythonServerStructureGenerator.kt:63 */
  140    187   
/// :param required_header_list typing.List\[str\]:
  141    188   
/// :param required_header_set typing.List\[str\]:
  142    189   
/// :rtype None:
         190  +
/* StructureGenerator.kt:197 */
  143    191   
#[allow(missing_docs)] // documentation missing in model
         192  +
/* RustType.kt:516 */
  144    193   
#[derive(
  145    194   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  146    195   
)]
  147         -
pub struct RequiredHeaderCollectionOperationInput {
         196  +
pub /* StructureGenerator.kt:201 */ struct RequiredHeaderCollectionOperationInput {
         197  +
    /* RustType.kt:516 */
  148    198   
    #[pyo3(get, set)]
         199  +
    /* PythonServerStructureGenerator.kt:80 */
  149    200   
    /// :type typing.List\[str\]:
         201  +
    /* StructureGenerator.kt:231 */
  150    202   
    #[allow(missing_docs)] // documentation missing in model
  151    203   
    pub required_header_list: ::std::vec::Vec<::std::string::String>,
         204  +
    /* RustType.kt:516 */
  152    205   
    #[pyo3(get, set)]
         206  +
    /* PythonServerStructureGenerator.kt:80 */
  153    207   
    /// :type typing.List\[str\]:
         208  +
    /* StructureGenerator.kt:231 */
  154    209   
    #[allow(missing_docs)] // documentation missing in model
  155    210   
    pub required_header_set: ::std::vec::Vec<::std::string::String>,
         211  +
    /* StructureGenerator.kt:201 */
  156    212   
}
         213  +
/* StructureGenerator.kt:135 */
  157    214   
impl RequiredHeaderCollectionOperationInput {
         215  +
    /* StructureGenerator.kt:231 */
  158    216   
    #[allow(missing_docs)] // documentation missing in model
         217  +
                           /* StructureGenerator.kt:166 */
  159    218   
    pub fn required_header_list(&self) -> &[::std::string::String] {
         219  +
        /* StructureGenerator.kt:171 */
  160    220   
        use std::ops::Deref;
  161    221   
        self.required_header_list.deref()
         222  +
        /* StructureGenerator.kt:166 */
  162    223   
    }
         224  +
    /* StructureGenerator.kt:231 */
  163    225   
    #[allow(missing_docs)] // documentation missing in model
         226  +
                           /* StructureGenerator.kt:166 */
  164    227   
    pub fn required_header_set(&self) -> &[::std::string::String] {
         228  +
        /* StructureGenerator.kt:171 */
  165    229   
        use std::ops::Deref;
  166    230   
        self.required_header_set.deref()
         231  +
        /* StructureGenerator.kt:166 */
  167    232   
    }
         233  +
    /* StructureGenerator.kt:135 */
  168    234   
}
         235  +
/* RustType.kt:516 */
  169    236   
#[allow(clippy::new_without_default)]
         237  +
/* RustType.kt:516 */
  170    238   
#[allow(clippy::too_many_arguments)]
         239  +
/* RustType.kt:516 */
  171    240   
#[::pyo3::pymethods]
         241  +
/* PythonServerStructureGenerator.kt:88 */
  172    242   
impl RequiredHeaderCollectionOperationInput {
  173    243   
    #[new]
  174    244   
    pub fn new(
  175    245   
        required_header_list: ::std::vec::Vec<::std::string::String>,
  176    246   
        required_header_set: ::std::vec::Vec<::std::string::String>,
  177    247   
    ) -> Self {
  178    248   
        Self {
  179    249   
            required_header_list,
  180    250   
            required_header_set,
  181    251   
        }
  182    252   
    }
  183    253   
    fn __repr__(&self) -> String {
  184    254   
        format!("{self:?}")
  185    255   
    }
  186    256   
    fn __str__(&self) -> String {
  187    257   
        format!("{self:?}")
  188    258   
    }
  189    259   
}
         260  +
/* PythonServerStructureGenerator.kt:111 */
  190    261   
impl<'source> ::pyo3::FromPyObject<'source>
  191    262   
    for std::boxed::Box<RequiredHeaderCollectionOperationInput>
  192    263   
{
  193    264   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  194    265   
        ob.extract::<RequiredHeaderCollectionOperationInput>()
  195    266   
            .map(Box::new)
  196    267   
    }
  197    268   
}
  198    269   
  199    270   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredHeaderCollectionOperationInput> {
  200    271   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  201    272   
        (*self).into_py(py)
  202    273   
    }
  203    274   
}
         275  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  204    276   
impl crate::constrained::Constrained for crate::input::RequiredHeaderCollectionOperationInput {
  205    277   
    type Unconstrained = crate::input::required_header_collection_operation_input_internal::Builder;
  206    278   
}
         279  +
/* ServerCodegenVisitor.kt:370 */
  207    280   
impl RequiredHeaderCollectionOperationInput {
  208         -
    /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         281  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         282  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  209    283   
    pub fn builder() -> crate::input::required_header_collection_operation_input::Builder {
         284  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  210    285   
        crate::input::required_header_collection_operation_input::Builder::default()
         286  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  211    287   
    }
         288  +
    /* ServerCodegenVisitor.kt:370 */
  212    289   
}
  213    290   
         291  +
/* RustType.kt:516 */
  214    292   
#[::pyo3::pyclass]
         293  +
/* PythonServerStructureGenerator.kt:63 */
  215    294   
/// :param inner typing.Optional\[misc.model.InnerShape\]:
  216    295   
/// :rtype None:
         296  +
/* StructureGenerator.kt:197 */
  217    297   
#[allow(missing_docs)] // documentation missing in model
         298  +
/* RustType.kt:516 */
  218    299   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  219         -
pub struct RequiredInnerShapeOperationInput {
         300  +
pub /* StructureGenerator.kt:201 */ struct RequiredInnerShapeOperationInput {
         301  +
    /* RustType.kt:516 */
  220    302   
    #[pyo3(get, set)]
         303  +
    /* PythonServerStructureGenerator.kt:80 */
  221    304   
    /// :type typing.Optional\[misc.model.InnerShape\]:
         305  +
    /* StructureGenerator.kt:231 */
  222    306   
    #[allow(missing_docs)] // documentation missing in model
  223    307   
    pub inner: ::std::option::Option<crate::model::InnerShape>,
         308  +
    /* StructureGenerator.kt:201 */
  224    309   
}
         310  +
/* StructureGenerator.kt:135 */
  225    311   
impl RequiredInnerShapeOperationInput {
         312  +
    /* StructureGenerator.kt:231 */
  226    313   
    #[allow(missing_docs)] // documentation missing in model
         314  +
                           /* StructureGenerator.kt:166 */
  227    315   
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
         316  +
        /* StructureGenerator.kt:170 */
  228    317   
        self.inner.as_ref()
         318  +
        /* StructureGenerator.kt:166 */
  229    319   
    }
         320  +
    /* StructureGenerator.kt:135 */
  230    321   
}
         322  +
/* RustType.kt:516 */
  231    323   
#[allow(clippy::new_without_default)]
         324  +
/* RustType.kt:516 */
  232    325   
#[allow(clippy::too_many_arguments)]
         326  +
/* RustType.kt:516 */
  233    327   
#[::pyo3::pymethods]
         328  +
/* PythonServerStructureGenerator.kt:88 */
  234    329   
impl RequiredInnerShapeOperationInput {
  235    330   
    #[new]
  236    331   
    pub fn new(inner: ::std::option::Option<crate::model::InnerShape>) -> Self {
  237    332   
        Self { inner }
  238    333   
    }
  239    334   
    fn __repr__(&self) -> String {
  240    335   
        format!("{self:?}")
  241    336   
    }
  242    337   
    fn __str__(&self) -> String {
  243    338   
        format!("{self:?}")
  244    339   
    }
  245    340   
}
         341  +
/* PythonServerStructureGenerator.kt:111 */
  246    342   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RequiredInnerShapeOperationInput> {
  247    343   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  248    344   
        ob.extract::<RequiredInnerShapeOperationInput>()
  249    345   
            .map(Box::new)
  250    346   
    }
  251    347   
}
  252    348   
  253    349   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredInnerShapeOperationInput> {
  254    350   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  255    351   
        (*self).into_py(py)
  256    352   
    }
  257    353   
}
         354  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  258    355   
impl crate::constrained::Constrained for crate::input::RequiredInnerShapeOperationInput {
  259    356   
    type Unconstrained = crate::input::required_inner_shape_operation_input_internal::Builder;
  260    357   
}
         358  +
/* ServerCodegenVisitor.kt:370 */
  261    359   
impl RequiredInnerShapeOperationInput {
  262         -
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         360  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         361  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  263    362   
    pub fn builder() -> crate::input::required_inner_shape_operation_input::Builder {
         363  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  264    364   
        crate::input::required_inner_shape_operation_input::Builder::default()
         365  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  265    366   
    }
         367  +
    /* ServerCodegenVisitor.kt:370 */
  266    368   
}
  267    369   
         370  +
/* RustType.kt:516 */
  268    371   
#[::pyo3::pyclass]
         372  +
/* PythonServerStructureGenerator.kt:63 */
  269    373   
/// :param list typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
  270    374   
/// :rtype None:
         375  +
/* StructureGenerator.kt:197 */
  271    376   
#[allow(missing_docs)] // documentation missing in model
         377  +
/* RustType.kt:516 */
  272    378   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  273         -
pub struct TypeComplexityOperationInput {
         379  +
pub /* StructureGenerator.kt:201 */ struct TypeComplexityOperationInput {
         380  +
    /* RustType.kt:516 */
  274    381   
    #[pyo3(get, set)]
         382  +
    /* PythonServerStructureGenerator.kt:80 */
  275    383   
    /// :type typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
         384  +
    /* StructureGenerator.kt:231 */
  276    385   
    #[allow(missing_docs)] // documentation missing in model
  277    386   
    pub list: ::std::option::Option<
  278    387   
        ::std::vec::Vec<
  279    388   
            ::std::vec::Vec<
  280    389   
                ::std::vec::Vec<
  281    390   
                    ::std::collections::HashMap<
  282    391   
                        ::std::string::String,
  283    392   
                        crate::model::EmptyStructure,
  284    393   
                    >,
  285    394   
                >,
  286    395   
            >,
  287    396   
        >,
  288    397   
    >,
         398  +
    /* StructureGenerator.kt:201 */
  289    399   
}
         400  +
/* StructureGenerator.kt:135 */
  290    401   
impl TypeComplexityOperationInput {
         402  +
    /* StructureGenerator.kt:231 */
  291    403   
    #[allow(missing_docs)] // documentation missing in model
         404  +
                           /* StructureGenerator.kt:166 */
  292    405   
    pub fn list(
  293    406   
        &self,
  294    407   
    ) -> ::std::option::Option<
  295    408   
        &[::std::vec::Vec<
  296    409   
            ::std::vec::Vec<
  297    410   
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
  298    411   
            >,
  299    412   
        >],
  300    413   
    > {
         414  +
        /* StructureGenerator.kt:169 */
  301    415   
        self.list.as_deref()
         416  +
        /* StructureGenerator.kt:166 */
  302    417   
    }
         418  +
    /* StructureGenerator.kt:135 */
  303    419   
}
         420  +
/* RustType.kt:516 */
  304    421   
#[allow(clippy::new_without_default)]
         422  +
/* RustType.kt:516 */
  305    423   
#[allow(clippy::too_many_arguments)]
         424  +
/* RustType.kt:516 */
  306    425   
#[::pyo3::pymethods]
         426  +
/* PythonServerStructureGenerator.kt:88 */
  307    427   
impl TypeComplexityOperationInput {
  308    428   
    #[new]
  309    429   
    pub fn new(
  310    430   
        list: ::std::option::Option<
  311    431   
            ::std::vec::Vec<
  312    432   
                ::std::vec::Vec<
  313    433   
                    ::std::vec::Vec<
  314    434   
                        ::std::collections::HashMap<
  315    435   
                            ::std::string::String,
  316    436   
                            crate::model::EmptyStructure,
  317    437   
                        >,
  318    438   
                    >,
  319    439   
                >,
  320    440   
            >,
  321    441   
        >,
  322    442   
    ) -> Self {
  323    443   
        Self { list }
  324    444   
    }
  325    445   
    fn __repr__(&self) -> String {
  326    446   
        format!("{self:?}")
  327    447   
    }
  328    448   
    fn __str__(&self) -> String {
  329    449   
        format!("{self:?}")
  330    450   
    }
  331    451   
}
         452  +
/* PythonServerStructureGenerator.kt:111 */
  332    453   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TypeComplexityOperationInput> {
  333    454   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  334    455   
        ob.extract::<TypeComplexityOperationInput>().map(Box::new)
  335    456   
    }
  336    457   
}
  337    458   
  338    459   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TypeComplexityOperationInput> {
  339    460   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  340    461   
        (*self).into_py(py)
  341    462   
    }
  342    463   
}
         464  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  343    465   
impl crate::constrained::Constrained for crate::input::TypeComplexityOperationInput {
  344    466   
    type Unconstrained = crate::input::type_complexity_operation_input_internal::Builder;
  345    467   
}
         468  +
/* ServerCodegenVisitor.kt:370 */
  346    469   
impl TypeComplexityOperationInput {
  347         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         470  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         471  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  348    472   
    pub fn builder() -> crate::input::type_complexity_operation_input::Builder {
         473  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  349    474   
        crate::input::type_complexity_operation_input::Builder::default()
         475  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  350    476   
    }
         477  +
    /* ServerCodegenVisitor.kt:370 */
  351    478   
}
  352         -
/// See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         479  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
  353    480   
pub(crate) mod response_code_default_operation_input_internal {
  354    481   
         482  +
    /* ServerBuilderGenerator.kt:461 */
  355    483   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeDefaultOperationInput {
  356    484   
        fn from(builder: Builder) -> Self {
  357    485   
            builder.build()
  358    486   
        }
  359    487   
    }
  360         -
    /// A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         488  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         489  +
    /* RustType.kt:516 */
  361    490   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  362         -
    pub(crate) struct Builder {}
         491  +
    /* ServerBuilderGenerator.kt:211 */
         492  +
    pub(crate) struct Builder {/* ServerBuilderGenerator.kt:211 */}
         493  +
    /* ServerBuilderGenerator.kt:215 */
  363    494   
    impl Builder {
  364         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         495  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         496  +
        /* ServerBuilderGenerator.kt:271 */
  365    497   
        pub fn build(self) -> crate::input::ResponseCodeDefaultOperationInput {
  366    498   
            self.build_enforcing_all_constraints()
  367    499   
        }
         500  +
        /* ServerBuilderGenerator.kt:283 */
  368    501   
        fn build_enforcing_all_constraints(
  369    502   
            self,
  370    503   
        ) -> crate::input::ResponseCodeDefaultOperationInput {
  371         -
            crate::input::ResponseCodeDefaultOperationInput {}
         504  +
            /* ServerBuilderGenerator.kt:542 */
         505  +
            crate::input::ResponseCodeDefaultOperationInput {
         506  +
            /* ServerBuilderGenerator.kt:542 */}
         507  +
            /* ServerBuilderGenerator.kt:283 */
  372    508   
        }
         509  +
        /* ServerBuilderGenerator.kt:215 */
  373    510   
    }
         511  +
         512  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  374    513   
}
  375         -
/// See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         514  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
  376    515   
pub mod response_code_default_operation_input {
  377    516   
         517  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  378    518   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeDefaultOperationInput {
  379    519   
        fn from(builder: Builder) -> Self {
  380    520   
            builder.build()
  381    521   
        }
  382    522   
    }
  383         -
    /// A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         523  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         524  +
    /* RustType.kt:516 */
  384    525   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  385         -
    pub struct Builder {}
         526  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         527  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         528  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  386    529   
    impl Builder {
  387         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         530  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         531  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  388    532   
        pub fn build(self) -> crate::input::ResponseCodeDefaultOperationInput {
  389    533   
            self.build_enforcing_required_and_enum_traits()
  390    534   
        }
         535  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  391    536   
        fn build_enforcing_required_and_enum_traits(
  392    537   
            self,
  393    538   
        ) -> crate::input::ResponseCodeDefaultOperationInput {
  394         -
            crate::input::ResponseCodeDefaultOperationInput {}
         539  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         540  +
            crate::input::ResponseCodeDefaultOperationInput {
         541  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         542  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  395    543   
        }
         544  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  396    545   
    }
         546  +
         547  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  397    548   
}
  398         -
/// See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         549  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
  399    550   
pub(crate) mod response_code_http_fallback_operation_input_internal {
  400    551   
         552  +
    /* ServerBuilderGenerator.kt:461 */
  401    553   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeHttpFallbackOperationInput {
  402    554   
        fn from(builder: Builder) -> Self {
  403    555   
            builder.build()
  404    556   
        }
  405    557   
    }
  406         -
    /// A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         558  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         559  +
    /* RustType.kt:516 */
  407    560   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  408         -
    pub(crate) struct Builder {}
         561  +
    /* ServerBuilderGenerator.kt:211 */
         562  +
    pub(crate) struct Builder {/* ServerBuilderGenerator.kt:211 */}
         563  +
    /* ServerBuilderGenerator.kt:215 */
  409    564   
    impl Builder {
  410         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         565  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         566  +
        /* ServerBuilderGenerator.kt:271 */
  411    567   
        pub fn build(self) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  412    568   
            self.build_enforcing_all_constraints()
  413    569   
        }
         570  +
        /* ServerBuilderGenerator.kt:283 */
  414    571   
        fn build_enforcing_all_constraints(
  415    572   
            self,
  416    573   
        ) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  417         -
            crate::input::ResponseCodeHttpFallbackOperationInput {}
         574  +
            /* ServerBuilderGenerator.kt:542 */
         575  +
            crate::input::ResponseCodeHttpFallbackOperationInput {
         576  +
            /* ServerBuilderGenerator.kt:542 */}
         577  +
            /* ServerBuilderGenerator.kt:283 */
  418    578   
        }
         579  +
        /* ServerBuilderGenerator.kt:215 */
  419    580   
    }
         581  +
         582  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  420    583   
}
  421         -
/// See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         584  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
  422    585   
pub mod response_code_http_fallback_operation_input {
  423    586   
         587  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  424    588   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeHttpFallbackOperationInput {
  425    589   
        fn from(builder: Builder) -> Self {
  426    590   
            builder.build()
  427    591   
        }
  428    592   
    }
  429         -
    /// A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         593  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         594  +
    /* RustType.kt:516 */
  430    595   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  431         -
    pub struct Builder {}
         596  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         597  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         598  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  432    599   
    impl Builder {
  433         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         600  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         601  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  434    602   
        pub fn build(self) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  435    603   
            self.build_enforcing_required_and_enum_traits()
  436    604   
        }
         605  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  437    606   
        fn build_enforcing_required_and_enum_traits(
  438    607   
            self,
  439    608   
        ) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  440         -
            crate::input::ResponseCodeHttpFallbackOperationInput {}
         609  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         610  +
            crate::input::ResponseCodeHttpFallbackOperationInput {
         611  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         612  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  441    613   
        }
         614  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  442    615   
    }
         616  +
         617  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  443    618   
}
  444         -
/// See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         619  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
  445    620   
pub(crate) mod response_code_required_operation_input_internal {
  446    621   
         622  +
    /* ServerBuilderGenerator.kt:461 */
  447    623   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeRequiredOperationInput {
  448    624   
        fn from(builder: Builder) -> Self {
  449    625   
            builder.build()
  450    626   
        }
  451    627   
    }
  452         -
    /// A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         628  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         629  +
    /* RustType.kt:516 */
  453    630   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  454         -
    pub(crate) struct Builder {}
         631  +
    /* ServerBuilderGenerator.kt:211 */
         632  +
    pub(crate) struct Builder {/* ServerBuilderGenerator.kt:211 */}
         633  +
    /* ServerBuilderGenerator.kt:215 */
  455    634   
    impl Builder {
  456         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         635  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         636  +
        /* ServerBuilderGenerator.kt:271 */
  457    637   
        pub fn build(self) -> crate::input::ResponseCodeRequiredOperationInput {
  458    638   
            self.build_enforcing_all_constraints()
  459    639   
        }
         640  +
        /* ServerBuilderGenerator.kt:283 */
  460    641   
        fn build_enforcing_all_constraints(
  461    642   
            self,
  462    643   
        ) -> crate::input::ResponseCodeRequiredOperationInput {
  463         -
            crate::input::ResponseCodeRequiredOperationInput {}
         644  +
            /* ServerBuilderGenerator.kt:542 */
         645  +
            crate::input::ResponseCodeRequiredOperationInput {
         646  +
            /* ServerBuilderGenerator.kt:542 */}
         647  +
            /* ServerBuilderGenerator.kt:283 */
  464    648   
        }
         649  +
        /* ServerBuilderGenerator.kt:215 */
  465    650   
    }
         651  +
         652  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  466    653   
}
  467         -
/// See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         654  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
  468    655   
pub mod response_code_required_operation_input {
  469    656   
         657  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  470    658   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeRequiredOperationInput {
  471    659   
        fn from(builder: Builder) -> Self {
  472    660   
            builder.build()
  473    661   
        }
  474    662   
    }
  475         -
    /// A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         663  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         664  +
    /* RustType.kt:516 */
  476    665   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  477         -
    pub struct Builder {}
         666  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         667  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         668  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  478    669   
    impl Builder {
  479         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         670  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         671  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  480    672   
        pub fn build(self) -> crate::input::ResponseCodeRequiredOperationInput {
  481    673   
            self.build_enforcing_required_and_enum_traits()
  482    674   
        }
         675  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  483    676   
        fn build_enforcing_required_and_enum_traits(
  484    677   
            self,
  485    678   
        ) -> crate::input::ResponseCodeRequiredOperationInput {
  486         -
            crate::input::ResponseCodeRequiredOperationInput {}
         679  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         680  +
            crate::input::ResponseCodeRequiredOperationInput {
         681  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         682  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  487    683   
        }
         684  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  488    685   
    }
         686  +
         687  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  489    688   
}
  490         -
/// See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         689  +
/// /* ServerBuilderGenerator.kt:171 */See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  491    690   
pub(crate) mod required_header_collection_operation_input_internal {
  492    691   
         692  +
    /* RustType.kt:516 */
  493    693   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  494         -
    /// Holds one variant for each of the ways the builder can fail.
         694  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         695  +
    /* RustType.kt:516 */
  495    696   
    #[non_exhaustive]
         697  +
    /* ServerBuilderConstraintViolations.kt:75 */
  496    698   
    #[allow(clippy::enum_variant_names)]
  497    699   
    pub(crate) enum ConstraintViolation {
  498         -
        /// `required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         700  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         701  +
        /* ServerBuilderConstraintViolations.kt:143 */
  499    702   
        MissingRequiredHeaderList,
  500         -
        /// `required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         703  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         704  +
        /* ServerBuilderConstraintViolations.kt:143 */
  501    705   
        MissingRequiredHeaderSet,
  502         -
        /// Constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`.
         706  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`.
         707  +
        /* RustType.kt:516 */
  503    708   
        #[doc(hidden)]
         709  +
        /* ServerBuilderConstraintViolations.kt:164 */
  504    710   
        RequiredHeaderSet(crate::model::header_set_internal::ConstraintViolation),
         711  +
        /* ServerBuilderConstraintViolations.kt:75 */
  505    712   
    }
         713  +
    /* ServerBuilderConstraintViolations.kt:117 */
  506    714   
    impl ::std::fmt::Display for ConstraintViolation {
         715  +
        /* ServerBuilderConstraintViolations.kt:118 */
  507    716   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         717  +
            /* ServerBuilderConstraintViolations.kt:119 */
  508    718   
            match self {
  509         -
                ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  510         -
                ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  511         -
                ConstraintViolation::RequiredHeaderSet(_) => write!(f, "constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`"),
  512         -
            }
         719  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         720  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         721  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequiredHeaderSet(_) => write!(f, "constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`"),
         722  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         723  +
            /* ServerBuilderConstraintViolations.kt:118 */
  513    724   
        }
         725  +
        /* ServerBuilderConstraintViolations.kt:117 */
  514    726   
    }
         727  +
    /* ServerBuilderConstraintViolations.kt:84 */
  515    728   
    impl ::std::error::Error for ConstraintViolation {}
         729  +
    /* ServerBuilderConstraintViolations.kt:171 */
  516    730   
    impl ConstraintViolation {
  517    731   
        pub(crate) fn as_validation_exception_field(
  518    732   
            self,
  519    733   
            path: ::std::string::String,
  520    734   
        ) -> crate::model::ValidationExceptionField {
  521    735   
            match self {
  522    736   
            ConstraintViolation::MissingRequiredHeaderList => crate::model::ValidationExceptionField {
  523    737   
                                                message: format!("Value at '{}/requiredHeaderList' failed to satisfy constraint: Member must not be null", path),
  524    738   
                                                path: path + "/requiredHeaderList",
  525    739   
                                            },
  526    740   
            ConstraintViolation::MissingRequiredHeaderSet => crate::model::ValidationExceptionField {
  527    741   
                                                message: format!("Value at '{}/requiredHeaderSet' failed to satisfy constraint: Member must not be null", path),
  528    742   
                                                path: path + "/requiredHeaderSet",
  529    743   
                                            },
  530    744   
            ConstraintViolation::RequiredHeaderSet(inner) => inner.as_validation_exception_field(path + "/requiredHeaderSet"),
  531    745   
        }
  532    746   
        }
  533    747   
    }
         748  +
    /* ServerBuilderGenerator.kt:234 */
  534    749   
    impl ::std::convert::From<ConstraintViolation>
  535    750   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  536    751   
    {
  537    752   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  538    753   
            let first_validation_exception_field =
  539    754   
                constraint_violation.as_validation_exception_field("".to_owned());
  540    755   
            let validation_exception = crate::error::ValidationException {
  541    756   
                message: format!(
  542    757   
                    "1 validation error detected. {}",
  543    758   
                    &first_validation_exception_field.message
  544    759   
                ),
  545    760   
                field_list: Some(vec![first_validation_exception_field]),
  546    761   
            };
  547    762   
            Self::ConstraintViolation(
  548    763   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  549    764   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  550    765   
                            )
  551    766   
        }
  552    767   
    }
         768  +
    /* ServerBuilderGenerator.kt:244 */
  553    769   
    impl ::std::convert::From<Builder>
  554    770   
        for crate::constrained::MaybeConstrained<
  555    771   
            crate::input::RequiredHeaderCollectionOperationInput,
  556    772   
        >
  557    773   
    {
  558    774   
        fn from(builder: Builder) -> Self {
  559    775   
            Self::Unconstrained(builder)
  560    776   
        }
  561    777   
    }
         778  +
    /* ServerBuilderGenerator.kt:446 */
  562    779   
    impl ::std::convert::TryFrom<Builder> for crate::input::RequiredHeaderCollectionOperationInput {
  563    780   
        type Error = ConstraintViolation;
  564    781   
  565    782   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  566    783   
            builder.build()
  567    784   
        }
  568    785   
    }
  569         -
    /// A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         786  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         787  +
    /* RustType.kt:516 */
  570    788   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         789  +
    /* ServerBuilderGenerator.kt:211 */
  571    790   
    pub(crate) struct Builder {
         791  +
        /* ServerBuilderGenerator.kt:308 */
  572    792   
        pub(crate) required_header_list:
  573    793   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         794  +
        /* ServerBuilderGenerator.kt:308 */
  574    795   
        pub(crate) required_header_set:
  575    796   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::HeaderSet>>,
         797  +
        /* ServerBuilderGenerator.kt:211 */
  576    798   
    }
         799  +
    /* ServerBuilderGenerator.kt:215 */
  577    800   
    impl Builder {
         801  +
        /* ServerBuilderGenerator.kt:426 */
  578    802   
        #[allow(missing_docs)] // documentation missing in model
         803  +
                               /* ServerBuilderGenerator.kt:428 */
  579    804   
        pub(crate) fn set_required_header_list(
  580    805   
            mut self,
  581    806   
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
  582    807   
        ) -> Self {
         808  +
            /* ServerBuilderGenerator.kt:429 */
  583    809   
            self.required_header_list = Some(input.into());
  584    810   
            self
         811  +
            /* ServerBuilderGenerator.kt:428 */
  585    812   
        }
         813  +
        /* ServerBuilderGenerator.kt:426 */
  586    814   
        #[allow(missing_docs)] // documentation missing in model
         815  +
                               /* ServerBuilderGenerator.kt:428 */
  587    816   
        pub(crate) fn set_required_header_set(
  588    817   
            mut self,
  589    818   
            input: impl ::std::convert::Into<
  590    819   
                crate::constrained::MaybeConstrained<crate::model::HeaderSet>,
  591    820   
            >,
  592    821   
        ) -> Self {
         822  +
            /* ServerBuilderGenerator.kt:429 */
  593    823   
            self.required_header_set = Some(input.into());
  594    824   
            self
         825  +
            /* ServerBuilderGenerator.kt:428 */
  595    826   
        }
  596         -
        /// Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  597         -
        ///
         827  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         828  +
        /// /* ServerBuilderGenerator.kt:260 */
  598    829   
        /// The builder fails to construct a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) if a [`ConstraintViolation`] occurs.
  599    830   
        ///
  600         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         831  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         832  +
        /* ServerBuilderGenerator.kt:271 */
  601    833   
        pub fn build(
  602    834   
            self,
  603    835   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  604    836   
        {
  605    837   
            self.build_enforcing_all_constraints()
  606    838   
        }
         839  +
        /* ServerBuilderGenerator.kt:283 */
  607    840   
        fn build_enforcing_all_constraints(
  608    841   
            self,
  609    842   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  610    843   
        {
  611         -
            Ok(crate::input::RequiredHeaderCollectionOperationInput {
         844  +
            /* ServerBuilderGenerator.kt:287 */
         845  +
            Ok(
         846  +
                /* ServerBuilderGenerator.kt:542 */
         847  +
                crate::input::RequiredHeaderCollectionOperationInput {
         848  +
                    /* ServerBuilderGenerator.kt:546 */
  612    849   
                    required_header_list: self
  613    850   
                        .required_header_list
         851  +
                        /* ServerBuilderGenerator.kt:569 */
  614    852   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
         853  +
                    /* ServerBuilderGenerator.kt:546 */
  615    854   
                    required_header_set: self
  616    855   
                        .required_header_set
         856  +
                        /* ServerBuilderGenerator.kt:602 */
  617    857   
                        .map(|v| match v {
  618    858   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  619    859   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  620    860   
                        })
         861  +
                        /* ServerBuilderGenerator.kt:614 */
  621    862   
                        .map(|res| res.map_err(ConstraintViolation::RequiredHeaderSet))
  622    863   
                        .transpose()?
         864  +
                        /* ServerBuilderGenerator.kt:630 */
  623    865   
                        .map(|v: crate::model::HeaderSet| v.into())
         866  +
                        /* ServerBuilderGenerator.kt:569 */
  624    867   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  625         -
            })
         868  +
                    /* ServerBuilderGenerator.kt:542 */
         869  +
                }, /* ServerBuilderGenerator.kt:287 */
         870  +
            )
         871  +
            /* ServerBuilderGenerator.kt:283 */
  626    872   
        }
         873  +
        /* ServerBuilderGenerator.kt:215 */
  627    874   
    }
         875  +
         876  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  628    877   
}
  629         -
/// See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         878  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  630    879   
pub mod required_header_collection_operation_input {
  631    880   
         881  +
    /* RustType.kt:516 */
  632    882   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  633         -
    /// Holds one variant for each of the ways the builder can fail.
  634         -
         883  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         884  +
    /* ServerBuilderConstraintViolations.kt:75 */
  635    885   
    #[allow(clippy::enum_variant_names)]
  636    886   
    pub enum ConstraintViolation {
  637         -
        /// `required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         887  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         888  +
        /* ServerBuilderConstraintViolations.kt:143 */
  638    889   
        MissingRequiredHeaderList,
  639         -
        /// `required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         890  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         891  +
        /* ServerBuilderConstraintViolations.kt:143 */
  640    892   
        MissingRequiredHeaderSet,
         893  +
        /* ServerBuilderConstraintViolations.kt:75 */
  641    894   
    }
         895  +
    /* ServerBuilderConstraintViolations.kt:117 */
  642    896   
    impl ::std::fmt::Display for ConstraintViolation {
         897  +
        /* ServerBuilderConstraintViolations.kt:118 */
  643    898   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         899  +
            /* ServerBuilderConstraintViolations.kt:119 */
  644    900   
            match self {
  645         -
                ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  646         -
                ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  647         -
            }
         901  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         902  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         903  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         904  +
            /* ServerBuilderConstraintViolations.kt:118 */
  648    905   
        }
         906  +
        /* ServerBuilderConstraintViolations.kt:117 */
  649    907   
    }
         908  +
    /* ServerBuilderConstraintViolations.kt:84 */
  650    909   
    impl ::std::error::Error for ConstraintViolation {}
         910  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  651    911   
    impl ::std::convert::TryFrom<Builder> for crate::input::RequiredHeaderCollectionOperationInput {
  652    912   
        type Error = ConstraintViolation;
  653    913   
  654    914   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  655    915   
            builder.build()
  656    916   
        }
  657    917   
    }
  658         -
    /// A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         918  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         919  +
    /* RustType.kt:516 */
  659    920   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         921  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  660    922   
    pub struct Builder {
         923  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  661    924   
        pub(crate) required_header_list:
  662    925   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         926  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  663    927   
        pub(crate) required_header_set:
  664    928   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         929  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  665    930   
    }
         931  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  666    932   
    impl Builder {
         933  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  667    934   
        #[allow(missing_docs)] // documentation missing in model
         935  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  668    936   
        pub fn required_header_list(
  669    937   
            mut self,
  670    938   
            input: ::std::vec::Vec<::std::string::String>,
  671    939   
        ) -> Self {
  672         -
            self.required_header_list = Some(input);
         940  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         941  +
            self.required_header_list =
         942  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         943  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         944  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         945  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  673    946   
            self
         947  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  674    948   
        }
         949  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  675    950   
        #[allow(missing_docs)] // documentation missing in model
         951  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  676    952   
        pub fn required_header_set(
  677    953   
            mut self,
  678    954   
            input: ::std::vec::Vec<::std::string::String>,
  679    955   
        ) -> Self {
  680         -
            self.required_header_set = Some(input);
         956  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         957  +
            self.required_header_set =
         958  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         959  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         960  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         961  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  681    962   
            self
         963  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  682    964   
        }
  683         -
        /// Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  684         -
        ///
         965  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         966  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  685    967   
        /// The builder fails to construct a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) if you do not provide a value for all non-`Option`al members.
  686    968   
        ///
         969  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  687    970   
        pub fn build(
  688    971   
            self,
  689    972   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  690    973   
        {
  691    974   
            self.build_enforcing_required_and_enum_traits()
  692    975   
        }
         976  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  693    977   
        fn build_enforcing_required_and_enum_traits(
  694    978   
            self,
  695    979   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  696    980   
        {
  697         -
            Ok(crate::input::RequiredHeaderCollectionOperationInput {
         981  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         982  +
            Ok(
         983  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         984  +
                crate::input::RequiredHeaderCollectionOperationInput {
         985  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
  698    986   
                    required_header_list: self
  699    987   
                        .required_header_list
         988  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
  700    989   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
         990  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
  701    991   
                    required_header_set: self
  702    992   
                        .required_header_set
         993  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
  703    994   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  704         -
            })
         995  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         996  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         997  +
            )
         998  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  705    999   
        }
        1000  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  706   1001   
    }
        1002  +
        1003  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  707   1004   
}
  708         -
/// See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1005  +
/// /* ServerBuilderGenerator.kt:171 */See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  709   1006   
pub(crate) mod required_inner_shape_operation_input_internal {
  710   1007   
        1008  +
    /* RustType.kt:516 */
  711   1009   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  712         -
    /// Holds one variant for each of the ways the builder can fail.
        1010  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        1011  +
    /* RustType.kt:516 */
  713   1012   
    #[non_exhaustive]
        1013  +
    /* ServerBuilderConstraintViolations.kt:75 */
  714   1014   
    #[allow(clippy::enum_variant_names)]
  715   1015   
    pub(crate) enum ConstraintViolation {
  716         -
        /// Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
        1016  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
        1017  +
        /* RustType.kt:516 */
  717   1018   
        #[doc(hidden)]
        1019  +
        /* ServerBuilderConstraintViolations.kt:164 */
  718   1020   
        Inner(crate::model::inner_shape_internal::ConstraintViolation),
        1021  +
        /* ServerBuilderConstraintViolations.kt:75 */
  719   1022   
    }
        1023  +
    /* ServerBuilderConstraintViolations.kt:117 */
  720   1024   
    impl ::std::fmt::Display for ConstraintViolation {
        1025  +
        /* ServerBuilderConstraintViolations.kt:118 */
  721   1026   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1027  +
            /* ServerBuilderConstraintViolations.kt:119 */
  722   1028   
            match self {
  723         -
                ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
  724         -
            }
        1029  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
        1030  +
            /* ServerBuilderConstraintViolations.kt:119 */}
        1031  +
            /* ServerBuilderConstraintViolations.kt:118 */
  725   1032   
        }
        1033  +
        /* ServerBuilderConstraintViolations.kt:117 */
  726   1034   
    }
        1035  +
    /* ServerBuilderConstraintViolations.kt:84 */
  727   1036   
    impl ::std::error::Error for ConstraintViolation {}
        1037  +
    /* ServerBuilderConstraintViolations.kt:171 */
  728   1038   
    impl ConstraintViolation {
  729   1039   
        pub(crate) fn as_validation_exception_field(
  730   1040   
            self,
  731   1041   
            path: ::std::string::String,
  732   1042   
        ) -> crate::model::ValidationExceptionField {
  733   1043   
            match self {
  734   1044   
                ConstraintViolation::Inner(inner) => {
  735   1045   
                    inner.as_validation_exception_field(path + "/inner")
  736   1046   
                }
  737   1047   
            }
  738   1048   
        }
  739   1049   
    }
        1050  +
    /* ServerBuilderGenerator.kt:234 */
  740   1051   
    impl ::std::convert::From<ConstraintViolation>
  741   1052   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  742   1053   
    {
  743   1054   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  744   1055   
            let first_validation_exception_field =
  745   1056   
                constraint_violation.as_validation_exception_field("".to_owned());
  746   1057   
            let validation_exception = crate::error::ValidationException {
  747   1058   
                message: format!(
  748   1059   
                    "1 validation error detected. {}",
  749   1060   
                    &first_validation_exception_field.message
  750   1061   
                ),
  751   1062   
                field_list: Some(vec![first_validation_exception_field]),
  752   1063   
            };
  753   1064   
            Self::ConstraintViolation(
  754   1065   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  755   1066   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  756   1067   
                            )
  757   1068   
        }
  758   1069   
    }
        1070  +
    /* ServerBuilderGenerator.kt:244 */
  759   1071   
    impl ::std::convert::From<Builder>
  760   1072   
        for crate::constrained::MaybeConstrained<crate::input::RequiredInnerShapeOperationInput>
  761   1073   
    {
  762   1074   
        fn from(builder: Builder) -> Self {
  763   1075   
            Self::Unconstrained(builder)
  764   1076   
        }
  765   1077   
    }
        1078  +
    /* ServerBuilderGenerator.kt:446 */
  766   1079   
    impl ::std::convert::TryFrom<Builder> for crate::input::RequiredInnerShapeOperationInput {
  767   1080   
        type Error = ConstraintViolation;
  768   1081   
  769   1082   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  770   1083   
            builder.build()
  771   1084   
        }
  772   1085   
    }
  773         -
    /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1086  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1087  +
    /* RustType.kt:516 */
  774   1088   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1089  +
    /* ServerBuilderGenerator.kt:211 */
  775   1090   
    pub(crate) struct Builder {
        1091  +
        /* ServerBuilderGenerator.kt:308 */
  776   1092   
        pub(crate) inner:
  777   1093   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::InnerShape>>,
        1094  +
        /* ServerBuilderGenerator.kt:211 */
  778   1095   
    }
        1096  +
    /* ServerBuilderGenerator.kt:215 */
  779   1097   
    impl Builder {
        1098  +
        /* ServerBuilderGenerator.kt:426 */
  780   1099   
        #[allow(missing_docs)] // documentation missing in model
        1100  +
                               /* ServerBuilderGenerator.kt:428 */
  781   1101   
        pub(crate) fn set_inner(
  782   1102   
            mut self,
  783   1103   
            input: Option<
  784   1104   
                impl ::std::convert::Into<
  785   1105   
                    crate::constrained::MaybeConstrained<crate::model::InnerShape>,
  786   1106   
                >,
  787   1107   
            >,
  788   1108   
        ) -> Self {
        1109  +
            /* ServerBuilderGenerator.kt:429 */
  789   1110   
            self.inner = input.map(|v| v.into());
  790   1111   
            self
        1112  +
            /* ServerBuilderGenerator.kt:428 */
  791   1113   
        }
  792         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  793         -
        ///
        1114  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1115  +
        /// /* ServerBuilderGenerator.kt:260 */
  794   1116   
        /// The builder fails to construct a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) if a [`ConstraintViolation`] occurs.
  795   1117   
        ///
        1118  +
        /* ServerBuilderGenerator.kt:271 */
  796   1119   
        pub fn build(
  797   1120   
            self,
  798   1121   
        ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
  799   1122   
            self.build_enforcing_all_constraints()
  800   1123   
        }
        1124  +
        /* ServerBuilderGenerator.kt:283 */
  801   1125   
        fn build_enforcing_all_constraints(
  802   1126   
            self,
  803   1127   
        ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
  804         -
            Ok(crate::input::RequiredInnerShapeOperationInput {
        1128  +
            /* ServerBuilderGenerator.kt:287 */
        1129  +
            Ok(
        1130  +
                /* ServerBuilderGenerator.kt:542 */
        1131  +
                crate::input::RequiredInnerShapeOperationInput {
        1132  +
                    /* ServerBuilderGenerator.kt:546 */
  805   1133   
                    inner: self
  806   1134   
                        .inner
        1135  +
                        /* ServerBuilderGenerator.kt:602 */
  807   1136   
                        .map(|v| match v {
  808   1137   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  809   1138   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  810   1139   
                        })
        1140  +
                        /* ServerBuilderGenerator.kt:614 */
  811   1141   
                        .map(|res| res.map_err(ConstraintViolation::Inner))
  812   1142   
                        .transpose()?,
  813         -
            })
        1143  +
                    /* ServerBuilderGenerator.kt:542 */
        1144  +
                }, /* ServerBuilderGenerator.kt:287 */
        1145  +
            )
        1146  +
            /* ServerBuilderGenerator.kt:283 */
  814   1147   
        }
        1148  +
        /* ServerBuilderGenerator.kt:215 */
  815   1149   
    }
        1150  +
        1151  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  816   1152   
}
  817         -
/// See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1153  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  818   1154   
pub mod required_inner_shape_operation_input {
  819   1155   
        1156  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  820   1157   
    impl ::std::convert::From<Builder> for crate::input::RequiredInnerShapeOperationInput {
  821   1158   
        fn from(builder: Builder) -> Self {
  822   1159   
            builder.build()
  823   1160   
        }
  824   1161   
    }
  825         -
    /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1162  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1163  +
    /* RustType.kt:516 */
  826   1164   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1165  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  827   1166   
    pub struct Builder {
        1167  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  828   1168   
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
        1169  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  829   1170   
    }
        1171  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  830   1172   
    impl Builder {
        1173  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  831   1174   
        #[allow(missing_docs)] // documentation missing in model
        1175  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  832   1176   
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  833         -
            self.inner = input;
        1177  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        1178  +
            self.inner =
        1179  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        1180  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  834   1181   
            self
        1182  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  835   1183   
        }
  836         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1184  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
        1185  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  837   1186   
        pub fn build(self) -> crate::input::RequiredInnerShapeOperationInput {
  838   1187   
            self.build_enforcing_required_and_enum_traits()
  839   1188   
        }
        1189  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  840   1190   
        fn build_enforcing_required_and_enum_traits(
  841   1191   
            self,
  842   1192   
        ) -> crate::input::RequiredInnerShapeOperationInput {
  843         -
            crate::input::RequiredInnerShapeOperationInput { inner: self.inner }
        1193  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1194  +
            crate::input::RequiredInnerShapeOperationInput {
        1195  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        1196  +
                inner: self.inner,
        1197  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1198  +
            }
        1199  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  844   1200   
        }
        1201  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  845   1202   
    }
        1203  +
        1204  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  846   1205   
}
  847         -
/// See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1206  +
/// /* ServerBuilderGenerator.kt:171 */See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
  848   1207   
pub(crate) mod type_complexity_operation_input_internal {
  849   1208   
        1209  +
    /* ServerBuilderGenerator.kt:461 */
  850   1210   
    impl ::std::convert::From<Builder> for crate::input::TypeComplexityOperationInput {
  851   1211   
        fn from(builder: Builder) -> Self {
  852   1212   
            builder.build()
  853   1213   
        }
  854   1214   
    }
  855         -
    /// A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1215  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1216  +
    /* RustType.kt:516 */
  856   1217   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1218  +
    /* ServerBuilderGenerator.kt:211 */
  857   1219   
    pub(crate) struct Builder {
        1220  +
        /* ServerBuilderGenerator.kt:308 */
  858   1221   
        pub(crate) list: ::std::option::Option<
  859   1222   
            ::std::vec::Vec<
  860   1223   
                ::std::vec::Vec<
  861   1224   
                    ::std::vec::Vec<
  862   1225   
                        ::std::collections::HashMap<
  863   1226   
                            ::std::string::String,
  864   1227   
                            crate::model::EmptyStructure,
  865   1228   
                        >,
  866   1229   
                    >,
  867   1230   
                >,
  868   1231   
            >,
  869   1232   
        >,
        1233  +
        /* ServerBuilderGenerator.kt:211 */
  870   1234   
    }
        1235  +
    /* ServerBuilderGenerator.kt:215 */
  871   1236   
    impl Builder {
        1237  +
        /* ServerBuilderGenerator.kt:426 */
  872   1238   
        #[allow(missing_docs)] // documentation missing in model
        1239  +
                               /* ServerBuilderGenerator.kt:428 */
  873   1240   
        pub(crate) fn set_list(
  874   1241   
            mut self,
  875   1242   
            input: Option<
  876   1243   
                impl ::std::convert::Into<
  877   1244   
                    ::std::vec::Vec<
  878   1245   
                        ::std::vec::Vec<
  879   1246   
                            ::std::vec::Vec<
  880   1247   
                                ::std::collections::HashMap<
  881   1248   
                                    ::std::string::String,
  882   1249   
                                    crate::model::EmptyStructure,
  883   1250   
                                >,
  884   1251   
                            >,
  885   1252   
                        >,
  886   1253   
                    >,
  887   1254   
                >,
  888   1255   
            >,
  889   1256   
        ) -> Self {
        1257  +
            /* ServerBuilderGenerator.kt:429 */
  890   1258   
            self.list = input.map(|v| v.into());
  891   1259   
            self
        1260  +
            /* ServerBuilderGenerator.kt:428 */
  892   1261   
        }
  893         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1262  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1263  +
        /* ServerBuilderGenerator.kt:271 */
  894   1264   
        pub fn build(self) -> crate::input::TypeComplexityOperationInput {
  895   1265   
            self.build_enforcing_all_constraints()
  896   1266   
        }
        1267  +
        /* ServerBuilderGenerator.kt:283 */
  897   1268   
        fn build_enforcing_all_constraints(self) -> crate::input::TypeComplexityOperationInput {
  898         -
            crate::input::TypeComplexityOperationInput { list: self.list }
        1269  +
            /* ServerBuilderGenerator.kt:542 */
        1270  +
            crate::input::TypeComplexityOperationInput {
        1271  +
                /* ServerBuilderGenerator.kt:546 */
        1272  +
                list: self.list,
        1273  +
                /* ServerBuilderGenerator.kt:542 */
        1274  +
            }
        1275  +
            /* ServerBuilderGenerator.kt:283 */
  899   1276   
        }
        1277  +
        /* ServerBuilderGenerator.kt:215 */
  900   1278   
    }
        1279  +
        1280  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  901   1281   
}
  902         -
/// See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1282  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
  903   1283   
pub mod type_complexity_operation_input {
  904   1284   
        1285  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  905   1286   
    impl ::std::convert::From<Builder> for crate::input::TypeComplexityOperationInput {
  906   1287   
        fn from(builder: Builder) -> Self {
  907   1288   
            builder.build()
  908   1289   
        }
  909   1290   
    }
  910         -
    /// A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1291  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1292  +
    /* RustType.kt:516 */
  911   1293   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1294  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  912   1295   
    pub struct Builder {
        1296  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  913   1297   
        pub(crate) list: ::std::option::Option<
  914   1298   
            ::std::vec::Vec<
  915   1299   
                ::std::vec::Vec<
  916   1300   
                    ::std::vec::Vec<
  917   1301   
                        ::std::collections::HashMap<
  918   1302   
                            ::std::string::String,
  919   1303   
                            crate::model::EmptyStructure,
  920   1304   
                        >,
  921   1305   
                    >,
  922   1306   
                >,
  923   1307   
            >,
  924   1308   
        >,
        1309  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  925   1310   
    }
        1311  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  926   1312   
    impl Builder {
        1313  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  927   1314   
        #[allow(missing_docs)] // documentation missing in model
        1315  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  928   1316   
        pub fn list(
  929   1317   
            mut self,
  930   1318   
            input: ::std::option::Option<
  931   1319   
                ::std::vec::Vec<
  932   1320   
                    ::std::vec::Vec<
  933   1321   
                        ::std::vec::Vec<
  934   1322   
                            ::std::collections::HashMap<
  935   1323   
                                ::std::string::String,
  936   1324   
                                crate::model::EmptyStructure,
  937   1325   
                            >,
  938   1326   
                        >,
  939   1327   
                    >,
  940   1328   
                >,
  941   1329   
            >,
  942   1330   
        ) -> Self {
  943         -
            self.list = input;
        1331  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        1332  +
            self.list =
        1333  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        1334  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  944   1335   
            self
        1336  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  945   1337   
        }
  946         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1338  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
        1339  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  947   1340   
        pub fn build(self) -> crate::input::TypeComplexityOperationInput {
  948   1341   
            self.build_enforcing_required_and_enum_traits()
  949   1342   
        }
        1343  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  950   1344   
        fn build_enforcing_required_and_enum_traits(
  951   1345   
            self,
  952   1346   
        ) -> crate::input::TypeComplexityOperationInput {
  953         -
            crate::input::TypeComplexityOperationInput { list: self.list }
        1347  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1348  +
            crate::input::TypeComplexityOperationInput {
        1349  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        1350  +
                list: self.list,
        1351  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        1352  +
            }
        1353  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  954   1354   
        }
        1355  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  955   1356   
    }
        1357  +
        1358  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  956   1359   
}