Server Test Python

Server Test Python

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +61,87 @@
    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 DoNothingOutput {}
          12  +
pub /* StructureGenerator.kt:201 */ struct DoNothingOutput {/* 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 DoNothingOutput {
   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<DoNothingOutput> {
   25     34   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   26     35   
        ob.extract::<DoNothingOutput>().map(Box::new)
   27     36   
    }
   28     37   
}
   29     38   
   30     39   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<DoNothingOutput> {
   31     40   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   32     41   
        (*self).into_py(py)
   33     42   
    }
   34     43   
}
          44  +
/* ServerCodegenVisitor.kt:370 */
   35     45   
impl DoNothingOutput {
   36         -
    /// Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
          46  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
          47  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   37     48   
    pub fn builder() -> crate::output::do_nothing_output::Builder {
          49  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   38     50   
        crate::output::do_nothing_output::Builder::default()
          51  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   39     52   
    }
          53  +
    /* ServerCodegenVisitor.kt:370 */
   40     54   
}
   41         -
/// See [`DoNothingOutput`](crate::output::DoNothingOutput).
          55  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`DoNothingOutput`](crate::output::DoNothingOutput).
   42     56   
pub mod do_nothing_output {
   43     57   
          58  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
   44     59   
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
   45     60   
        fn from(builder: Builder) -> Self {
   46     61   
            builder.build()
   47     62   
        }
   48     63   
    }
   49         -
    /// A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
          64  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
          65  +
    /* RustType.kt:516 */
   50     66   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
   51         -
    pub struct Builder {}
          67  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
          68  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
          69  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
   52     70   
    impl Builder {
   53         -
        /// Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
          71  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
          72  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
   54     73   
        pub fn build(self) -> crate::output::DoNothingOutput {
   55     74   
            self.build_enforcing_required_and_enum_traits()
   56     75   
        }
          76  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
   57     77   
        fn build_enforcing_required_and_enum_traits(self) -> crate::output::DoNothingOutput {
   58         -
            crate::output::DoNothingOutput {}
          78  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
          79  +
            crate::output::DoNothingOutput {
          80  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
          81  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
   59     82   
        }
          83  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
   60     84   
    }
          85  +
          86  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   61     87   
}

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

@@ -1,1 +85,124 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ServerHttpBoundProtocolGenerator.kt:383 */
    3      5   
pub async fn de_do_nothing_http_request<B>(
    4      6   
    #[allow(unused_variables)] request: ::http::Request<B>,
    5      7   
) -> std::result::Result<
    6      8   
    crate::input::DoNothingInput,
    7      9   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection,
    8     10   
>
    9     11   
where
   10     12   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   11     13   
    B::Data: Send,
   12     14   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   13     15   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   14     16   
{
          17  +
    /* ServerHttpBoundProtocolGenerator.kt:399 */
   15     18   
    Ok({
          19  +
        /* RustType.kt:516 */
   16     20   
        #[allow(unused_mut)]
          21  +
        /* ServerHttpBoundProtocolGenerator.kt:723 */
   17     22   
        let mut input = crate::input::do_nothing_input_internal::Builder::default();
          23  +
        /* RustType.kt:516 */
   18     24   
        #[allow(unused_variables)]
          25  +
        /* ServerHttpBoundProtocolGenerator.kt:728 */
   19     26   
        let ::aws_smithy_runtime_api::http::RequestParts {
   20     27   
            uri, headers, body, ..
   21     28   
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          29  +
        /* ServerHttpBoundProtocolGenerator.kt:834 */
   22     30   
        input.build()
          31  +
        /* ServerHttpBoundProtocolGenerator.kt:399 */
   23     32   
    })
          33  +
    /* ServerHttpBoundProtocolGenerator.kt:383 */
   24     34   
}
   25     35   
          36  +
/* RustType.kt:516 */
   26     37   
#[allow(clippy::unnecessary_wraps)]
          38  +
/* ServerHttpBoundProtocolGenerator.kt:421 */
   27     39   
pub fn ser_do_nothing_http_response(
   28     40   
    #[allow(unused_variables)] output: crate::output::DoNothingOutput,
   29     41   
) -> std::result::Result<
   30     42   
    ::aws_smithy_http_server::response::Response,
   31     43   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   32     44   
> {
          45  +
    /* ServerHttpBoundProtocolGenerator.kt:433 */
   33     46   
    Ok({
          47  +
        /* RustType.kt:516 */
   34     48   
        #[allow(unused_mut)]
          49  +
        /* ServerHttpBoundProtocolGenerator.kt:523 */
   35     50   
        let mut builder = ::http::Response::builder();
          51  +
        /* ServerHttpBoundProtocolGenerator.kt:597 */
   36     52   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   37     53   
            builder,
   38     54   
            ::http::header::CONTENT_TYPE,
   39     55   
            "application/x-amz-json-1.1",
   40     56   
        );
          57  +
        /* ServerHttpBoundProtocolGenerator.kt:682 */
   41     58   
        let http_status: u16 = 200;
   42     59   
        builder = builder.status(http_status);
   43         -
        let payload = "";
          60  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */
          61  +
        let payload =
          62  +
            /* HttpBoundProtocolPayloadGenerator.kt:235 */""
          63  +
        /* ServerHttpBoundProtocolGenerator.kt:561 */;
          64  +
        /* ServerHttpBoundProtocolGenerator.kt:663 */
   44     65   
        let content_length = payload.len();
   45     66   
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
   46     67   
            builder,
   47     68   
            ::http::header::CONTENT_LENGTH,
   48     69   
            content_length,
   49     70   
        );
          71  +
        /* ServerHttpBoundProtocolGenerator.kt:567 */
   50     72   
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          73  +
        /* ServerHttpBoundProtocolGenerator.kt:575 */
   51     74   
        builder.body(body)?
          75  +
        /* ServerHttpBoundProtocolGenerator.kt:433 */
   52     76   
    })
          77  +
    /* ServerHttpBoundProtocolGenerator.kt:421 */
   53     78   
}
   54     79   
          80  +
/* RustType.kt:516 */
   55     81   
#[allow(clippy::unnecessary_wraps)]
          82  +
/* ServerHttpBoundProtocolGenerator.kt:447 */
   56     83   
pub fn ser_do_nothing_http_error(
   57     84   
    error: &crate::error::DoNothingError,
   58     85   
) -> std::result::Result<
   59     86   
    ::aws_smithy_http_server::response::Response,
   60     87   
    ::aws_smithy_http_server::protocol::aws_json::rejection::ResponseRejection,
   61     88   
> {
          89  +
    /* ServerHttpBoundProtocolGenerator.kt:452 */
   62     90   
    Ok({
          91  +
        /* ServerHttpBoundProtocolGenerator.kt:468 */
   63     92   
        match error {
          93  +
            /* ServerHttpBoundProtocolGenerator.kt:476 */
   64     94   
            crate::error::DoNothingError::InternalServerError(output) => {
          95  +
                /* ServerHttpBoundProtocolGenerator.kt:477 */
   65     96   
                let payload = crate::protocol_serde::shape_internal_server_error::ser_internal_server_error_error(output)?;
          97  +
                /* RustType.kt:516 */
   66     98   
                #[allow(unused_mut)]
          99  +
                /* ServerHttpBoundProtocolGenerator.kt:487 */
   67    100   
                let mut builder = ::http::Response::builder();
         101  +
                /* ServerHttpBoundProtocolGenerator.kt:597 */
   68    102   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   69    103   
                    builder,
   70    104   
                    ::http::header::CONTENT_TYPE,
   71    105   
                    "application/x-amz-json-1.1",
   72    106   
                );
         107  +
                /* ServerHttpBoundProtocolGenerator.kt:663 */
   73    108   
                let content_length = payload.len();
   74    109   
                builder = ::aws_smithy_http::header::set_response_header_if_absent(
   75    110   
                    builder,
   76    111   
                    ::http::header::CONTENT_LENGTH,
   77    112   
                    content_length,
   78    113   
                );
         114  +
                /* ServerHttpBoundProtocolGenerator.kt:504 */
   79    115   
                builder
   80    116   
                    .status(500)
   81    117   
                    .body(::aws_smithy_http_server::body::to_boxed(payload))?
         118  +
                /* ServerHttpBoundProtocolGenerator.kt:476 */
         119  +
            } /* ServerHttpBoundProtocolGenerator.kt:468 */
   82    120   
        }
   83         -
        }
         121  +
        /* ServerHttpBoundProtocolGenerator.kt:452 */
   84    122   
    })
         123  +
    /* ServerHttpBoundProtocolGenerator.kt:447 */
   85    124   
}

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

@@ -1,1 +24,36 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_internal_server_error_error(
    3      4   
    value: &crate::error::InternalServerError,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_internal_server_error::ser_internal_server_error(
    8     11   
        &mut object,
    9     12   
        value,
   10     13   
    )?;
          14  +
    /* ServerAwsJson.kt:95 */
   11     15   
    object.key("__type").string("InternalServerError");
          16  +
    /* JsonSerializerGenerator.kt:227 */
   12     17   
    object.finish();
   13     18   
    Ok(out)
          19  +
    /* JsonSerializerGenerator.kt:213 */
   14     20   
}
   15     21   
          22  +
/* JsonSerializerGenerator.kt:358 */
   16     23   
pub fn ser_internal_server_error(
   17     24   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   18     25   
    input: &crate::error::InternalServerError,
   19     26   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          27  +
    /* SerializerUtil.kt:42 */
   20     28   
    {
          29  +
        /* JsonSerializerGenerator.kt:423 */
   21     30   
        object.key("message").string(input.message.as_str());
          31  +
        /* SerializerUtil.kt:42 */
   22     32   
    }
          33  +
    /* JsonSerializerGenerator.kt:372 */
   23     34   
    Ok(())
          35  +
    /* JsonSerializerGenerator.kt:358 */
   24     36   
}

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

@@ -1,1 +93,109 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* PythonServerModuleGenerator.kt:41 */
    2      3   
#[::pyo3::pymodule]
    3         -
#[::pyo3(name = "naming_test_casing")]
           4  +
#[pyo3(name = "naming_test_casing")]
    4      5   
pub fn python_library(py: ::pyo3::Python<'_>, m: &::pyo3::types::PyModule) -> ::pyo3::PyResult<()> {
           6  +
    /* PythonServerModuleGenerator.kt:65 */
    5      7   
    let input = ::pyo3::types::PyModule::new(py, "input")?;
    6      8   
    let output = ::pyo3::types::PyModule::new(py, "output")?;
    7      9   
    let error = ::pyo3::types::PyModule::new(py, "error")?;
          10  +
    /* PythonServerModuleGenerator.kt:96 */
    8     11   
    error.add_class::<crate::error::InternalServerError>()?;
          12  +
    /* PythonServerModuleGenerator.kt:96 */
    9     13   
    output.add_class::<crate::output::DoNothingOutput>()?;
          14  +
    /* PythonServerModuleGenerator.kt:96 */
   10     15   
    input.add_class::<crate::input::DoNothingInput>()?;
          16  +
    /* PythonServerModuleGenerator.kt:105 */
   11     17   
    ::pyo3::py_run!(
   12     18   
        py,
   13     19   
        input,
   14     20   
        "import sys; sys.modules['naming_test_casing.input'] = input"
   15     21   
    );
   16     22   
    m.add_submodule(input)?;
   17     23   
    ::pyo3::py_run!(
   18     24   
        py,
   19     25   
        output,
   20     26   
        "import sys; sys.modules['naming_test_casing.output'] = output"
   21     27   
    );
   22     28   
    m.add_submodule(output)?;
   23     29   
    ::pyo3::py_run!(
   24     30   
        py,
   25     31   
        error,
   26     32   
        "import sys; sys.modules['naming_test_casing.error'] = error"
   27     33   
    );
   28     34   
    m.add_submodule(error)?;
          35  +
    /* PythonServerModuleGenerator.kt:129 */
   29     36   
    let types = ::pyo3::types::PyModule::new(py, "types")?;
   30     37   
    types.add_class::<::aws_smithy_http_server_python::types::Blob>()?;
   31     38   
    types.add_class::<::aws_smithy_http_server_python::types::DateTime>()?;
   32     39   
    types.add_class::<::aws_smithy_http_server_python::types::Format>()?;
   33     40   
    types.add_class::<::aws_smithy_http_server_python::types::ByteStream>()?;
   34     41   
    ::pyo3::py_run!(
   35     42   
        py,
   36     43   
        types,
   37     44   
        "import sys; sys.modules['naming_test_casing.types'] = types"
   38     45   
    );
   39     46   
    m.add_submodule(types)?;
          47  +
    /* PythonServerModuleGenerator.kt:149 */
   40     48   
    let socket = ::pyo3::types::PyModule::new(py, "socket")?;
   41     49   
    socket.add_class::<::aws_smithy_http_server_python::PySocket>()?;
   42     50   
    ::pyo3::py_run!(
   43     51   
        py,
   44     52   
        socket,
   45     53   
        "import sys; sys.modules['naming_test_casing.socket'] = socket"
   46     54   
    );
   47     55   
    m.add_submodule(socket)?;
          56  +
    /* PythonServerModuleGenerator.kt:166 */
   48     57   
    let logging = ::pyo3::types::PyModule::new(py, "logging")?;
   49     58   
    logging.add_function(::pyo3::wrap_pyfunction!(
   50     59   
        ::aws_smithy_http_server_python::py_tracing_event,
   51     60   
        m
   52     61   
    )?)?;
   53     62   
    logging.add_class::<::aws_smithy_http_server_python::PyTracingHandler>()?;
   54     63   
    ::pyo3::py_run!(
   55     64   
        py,
   56     65   
        logging,
   57     66   
        "import sys; sys.modules['naming_test_casing.logging'] = logging"
   58     67   
    );
   59     68   
    m.add_submodule(logging)?;
          69  +
    /* PythonServerModuleGenerator.kt:183 */
   60     70   
    let middleware = ::pyo3::types::PyModule::new(py, "middleware")?;
   61     71   
    middleware.add_class::<::aws_smithy_http_server_python::PyRequest>()?;
   62     72   
    middleware.add_class::<::aws_smithy_http_server_python::PyResponse>()?;
   63     73   
    middleware.add_class::<::aws_smithy_http_server_python::PyMiddlewareException>()?;
   64     74   
    pyo3::py_run!(
   65     75   
        py,
   66     76   
        middleware,
   67     77   
        "import sys; sys.modules['naming_test_casing.middleware'] = middleware"
   68     78   
    );
   69     79   
    m.add_submodule(middleware)?;
          80  +
    /* PythonServerModuleGenerator.kt:201 */
   70     81   
    let tls = ::pyo3::types::PyModule::new(py, "tls")?;
   71     82   
    tls.add_class::<::aws_smithy_http_server_python::tls::PyTlsConfig>()?;
   72     83   
    pyo3::py_run!(
   73     84   
        py,
   74     85   
        tls,
   75     86   
        "import sys; sys.modules['naming_test_casing.tls'] = tls"
   76     87   
    );
   77     88   
    m.add_submodule(tls)?;
          89  +
    /* PythonServerModuleGenerator.kt:217 */
   78     90   
    let aws_lambda = ::pyo3::types::PyModule::new(py, "aws_lambda")?;
   79     91   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyLambdaContext>()?;
   80     92   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyClientApplication>()?;
   81     93   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyClientContext>()?;
   82     94   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyCognitoIdentity>()?;
   83     95   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyConfig>()?;
   84     96   
    pyo3::py_run!(
   85     97   
        py,
   86     98   
        aws_lambda,
   87     99   
        "import sys; sys.modules['naming_test_casing.aws_lambda'] = aws_lambda"
   88    100   
    );
   89    101   
    m.add_submodule(aws_lambda)?;
         102  +
    /* PythonServerModuleGenerator.kt:238 */
   90    103   
    m.add_class::<crate::python_server_application::App>()?;
         104  +
    /* PythonServerModuleGenerator.kt:243 */
   91    105   
    m.add("CODEGEN_VERSION", "ci")?;
         106  +
    /* PythonServerModuleGenerator.kt:58 */
   92    107   
    Ok(())
         108  +
    /* PythonServerModuleGenerator.kt:41 */
   93    109   
}

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

@@ -1,1 +31,32 @@
    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 `DoNothing`.
    3      4   
pub(crate) async fn do_nothing(
    4      5   
    input: crate::input::DoNothingInput,
    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<crate::output::DoNothingOutput, crate::error::DoNothingError> {
    8      9   
    // Async block used to run the handler and catch any Python error.
    9     10   
    let result = if handler.is_coroutine {
   10     11   
        ::tracing::trace!(name = "do_nothing", "executing python handler coroutine");
   11     12   
        let result = ::pyo3::Python::with_gil(|py| {

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

@@ -1,1 +155,174 @@
    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 naming_test_casing import input
   12     14   
/// from naming_test_casing import output
          15  +
/* PythonApplicationGenerator.kt:406 */
   13     16   
/// from naming_test_casing import error
          17  +
/* PythonApplicationGenerator.kt:408 */
   14     18   
/// from naming_test_casing import middleware
   15     19   
/// from naming_test_casing 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   
/// @app.do_nothing
   30     35   
/// def do_nothing(input: input::DoNothingInput, ctx: Context) -> output::DoNothingOutput:
   31     36   
///     raise NotImplementedError
          37  +
/* PythonApplicationGenerator.kt:428 */
   32     38   
///
   33     39   
/// app.run()
   34     40   
/// ```
   35     41   
///
   36     42   
/// Any of operations above can be written as well prepending the `async` keyword and
   37     43   
/// the Python application will automatically handle it and schedule it on the event loop for you.
          44  +
/* PythonApplicationGenerator.kt:112 */
   38     45   
#[::pyo3::pyclass]
   39     46   
#[derive(Debug)]
   40     47   
/// :generic Ctx:
   41     48   
/// :extends typing.Generic\[Ctx\]:
   42     49   
/// :rtype None:
   43     50   
pub struct App {
   44     51   
    handlers: ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler>,
   45     52   
    middlewares: Vec<::aws_smithy_http_server_python::PyMiddlewareHandler>,
   46     53   
    context: Option<::pyo3::PyObject>,
   47     54   
    workers: ::parking_lot::Mutex<Vec<::pyo3::PyObject>>,
   48     55   
}
          56  +
/* PythonApplicationGenerator.kt:149 */
   49     57   
impl Default for App {
   50     58   
    fn default() -> Self {
   51     59   
        Self {
   52     60   
            handlers: Default::default(),
   53     61   
            middlewares: vec![],
   54     62   
            context: None,
   55     63   
            workers: ::parking_lot::Mutex::new(vec![]),
   56     64   
        }
   57     65   
    }
   58     66   
}
          67  +
/* PythonApplicationGenerator.kt:131 */
   59     68   
impl Clone for App {
   60     69   
    fn clone(&self) -> Self {
   61     70   
        Self {
   62     71   
            handlers: self.handlers.clone(),
   63     72   
            middlewares: self.middlewares.clone(),
   64     73   
            context: self.context.clone(),
   65     74   
            workers: ::parking_lot::Mutex::new(vec![]),
   66     75   
        }
   67     76   
    }
   68     77   
}
          78  +
/* PythonApplicationGenerator.kt:168 */
   69     79   
impl ::aws_smithy_http_server_python::PyApp for App {
          80  +
    /* PythonApplicationGenerator.kt:174 */
   70     81   
    fn workers(&self) -> &::parking_lot::Mutex<Vec<::pyo3::PyObject>> {
   71     82   
        &self.workers
   72     83   
    }
   73     84   
    fn context(&self) -> &Option<::pyo3::PyObject> {
   74     85   
        &self.context
   75     86   
    }
   76     87   
    fn handlers(
   77     88   
        &mut self,
   78     89   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
   79     90   
        &mut self.handlers
   80     91   
    }
          92  +
    /* PythonApplicationGenerator.kt:189 */
   81     93   
    fn build_service(
   82     94   
        &mut self,
   83     95   
        event_loop: &::pyo3::PyAny,
   84     96   
    ) -> ::pyo3::PyResult<
   85     97   
        ::tower::util::BoxCloneService<
   86     98   
            ::http::Request<::aws_smithy_http_server::body::Body>,
   87     99   
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
   88    100   
            std::convert::Infallible,
   89    101   
        >,
   90    102   
    > {
         103  +
        /* PythonApplicationGenerator.kt:201 */
   91    104   
        let builder = crate::service::AcronymInsideService::builder_without_plugins();
         105  +
        /* PythonApplicationGenerator.kt:209 */
   92    106   
        let do_nothing_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
   93    107   
        let handler = self
   94    108   
            .handlers
   95    109   
            .get("do_nothing")
   96    110   
            .expect("Python handler for operation `do_nothing` not found")
   97    111   
            .clone();
   98    112   
        let builder = builder.do_nothing(move |input, state| {
   99    113   
            ::pyo3_asyncio::tokio::scope(
  100    114   
                do_nothing_locals.clone(),
  101    115   
                crate::python_operation_adaptor::do_nothing(input, state, handler.clone()),
  102    116   
            )
  103    117   
        });
         118  +
        /* PythonApplicationGenerator.kt:220 */
  104    119   
        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"));
  105    120   
  106    121   
        {
  107    122   
            use ::tower::Layer;
  108    123   
            ::tracing::trace!("adding middlewares to rust python router");
  109    124   
            let mut middlewares = self.middlewares.clone();
  110    125   
            // Reverse the middlewares, so they run with same order as they defined
  111    126   
            middlewares.reverse();
  112    127   
            for handler in middlewares {
  113    128   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  114    129   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  115    130   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  116    131   
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  117    132   
                >::new(handler, locals);
  118    133   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  119    134   
            }
  120    135   
        }
  121    136   
        Ok(service)
         137  +
        /* PythonApplicationGenerator.kt:189 */
  122    138   
    }
         139  +
    /* PythonApplicationGenerator.kt:168 */
  123    140   
}
         141  +
/* PythonApplicationGenerator.kt:247 */
  124    142   
#[::pyo3::pymethods]
  125    143   
impl App {
         144  +
    /* PythonApplicationGenerator.kt:260 */
  126    145   
    /// Create a new [App].
  127    146   
    #[new]
  128    147   
    pub fn new() -> Self {
  129    148   
        Self::default()
  130    149   
    }
  131    150   
  132    151   
    /// Register a context object that will be shared between handlers.
  133    152   
    ///
  134    153   
    /// :param context Ctx:
  135    154   
    /// :rtype None:
@@ -178,197 +222,243 @@
  198    217   
        py: pyo3::Python,
  199    218   
        socket: &pyo3::PyCell<::aws_smithy_http_server_python::PySocket>,
  200    219   
        worker_number: isize,
  201    220   
        tls: Option<::aws_smithy_http_server_python::tls::PyTlsConfig>,
  202    221   
    ) -> pyo3::PyResult<()> {
  203    222   
        use ::aws_smithy_http_server_python::PyApp;
  204    223   
        let event_loop = self.configure_python_event_loop(py)?;
  205    224   
        let service = self.build_and_configure_service(py, event_loop)?;
  206    225   
        self.start_hyper_worker(py, socket, event_loop, service, worker_number, tls)
  207    226   
    }
         227  +
    /* PythonApplicationGenerator.kt:366 */
  208    228   
    /// Method to register `do_nothing` Python implementation inside the handlers map.
  209    229   
    /// It can be used as a function decorator in Python.
  210    230   
    ///
  211    231   
    /// :param func typing.Union\[typing.Callable\[\[naming_test_casing.input.DoNothingInput, Ctx\], typing.Union\[naming_test_casing.output.DoNothingOutput, typing.Awaitable\[naming_test_casing.output.DoNothingOutput\]\]\], typing.Callable\[\[naming_test_casing.input.DoNothingInput\], typing.Union\[naming_test_casing.output.DoNothingOutput, typing.Awaitable\[naming_test_casing.output.DoNothingOutput\]\]\]\]:
  212    232   
    /// :rtype None:
  213    233   
    #[pyo3(text_signature = "($self, func)")]
  214    234   
    pub fn do_nothing(
  215    235   
        &mut self,
  216    236   
        py: ::pyo3::Python,
  217    237   
        func: ::pyo3::PyObject,
  218    238   
    ) -> ::pyo3::PyResult<()> {
  219    239   
        use ::aws_smithy_http_server_python::PyApp;
  220    240   
        self.register_operation(py, "do_nothing", func)
  221    241   
    }
         242  +
    /* PythonApplicationGenerator.kt:247 */
  222    243   
}

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/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 [`AcronymInsideService`].
    3      4   
///
    4      5   
/// Constructed via [`AcronymInsideService::builder`].
    5      6   
pub struct AcronymInsideServiceBuilder<Body, L, HttpPl, ModelPl> {
    6      7   
    do_nothing: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      8   
    layer: L,
    8      9   
    http_plugin: HttpPl,
    9     10   
    model_plugin: ModelPl,
   10     11   
}
   11     12   
@@ -465,466 +524,526 @@
  485    486   
            "casing",
  486    487   
            "ACRONYMInside_Service",
  487    488   
        );
  488    489   
  489    490   
    const VERSION: Option<&'static str> = Some("");
  490    491   
  491    492   
    type Protocol = ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1;
  492    493   
  493    494   
    type Operations = Operation;
  494    495   
}
         496  +
/* ServiceConfigGenerator.kt:178 */
  495    497   
/// Configuration for the [`AcronymInsideService`]. This is the central place where to register and
  496    498   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
  497    499   
///
  498    500   
/// ```rust,no_run
  499    501   
/// # use naming_test_casing::AcronymInsideServiceConfig;
  500    502   
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
  501    503   
/// # use ::tower::layer::util::Identity;
  502    504   
/// # let authentication_plugin = IdentityPlugin;
  503    505   
/// # let authorization_plugin = IdentityPlugin;
  504    506   
/// # let server_request_id_provider_layer = Identity::new();
@@ -586,588 +645,648 @@
  606    608   
  607    609   
    /// Build the configuration.
  608    610   
    pub fn build(self) -> super::AcronymInsideServiceConfig<L, H, M> {
  609    611   
        super::AcronymInsideServiceConfig {
  610    612   
            layers: self.layers,
  611    613   
            http_plugins: self.http_plugins,
  612    614   
            model_plugins: self.model_plugins,
  613    615   
        }
  614    616   
    }
  615    617   
}
         618  +
/* ScopeMacroGenerator.kt:81 */
  616    619   
/// A macro to help with scoping [plugins](crate::server::plugin) to a subset of all operations.
  617    620   
///
  618    621   
/// In contrast to [`crate::server::scope`](crate::server::scope), this macro has knowledge
  619    622   
/// of the service and any operations _not_ specified will be placed in the opposing group.
  620    623   
///
  621    624   
/// # Example
  622    625   
///
  623    626   
/// ```rust
  624    627   
/// scope! {
  625    628   
///     /// Includes [`DoNothing`], excluding all other operations.

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/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/naming_test_ops/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/naming_test_ops/rust-server-codegen-python/python/naming_test_ops/error/__init__.pyi

@@ -1,1 +42,42 @@
    1      1   
import naming_test_ops.model
    2      2   
import typing
    3      3   
    4      4   
class CollidingError(Exception):
    5      5   
    def __init__(self) -> None:
    6      6   
        ...
    7      7   
    8      8   
    9      9   
class CollidingException(Exception):
   10     10   
    """
   11         -
    This will be renamed to CollidingError
          11  +
    /* StructureGenerator.kt:197 */This will be renamed to CollidingError
   12     12   
    """
   13     13   
   14     14   
    def __init__(self) -> None:
   15     15   
        ...
   16     16   
   17     17   
   18     18   
class InternalServerError(Exception):
   19     19   
    message: str
   20     20   
   21     21   
    def __init__(self, message: str) -> None:
   22     22   
        ...
   23     23   
   24     24   
   25     25   
class ValidationException(Exception):
   26     26   
    """
   27         -
    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.
          27  +
    /* 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.
   28     28   
    """
   29     29   
   30     30   
    field_list: typing.Optional[typing.List[naming_test_ops.model.ValidationExceptionField]]
   31     31   
    """
   32         -
    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.
          32  +
    /* 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.
   33     33   
    """
   34     34   
   35     35   
    message: str
   36     36   
    """
   37         -
    A summary of the validation failure.
          37  +
    /* StructureGenerator.kt:231 */A summary of the validation failure.
   38     38   
    """
   39     39   
   40     40   
    def __init__(self, message: str, field_list: typing.Optional[typing.List[naming_test_ops.model.ValidationExceptionField]] = ...) -> None:
   41     41   
        ...
   42     42   

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

@@ -1,1 +67,67 @@
    1      1   
import typing
    2      2   
    3      3   
class UnknownVariantCollidingEnum:
    4      4   
    """
    5         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
           5  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
    6      6   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
    7      7   
    """
    8      8   
    9      9   
    Known: UnknownVariantCollidingEnum
   10     10   
    """
   11         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
          11  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   12     12   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   13     13   
    """
   14     14   
   15     15   
    SelfValue: UnknownVariantCollidingEnum
   16     16   
    """
   17         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
          17  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   18     18   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   19     19   
    """
   20     20   
   21     21   
    SelfValue_: UnknownVariantCollidingEnum
   22     22   
    """
   23         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
          23  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   24     24   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   25     25   
    """
   26     26   
   27     27   
    Unknown: UnknownVariantCollidingEnum
   28     28   
    """
   29         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
          29  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   30     30   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   31     31   
    """
   32     32   
   33     33   
    UnknownValue: UnknownVariantCollidingEnum
   34     34   
    """
   35         -
    _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
          35  +
    /* EnumGenerator.kt:160 */_Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   36     36   
    `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   37     37   
    """
   38     38   
   39     39   
    name: typing.Any
   40     40   
   41     41   
    value: typing.Any
   42     42   
   43     43   
class ValidationExceptionField:
   44     44   
    """
   45         -
    Describes one specific validation failure for an input member.
          45  +
    /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
   46     46   
    """
   47     47   
   48     48   
    message: str
   49     49   
    """
   50         -
    A detailed description of the validation failure.
          50  +
    /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   51     51   
    """
   52     52   
   53     53   
    path: str
   54     54   
    """
   55         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          55  +
    /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   56     56   
    """
   57     57   
   58     58   
    def __init__(self, path: str, message: str) -> None:
   59     59   
        ...
   60     60   
   61     61   
   62     62   
class Vec:
   63     63   
    pv_member: typing.Optional[bool]
   64     64   
   65     65   
    def __init__(self, pv_member: typing.Optional[bool] = ...) -> None:

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

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