Server Test Python

Server Test Python

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +101,148 @@
    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 = "ebs")]
           4  +
#[pyo3(name = "ebs")]
    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   
    error.add_class::<crate::error::ValidationException>()?;
          14  +
    /* PythonServerModuleGenerator.kt:79 */
   10     15   
    let model = ::pyo3::types::PyModule::new(py, "model")?;
          16  +
    /* PythonServerModuleGenerator.kt:96 */
   11     17   
    model.add_class::<crate::model::ValidationExceptionField>()?;
          18  +
    /* PythonServerModuleGenerator.kt:96 */
   12     19   
    error.add_class::<crate::error::ConcurrentLimitExceededException>()?;
          20  +
    /* PythonServerModuleGenerator.kt:96 */
   13     21   
    error.add_class::<crate::error::ServiceQuotaExceededException>()?;
          22  +
    /* PythonServerModuleGenerator.kt:96 */
   14     23   
    model.add_class::<crate::model::ServiceQuotaExceededExceptionReason>()?;
          24  +
    /* PythonServerModuleGenerator.kt:96 */
   15     25   
    error.add_class::<crate::error::RequestThrottledException>()?;
          26  +
    /* PythonServerModuleGenerator.kt:96 */
   16     27   
    model.add_class::<crate::model::RequestThrottledExceptionReason>()?;
          28  +
    /* PythonServerModuleGenerator.kt:96 */
   17     29   
    error.add_class::<crate::error::ConflictException>()?;
          30  +
    /* PythonServerModuleGenerator.kt:96 */
   18     31   
    error.add_class::<crate::error::AccessDeniedException>()?;
          32  +
    /* PythonServerModuleGenerator.kt:96 */
   19     33   
    model.add_class::<crate::model::AccessDeniedExceptionReason>()?;
          34  +
    /* PythonServerModuleGenerator.kt:96 */
   20     35   
    error.add_class::<crate::error::ResourceNotFoundException>()?;
          36  +
    /* PythonServerModuleGenerator.kt:96 */
   21     37   
    model.add_class::<crate::model::ResourceNotFoundExceptionReason>()?;
          38  +
    /* PythonServerModuleGenerator.kt:96 */
   22     39   
    error.add_class::<crate::error::InternalServerException>()?;
          40  +
    /* PythonServerModuleGenerator.kt:96 */
   23     41   
    output.add_class::<crate::output::StartSnapshotOutput>()?;
          42  +
    /* PythonServerModuleGenerator.kt:96 */
   24     43   
    model.add_class::<crate::model::Status>()?;
          44  +
    /* PythonServerModuleGenerator.kt:96 */
   25     45   
    model.add_class::<crate::model::Tag>()?;
          46  +
    /* PythonServerModuleGenerator.kt:96 */
   26     47   
    input.add_class::<crate::input::StartSnapshotInput>()?;
          48  +
    /* PythonServerModuleGenerator.kt:96 */
   27     49   
    output.add_class::<crate::output::PutSnapshotBlockOutput>()?;
          50  +
    /* PythonServerModuleGenerator.kt:96 */
   28     51   
    model.add_class::<crate::model::ChecksumAlgorithm>()?;
          52  +
    /* PythonServerModuleGenerator.kt:96 */
   29     53   
    input.add_class::<crate::input::PutSnapshotBlockInput>()?;
          54  +
    /* PythonServerModuleGenerator.kt:96 */
   30     55   
    output.add_class::<crate::output::ListSnapshotBlocksOutput>()?;
          56  +
    /* PythonServerModuleGenerator.kt:96 */
   31     57   
    model.add_class::<crate::model::Block>()?;
          58  +
    /* PythonServerModuleGenerator.kt:96 */
   32     59   
    input.add_class::<crate::input::ListSnapshotBlocksInput>()?;
          60  +
    /* PythonServerModuleGenerator.kt:96 */
   33     61   
    output.add_class::<crate::output::ListChangedBlocksOutput>()?;
          62  +
    /* PythonServerModuleGenerator.kt:96 */
   34     63   
    model.add_class::<crate::model::ChangedBlock>()?;
          64  +
    /* PythonServerModuleGenerator.kt:96 */
   35     65   
    input.add_class::<crate::input::ListChangedBlocksInput>()?;
          66  +
    /* PythonServerModuleGenerator.kt:96 */
   36     67   
    output.add_class::<crate::output::GetSnapshotBlockOutput>()?;
          68  +
    /* PythonServerModuleGenerator.kt:96 */
   37     69   
    input.add_class::<crate::input::GetSnapshotBlockInput>()?;
          70  +
    /* PythonServerModuleGenerator.kt:96 */
   38     71   
    output.add_class::<crate::output::CompleteSnapshotOutput>()?;
          72  +
    /* PythonServerModuleGenerator.kt:96 */
   39     73   
    input.add_class::<crate::input::CompleteSnapshotInput>()?;
          74  +
    /* PythonServerModuleGenerator.kt:96 */
   40     75   
    model.add_class::<crate::model::ChecksumAggregationMethod>()?;
          76  +
    /* PythonServerModuleGenerator.kt:105 */
   41     77   
    ::pyo3::py_run!(py, input, "import sys; sys.modules['ebs.input'] = input");
   42     78   
    m.add_submodule(input)?;
   43     79   
    ::pyo3::py_run!(py, output, "import sys; sys.modules['ebs.output'] = output");
   44     80   
    m.add_submodule(output)?;
   45     81   
    ::pyo3::py_run!(py, error, "import sys; sys.modules['ebs.error'] = error");
   46     82   
    m.add_submodule(error)?;
          83  +
    /* PythonServerModuleGenerator.kt:117 */
   47     84   
    ::pyo3::py_run!(py, model, "import sys; sys.modules['ebs.model'] = model");
   48     85   
    m.add_submodule(model)?;
          86  +
    /* PythonServerModuleGenerator.kt:129 */
   49     87   
    let types = ::pyo3::types::PyModule::new(py, "types")?;
   50     88   
    types.add_class::<::aws_smithy_http_server_python::types::Blob>()?;
   51     89   
    types.add_class::<::aws_smithy_http_server_python::types::DateTime>()?;
   52     90   
    types.add_class::<::aws_smithy_http_server_python::types::Format>()?;
   53     91   
    types.add_class::<::aws_smithy_http_server_python::types::ByteStream>()?;
   54     92   
    ::pyo3::py_run!(py, types, "import sys; sys.modules['ebs.types'] = types");
   55     93   
    m.add_submodule(types)?;
          94  +
    /* PythonServerModuleGenerator.kt:149 */
   56     95   
    let socket = ::pyo3::types::PyModule::new(py, "socket")?;
   57     96   
    socket.add_class::<::aws_smithy_http_server_python::PySocket>()?;
   58     97   
    ::pyo3::py_run!(py, socket, "import sys; sys.modules['ebs.socket'] = socket");
   59     98   
    m.add_submodule(socket)?;
          99  +
    /* PythonServerModuleGenerator.kt:166 */
   60    100   
    let logging = ::pyo3::types::PyModule::new(py, "logging")?;
   61    101   
    logging.add_function(::pyo3::wrap_pyfunction!(
   62    102   
        ::aws_smithy_http_server_python::py_tracing_event,
   63    103   
        m
   64    104   
    )?)?;
   65    105   
    logging.add_class::<::aws_smithy_http_server_python::PyTracingHandler>()?;
   66    106   
    ::pyo3::py_run!(
   67    107   
        py,
   68    108   
        logging,
   69    109   
        "import sys; sys.modules['ebs.logging'] = logging"
   70    110   
    );
   71    111   
    m.add_submodule(logging)?;
         112  +
    /* PythonServerModuleGenerator.kt:183 */
   72    113   
    let middleware = ::pyo3::types::PyModule::new(py, "middleware")?;
   73    114   
    middleware.add_class::<::aws_smithy_http_server_python::PyRequest>()?;
   74    115   
    middleware.add_class::<::aws_smithy_http_server_python::PyResponse>()?;
   75    116   
    middleware.add_class::<::aws_smithy_http_server_python::PyMiddlewareException>()?;
   76    117   
    pyo3::py_run!(
   77    118   
        py,
   78    119   
        middleware,
   79    120   
        "import sys; sys.modules['ebs.middleware'] = middleware"
   80    121   
    );
   81    122   
    m.add_submodule(middleware)?;
         123  +
    /* PythonServerModuleGenerator.kt:201 */
   82    124   
    let tls = ::pyo3::types::PyModule::new(py, "tls")?;
   83    125   
    tls.add_class::<::aws_smithy_http_server_python::tls::PyTlsConfig>()?;
   84    126   
    pyo3::py_run!(py, tls, "import sys; sys.modules['ebs.tls'] = tls");
   85    127   
    m.add_submodule(tls)?;
         128  +
    /* PythonServerModuleGenerator.kt:217 */
   86    129   
    let aws_lambda = ::pyo3::types::PyModule::new(py, "aws_lambda")?;
   87    130   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyLambdaContext>()?;
   88    131   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyClientApplication>()?;
   89    132   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyClientContext>()?;
   90    133   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyCognitoIdentity>()?;
   91    134   
    aws_lambda.add_class::<::aws_smithy_http_server_python::lambda::PyConfig>()?;
   92    135   
    pyo3::py_run!(
   93    136   
        py,
   94    137   
        aws_lambda,
   95    138   
        "import sys; sys.modules['ebs.aws_lambda'] = aws_lambda"
   96    139   
    );
   97    140   
    m.add_submodule(aws_lambda)?;
         141  +
    /* PythonServerModuleGenerator.kt:238 */
   98    142   
    m.add_class::<crate::python_server_application::App>()?;
         143  +
    /* PythonServerModuleGenerator.kt:243 */
   99    144   
    m.add("CODEGEN_VERSION", "ci")?;
         145  +
    /* PythonServerModuleGenerator.kt:58 */
  100    146   
    Ok(())
         147  +
    /* PythonServerModuleGenerator.kt:41 */
  101    148   
}

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

@@ -1,1 +284,290 @@
    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 `StartSnapshot`.
    3      4   
pub(crate) async fn start_snapshot(
    4      5   
    input: crate::input::StartSnapshotInput,
    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::StartSnapshotOutput, crate::error::StartSnapshotError> {
    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!(
   11     12   
            name = "start_snapshot",
   12     13   
            "executing python handler coroutine"
   13     14   
        );
   14     15   
        let result = ::pyo3::Python::with_gil(|py| {
   15     16   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   16     17   
            let coroutine = if handler.args == 1 {
   17     18   
                pyhandler.call1((input,))?
   18     19   
            } else {
   19     20   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   20     21   
            };
   21     22   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   22     23   
        })?;
   23     24   
        result.await.and_then(|r| {
   24     25   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::StartSnapshotOutput>(py))
   25     26   
        })
   26     27   
    } else {
   27     28   
        ::tracing::trace!(name = "start_snapshot", "executing python handler function");
   28     29   
        ::pyo3::Python::with_gil(|py| {
   29     30   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   30     31   
            let output = if handler.args == 1 {
   31     32   
                pyhandler.call1((input,))?
   32     33   
            } else {
   33     34   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   34     35   
            };
   35     36   
            output.extract::<crate::output::StartSnapshotOutput>()
   36     37   
        })
   37     38   
    };
   38     39   
    // Catch and record a Python traceback.
   39     40   
    result.map_err(|e| {
   40     41   
        let rich_py_err =
   41     42   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   42     43   
                e.clone_ref(py)
   43     44   
            }));
   44     45   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   45     46   
        e.into()
   46     47   
    })
   47     48   
}
   48     49   
          50  +
/* PythonServerOperationHandlerGenerator.kt:61 */
   49     51   
/// Python handler for operation `PutSnapshotBlock`.
   50     52   
pub(crate) async fn put_snapshot_block(
   51     53   
    input: crate::input::PutSnapshotBlockInput,
   52     54   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
   53     55   
    handler: ::aws_smithy_http_server_python::PyHandler,
   54     56   
) -> std::result::Result<crate::output::PutSnapshotBlockOutput, crate::error::PutSnapshotBlockError>
   55     57   
{
   56     58   
    // Async block used to run the handler and catch any Python error.
   57     59   
    let result = if handler.is_coroutine {
   58     60   
        ::tracing::trace!(
   59     61   
            name = "put_snapshot_block",
   60     62   
            "executing python handler coroutine"
   61     63   
        );
   62     64   
        let result = ::pyo3::Python::with_gil(|py| {
   63     65   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   64     66   
            let coroutine = if handler.args == 1 {
   65     67   
                pyhandler.call1((input,))?
   66     68   
            } else {
   67     69   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   68     70   
            };
   69     71   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   70     72   
        })?;
   71     73   
        result.await.and_then(|r| {
   72     74   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::PutSnapshotBlockOutput>(py))
   73     75   
        })
   74     76   
    } else {
   75     77   
        ::tracing::trace!(
   76     78   
            name = "put_snapshot_block",
   77     79   
            "executing python handler function"
   78     80   
        );
   79     81   
        ::pyo3::Python::with_gil(|py| {
   80     82   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   81     83   
            let output = if handler.args == 1 {
   82     84   
                pyhandler.call1((input,))?
   83     85   
            } else {
   84     86   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   85     87   
            };
   86     88   
            output.extract::<crate::output::PutSnapshotBlockOutput>()
   87     89   
        })
   88     90   
    };
   89     91   
    // Catch and record a Python traceback.
   90     92   
    result.map_err(|e| {
   91     93   
        let rich_py_err =
   92     94   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   93     95   
                e.clone_ref(py)
   94     96   
            }));
   95     97   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   96     98   
        e.into()
   97     99   
    })
   98    100   
}
   99    101   
         102  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  100    103   
/// Python handler for operation `ListSnapshotBlocks`.
  101    104   
pub(crate) async fn list_snapshot_blocks(
  102    105   
    input: crate::input::ListSnapshotBlocksInput,
  103    106   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  104    107   
    handler: ::aws_smithy_http_server_python::PyHandler,
  105    108   
) -> std::result::Result<
  106    109   
    crate::output::ListSnapshotBlocksOutput,
  107    110   
    crate::error::ListSnapshotBlocksError,
  108    111   
> {
  109    112   
    // Async block used to run the handler and catch any Python error.
  110    113   
    let result = if handler.is_coroutine {
  111    114   
        ::tracing::trace!(
  112    115   
            name = "list_snapshot_blocks",
  113    116   
            "executing python handler coroutine"
  114    117   
        );
  115    118   
        let result = ::pyo3::Python::with_gil(|py| {
  116    119   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  117    120   
            let coroutine = if handler.args == 1 {
  118    121   
                pyhandler.call1((input,))?
  119    122   
            } else {
  120    123   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  121    124   
            };
  122    125   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  123    126   
        })?;
  124    127   
        result.await.and_then(|r| {
  125    128   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListSnapshotBlocksOutput>(py))
  126    129   
        })
  127    130   
    } else {
  128    131   
        ::tracing::trace!(
  129    132   
            name = "list_snapshot_blocks",
  130    133   
            "executing python handler function"
  131    134   
        );
  132    135   
        ::pyo3::Python::with_gil(|py| {
  133    136   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  134    137   
            let output = if handler.args == 1 {
  135    138   
                pyhandler.call1((input,))?
  136    139   
            } else {
  137    140   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  138    141   
            };
  139    142   
            output.extract::<crate::output::ListSnapshotBlocksOutput>()
  140    143   
        })
  141    144   
    };
  142    145   
    // Catch and record a Python traceback.
  143    146   
    result.map_err(|e| {
  144    147   
        let rich_py_err =
  145    148   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  146    149   
                e.clone_ref(py)
  147    150   
            }));
  148    151   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  149    152   
        e.into()
  150    153   
    })
  151    154   
}
  152    155   
         156  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  153    157   
/// Python handler for operation `ListChangedBlocks`.
  154    158   
pub(crate) async fn list_changed_blocks(
  155    159   
    input: crate::input::ListChangedBlocksInput,
  156    160   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  157    161   
    handler: ::aws_smithy_http_server_python::PyHandler,
  158    162   
) -> std::result::Result<crate::output::ListChangedBlocksOutput, crate::error::ListChangedBlocksError>
  159    163   
{
  160    164   
    // Async block used to run the handler and catch any Python error.
  161    165   
    let result = if handler.is_coroutine {
  162    166   
        ::tracing::trace!(
  163    167   
            name = "list_changed_blocks",
  164    168   
            "executing python handler coroutine"
  165    169   
        );
  166    170   
        let result = ::pyo3::Python::with_gil(|py| {
  167    171   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  168    172   
            let coroutine = if handler.args == 1 {
  169    173   
                pyhandler.call1((input,))?
  170    174   
            } else {
  171    175   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  172    176   
            };
  173    177   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  174    178   
        })?;
  175    179   
        result.await.and_then(|r| {
  176    180   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::ListChangedBlocksOutput>(py))
  177    181   
        })
  178    182   
    } else {
  179    183   
        ::tracing::trace!(
  180    184   
            name = "list_changed_blocks",
  181    185   
            "executing python handler function"
  182    186   
        );
  183    187   
        ::pyo3::Python::with_gil(|py| {
  184    188   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  185    189   
            let output = if handler.args == 1 {
  186    190   
                pyhandler.call1((input,))?
  187    191   
            } else {
  188    192   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  189    193   
            };
  190    194   
            output.extract::<crate::output::ListChangedBlocksOutput>()
  191    195   
        })
  192    196   
    };
  193    197   
    // Catch and record a Python traceback.
  194    198   
    result.map_err(|e| {
  195    199   
        let rich_py_err =
  196    200   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  197    201   
                e.clone_ref(py)
  198    202   
            }));
  199    203   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  200    204   
        e.into()
  201    205   
    })
  202    206   
}
  203    207   
         208  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  204    209   
/// Python handler for operation `GetSnapshotBlock`.
  205    210   
pub(crate) async fn get_snapshot_block(
  206    211   
    input: crate::input::GetSnapshotBlockInput,
  207    212   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  208    213   
    handler: ::aws_smithy_http_server_python::PyHandler,
  209    214   
) -> std::result::Result<crate::output::GetSnapshotBlockOutput, crate::error::GetSnapshotBlockError>
  210    215   
{
  211    216   
    // Async block used to run the handler and catch any Python error.
  212    217   
    let result = if handler.is_coroutine {
  213    218   
        ::tracing::trace!(
  214    219   
            name = "get_snapshot_block",
  215    220   
            "executing python handler coroutine"
  216    221   
        );
  217    222   
        let result = ::pyo3::Python::with_gil(|py| {
  218    223   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  219    224   
            let coroutine = if handler.args == 1 {
  220    225   
                pyhandler.call1((input,))?
  221    226   
            } else {
  222    227   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  223    228   
            };
  224    229   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  225    230   
        })?;
  226    231   
        result.await.and_then(|r| {
  227    232   
            ::pyo3::Python::with_gil(|py| r.extract::<crate::output::GetSnapshotBlockOutput>(py))
  228    233   
        })
  229    234   
    } else {
  230    235   
        ::tracing::trace!(
  231    236   
            name = "get_snapshot_block",
  232    237   
            "executing python handler function"
  233    238   
        );
  234    239   
        ::pyo3::Python::with_gil(|py| {
  235    240   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  236    241   
            let output = if handler.args == 1 {
  237    242   
                pyhandler.call1((input,))?
  238    243   
            } else {
  239    244   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  240    245   
            };
  241    246   
            output.extract::<crate::output::GetSnapshotBlockOutput>()
  242    247   
        })
  243    248   
    };
  244    249   
    // Catch and record a Python traceback.
  245    250   
    result.map_err(|e| {
  246    251   
        let rich_py_err =
  247    252   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  248    253   
                e.clone_ref(py)
  249    254   
            }));
  250    255   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  251    256   
        e.into()
  252    257   
    })
  253    258   
}
  254    259   
         260  +
/* PythonServerOperationHandlerGenerator.kt:61 */
  255    261   
/// Python handler for operation `CompleteSnapshot`.
  256    262   
pub(crate) async fn complete_snapshot(
  257    263   
    input: crate::input::CompleteSnapshotInput,
  258    264   
    state: ::aws_smithy_http_server::Extension<::aws_smithy_http_server_python::context::PyContext>,
  259    265   
    handler: ::aws_smithy_http_server_python::PyHandler,
  260    266   
) -> std::result::Result<crate::output::CompleteSnapshotOutput, crate::error::CompleteSnapshotError>
  261    267   
{
  262    268   
    // Async block used to run the handler and catch any Python error.
  263    269   
    let result = if handler.is_coroutine {
  264    270   
        ::tracing::trace!(

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

@@ -1,1 +254,278 @@
    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 ebs import input
   12     14   
/// from ebs import output
          15  +
/* PythonApplicationGenerator.kt:406 */
   13     16   
/// from ebs import error
          17  +
/* PythonApplicationGenerator.kt:408 */
   14     18   
/// from ebs import middleware
   15     19   
/// from ebs 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   
/// # <p>Seals and completes the snapshot after all of the required blocks of data have been
   30     35   
/// #             written to it. Completing the snapshot changes the status to <code>completed</code>. You
   31     36   
/// #             cannot write new blocks to a snapshot after it has been completed.</p>
   32     37   
/// @app.complete_snapshot
   33     38   
/// def complete_snapshot(input: input::CompleteSnapshotInput, ctx: Context) -> output::CompleteSnapshotOutput:
   34     39   
///     raise NotImplementedError
   35     40   
///
   36     41   
/// # <p>Returns the data in a block in an Amazon Elastic Block Store snapshot.</p>
   37     42   
/// @app.get_snapshot_block
   38     43   
/// def get_snapshot_block(input: input::GetSnapshotBlockInput, ctx: Context) -> output::GetSnapshotBlockOutput:
   39     44   
///     raise NotImplementedError
   40     45   
///
   41     46   
/// # <p>Returns information about the blocks that are different between two
   42     47   
/// #             Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.</p>
   43     48   
/// @app.list_changed_blocks
   44     49   
/// def list_changed_blocks(input: input::ListChangedBlocksInput, ctx: Context) -> output::ListChangedBlocksOutput:
   45     50   
///     raise NotImplementedError
   46     51   
///
   47     52   
/// # <p>Returns information about the blocks in an Amazon Elastic Block Store snapshot.</p>
   48     53   
/// @app.list_snapshot_blocks
   49     54   
/// def list_snapshot_blocks(input: input::ListSnapshotBlocksInput, ctx: Context) -> output::ListSnapshotBlocksOutput:
   50     55   
///     raise NotImplementedError
   51     56   
///
   52     57   
/// # <p>Writes a block of data to a snapshot. If the specified block contains
   53     58   
/// #             data, the existing data is overwritten. The target snapshot must be in the
   54     59   
/// #                 <code>pending</code> state.</p>
   55     60   
/// #     	    <p>Data written to a snapshot must be aligned with 512-byte sectors.</p>
   56     61   
/// @app.put_snapshot_block
   57     62   
/// def put_snapshot_block(input: input::PutSnapshotBlockInput, ctx: Context) -> output::PutSnapshotBlockOutput:
   58     63   
///     raise NotImplementedError
   59     64   
///
   60     65   
/// # <p>Creates a new Amazon EBS snapshot. The new snapshot enters the <code>pending</code> state
   61     66   
/// #             after the request completes. </p>
   62     67   
/// #         <p>After creating the snapshot, use <a href="https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html"> PutSnapshotBlock</a> to
   63     68   
/// #             write blocks of data to the snapshot.</p>
   64     69   
/// @app.start_snapshot
   65     70   
/// def start_snapshot(input: input::StartSnapshotInput, ctx: Context) -> output::StartSnapshotOutput:
   66     71   
///     raise NotImplementedError
          72  +
/* PythonApplicationGenerator.kt:428 */
   67     73   
///
   68     74   
/// app.run()
   69     75   
/// ```
   70     76   
///
   71     77   
/// Any of operations above can be written as well prepending the `async` keyword and
   72     78   
/// the Python application will automatically handle it and schedule it on the event loop for you.
          79  +
/* PythonApplicationGenerator.kt:112 */
   73     80   
#[::pyo3::pyclass]
   74     81   
#[derive(Debug)]
   75     82   
/// :generic Ctx:
   76     83   
/// :extends typing.Generic\[Ctx\]:
   77     84   
/// :rtype None:
   78     85   
pub struct App {
   79     86   
    handlers: ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler>,
   80     87   
    middlewares: Vec<::aws_smithy_http_server_python::PyMiddlewareHandler>,
   81     88   
    context: Option<::pyo3::PyObject>,
   82     89   
    workers: ::parking_lot::Mutex<Vec<::pyo3::PyObject>>,
   83     90   
}
          91  +
/* PythonApplicationGenerator.kt:149 */
   84     92   
impl Default for App {
   85     93   
    fn default() -> Self {
   86     94   
        Self {
   87     95   
            handlers: Default::default(),
   88     96   
            middlewares: vec![],
   89     97   
            context: None,
   90     98   
            workers: ::parking_lot::Mutex::new(vec![]),
   91     99   
        }
   92    100   
    }
   93    101   
}
         102  +
/* PythonApplicationGenerator.kt:131 */
   94    103   
impl Clone for App {
   95    104   
    fn clone(&self) -> Self {
   96    105   
        Self {
   97    106   
            handlers: self.handlers.clone(),
   98    107   
            middlewares: self.middlewares.clone(),
   99    108   
            context: self.context.clone(),
  100    109   
            workers: ::parking_lot::Mutex::new(vec![]),
  101    110   
        }
  102    111   
    }
  103    112   
}
         113  +
/* PythonApplicationGenerator.kt:168 */
  104    114   
impl ::aws_smithy_http_server_python::PyApp for App {
         115  +
    /* PythonApplicationGenerator.kt:174 */
  105    116   
    fn workers(&self) -> &::parking_lot::Mutex<Vec<::pyo3::PyObject>> {
  106    117   
        &self.workers
  107    118   
    }
  108    119   
    fn context(&self) -> &Option<::pyo3::PyObject> {
  109    120   
        &self.context
  110    121   
    }
  111    122   
    fn handlers(
  112    123   
        &mut self,
  113    124   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
  114    125   
        &mut self.handlers
  115    126   
    }
         127  +
    /* PythonApplicationGenerator.kt:189 */
  116    128   
    fn build_service(
  117    129   
        &mut self,
  118    130   
        event_loop: &::pyo3::PyAny,
  119    131   
    ) -> ::pyo3::PyResult<
  120    132   
        ::tower::util::BoxCloneService<
  121    133   
            ::http::Request<::aws_smithy_http_server::body::Body>,
  122    134   
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
  123    135   
            std::convert::Infallible,
  124    136   
        >,
  125    137   
    > {
         138  +
        /* PythonApplicationGenerator.kt:201 */
  126    139   
        let builder = crate::service::Ebs::builder_without_plugins();
         140  +
        /* PythonApplicationGenerator.kt:209 */
  127    141   
        let complete_snapshot_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  128    142   
        let handler = self
  129    143   
            .handlers
  130    144   
            .get("complete_snapshot")
  131    145   
            .expect("Python handler for operation `complete_snapshot` not found")
  132    146   
            .clone();
  133    147   
        let builder = builder.complete_snapshot(move |input, state| {
  134    148   
            ::pyo3_asyncio::tokio::scope(
  135    149   
                complete_snapshot_locals.clone(),
  136    150   
                crate::python_operation_adaptor::complete_snapshot(input, state, handler.clone()),
  137    151   
            )
  138    152   
        });
         153  +
        /* PythonApplicationGenerator.kt:209 */
  139    154   
        let get_snapshot_block_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  140    155   
        let handler = self
  141    156   
            .handlers
  142    157   
            .get("get_snapshot_block")
  143    158   
            .expect("Python handler for operation `get_snapshot_block` not found")
  144    159   
            .clone();
  145    160   
        let builder = builder.get_snapshot_block(move |input, state| {
  146    161   
            ::pyo3_asyncio::tokio::scope(
  147    162   
                get_snapshot_block_locals.clone(),
  148    163   
                crate::python_operation_adaptor::get_snapshot_block(input, state, handler.clone()),
  149    164   
            )
  150    165   
        });
         166  +
        /* PythonApplicationGenerator.kt:209 */
  151    167   
        let list_changed_blocks_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  152    168   
        let handler = self
  153    169   
            .handlers
  154    170   
            .get("list_changed_blocks")
  155    171   
            .expect("Python handler for operation `list_changed_blocks` not found")
  156    172   
            .clone();
  157    173   
        let builder = builder.list_changed_blocks(move |input, state| {
  158    174   
            ::pyo3_asyncio::tokio::scope(
  159    175   
                list_changed_blocks_locals.clone(),
  160    176   
                crate::python_operation_adaptor::list_changed_blocks(input, state, handler.clone()),
  161    177   
            )
  162    178   
        });
         179  +
        /* PythonApplicationGenerator.kt:209 */
  163    180   
        let list_snapshot_blocks_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  164    181   
        let handler = self
  165    182   
            .handlers
  166    183   
            .get("list_snapshot_blocks")
  167    184   
            .expect("Python handler for operation `list_snapshot_blocks` not found")
  168    185   
            .clone();
  169    186   
        let builder = builder.list_snapshot_blocks(move |input, state| {
  170    187   
            ::pyo3_asyncio::tokio::scope(
  171    188   
                list_snapshot_blocks_locals.clone(),
  172    189   
                crate::python_operation_adaptor::list_snapshot_blocks(
  173    190   
                    input,
  174    191   
                    state,
  175    192   
                    handler.clone(),
  176    193   
                ),
  177    194   
            )
  178    195   
        });
         196  +
        /* PythonApplicationGenerator.kt:209 */
  179    197   
        let put_snapshot_block_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  180    198   
        let handler = self
  181    199   
            .handlers
  182    200   
            .get("put_snapshot_block")
  183    201   
            .expect("Python handler for operation `put_snapshot_block` not found")
  184    202   
            .clone();
  185    203   
        let builder = builder.put_snapshot_block(move |input, state| {
  186    204   
            ::pyo3_asyncio::tokio::scope(
  187    205   
                put_snapshot_block_locals.clone(),
  188    206   
                crate::python_operation_adaptor::put_snapshot_block(input, state, handler.clone()),
  189    207   
            )
  190    208   
        });
         209  +
        /* PythonApplicationGenerator.kt:209 */
  191    210   
        let start_snapshot_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  192    211   
        let handler = self
  193    212   
            .handlers
  194    213   
            .get("start_snapshot")
  195    214   
            .expect("Python handler for operation `start_snapshot` not found")
  196    215   
            .clone();
  197    216   
        let builder = builder.start_snapshot(move |input, state| {
  198    217   
            ::pyo3_asyncio::tokio::scope(
  199    218   
                start_snapshot_locals.clone(),
  200    219   
                crate::python_operation_adaptor::start_snapshot(input, state, handler.clone()),
  201    220   
            )
  202    221   
        });
         222  +
        /* PythonApplicationGenerator.kt:220 */
  203    223   
        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"));
  204    224   
  205    225   
        {
  206    226   
            use ::tower::Layer;
  207    227   
            ::tracing::trace!("adding middlewares to rust python router");
  208    228   
            let mut middlewares = self.middlewares.clone();
  209    229   
            // Reverse the middlewares, so they run with same order as they defined
  210    230   
            middlewares.reverse();
  211    231   
            for handler in middlewares {
  212    232   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  213    233   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  214    234   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  215    235   
                    ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  216    236   
                >::new(handler, locals);
  217    237   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  218    238   
            }
  219    239   
        }
  220    240   
        Ok(service)
         241  +
        /* PythonApplicationGenerator.kt:189 */
  221    242   
    }
         243  +
    /* PythonApplicationGenerator.kt:168 */
  222    244   
}
         245  +
/* PythonApplicationGenerator.kt:247 */
  223    246   
#[::pyo3::pymethods]
  224    247   
impl App {
         248  +
    /* PythonApplicationGenerator.kt:260 */
  225    249   
    /// Create a new [App].
  226    250   
    #[new]
  227    251   
    pub fn new() -> Self {
  228    252   
        Self::default()
  229    253   
    }
  230    254   
  231    255   
    /// Register a context object that will be shared between handlers.
  232    256   
    ///
  233    257   
    /// :param context Ctx:
  234    258   
    /// :rtype None:
@@ -277,301 +391,422 @@
  297    321   
        py: pyo3::Python,
  298    322   
        socket: &pyo3::PyCell<::aws_smithy_http_server_python::PySocket>,
  299    323   
        worker_number: isize,
  300    324   
        tls: Option<::aws_smithy_http_server_python::tls::PyTlsConfig>,
  301    325   
    ) -> pyo3::PyResult<()> {
  302    326   
        use ::aws_smithy_http_server_python::PyApp;
  303    327   
        let event_loop = self.configure_python_event_loop(py)?;
  304    328   
        let service = self.build_and_configure_service(py, event_loop)?;
  305    329   
        self.start_hyper_worker(py, socket, event_loop, service, worker_number, tls)
  306    330   
    }
         331  +
    /* PythonApplicationGenerator.kt:366 */
  307    332   
    /// Method to register `complete_snapshot` Python implementation inside the handlers map.
  308    333   
    /// It can be used as a function decorator in Python.
  309    334   
    ///
  310    335   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.CompleteSnapshotInput, Ctx\], typing.Union\[ebs.output.CompleteSnapshotOutput, typing.Awaitable\[ebs.output.CompleteSnapshotOutput\]\]\], typing.Callable\[\[ebs.input.CompleteSnapshotInput\], typing.Union\[ebs.output.CompleteSnapshotOutput, typing.Awaitable\[ebs.output.CompleteSnapshotOutput\]\]\]\]:
  311    336   
    /// :rtype None:
  312    337   
    #[pyo3(text_signature = "($self, func)")]
  313    338   
    pub fn complete_snapshot(
  314    339   
        &mut self,
  315    340   
        py: ::pyo3::Python,
  316    341   
        func: ::pyo3::PyObject,
  317    342   
    ) -> ::pyo3::PyResult<()> {
  318    343   
        use ::aws_smithy_http_server_python::PyApp;
  319    344   
        self.register_operation(py, "complete_snapshot", func)
  320    345   
    }
         346  +
    /* PythonApplicationGenerator.kt:366 */
  321    347   
    /// Method to register `get_snapshot_block` Python implementation inside the handlers map.
  322    348   
    /// It can be used as a function decorator in Python.
  323    349   
    ///
  324    350   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.GetSnapshotBlockInput, Ctx\], typing.Union\[ebs.output.GetSnapshotBlockOutput, typing.Awaitable\[ebs.output.GetSnapshotBlockOutput\]\]\], typing.Callable\[\[ebs.input.GetSnapshotBlockInput\], typing.Union\[ebs.output.GetSnapshotBlockOutput, typing.Awaitable\[ebs.output.GetSnapshotBlockOutput\]\]\]\]:
  325    351   
    /// :rtype None:
  326    352   
    #[pyo3(text_signature = "($self, func)")]
  327    353   
    pub fn get_snapshot_block(
  328    354   
        &mut self,
  329    355   
        py: ::pyo3::Python,
  330    356   
        func: ::pyo3::PyObject,
  331    357   
    ) -> ::pyo3::PyResult<()> {
  332    358   
        use ::aws_smithy_http_server_python::PyApp;
  333    359   
        self.register_operation(py, "get_snapshot_block", func)
  334    360   
    }
         361  +
    /* PythonApplicationGenerator.kt:366 */
  335    362   
    /// Method to register `list_changed_blocks` Python implementation inside the handlers map.
  336    363   
    /// It can be used as a function decorator in Python.
  337    364   
    ///
  338    365   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.ListChangedBlocksInput, Ctx\], typing.Union\[ebs.output.ListChangedBlocksOutput, typing.Awaitable\[ebs.output.ListChangedBlocksOutput\]\]\], typing.Callable\[\[ebs.input.ListChangedBlocksInput\], typing.Union\[ebs.output.ListChangedBlocksOutput, typing.Awaitable\[ebs.output.ListChangedBlocksOutput\]\]\]\]:
  339    366   
    /// :rtype None:
  340    367   
    #[pyo3(text_signature = "($self, func)")]
  341    368   
    pub fn list_changed_blocks(
  342    369   
        &mut self,
  343    370   
        py: ::pyo3::Python,
  344    371   
        func: ::pyo3::PyObject,
  345    372   
    ) -> ::pyo3::PyResult<()> {
  346    373   
        use ::aws_smithy_http_server_python::PyApp;
  347    374   
        self.register_operation(py, "list_changed_blocks", func)
  348    375   
    }
         376  +
    /* PythonApplicationGenerator.kt:366 */
  349    377   
    /// Method to register `list_snapshot_blocks` Python implementation inside the handlers map.
  350    378   
    /// It can be used as a function decorator in Python.
  351    379   
    ///
  352    380   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.ListSnapshotBlocksInput, Ctx\], typing.Union\[ebs.output.ListSnapshotBlocksOutput, typing.Awaitable\[ebs.output.ListSnapshotBlocksOutput\]\]\], typing.Callable\[\[ebs.input.ListSnapshotBlocksInput\], typing.Union\[ebs.output.ListSnapshotBlocksOutput, typing.Awaitable\[ebs.output.ListSnapshotBlocksOutput\]\]\]\]:
  353    381   
    /// :rtype None:
  354    382   
    #[pyo3(text_signature = "($self, func)")]
  355    383   
    pub fn list_snapshot_blocks(
  356    384   
        &mut self,
  357    385   
        py: ::pyo3::Python,
  358    386   
        func: ::pyo3::PyObject,
  359    387   
    ) -> ::pyo3::PyResult<()> {
  360    388   
        use ::aws_smithy_http_server_python::PyApp;
  361    389   
        self.register_operation(py, "list_snapshot_blocks", func)
  362    390   
    }
         391  +
    /* PythonApplicationGenerator.kt:366 */
  363    392   
    /// Method to register `put_snapshot_block` Python implementation inside the handlers map.
  364    393   
    /// It can be used as a function decorator in Python.
  365    394   
    ///
  366    395   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.PutSnapshotBlockInput, Ctx\], typing.Union\[ebs.output.PutSnapshotBlockOutput, typing.Awaitable\[ebs.output.PutSnapshotBlockOutput\]\]\], typing.Callable\[\[ebs.input.PutSnapshotBlockInput\], typing.Union\[ebs.output.PutSnapshotBlockOutput, typing.Awaitable\[ebs.output.PutSnapshotBlockOutput\]\]\]\]:
  367    396   
    /// :rtype None:
  368    397   
    #[pyo3(text_signature = "($self, func)")]
  369    398   
    pub fn put_snapshot_block(
  370    399   
        &mut self,
  371    400   
        py: ::pyo3::Python,
  372    401   
        func: ::pyo3::PyObject,
  373    402   
    ) -> ::pyo3::PyResult<()> {
  374    403   
        use ::aws_smithy_http_server_python::PyApp;
  375    404   
        self.register_operation(py, "put_snapshot_block", func)
  376    405   
    }
         406  +
    /* PythonApplicationGenerator.kt:366 */
  377    407   
    /// Method to register `start_snapshot` Python implementation inside the handlers map.
  378    408   
    /// It can be used as a function decorator in Python.
  379    409   
    ///
  380    410   
    /// :param func typing.Union\[typing.Callable\[\[ebs.input.StartSnapshotInput, Ctx\], typing.Union\[ebs.output.StartSnapshotOutput, typing.Awaitable\[ebs.output.StartSnapshotOutput\]\]\], typing.Callable\[\[ebs.input.StartSnapshotInput\], typing.Union\[ebs.output.StartSnapshotOutput, typing.Awaitable\[ebs.output.StartSnapshotOutput\]\]\]\]:
  381    411   
    /// :rtype None:
  382    412   
    #[pyo3(text_signature = "($self, func)")]
  383    413   
    pub fn start_snapshot(
  384    414   
        &mut self,
  385    415   
        py: ::pyo3::Python,
  386    416   
        func: ::pyo3::PyObject,
  387    417   
    ) -> ::pyo3::PyResult<()> {
  388    418   
        use ::aws_smithy_http_server_python::PyApp;
  389    419   
        self.register_operation(py, "start_snapshot", func)
  390    420   
    }
         421  +
    /* PythonApplicationGenerator.kt:247 */
  391    422   
}

tmp-codegen-diff/codegen-server-test-python/ebs/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 [`Ebs`].
    3      4   
///
    4      5   
/// Constructed via [`Ebs::builder`].
    5      6   
pub struct EbsBuilder<Body, L, HttpPl, ModelPl> {
    6      7   
    complete_snapshot: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      8   
    get_snapshot_block: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8      9   
    list_changed_blocks: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9     10   
    list_snapshot_blocks: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10     11   
    put_snapshot_block: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11     12   
    start_snapshot: Option<::aws_smithy_http_server::routing::Route<Body>>,
@@ -1504,1505 +1563,1565 @@
 1524   1525   
            "com.amazonaws.ebs",
 1525   1526   
            "Ebs",
 1526   1527   
        );
 1527   1528   
 1528   1529   
    const VERSION: Option<&'static str> = Some("2019-11-02");
 1529   1530   
 1530   1531   
    type Protocol = ::aws_smithy_http_server::protocol::rest_json_1::RestJson1;
 1531   1532   
 1532   1533   
    type Operations = Operation;
 1533   1534   
}
        1535  +
/* ServiceConfigGenerator.kt:178 */
 1534   1536   
/// Configuration for the [`Ebs`]. This is the central place where to register and
 1535   1537   
/// configure [`::tower::Layer`]s, HTTP plugins, and model plugins.
 1536   1538   
///
 1537   1539   
/// ```rust,no_run
 1538   1540   
/// # use ebs::EbsConfig;
 1539   1541   
/// # use ::aws_smithy_http_server::plugin::IdentityPlugin;
 1540   1542   
/// # use ::tower::layer::util::Identity;
 1541   1543   
/// # let authentication_plugin = IdentityPlugin;
 1542   1544   
/// # let authorization_plugin = IdentityPlugin;
 1543   1545   
/// # let server_request_id_provider_layer = Identity::new();
@@ -1617,1619 +1676,1679 @@
 1637   1639   
 1638   1640   
    /// Build the configuration.
 1639   1641   
    pub fn build(self) -> super::EbsConfig<L, H, M> {
 1640   1642   
        super::EbsConfig {
 1641   1643   
            layers: self.layers,
 1642   1644   
            http_plugins: self.http_plugins,
 1643   1645   
            model_plugins: self.model_plugins,
 1644   1646   
        }
 1645   1647   
    }
 1646   1648   
}
        1649  +
/* ScopeMacroGenerator.kt:81 */
 1647   1650   
/// A macro to help with scoping [plugins](crate::server::plugin) to a subset of all operations.
 1648   1651   
///
 1649   1652   
/// In contrast to [`crate::server::scope`](crate::server::scope), this macro has knowledge
 1650   1653   
/// of the service and any operations _not_ specified will be placed in the opposing group.
 1651   1654   
///
 1652   1655   
/// # Example
 1653   1656   
///
 1654   1657   
/// ```rust
 1655   1658   
/// scope! {
 1656   1659   
///     /// Includes [`CompleteSnapshot`], excluding all other operations.

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

@@ -1,1 +0,15 @@
    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::body::SdkBody;
    3      4   
pub use ::aws_smithy_types::byte_stream::error::Error as ByteStreamError;
    4      5   
pub use ::aws_smithy_types::byte_stream::AggregatedBytes;
    5         -
pub use ::aws_smithy_types::byte_stream::ByteStream;
           6  +
/* SmithyTypesPubUseExtra.kt:86 */ pub use ::aws_smithy_types::byte_stream::ByteStream;
    6      7   
#[cfg(feature = "rt-tokio")]
    7      8   
pub use ::aws_smithy_types::byte_stream::FsBuilder;
    8      9   
#[cfg(feature = "rt-tokio")]
    9     10   
pub use ::aws_smithy_types::byte_stream::Length;
   10     11   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
          12  +
/* ServerRequiredCustomizations.kt:69 */
   11     13   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
   12     14   
pub use ::aws_smithy_types::Blob;
   13         -
pub use ::aws_smithy_types::DateTime;
          15  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;

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

@@ -1,1 +42,52 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3      3   
pub(crate) mod tags_unconstrained {
    4      4   
           5  +
    /* UnconstrainedCollectionGenerator.kt:77 */
    5      6   
    #[derive(Debug, Clone)]
    6      7   
    pub(crate) struct TagsUnconstrained(
    7      8   
        pub(crate) std::vec::Vec<crate::model::tag_internal::Builder>,
    8      9   
    );
    9     10   
   10     11   
    impl From<TagsUnconstrained>
   11     12   
        for crate::constrained::MaybeConstrained<
   12     13   
            crate::constrained::tags_constrained::TagsConstrained,
   13     14   
        >
   14     15   
    {
   15     16   
        fn from(value: TagsUnconstrained) -> Self {
   16     17   
            Self::Unconstrained(value)
   17     18   
        }
   18     19   
    }
          20  +
    /* UnconstrainedCollectionGenerator.kt:97 */
   19     21   
    impl std::convert::TryFrom<TagsUnconstrained>
   20     22   
        for crate::constrained::tags_constrained::TagsConstrained
   21     23   
    {
          24  +
        /* UnconstrainedCollectionGenerator.kt:98 */
   22     25   
        type Error = crate::model::tags_internal::ConstraintViolation;
          26  +
        /* UnconstrainedCollectionGenerator.kt:100 */
   23     27   
        fn try_from(value: TagsUnconstrained) -> std::result::Result<Self, Self::Error> {
          28  +
            /* UnconstrainedCollectionGenerator.kt:127 */
   24     29   
            let res: ::std::result::Result<
   25     30   
                ::std::vec::Vec<crate::model::Tag>,
   26     31   
                (usize, crate::model::tag_internal::ConstraintViolation),
   27     32   
            > = value
   28     33   
                .0
   29     34   
                .into_iter()
   30     35   
                .enumerate()
   31     36   
                .map(|(idx, inner)| {
   32     37   
                    inner
   33     38   
                        .try_into()
   34     39   
                        .map_err(|inner_violation| (idx, inner_violation))
   35     40   
                })
   36     41   
                .collect();
   37     42   
            let inner =
   38     43   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
          44  +
            /* UnconstrainedCollectionGenerator.kt:191 */
   39     45   
            Ok(Self(inner))
          46  +
            /* UnconstrainedCollectionGenerator.kt:100 */
   40     47   
        }
          48  +
        /* UnconstrainedCollectionGenerator.kt:97 */
   41     49   
    }
          50  +
          51  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   42     52   
}

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

@@ -1,1 +61,61 @@
    1      1   
import json_rpc10.model
    2      2   
import typing
    3      3   
    4      4   
class ComplexError(Exception):
    5      5   
    """
    6         -
    This error is thrown when a request is invalid.
           6  +
    /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
    7      7   
    """
    8      8   
    9      9   
    nested: typing.Optional[json_rpc10.model.ComplexNestedErrorData]
   10     10   
   11     11   
    top_level: typing.Optional[str]
   12     12   
   13     13   
    def __init__(self, top_level: typing.Optional[str] = ..., nested: typing.Optional[json_rpc10.model.ComplexNestedErrorData] = ...) -> None:
   14     14   
        ...
   15     15   
   16     16   
   17     17   
class FooError(Exception):
   18     18   
    """
   19         -
    This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
          19  +
    /* StructureGenerator.kt:197 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
   20     20   
    """
   21     21   
   22     22   
    def __init__(self) -> None:
   23     23   
        ...
   24     24   
   25     25   
   26     26   
class InternalServerError(Exception):
   27     27   
    message: str
   28     28   
   29     29   
    def __init__(self, message: str) -> None:
   30     30   
        ...
   31     31   
   32     32   
   33     33   
class InvalidGreeting(Exception):
   34     34   
    """
   35         -
    This error is thrown when an invalid greeting value is provided.
          35  +
    /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
   36     36   
    """
   37     37   
   38     38   
    message: typing.Optional[str]
   39     39   
   40     40   
    def __init__(self, message: typing.Optional[str] = ...) -> None:
   41     41   
        ...
   42     42   
   43     43   
   44     44   
class ValidationException(Exception):
   45     45   
    """
   46         -
    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.
          46  +
    /* 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.
   47     47   
    """
   48     48   
   49     49   
    field_list: typing.Optional[typing.List[json_rpc10.model.ValidationExceptionField]]
   50     50   
    """
   51         -
    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.
          51  +
    /* 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.
   52     52   
    """
   53     53   
   54     54   
    message: str
   55     55   
    """
   56         -
    A summary of the validation failure.
          56  +
    /* StructureGenerator.kt:231 */A summary of the validation failure.
   57     57   
    """
   58     58   
   59     59   
    def __init__(self, message: str, field_list: typing.Optional[typing.List[json_rpc10.model.ValidationExceptionField]] = ...) -> None:
   60     60   
        ...
   61     61   

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/input/__init__.pyi

@@ -13,13 +99,99 @@
   33     33   
   34     34   
   35     35   
class HostWithPathOperationInput:
   36     36   
    def __init__(self) -> None:
   37     37   
        ...
   38     38   
   39     39   
   40     40   
class JsonUnionsInput:
   41     41   
    contents: typing.Optional[json_rpc10.model.MyUnion]
   42     42   
    """
   43         -
    A union with a representative set of types for members.
          43  +
    /* StructureGenerator.kt:231 */A union with a representative set of types for members.
   44     44   
    """
   45     45   
   46     46   
    def __init__(self, contents: typing.Optional[json_rpc10.model.MyUnion] = ...) -> None:
   47     47   
        ...
   48     48   
   49     49   
   50     50   
class NoInputAndNoOutputInput:
   51     51   
    def __init__(self) -> None:
   52     52   
        ...
   53     53   
   54     54   
   55     55   
class NoInputAndOutputInput:
   56     56   
    def __init__(self) -> None:
   57     57   
        ...
   58     58   
   59     59   
   60     60   
class OperationWithDefaultsInput:
   61     61   
    client_optional_defaults: typing.Optional[json_rpc10.model.ClientOptionalDefaults]
   62     62   
   63     63   
    defaults: typing.Optional[json_rpc10.model.Defaults]
   64     64   
   65     65   
    other_top_level_default: int
   66     66   
   67     67   
    top_level_default: str
   68     68   
   69         -
    def __init__(self, defaults: typing.Optional[json_rpc10.model.Defaults] = ..., client_optional_defaults: typing.Optional[json_rpc10.model.ClientOptionalDefaults] = ..., top_level_default: str, other_top_level_default: int) -> None:
          69  +
    def __init__(self, top_level_default: str, other_top_level_default: int, defaults: typing.Optional[json_rpc10.model.Defaults] = ..., client_optional_defaults: typing.Optional[json_rpc10.model.ClientOptionalDefaults] = ...) -> None:
   70     70   
        ...
   71     71   
   72     72   
   73     73   
class OperationWithNestedStructureInput:
   74     74   
    top_level: json_rpc10.model.TopLevel
   75     75   
   76     76   
    def __init__(self, top_level: json_rpc10.model.TopLevel) -> None:
   77     77   
        ...
   78     78   
   79     79   

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

@@ -46,46 +117,117 @@
   66     66   
    zero_double: float
   67     67   
   68     68   
    zero_float: float
   69     69   
   70     70   
    zero_integer: int
   71     71   
   72     72   
    zero_long: int
   73     73   
   74     74   
    zero_short: int
   75     75   
   76         -
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_null_document: typing.Optional[json_rpc10.types.Document] = ..., default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float) -> None:
          76  +
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float, default_null_document: typing.Optional[json_rpc10.types.Document] = ...) -> None:
   77     77   
        ...
   78     78   
   79     79   
   80     80   
class Dialog:
   81     81   
    farewell: typing.Optional[json_rpc10.model.Farewell]
   82     82   
   83     83   
    greeting: str
   84     84   
   85     85   
    language: typing.Optional[str]
   86     86   
   87         -
    def __init__(self, language: typing.Optional[str] = ..., greeting: str, farewell: typing.Optional[json_rpc10.model.Farewell] = ...) -> None:
          87  +
    def __init__(self, greeting: str, language: typing.Optional[str] = ..., farewell: typing.Optional[json_rpc10.model.Farewell] = ...) -> None:
   88     88   
        ...
   89     89   
   90     90   
   91     91   
class Farewell:
   92     92   
    phrase: str
   93     93   
   94     94   
    def __init__(self, phrase: str) -> None:
   95     95   
        ...
   96     96   
   97     97   
@@ -335,335 +380,380 @@
  355    355   
    dialog_list: typing.List[json_rpc10.model.Dialog]
  356    356   
  357    357   
    dialog_map: typing.Dict[str, json_rpc10.model.Dialog]
  358    358   
  359    359   
    def __init__(self, dialog: json_rpc10.model.Dialog, dialog_list: typing.List[json_rpc10.model.Dialog], dialog_map: typing.Dict[str, json_rpc10.model.Dialog]) -> None:
  360    360   
        ...
  361    361   
  362    362   
  363    363   
class ValidationExceptionField:
  364    364   
    """
  365         -
    Describes one specific validation failure for an input member.
         365  +
    /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
  366    366   
    """
  367    367   
  368    368   
    message: str
  369    369   
    """
  370         -
    A detailed description of the validation failure.
         370  +
    /* StructureGenerator.kt:231 */A detailed description of the validation failure.
  371    371   
    """
  372    372   
  373    373   
    path: str
  374    374   
    """
  375         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         375  +
    /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  376    376   
    """
  377    377   
  378    378   
    def __init__(self, path: str, message: str) -> None:
  379    379   
        ...
  380    380   

tmp-codegen-diff/codegen-server-test-python/json_rpc10/rust-server-codegen-python/python/json_rpc10/output/__init__.pyi

@@ -10,10 +70,70 @@
   30     30   
   31     31   
   32     32   
class HostWithPathOperationOutput:
   33     33   
    def __init__(self) -> None:
   34     34   
        ...
   35     35   
   36     36   
   37     37   
class JsonUnionsOutput:
   38     38   
    contents: typing.Optional[json_rpc10.model.MyUnion]
   39     39   
    """
   40         -
    A union with a representative set of types for members.
          40  +
    /* StructureGenerator.kt:231 */A union with a representative set of types for members.
   41     41   
    """
   42     42   
   43     43   
    def __init__(self, contents: typing.Optional[json_rpc10.model.MyUnion] = ...) -> None:
   44     44   
        ...
   45     45   
   46     46   
   47     47   
class NoInputAndNoOutputOutput:
   48     48   
    def __init__(self) -> None:
   49     49   
        ...
   50     50   
@@ -84,84 +144,144 @@
  104    104   
    zero_double: float
  105    105   
  106    106   
    zero_float: float
  107    107   
  108    108   
    zero_integer: int
  109    109   
  110    110   
    zero_long: int
  111    111   
  112    112   
    zero_short: int
  113    113   
  114         -
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_null_document: typing.Optional[json_rpc10.types.Document] = ..., default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float) -> None:
         114  +
    def __init__(self, default_string: str, default_boolean: bool, default_list: typing.List[str], default_document_map: json_rpc10.types.Document, default_document_string: json_rpc10.types.Document, default_document_boolean: json_rpc10.types.Document, default_document_list: json_rpc10.types.Document, default_timestamp: json_rpc10.types.DateTime, default_blob: json_rpc10.types.Blob, default_byte: int, default_short: int, default_integer: int, default_long: int, default_float: float, default_double: float, default_map: typing.Dict[str, str], default_enum: json_rpc10.model.TestEnum, default_int_enum: int, empty_string: str, false_boolean: bool, empty_blob: json_rpc10.types.Blob, zero_byte: int, zero_short: int, zero_integer: int, zero_long: int, zero_float: float, zero_double: float, default_null_document: typing.Optional[json_rpc10.types.Document] = ...) -> None:
  115    115   
        ...
  116    116   
  117    117   
  118    118   
class OperationWithNestedStructureOutput:
  119    119   
    dialog: json_rpc10.model.Dialog
  120    120   
  121    121   
    dialog_list: typing.List[json_rpc10.model.Dialog]
  122    122   
  123    123   
    dialog_map: typing.Dict[str, json_rpc10.model.Dialog]
  124    124   

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

@@ -1,1 +1418,2618 @@
    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 `OperationWithNestedStructure` operation.
           4  +
/* ServerOperationErrorGenerator.kt:64 */
    3      5   
/// Each variant represents an error that can occur for the `OperationWithNestedStructure` operation.
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::fmt::Debug)]
    5         -
pub enum OperationWithNestedStructureError {
    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 OperationWithNestedStructureError {
           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 OperationWithNestedStructureError {
          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         -
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.fmt(f),
   15         -
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.fmt(f),
          24  +
            /* ServerOperationErrorGenerator.kt:142 */
          25  +
            OperationWithNestedStructureError::ValidationException(_inner) =>
          26  +
            /* ServerOperationErrorGenerator.kt:78 */
          27  +
            {
          28  +
                _inner.fmt(f)
          29  +
            }
          30  +
            ,
          31  +
            /* ServerOperationErrorGenerator.kt:142 */
          32  +
            OperationWithNestedStructureError::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 OperationWithNestedStructureError {
          45  +
    /* ServerOperationErrorGenerator.kt:87 */
   20     46   
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::ValidationException`.
          47  +
    /* ServerOperationErrorGenerator.kt:88 */
   21     48   
    pub fn is_validation_exception(&self) -> bool {
          49  +
        /* ServerOperationErrorGenerator.kt:89 */
   22     50   
        matches!(
   23     51   
            &self,
   24     52   
            OperationWithNestedStructureError::ValidationException(_)
   25     53   
        )
          54  +
        /* ServerOperationErrorGenerator.kt:88 */
   26     55   
    }
          56  +
    /* ServerOperationErrorGenerator.kt:87 */
   27     57   
    /// Returns `true` if the error kind is `OperationWithNestedStructureError::InternalServerError`.
          58  +
    /* ServerOperationErrorGenerator.kt:88 */
   28     59   
    pub fn is_internal_server_error(&self) -> bool {
          60  +
        /* ServerOperationErrorGenerator.kt:89 */
   29     61   
        matches!(
   30     62   
            &self,
   31     63   
            OperationWithNestedStructureError::InternalServerError(_)
   32     64   
        )
          65  +
        /* ServerOperationErrorGenerator.kt:88 */
   33     66   
    }
          67  +
    /* ServerOperationErrorGenerator.kt:92 */
   34     68   
    /// Returns the error name string by matching the correct variant.
          69  +
    /* ServerOperationErrorGenerator.kt:93 */
   35     70   
    pub fn name(&self) -> &'static str {
          71  +
        /* ServerOperationErrorGenerator.kt:139 */
   36     72   
        match &self {
   37         -
            OperationWithNestedStructureError::ValidationException(_inner) => _inner.name(),
   38         -
            OperationWithNestedStructureError::InternalServerError(_inner) => _inner.name(),
          73  +
            /* ServerOperationErrorGenerator.kt:142 */
          74  +
            OperationWithNestedStructureError::ValidationException(_inner) =>
          75  +
            /* ServerOperationErrorGenerator.kt:95 */
          76  +
            {
          77  +
                _inner.name()
   39     78   
            }
          79  +
            ,
          80  +
            /* ServerOperationErrorGenerator.kt:142 */
          81  +
            OperationWithNestedStructureError::InternalServerError(_inner) =>
          82  +
            /* ServerOperationErrorGenerator.kt:95 */
          83  +
            {
          84  +
                _inner.name()
          85  +
            }
          86  +
            /* ServerOperationErrorGenerator.kt:139 */
   40     87   
        }
          88  +
        /* ServerOperationErrorGenerator.kt:93 */
          89  +
    }
          90  +
    /* ServerOperationErrorGenerator.kt:83 */
   41     91   
}
          92  +
/* ServerOperationErrorGenerator.kt:100 */
   42     93   
impl ::std::error::Error for OperationWithNestedStructureError {
          94  +
    /* ServerOperationErrorGenerator.kt:101 */
   43     95   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          96  +
        /* ServerOperationErrorGenerator.kt:139 */
   44     97   
        match &self {
   45         -
            OperationWithNestedStructureError::ValidationException(_inner) => Some(_inner),
   46         -
            OperationWithNestedStructureError::InternalServerError(_inner) => Some(_inner),
          98  +
            /* ServerOperationErrorGenerator.kt:142 */
          99  +
            OperationWithNestedStructureError::ValidationException(_inner) =>
         100  +
            /* ServerOperationErrorGenerator.kt:103 */
         101  +
            {
         102  +
                Some(_inner)
   47    103   
            }
         104  +
            ,
         105  +
            /* ServerOperationErrorGenerator.kt:142 */
         106  +
            OperationWithNestedStructureError::InternalServerError(_inner) =>
         107  +
            /* ServerOperationErrorGenerator.kt:103 */
         108  +
            {
         109  +
                Some(_inner)
         110  +
            }
         111  +
            /* ServerOperationErrorGenerator.kt:139 */
         112  +
        }
         113  +
        /* ServerOperationErrorGenerator.kt:101 */
   48    114   
    }
         115  +
    /* ServerOperationErrorGenerator.kt:100 */
   49    116   
}
         117  +
/* ServerOperationErrorGenerator.kt:110 */
   50    118   
impl ::std::convert::From<crate::error::ValidationException>
   51    119   
    for crate::error::OperationWithNestedStructureError
   52    120   
{
         121  +
    /* ServerOperationErrorGenerator.kt:111 */
   53    122   
    fn from(
   54    123   
        variant: crate::error::ValidationException,
   55    124   
    ) -> crate::error::OperationWithNestedStructureError {
         125  +
        /* ServerOperationErrorGenerator.kt:112 */
   56    126   
        Self::ValidationException(variant)
         127  +
        /* ServerOperationErrorGenerator.kt:111 */
   57    128   
    }
         129  +
    /* ServerOperationErrorGenerator.kt:110 */
   58    130   
}
         131  +
/* ServerOperationErrorGenerator.kt:110 */
   59    132   
impl ::std::convert::From<crate::error::InternalServerError>
   60    133   
    for crate::error::OperationWithNestedStructureError
   61    134   
{
         135  +
    /* ServerOperationErrorGenerator.kt:111 */
   62    136   
    fn from(
   63    137   
        variant: crate::error::InternalServerError,
   64    138   
    ) -> crate::error::OperationWithNestedStructureError {
         139  +
        /* ServerOperationErrorGenerator.kt:112 */
   65    140   
        Self::InternalServerError(variant)
         141  +
        /* ServerOperationErrorGenerator.kt:111 */
   66    142   
    }
         143  +
    /* ServerOperationErrorGenerator.kt:110 */
   67    144   
}
   68    145   
         146  +
/* PythonServerOperationErrorGenerator.kt:38 */
   69    147   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithNestedStructureError {
   70    148   
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithNestedStructureError {
   71    149   
        ::pyo3::Python::with_gil(|py| {
   72    150   
            let error = variant.value(py);
   73    151   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
   74    152   
                return error.into();
   75    153   
            }
   76    154   
            crate::error::InternalServerError {
   77    155   
                message: error.to_string(),
   78    156   
            }
   79    157   
            .into()
   80    158   
        })
   81    159   
    }
   82    160   
}
   83    161   
         162  +
/* RustType.kt:516 */
   84    163   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
         164  +
/* PythonServerStructureGenerator.kt:63 */
   85    165   
/// :param message str:
   86    166   
/// :rtype None:
         167  +
/* StructureGenerator.kt:197 */
   87    168   
#[allow(missing_docs)] // documentation missing in model
         169  +
/* RustType.kt:516 */
   88    170   
#[derive(
   89    171   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   90    172   
)]
   91         -
pub struct InternalServerError {
         173  +
pub /* StructureGenerator.kt:201 */ struct InternalServerError {
         174  +
    /* RustType.kt:516 */
   92    175   
    #[pyo3(get, set)]
         176  +
    /* PythonServerStructureGenerator.kt:80 */
   93    177   
    /// :type str:
         178  +
    /* StructureGenerator.kt:231 */
   94    179   
    #[allow(missing_docs)] // documentation missing in model
   95    180   
    pub message: ::std::string::String,
         181  +
    /* StructureGenerator.kt:201 */
   96    182   
}
         183  +
/* RustType.kt:516 */
   97    184   
#[allow(clippy::new_without_default)]
         185  +
/* RustType.kt:516 */
   98    186   
#[allow(clippy::too_many_arguments)]
         187  +
/* RustType.kt:516 */
   99    188   
#[::pyo3::pymethods]
         189  +
/* PythonServerStructureGenerator.kt:88 */
  100    190   
impl InternalServerError {
  101    191   
    #[new]
  102    192   
    pub fn new(message: ::std::string::String) -> Self {
  103    193   
        Self { message }
  104    194   
    }
  105    195   
    fn __repr__(&self) -> String {
  106    196   
        format!("{self:?}")
  107    197   
    }
  108    198   
    fn __str__(&self) -> String {
  109    199   
        format!("{self:?}")
  110    200   
    }
  111    201   
}
         202  +
/* ErrorImplGenerator.kt:99 */
  112    203   
impl InternalServerError {
         204  +
    /* ErrorImplGenerator.kt:128 */
  113    205   
    /// Returns the error message.
  114    206   
    pub fn message(&self) -> &str {
  115    207   
        &self.message
  116    208   
    }
         209  +
    /* ErrorImplGenerator.kt:141 */
  117    210   
    #[doc(hidden)]
  118    211   
    /// Returns the error name.
  119    212   
    pub fn name(&self) -> &'static str {
  120    213   
        "InternalServerError"
  121    214   
    }
         215  +
    /* ErrorImplGenerator.kt:99 */
  122    216   
}
         217  +
/* ErrorImplGenerator.kt:153 */
  123    218   
impl ::std::fmt::Display for InternalServerError {
         219  +
    /* ErrorImplGenerator.kt:154 */
  124    220   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         221  +
        /* ErrorImplGenerator.kt:161 */
  125    222   
        ::std::write!(f, "InternalServerError")?;
         223  +
        /* ErrorImplGenerator.kt:166 */
  126    224   
        {
         225  +
            /* ErrorImplGenerator.kt:167 */
  127    226   
            ::std::write!(f, ": {}", &self.message)?;
         227  +
            /* ErrorImplGenerator.kt:166 */
  128    228   
        }
         229  +
        /* ErrorImplGenerator.kt:171 */
  129    230   
        Ok(())
         231  +
        /* ErrorImplGenerator.kt:154 */
  130    232   
    }
         233  +
    /* ErrorImplGenerator.kt:153 */
  131    234   
}
         235  +
/* ErrorImplGenerator.kt:175 */
  132    236   
impl ::std::error::Error for InternalServerError {}
         237  +
/* ServerCodegenVisitor.kt:370 */
  133    238   
impl InternalServerError {
  134         -
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
         239  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
         240  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  135    241   
    pub fn builder() -> crate::error::internal_server_error::Builder {
         242  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  136    243   
        crate::error::internal_server_error::Builder::default()
         244  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  137    245   
    }
         246  +
    /* ServerCodegenVisitor.kt:370 */
  138    247   
}
  139    248   
         249  +
/* RustType.kt:516 */
  140    250   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
         251  +
/* PythonServerStructureGenerator.kt:63 */
  141    252   
/// :param message str:
  142    253   
/// :param field_list typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
  143    254   
/// :rtype None:
  144         -
/// 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.
         255  +
/// /* 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.
         256  +
/* RustType.kt:516 */
  145    257   
#[derive(
  146    258   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  147    259   
)]
  148         -
pub struct ValidationException {
         260  +
pub /* StructureGenerator.kt:201 */ struct ValidationException {
         261  +
    /* RustType.kt:516 */
  149    262   
    #[pyo3(get, set)]
         263  +
    /* PythonServerStructureGenerator.kt:80 */
  150    264   
    /// :type str:
  151         -
    /// A summary of the validation failure.
         265  +
    /// /* StructureGenerator.kt:231 */A summary of the validation failure.
  152    266   
    pub message: ::std::string::String,
         267  +
    /* RustType.kt:516 */
  153    268   
    #[pyo3(get, set)]
         269  +
    /* PythonServerStructureGenerator.kt:80 */
  154    270   
    /// :type typing.Optional\[typing.List\[json_rpc10.model.ValidationExceptionField\]\]:
  155         -
    /// 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.
         271  +
    /// /* 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.
  156    272   
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         273  +
    /* StructureGenerator.kt:201 */
  157    274   
}
         275  +
/* StructureGenerator.kt:135 */
  158    276   
impl ValidationException {
  159         -
    /// 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.
         277  +
    /// /* 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.
         278  +
    /* StructureGenerator.kt:166 */
  160    279   
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         280  +
        /* StructureGenerator.kt:169 */
  161    281   
        self.field_list.as_deref()
         282  +
        /* StructureGenerator.kt:166 */
  162    283   
    }
         284  +
    /* StructureGenerator.kt:135 */
  163    285   
}
         286  +
/* RustType.kt:516 */
  164    287   
#[allow(clippy::new_without_default)]
         288  +
/* RustType.kt:516 */
  165    289   
#[allow(clippy::too_many_arguments)]
         290  +
/* RustType.kt:516 */
  166    291   
#[::pyo3::pymethods]
         292  +
/* PythonServerStructureGenerator.kt:88 */
  167    293   
impl ValidationException {
  168    294   
    #[new]
  169    295   
    pub fn new(
  170    296   
        message: ::std::string::String,
  171    297   
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  172    298   
    ) -> Self {
  173    299   
        Self {
  174    300   
            message,
  175    301   
            field_list,
  176    302   
        }
  177    303   
    }
  178    304   
    fn __repr__(&self) -> String {
  179    305   
        format!("{self:?}")
  180    306   
    }
  181    307   
    fn __str__(&self) -> String {
  182    308   
        format!("{self:?}")
  183    309   
    }
  184    310   
}
         311  +
/* ErrorImplGenerator.kt:99 */
  185    312   
impl ValidationException {
         313  +
    /* ErrorImplGenerator.kt:128 */
  186    314   
    /// Returns the error message.
  187    315   
    pub fn message(&self) -> &str {
  188    316   
        &self.message
  189    317   
    }
         318  +
    /* ErrorImplGenerator.kt:141 */
  190    319   
    #[doc(hidden)]
  191    320   
    /// Returns the error name.
  192    321   
    pub fn name(&self) -> &'static str {
  193    322   
        "ValidationException"
  194    323   
    }
         324  +
    /* ErrorImplGenerator.kt:99 */
  195    325   
}
         326  +
/* ErrorImplGenerator.kt:153 */
  196    327   
impl ::std::fmt::Display for ValidationException {
         328  +
    /* ErrorImplGenerator.kt:154 */
  197    329   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         330  +
        /* ErrorImplGenerator.kt:161 */
  198    331   
        ::std::write!(f, "ValidationException")?;
         332  +
        /* ErrorImplGenerator.kt:166 */
  199    333   
        {
         334  +
            /* ErrorImplGenerator.kt:167 */
  200    335   
            ::std::write!(f, ": {}", &self.message)?;
         336  +
            /* ErrorImplGenerator.kt:166 */
  201    337   
        }
         338  +
        /* ErrorImplGenerator.kt:171 */
  202    339   
        Ok(())
         340  +
        /* ErrorImplGenerator.kt:154 */
  203    341   
    }
         342  +
    /* ErrorImplGenerator.kt:153 */
  204    343   
}
         344  +
/* ErrorImplGenerator.kt:175 */
  205    345   
impl ::std::error::Error for ValidationException {}
         346  +
/* ServerCodegenVisitor.kt:370 */
  206    347   
impl ValidationException {
  207         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         348  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         349  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  208    350   
    pub fn builder() -> crate::error::validation_exception::Builder {
         351  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  209    352   
        crate::error::validation_exception::Builder::default()
         353  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  210    354   
    }
         355  +
    /* ServerCodegenVisitor.kt:370 */
  211    356   
}
  212    357   
         358  +
/* ServerOperationErrorGenerator.kt:63 */
  213    359   
/// Error type for the `OperationWithRequiredMembers` operation.
         360  +
/* ServerOperationErrorGenerator.kt:64 */
  214    361   
/// Each variant represents an error that can occur for the `OperationWithRequiredMembers` operation.
         362  +
/* RustType.kt:516 */
  215    363   
#[derive(::std::fmt::Debug)]
  216         -
pub enum OperationWithRequiredMembersError {
         364  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum OperationWithRequiredMembersError {
         365  +
    /* ServerOperationErrorGenerator.kt:68 */
  217    366   
    #[allow(missing_docs)] // documentation missing in model
         367  +
    /* ServerOperationErrorGenerator.kt:71 */
  218    368   
    InternalServerError(crate::error::InternalServerError),
         369  +
    /* ServerOperationErrorGenerator.kt:66 */
  219    370   
}
         371  +
/* ServerOperationErrorGenerator.kt:75 */
  220    372   
impl ::std::fmt::Display for OperationWithRequiredMembersError {
         373  +
    /* ServerOperationErrorGenerator.kt:76 */
  221    374   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         375  +
        /* ServerOperationErrorGenerator.kt:139 */
  222    376   
        match &self {
  223         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.fmt(f),
         377  +
            /* ServerOperationErrorGenerator.kt:142 */
         378  +
            OperationWithRequiredMembersError::InternalServerError(_inner) =>
         379  +
            /* ServerOperationErrorGenerator.kt:78 */
         380  +
            {
         381  +
                _inner.fmt(f)
         382  +
            }
         383  +
            /* ServerOperationErrorGenerator.kt:139 */
  224    384   
        }
         385  +
        /* ServerOperationErrorGenerator.kt:76 */
  225    386   
    }
         387  +
    /* ServerOperationErrorGenerator.kt:75 */
  226    388   
}
         389  +
/* ServerOperationErrorGenerator.kt:83 */
  227    390   
impl OperationWithRequiredMembersError {
         391  +
    /* ServerOperationErrorGenerator.kt:87 */
  228    392   
    /// Returns `true` if the error kind is `OperationWithRequiredMembersError::InternalServerError`.
         393  +
    /* ServerOperationErrorGenerator.kt:88 */
  229    394   
    pub fn is_internal_server_error(&self) -> bool {
         395  +
        /* ServerOperationErrorGenerator.kt:89 */
  230    396   
        matches!(
  231    397   
            &self,
  232    398   
            OperationWithRequiredMembersError::InternalServerError(_)
  233    399   
        )
         400  +
        /* ServerOperationErrorGenerator.kt:88 */
  234    401   
    }
         402  +
    /* ServerOperationErrorGenerator.kt:92 */
  235    403   
    /// Returns the error name string by matching the correct variant.
         404  +
    /* ServerOperationErrorGenerator.kt:93 */
  236    405   
    pub fn name(&self) -> &'static str {
         406  +
        /* ServerOperationErrorGenerator.kt:139 */
  237    407   
        match &self {
  238         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => _inner.name(),
         408  +
            /* ServerOperationErrorGenerator.kt:142 */
         409  +
            OperationWithRequiredMembersError::InternalServerError(_inner) =>
         410  +
            /* ServerOperationErrorGenerator.kt:95 */
         411  +
            {
         412  +
                _inner.name()
         413  +
            }
         414  +
            /* ServerOperationErrorGenerator.kt:139 */
  239    415   
        }
         416  +
        /* ServerOperationErrorGenerator.kt:93 */
  240    417   
    }
         418  +
    /* ServerOperationErrorGenerator.kt:83 */
  241    419   
}
         420  +
/* ServerOperationErrorGenerator.kt:100 */
  242    421   
impl ::std::error::Error for OperationWithRequiredMembersError {
         422  +
    /* ServerOperationErrorGenerator.kt:101 */
  243    423   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         424  +
        /* ServerOperationErrorGenerator.kt:139 */
  244    425   
        match &self {
  245         -
            OperationWithRequiredMembersError::InternalServerError(_inner) => Some(_inner),
         426  +
            /* ServerOperationErrorGenerator.kt:142 */
         427  +
            OperationWithRequiredMembersError::InternalServerError(_inner) =>
         428  +
            /* ServerOperationErrorGenerator.kt:103 */
         429  +
            {
         430  +
                Some(_inner)
         431  +
            }
         432  +
            /* ServerOperationErrorGenerator.kt:139 */
  246    433   
        }
         434  +
        /* ServerOperationErrorGenerator.kt:101 */
  247    435   
    }
         436  +
    /* ServerOperationErrorGenerator.kt:100 */
  248    437   
}
         438  +
/* ServerOperationErrorGenerator.kt:110 */
  249    439   
impl ::std::convert::From<crate::error::InternalServerError>
  250    440   
    for crate::error::OperationWithRequiredMembersError
  251    441   
{
         442  +
    /* ServerOperationErrorGenerator.kt:111 */
  252    443   
    fn from(
  253    444   
        variant: crate::error::InternalServerError,
  254    445   
    ) -> crate::error::OperationWithRequiredMembersError {
         446  +
        /* ServerOperationErrorGenerator.kt:112 */
  255    447   
        Self::InternalServerError(variant)
         448  +
        /* ServerOperationErrorGenerator.kt:111 */
  256    449   
    }
         450  +
    /* ServerOperationErrorGenerator.kt:110 */
  257    451   
}
  258    452   
         453  +
/* PythonServerOperationErrorGenerator.kt:38 */
  259    454   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithRequiredMembersError {
  260    455   
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithRequiredMembersError {
  261    456   
        ::pyo3::Python::with_gil(|py| {
  262    457   
            let error = variant.value(py);
  263    458   
  264    459   
            crate::error::InternalServerError {
  265    460   
                message: error.to_string(),
  266    461   
            }
  267    462   
            .into()
  268    463   
        })
  269    464   
    }
  270    465   
}
  271    466   
         467  +
/* ServerOperationErrorGenerator.kt:63 */
  272    468   
/// Error type for the `OperationWithDefaults` operation.
         469  +
/* ServerOperationErrorGenerator.kt:64 */
  273    470   
/// Each variant represents an error that can occur for the `OperationWithDefaults` operation.
         471  +
/* RustType.kt:516 */
  274    472   
#[derive(::std::fmt::Debug)]
  275         -
pub enum OperationWithDefaultsError {
  276         -
    /// 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.
         473  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum OperationWithDefaultsError {
         474  +
    /// /* 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.
         475  +
    /* ServerOperationErrorGenerator.kt:71 */
  277    476   
    ValidationException(crate::error::ValidationException),
         477  +
    /* ServerOperationErrorGenerator.kt:68 */
  278    478   
    #[allow(missing_docs)] // documentation missing in model
         479  +
    /* ServerOperationErrorGenerator.kt:71 */
  279    480   
    InternalServerError(crate::error::InternalServerError),
         481  +
    /* ServerOperationErrorGenerator.kt:66 */
  280    482   
}
         483  +
/* ServerOperationErrorGenerator.kt:75 */
  281    484   
impl ::std::fmt::Display for OperationWithDefaultsError {
         485  +
    /* ServerOperationErrorGenerator.kt:76 */
  282    486   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         487  +
        /* ServerOperationErrorGenerator.kt:139 */
  283    488   
        match &self {
  284         -
            OperationWithDefaultsError::ValidationException(_inner) => _inner.fmt(f),
  285         -
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.fmt(f),
         489  +
            /* ServerOperationErrorGenerator.kt:142 */
         490  +
            OperationWithDefaultsError::ValidationException(_inner) =>
         491  +
            /* ServerOperationErrorGenerator.kt:78 */
         492  +
            {
         493  +
                _inner.fmt(f)
         494  +
            }
         495  +
            ,
         496  +
            /* ServerOperationErrorGenerator.kt:142 */
         497  +
            OperationWithDefaultsError::InternalServerError(_inner) =>
         498  +
            /* ServerOperationErrorGenerator.kt:78 */
         499  +
            {
         500  +
                _inner.fmt(f)
  286    501   
            }
         502  +
            /* ServerOperationErrorGenerator.kt:139 */
  287    503   
        }
         504  +
        /* ServerOperationErrorGenerator.kt:76 */
         505  +
    }
         506  +
    /* ServerOperationErrorGenerator.kt:75 */
  288    507   
}
         508  +
/* ServerOperationErrorGenerator.kt:83 */
  289    509   
impl OperationWithDefaultsError {
         510  +
    /* ServerOperationErrorGenerator.kt:87 */
  290    511   
    /// Returns `true` if the error kind is `OperationWithDefaultsError::ValidationException`.
         512  +
    /* ServerOperationErrorGenerator.kt:88 */
  291    513   
    pub fn is_validation_exception(&self) -> bool {
         514  +
        /* ServerOperationErrorGenerator.kt:89 */
  292    515   
        matches!(&self, OperationWithDefaultsError::ValidationException(_))
         516  +
        /* ServerOperationErrorGenerator.kt:88 */
  293    517   
    }
         518  +
    /* ServerOperationErrorGenerator.kt:87 */
  294    519   
    /// Returns `true` if the error kind is `OperationWithDefaultsError::InternalServerError`.
         520  +
    /* ServerOperationErrorGenerator.kt:88 */
  295    521   
    pub fn is_internal_server_error(&self) -> bool {
         522  +
        /* ServerOperationErrorGenerator.kt:89 */
  296    523   
        matches!(&self, OperationWithDefaultsError::InternalServerError(_))
         524  +
        /* ServerOperationErrorGenerator.kt:88 */
  297    525   
    }
         526  +
    /* ServerOperationErrorGenerator.kt:92 */
  298    527   
    /// Returns the error name string by matching the correct variant.
         528  +
    /* ServerOperationErrorGenerator.kt:93 */
  299    529   
    pub fn name(&self) -> &'static str {
         530  +
        /* ServerOperationErrorGenerator.kt:139 */
  300    531   
        match &self {
  301         -
            OperationWithDefaultsError::ValidationException(_inner) => _inner.name(),
  302         -
            OperationWithDefaultsError::InternalServerError(_inner) => _inner.name(),
         532  +
            /* ServerOperationErrorGenerator.kt:142 */
         533  +
            OperationWithDefaultsError::ValidationException(_inner) =>
         534  +
            /* ServerOperationErrorGenerator.kt:95 */
         535  +
            {
         536  +
                _inner.name()
  303    537   
            }
         538  +
            ,
         539  +
            /* ServerOperationErrorGenerator.kt:142 */
         540  +
            OperationWithDefaultsError::InternalServerError(_inner) =>
         541  +
            /* ServerOperationErrorGenerator.kt:95 */
         542  +
            {
         543  +
                _inner.name()
         544  +
            }
         545  +
            /* ServerOperationErrorGenerator.kt:139 */
  304    546   
        }
         547  +
        /* ServerOperationErrorGenerator.kt:93 */
         548  +
    }
         549  +
    /* ServerOperationErrorGenerator.kt:83 */
  305    550   
}
         551  +
/* ServerOperationErrorGenerator.kt:100 */
  306    552   
impl ::std::error::Error for OperationWithDefaultsError {
         553  +
    /* ServerOperationErrorGenerator.kt:101 */
  307    554   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         555  +
        /* ServerOperationErrorGenerator.kt:139 */
  308    556   
        match &self {
  309         -
            OperationWithDefaultsError::ValidationException(_inner) => Some(_inner),
  310         -
            OperationWithDefaultsError::InternalServerError(_inner) => Some(_inner),
         557  +
            /* ServerOperationErrorGenerator.kt:142 */
         558  +
            OperationWithDefaultsError::ValidationException(_inner) =>
         559  +
            /* ServerOperationErrorGenerator.kt:103 */
         560  +
            {
         561  +
                Some(_inner)
  311    562   
            }
         563  +
            ,
         564  +
            /* ServerOperationErrorGenerator.kt:142 */
         565  +
            OperationWithDefaultsError::InternalServerError(_inner) =>
         566  +
            /* ServerOperationErrorGenerator.kt:103 */
         567  +
            {
         568  +
                Some(_inner)
         569  +
            }
         570  +
            /* ServerOperationErrorGenerator.kt:139 */
         571  +
        }
         572  +
        /* ServerOperationErrorGenerator.kt:101 */
  312    573   
    }
         574  +
    /* ServerOperationErrorGenerator.kt:100 */
  313    575   
}
         576  +
/* ServerOperationErrorGenerator.kt:110 */
  314    577   
impl ::std::convert::From<crate::error::ValidationException>
  315    578   
    for crate::error::OperationWithDefaultsError
  316    579   
{
         580  +
    /* ServerOperationErrorGenerator.kt:111 */
  317    581   
    fn from(
  318    582   
        variant: crate::error::ValidationException,
  319    583   
    ) -> crate::error::OperationWithDefaultsError {
         584  +
        /* ServerOperationErrorGenerator.kt:112 */
  320    585   
        Self::ValidationException(variant)
         586  +
        /* ServerOperationErrorGenerator.kt:111 */
  321    587   
    }
         588  +
    /* ServerOperationErrorGenerator.kt:110 */
  322    589   
}
         590  +
/* ServerOperationErrorGenerator.kt:110 */
  323    591   
impl ::std::convert::From<crate::error::InternalServerError>
  324    592   
    for crate::error::OperationWithDefaultsError
  325    593   
{
         594  +
    /* ServerOperationErrorGenerator.kt:111 */
  326    595   
    fn from(
  327    596   
        variant: crate::error::InternalServerError,
  328    597   
    ) -> crate::error::OperationWithDefaultsError {
         598  +
        /* ServerOperationErrorGenerator.kt:112 */
  329    599   
        Self::InternalServerError(variant)
         600  +
        /* ServerOperationErrorGenerator.kt:111 */
  330    601   
    }
         602  +
    /* ServerOperationErrorGenerator.kt:110 */
  331    603   
}
  332    604   
         605  +
/* PythonServerOperationErrorGenerator.kt:38 */
  333    606   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::OperationWithDefaultsError {
  334    607   
    fn from(variant: ::pyo3::PyErr) -> crate::error::OperationWithDefaultsError {
  335    608   
        ::pyo3::Python::with_gil(|py| {
  336    609   
            let error = variant.value(py);
  337    610   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  338    611   
                return error.into();
  339    612   
            }
  340    613   
            crate::error::InternalServerError {
  341    614   
                message: error.to_string(),
  342    615   
            }
  343    616   
            .into()
  344    617   
        })
  345    618   
    }
  346    619   
}
  347    620   
         621  +
/* ServerOperationErrorGenerator.kt:63 */
  348    622   
/// Error type for the `ContentTypeParameters` operation.
         623  +
/* ServerOperationErrorGenerator.kt:64 */
  349    624   
/// Each variant represents an error that can occur for the `ContentTypeParameters` operation.
         625  +
/* RustType.kt:516 */
  350    626   
#[derive(::std::fmt::Debug)]
  351         -
pub enum ContentTypeParametersError {
         627  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum ContentTypeParametersError {
         628  +
    /* ServerOperationErrorGenerator.kt:68 */
  352    629   
    #[allow(missing_docs)] // documentation missing in model
         630  +
    /* ServerOperationErrorGenerator.kt:71 */
  353    631   
    InternalServerError(crate::error::InternalServerError),
         632  +
    /* ServerOperationErrorGenerator.kt:66 */
  354    633   
}
         634  +
/* ServerOperationErrorGenerator.kt:75 */
  355    635   
impl ::std::fmt::Display for ContentTypeParametersError {
         636  +
    /* ServerOperationErrorGenerator.kt:76 */
  356    637   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         638  +
        /* ServerOperationErrorGenerator.kt:139 */
  357    639   
        match &self {
  358         -
            ContentTypeParametersError::InternalServerError(_inner) => _inner.fmt(f),
         640  +
            /* ServerOperationErrorGenerator.kt:142 */
         641  +
            ContentTypeParametersError::InternalServerError(_inner) =>
         642  +
            /* ServerOperationErrorGenerator.kt:78 */
         643  +
            {
         644  +
                _inner.fmt(f)
         645  +
            }
         646  +
            /* ServerOperationErrorGenerator.kt:139 */
  359    647   
        }
         648  +
        /* ServerOperationErrorGenerator.kt:76 */
  360    649   
    }
         650  +
    /* ServerOperationErrorGenerator.kt:75 */
  361    651   
}
         652  +
/* ServerOperationErrorGenerator.kt:83 */
  362    653   
impl ContentTypeParametersError {
         654  +
    /* ServerOperationErrorGenerator.kt:87 */
  363    655   
    /// Returns `true` if the error kind is `ContentTypeParametersError::InternalServerError`.
         656  +
    /* ServerOperationErrorGenerator.kt:88 */
  364    657   
    pub fn is_internal_server_error(&self) -> bool {
         658  +
        /* ServerOperationErrorGenerator.kt:89 */
  365    659   
        matches!(&self, ContentTypeParametersError::InternalServerError(_))
         660  +
        /* ServerOperationErrorGenerator.kt:88 */
  366    661   
    }
         662  +
    /* ServerOperationErrorGenerator.kt:92 */
  367    663   
    /// Returns the error name string by matching the correct variant.
         664  +
    /* ServerOperationErrorGenerator.kt:93 */
  368    665   
    pub fn name(&self) -> &'static str {
         666  +
        /* ServerOperationErrorGenerator.kt:139 */
  369    667   
        match &self {
  370         -
            ContentTypeParametersError::InternalServerError(_inner) => _inner.name(),
         668  +
            /* ServerOperationErrorGenerator.kt:142 */
         669  +
            ContentTypeParametersError::InternalServerError(_inner) =>
         670  +
            /* ServerOperationErrorGenerator.kt:95 */
         671  +
            {
         672  +
                _inner.name()
         673  +
            }
         674  +
            /* ServerOperationErrorGenerator.kt:139 */
  371    675   
        }
         676  +
        /* ServerOperationErrorGenerator.kt:93 */
  372    677   
    }
         678  +
    /* ServerOperationErrorGenerator.kt:83 */
  373    679   
}
         680  +
/* ServerOperationErrorGenerator.kt:100 */
  374    681   
impl ::std::error::Error for ContentTypeParametersError {
         682  +
    /* ServerOperationErrorGenerator.kt:101 */
  375    683   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         684  +
        /* ServerOperationErrorGenerator.kt:139 */
  376    685   
        match &self {
  377         -
            ContentTypeParametersError::InternalServerError(_inner) => Some(_inner),
         686  +
            /* ServerOperationErrorGenerator.kt:142 */
         687  +
            ContentTypeParametersError::InternalServerError(_inner) =>
         688  +
            /* ServerOperationErrorGenerator.kt:103 */
         689  +
            {
         690  +
                Some(_inner)
         691  +
            }
         692  +
            /* ServerOperationErrorGenerator.kt:139 */
  378    693   
        }
         694  +
        /* ServerOperationErrorGenerator.kt:101 */
  379    695   
    }
         696  +
    /* ServerOperationErrorGenerator.kt:100 */
  380    697   
}
         698  +
/* ServerOperationErrorGenerator.kt:110 */
  381    699   
impl ::std::convert::From<crate::error::InternalServerError>
  382    700   
    for crate::error::ContentTypeParametersError
  383    701   
{
         702  +
    /* ServerOperationErrorGenerator.kt:111 */
  384    703   
    fn from(
  385    704   
        variant: crate::error::InternalServerError,
  386    705   
    ) -> crate::error::ContentTypeParametersError {
         706  +
        /* ServerOperationErrorGenerator.kt:112 */
  387    707   
        Self::InternalServerError(variant)
         708  +
        /* ServerOperationErrorGenerator.kt:111 */
  388    709   
    }
         710  +
    /* ServerOperationErrorGenerator.kt:110 */
  389    711   
}
  390    712   
         713  +
/* PythonServerOperationErrorGenerator.kt:38 */
  391    714   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::ContentTypeParametersError {
  392    715   
    fn from(variant: ::pyo3::PyErr) -> crate::error::ContentTypeParametersError {
  393    716   
        ::pyo3::Python::with_gil(|py| {
  394    717   
            let error = variant.value(py);
  395    718   
  396    719   
            crate::error::InternalServerError {
  397    720   
                message: error.to_string(),
  398    721   
            }
  399    722   
            .into()
  400    723   
        })
  401    724   
    }
  402    725   
}
  403    726   
         727  +
/* ServerOperationErrorGenerator.kt:63 */
  404    728   
/// Error type for the `PutWithContentEncoding` operation.
         729  +
/* ServerOperationErrorGenerator.kt:64 */
  405    730   
/// Each variant represents an error that can occur for the `PutWithContentEncoding` operation.
         731  +
/* RustType.kt:516 */
  406    732   
#[derive(::std::fmt::Debug)]
  407         -
pub enum PutWithContentEncodingError {
         733  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum PutWithContentEncodingError {
         734  +
    /* ServerOperationErrorGenerator.kt:68 */
  408    735   
    #[allow(missing_docs)] // documentation missing in model
         736  +
    /* ServerOperationErrorGenerator.kt:71 */
  409    737   
    InternalServerError(crate::error::InternalServerError),
         738  +
    /* ServerOperationErrorGenerator.kt:66 */
  410    739   
}
         740  +
/* ServerOperationErrorGenerator.kt:75 */
  411    741   
impl ::std::fmt::Display for PutWithContentEncodingError {
         742  +
    /* ServerOperationErrorGenerator.kt:76 */
  412    743   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         744  +
        /* ServerOperationErrorGenerator.kt:139 */
  413    745   
        match &self {
  414         -
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.fmt(f),
         746  +
            /* ServerOperationErrorGenerator.kt:142 */
         747  +
            PutWithContentEncodingError::InternalServerError(_inner) =>
         748  +
            /* ServerOperationErrorGenerator.kt:78 */
         749  +
            {
         750  +
                _inner.fmt(f)
         751  +
            }
         752  +
            /* ServerOperationErrorGenerator.kt:139 */
  415    753   
        }
         754  +
        /* ServerOperationErrorGenerator.kt:76 */
  416    755   
    }
         756  +
    /* ServerOperationErrorGenerator.kt:75 */
  417    757   
}
         758  +
/* ServerOperationErrorGenerator.kt:83 */
  418    759   
impl PutWithContentEncodingError {
         760  +
    /* ServerOperationErrorGenerator.kt:87 */
  419    761   
    /// Returns `true` if the error kind is `PutWithContentEncodingError::InternalServerError`.
         762  +
    /* ServerOperationErrorGenerator.kt:88 */
  420    763   
    pub fn is_internal_server_error(&self) -> bool {
         764  +
        /* ServerOperationErrorGenerator.kt:89 */
  421    765   
        matches!(&self, PutWithContentEncodingError::InternalServerError(_))
         766  +
        /* ServerOperationErrorGenerator.kt:88 */
  422    767   
    }
         768  +
    /* ServerOperationErrorGenerator.kt:92 */
  423    769   
    /// Returns the error name string by matching the correct variant.
         770  +
    /* ServerOperationErrorGenerator.kt:93 */
  424    771   
    pub fn name(&self) -> &'static str {
         772  +
        /* ServerOperationErrorGenerator.kt:139 */
  425    773   
        match &self {
  426         -
            PutWithContentEncodingError::InternalServerError(_inner) => _inner.name(),
         774  +
            /* ServerOperationErrorGenerator.kt:142 */
         775  +
            PutWithContentEncodingError::InternalServerError(_inner) =>
         776  +
            /* ServerOperationErrorGenerator.kt:95 */
         777  +
            {
         778  +
                _inner.name()
  427    779   
            }
         780  +
            /* ServerOperationErrorGenerator.kt:139 */
  428    781   
        }
         782  +
        /* ServerOperationErrorGenerator.kt:93 */
         783  +
    }
         784  +
    /* ServerOperationErrorGenerator.kt:83 */
  429    785   
}
         786  +
/* ServerOperationErrorGenerator.kt:100 */
  430    787   
impl ::std::error::Error for PutWithContentEncodingError {
         788  +
    /* ServerOperationErrorGenerator.kt:101 */
  431    789   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         790  +
        /* ServerOperationErrorGenerator.kt:139 */
  432    791   
        match &self {
  433         -
            PutWithContentEncodingError::InternalServerError(_inner) => Some(_inner),
         792  +
            /* ServerOperationErrorGenerator.kt:142 */
         793  +
            PutWithContentEncodingError::InternalServerError(_inner) =>
         794  +
            /* ServerOperationErrorGenerator.kt:103 */
         795  +
            {
         796  +
                Some(_inner)
  434    797   
            }
         798  +
            /* ServerOperationErrorGenerator.kt:139 */
  435    799   
        }
         800  +
        /* ServerOperationErrorGenerator.kt:101 */
         801  +
    }
         802  +
    /* ServerOperationErrorGenerator.kt:100 */
  436    803   
}
         804  +
/* ServerOperationErrorGenerator.kt:110 */
  437    805   
impl ::std::convert::From<crate::error::InternalServerError>
  438    806   
    for crate::error::PutWithContentEncodingError
  439    807   
{
         808  +
    /* ServerOperationErrorGenerator.kt:111 */
  440    809   
    fn from(
  441    810   
        variant: crate::error::InternalServerError,
  442    811   
    ) -> crate::error::PutWithContentEncodingError {
         812  +
        /* ServerOperationErrorGenerator.kt:112 */
  443    813   
        Self::InternalServerError(variant)
         814  +
        /* ServerOperationErrorGenerator.kt:111 */
  444    815   
    }
         816  +
    /* ServerOperationErrorGenerator.kt:110 */
  445    817   
}
  446    818   
         819  +
/* PythonServerOperationErrorGenerator.kt:38 */
  447    820   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::PutWithContentEncodingError {
  448    821   
    fn from(variant: ::pyo3::PyErr) -> crate::error::PutWithContentEncodingError {
  449    822   
        ::pyo3::Python::with_gil(|py| {
  450    823   
            let error = variant.value(py);
  451    824   
  452    825   
            crate::error::InternalServerError {
  453    826   
                message: error.to_string(),
  454    827   
            }
  455    828   
            .into()
  456    829   
        })
  457    830   
    }
  458    831   
}
  459    832   
         833  +
/* ServerOperationErrorGenerator.kt:63 */
  460    834   
/// Error type for the `HostWithPathOperation` operation.
         835  +
/* ServerOperationErrorGenerator.kt:64 */
  461    836   
/// Each variant represents an error that can occur for the `HostWithPathOperation` operation.
         837  +
/* RustType.kt:516 */
  462    838   
#[derive(::std::fmt::Debug)]
  463         -
pub enum HostWithPathOperationError {
         839  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum HostWithPathOperationError {
         840  +
    /* ServerOperationErrorGenerator.kt:68 */
  464    841   
    #[allow(missing_docs)] // documentation missing in model
         842  +
    /* ServerOperationErrorGenerator.kt:71 */
  465    843   
    InternalServerError(crate::error::InternalServerError),
         844  +
    /* ServerOperationErrorGenerator.kt:66 */
  466    845   
}
         846  +
/* ServerOperationErrorGenerator.kt:75 */
  467    847   
impl ::std::fmt::Display for HostWithPathOperationError {
         848  +
    /* ServerOperationErrorGenerator.kt:76 */
  468    849   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         850  +
        /* ServerOperationErrorGenerator.kt:139 */
  469    851   
        match &self {
  470         -
            HostWithPathOperationError::InternalServerError(_inner) => _inner.fmt(f),
         852  +
            /* ServerOperationErrorGenerator.kt:142 */
         853  +
            HostWithPathOperationError::InternalServerError(_inner) =>
         854  +
            /* ServerOperationErrorGenerator.kt:78 */
         855  +
            {
         856  +
                _inner.fmt(f)
  471    857   
            }
         858  +
            /* ServerOperationErrorGenerator.kt:139 */
  472    859   
        }
         860  +
        /* ServerOperationErrorGenerator.kt:76 */
         861  +
    }
         862  +
    /* ServerOperationErrorGenerator.kt:75 */
  473    863   
}
         864  +
/* ServerOperationErrorGenerator.kt:83 */
  474    865   
impl HostWithPathOperationError {
         866  +
    /* ServerOperationErrorGenerator.kt:87 */
  475    867   
    /// Returns `true` if the error kind is `HostWithPathOperationError::InternalServerError`.
         868  +
    /* ServerOperationErrorGenerator.kt:88 */
  476    869   
    pub fn is_internal_server_error(&self) -> bool {
         870  +
        /* ServerOperationErrorGenerator.kt:89 */
  477    871   
        matches!(&self, HostWithPathOperationError::InternalServerError(_))
         872  +
        /* ServerOperationErrorGenerator.kt:88 */
  478    873   
    }
         874  +
    /* ServerOperationErrorGenerator.kt:92 */
  479    875   
    /// Returns the error name string by matching the correct variant.
         876  +
    /* ServerOperationErrorGenerator.kt:93 */
  480    877   
    pub fn name(&self) -> &'static str {
         878  +
        /* ServerOperationErrorGenerator.kt:139 */
  481    879   
        match &self {
  482         -
            HostWithPathOperationError::InternalServerError(_inner) => _inner.name(),
         880  +
            /* ServerOperationErrorGenerator.kt:142 */
         881  +
            HostWithPathOperationError::InternalServerError(_inner) =>
         882  +
            /* ServerOperationErrorGenerator.kt:95 */
         883  +
            {
         884  +
                _inner.name()
  483    885   
            }
         886  +
            /* ServerOperationErrorGenerator.kt:139 */
  484    887   
        }
         888  +
        /* ServerOperationErrorGenerator.kt:93 */
         889  +
    }
         890  +
    /* ServerOperationErrorGenerator.kt:83 */
  485    891   
}
         892  +
/* ServerOperationErrorGenerator.kt:100 */
  486    893   
impl ::std::error::Error for HostWithPathOperationError {
         894  +
    /* ServerOperationErrorGenerator.kt:101 */
  487    895   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         896  +
        /* ServerOperationErrorGenerator.kt:139 */
  488    897   
        match &self {
  489         -
            HostWithPathOperationError::InternalServerError(_inner) => Some(_inner),
         898  +
            /* ServerOperationErrorGenerator.kt:142 */
         899  +
            HostWithPathOperationError::InternalServerError(_inner) =>
         900  +
            /* ServerOperationErrorGenerator.kt:103 */
         901  +
            {
         902  +
                Some(_inner)
         903  +
            }
         904  +
            /* ServerOperationErrorGenerator.kt:139 */
  490    905   
        }
         906  +
        /* ServerOperationErrorGenerator.kt:101 */
  491    907   
    }
         908  +
    /* ServerOperationErrorGenerator.kt:100 */
  492    909   
}
         910  +
/* ServerOperationErrorGenerator.kt:110 */
  493    911   
impl ::std::convert::From<crate::error::InternalServerError>
  494    912   
    for crate::error::HostWithPathOperationError
  495    913   
{
         914  +
    /* ServerOperationErrorGenerator.kt:111 */
  496    915   
    fn from(
  497    916   
        variant: crate::error::InternalServerError,
  498    917   
    ) -> crate::error::HostWithPathOperationError {
         918  +
        /* ServerOperationErrorGenerator.kt:112 */
  499    919   
        Self::InternalServerError(variant)
         920  +
        /* ServerOperationErrorGenerator.kt:111 */
  500    921   
    }
         922  +
    /* ServerOperationErrorGenerator.kt:110 */
  501    923   
}
  502    924   
         925  +
/* PythonServerOperationErrorGenerator.kt:38 */
  503    926   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::HostWithPathOperationError {
  504    927   
    fn from(variant: ::pyo3::PyErr) -> crate::error::HostWithPathOperationError {
  505    928   
        ::pyo3::Python::with_gil(|py| {
  506    929   
            let error = variant.value(py);
  507    930   
  508    931   
            crate::error::InternalServerError {
  509    932   
                message: error.to_string(),
  510    933   
            }
  511    934   
            .into()
  512    935   
        })
  513    936   
    }
  514    937   
}
  515    938   
         939  +
/* ServerOperationErrorGenerator.kt:63 */
  516    940   
/// Error type for the `EndpointWithHostLabelOperation` operation.
         941  +
/* ServerOperationErrorGenerator.kt:64 */
  517    942   
/// Each variant represents an error that can occur for the `EndpointWithHostLabelOperation` operation.
         943  +
/* RustType.kt:516 */
  518    944   
#[derive(::std::fmt::Debug)]
  519         -
pub enum EndpointWithHostLabelOperationError {
  520         -
    /// 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.
         945  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum EndpointWithHostLabelOperationError {
         946  +
    /// /* 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.
         947  +
    /* ServerOperationErrorGenerator.kt:71 */
  521    948   
    ValidationException(crate::error::ValidationException),
         949  +
    /* ServerOperationErrorGenerator.kt:68 */
  522    950   
    #[allow(missing_docs)] // documentation missing in model
         951  +
    /* ServerOperationErrorGenerator.kt:71 */
  523    952   
    InternalServerError(crate::error::InternalServerError),
         953  +
    /* ServerOperationErrorGenerator.kt:66 */
  524    954   
}
         955  +
/* ServerOperationErrorGenerator.kt:75 */
  525    956   
impl ::std::fmt::Display for EndpointWithHostLabelOperationError {
         957  +
    /* ServerOperationErrorGenerator.kt:76 */
  526    958   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         959  +
        /* ServerOperationErrorGenerator.kt:139 */
  527    960   
        match &self {
  528         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.fmt(f),
  529         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.fmt(f),
         961  +
            /* ServerOperationErrorGenerator.kt:142 */
         962  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) =>
         963  +
            /* ServerOperationErrorGenerator.kt:78 */
         964  +
            {
         965  +
                _inner.fmt(f)
  530    966   
            }
         967  +
            ,
         968  +
            /* ServerOperationErrorGenerator.kt:142 */
         969  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
         970  +
            /* ServerOperationErrorGenerator.kt:78 */
         971  +
            {
         972  +
                _inner.fmt(f)
  531    973   
            }
         974  +
            /* ServerOperationErrorGenerator.kt:139 */
         975  +
        }
         976  +
        /* ServerOperationErrorGenerator.kt:76 */
         977  +
    }
         978  +
    /* ServerOperationErrorGenerator.kt:75 */
  532    979   
}
         980  +
/* ServerOperationErrorGenerator.kt:83 */
  533    981   
impl EndpointWithHostLabelOperationError {
         982  +
    /* ServerOperationErrorGenerator.kt:87 */
  534    983   
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::ValidationException`.
         984  +
    /* ServerOperationErrorGenerator.kt:88 */
  535    985   
    pub fn is_validation_exception(&self) -> bool {
         986  +
        /* ServerOperationErrorGenerator.kt:89 */
  536    987   
        matches!(
  537    988   
            &self,
  538    989   
            EndpointWithHostLabelOperationError::ValidationException(_)
  539    990   
        )
         991  +
        /* ServerOperationErrorGenerator.kt:88 */
  540    992   
    }
         993  +
    /* ServerOperationErrorGenerator.kt:87 */
  541    994   
    /// Returns `true` if the error kind is `EndpointWithHostLabelOperationError::InternalServerError`.
         995  +
    /* ServerOperationErrorGenerator.kt:88 */
  542    996   
    pub fn is_internal_server_error(&self) -> bool {
         997  +
        /* ServerOperationErrorGenerator.kt:89 */
  543    998   
        matches!(
  544    999   
            &self,
  545   1000   
            EndpointWithHostLabelOperationError::InternalServerError(_)
  546   1001   
        )
        1002  +
        /* ServerOperationErrorGenerator.kt:88 */
  547   1003   
    }
        1004  +
    /* ServerOperationErrorGenerator.kt:92 */
  548   1005   
    /// Returns the error name string by matching the correct variant.
        1006  +
    /* ServerOperationErrorGenerator.kt:93 */
  549   1007   
    pub fn name(&self) -> &'static str {
        1008  +
        /* ServerOperationErrorGenerator.kt:139 */
  550   1009   
        match &self {
  551         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => _inner.name(),
  552         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => _inner.name(),
        1010  +
            /* ServerOperationErrorGenerator.kt:142 */
        1011  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) =>
        1012  +
            /* ServerOperationErrorGenerator.kt:95 */
        1013  +
            {
        1014  +
                _inner.name()
  553   1015   
            }
        1016  +
            ,
        1017  +
            /* ServerOperationErrorGenerator.kt:142 */
        1018  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
        1019  +
            /* ServerOperationErrorGenerator.kt:95 */
        1020  +
            {
        1021  +
                _inner.name()
  554   1022   
            }
        1023  +
            /* ServerOperationErrorGenerator.kt:139 */
        1024  +
        }
        1025  +
        /* ServerOperationErrorGenerator.kt:93 */
        1026  +
    }
        1027  +
    /* ServerOperationErrorGenerator.kt:83 */
  555   1028   
}
        1029  +
/* ServerOperationErrorGenerator.kt:100 */
  556   1030   
impl ::std::error::Error for EndpointWithHostLabelOperationError {
        1031  +
    /* ServerOperationErrorGenerator.kt:101 */
  557   1032   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1033  +
        /* ServerOperationErrorGenerator.kt:139 */
  558   1034   
        match &self {
  559         -
            EndpointWithHostLabelOperationError::ValidationException(_inner) => Some(_inner),
  560         -
            EndpointWithHostLabelOperationError::InternalServerError(_inner) => Some(_inner),
        1035  +
            /* ServerOperationErrorGenerator.kt:142 */
        1036  +
            EndpointWithHostLabelOperationError::ValidationException(_inner) =>
        1037  +
            /* ServerOperationErrorGenerator.kt:103 */
        1038  +
            {
        1039  +
                Some(_inner)
        1040  +
            }
        1041  +
            ,
        1042  +
            /* ServerOperationErrorGenerator.kt:142 */
        1043  +
            EndpointWithHostLabelOperationError::InternalServerError(_inner) =>
        1044  +
            /* ServerOperationErrorGenerator.kt:103 */
        1045  +
            {
        1046  +
                Some(_inner)
  561   1047   
            }
        1048  +
            /* ServerOperationErrorGenerator.kt:139 */
  562   1049   
        }
        1050  +
        /* ServerOperationErrorGenerator.kt:101 */
        1051  +
    }
        1052  +
    /* ServerOperationErrorGenerator.kt:100 */
  563   1053   
}
        1054  +
/* ServerOperationErrorGenerator.kt:110 */
  564   1055   
impl ::std::convert::From<crate::error::ValidationException>
  565   1056   
    for crate::error::EndpointWithHostLabelOperationError
  566   1057   
{
        1058  +
    /* ServerOperationErrorGenerator.kt:111 */
  567   1059   
    fn from(
  568   1060   
        variant: crate::error::ValidationException,
  569   1061   
    ) -> crate::error::EndpointWithHostLabelOperationError {
        1062  +
        /* ServerOperationErrorGenerator.kt:112 */
  570   1063   
        Self::ValidationException(variant)
        1064  +
        /* ServerOperationErrorGenerator.kt:111 */
  571   1065   
    }
        1066  +
    /* ServerOperationErrorGenerator.kt:110 */
  572   1067   
}
        1068  +
/* ServerOperationErrorGenerator.kt:110 */
  573   1069   
impl ::std::convert::From<crate::error::InternalServerError>
  574   1070   
    for crate::error::EndpointWithHostLabelOperationError
  575   1071   
{
        1072  +
    /* ServerOperationErrorGenerator.kt:111 */
  576   1073   
    fn from(
  577   1074   
        variant: crate::error::InternalServerError,
  578   1075   
    ) -> crate::error::EndpointWithHostLabelOperationError {
        1076  +
        /* ServerOperationErrorGenerator.kt:112 */
  579   1077   
        Self::InternalServerError(variant)
        1078  +
        /* ServerOperationErrorGenerator.kt:111 */
  580   1079   
    }
        1080  +
    /* ServerOperationErrorGenerator.kt:110 */
  581   1081   
}
  582   1082   
        1083  +
/* PythonServerOperationErrorGenerator.kt:38 */
  583   1084   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointWithHostLabelOperationError {
  584   1085   
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointWithHostLabelOperationError {
  585   1086   
        ::pyo3::Python::with_gil(|py| {
  586   1087   
            let error = variant.value(py);
  587   1088   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  588   1089   
                return error.into();
  589   1090   
            }
  590   1091   
            crate::error::InternalServerError {
  591   1092   
                message: error.to_string(),
  592   1093   
            }
  593   1094   
            .into()
  594   1095   
        })
  595   1096   
    }
  596   1097   
}
  597   1098   
        1099  +
/* ServerOperationErrorGenerator.kt:63 */
  598   1100   
/// Error type for the `EndpointOperation` operation.
        1101  +
/* ServerOperationErrorGenerator.kt:64 */
  599   1102   
/// Each variant represents an error that can occur for the `EndpointOperation` operation.
        1103  +
/* RustType.kt:516 */
  600   1104   
#[derive(::std::fmt::Debug)]
  601         -
pub enum EndpointOperationError {
        1105  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum EndpointOperationError {
        1106  +
    /* ServerOperationErrorGenerator.kt:68 */
  602   1107   
    #[allow(missing_docs)] // documentation missing in model
        1108  +
    /* ServerOperationErrorGenerator.kt:71 */
  603   1109   
    InternalServerError(crate::error::InternalServerError),
        1110  +
    /* ServerOperationErrorGenerator.kt:66 */
  604   1111   
}
        1112  +
/* ServerOperationErrorGenerator.kt:75 */
  605   1113   
impl ::std::fmt::Display for EndpointOperationError {
        1114  +
    /* ServerOperationErrorGenerator.kt:76 */
  606   1115   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1116  +
        /* ServerOperationErrorGenerator.kt:139 */
  607   1117   
        match &self {
  608         -
            EndpointOperationError::InternalServerError(_inner) => _inner.fmt(f),
        1118  +
            /* ServerOperationErrorGenerator.kt:142 */
        1119  +
            EndpointOperationError::InternalServerError(_inner) =>
        1120  +
            /* ServerOperationErrorGenerator.kt:78 */
        1121  +
            {
        1122  +
                _inner.fmt(f)
  609   1123   
            }
        1124  +
            /* ServerOperationErrorGenerator.kt:139 */
  610   1125   
        }
        1126  +
        /* ServerOperationErrorGenerator.kt:76 */
        1127  +
    }
        1128  +
    /* ServerOperationErrorGenerator.kt:75 */
  611   1129   
}
        1130  +
/* ServerOperationErrorGenerator.kt:83 */
  612   1131   
impl EndpointOperationError {
        1132  +
    /* ServerOperationErrorGenerator.kt:87 */
  613   1133   
    /// Returns `true` if the error kind is `EndpointOperationError::InternalServerError`.
        1134  +
    /* ServerOperationErrorGenerator.kt:88 */
  614   1135   
    pub fn is_internal_server_error(&self) -> bool {
        1136  +
        /* ServerOperationErrorGenerator.kt:89 */
  615   1137   
        matches!(&self, EndpointOperationError::InternalServerError(_))
        1138  +
        /* ServerOperationErrorGenerator.kt:88 */
  616   1139   
    }
        1140  +
    /* ServerOperationErrorGenerator.kt:92 */
  617   1141   
    /// Returns the error name string by matching the correct variant.
        1142  +
    /* ServerOperationErrorGenerator.kt:93 */
  618   1143   
    pub fn name(&self) -> &'static str {
        1144  +
        /* ServerOperationErrorGenerator.kt:139 */
  619   1145   
        match &self {
  620         -
            EndpointOperationError::InternalServerError(_inner) => _inner.name(),
        1146  +
            /* ServerOperationErrorGenerator.kt:142 */
        1147  +
            EndpointOperationError::InternalServerError(_inner) =>
        1148  +
            /* ServerOperationErrorGenerator.kt:95 */
        1149  +
            {
        1150  +
                _inner.name()
  621   1151   
            }
        1152  +
            /* ServerOperationErrorGenerator.kt:139 */
  622   1153   
        }
        1154  +
        /* ServerOperationErrorGenerator.kt:93 */
        1155  +
    }
        1156  +
    /* ServerOperationErrorGenerator.kt:83 */
  623   1157   
}
        1158  +
/* ServerOperationErrorGenerator.kt:100 */
  624   1159   
impl ::std::error::Error for EndpointOperationError {
        1160  +
    /* ServerOperationErrorGenerator.kt:101 */
  625   1161   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1162  +
        /* ServerOperationErrorGenerator.kt:139 */
  626   1163   
        match &self {
  627         -
            EndpointOperationError::InternalServerError(_inner) => Some(_inner),
        1164  +
            /* ServerOperationErrorGenerator.kt:142 */
        1165  +
            EndpointOperationError::InternalServerError(_inner) =>
        1166  +
            /* ServerOperationErrorGenerator.kt:103 */
        1167  +
            {
        1168  +
                Some(_inner)
  628   1169   
            }
        1170  +
            /* ServerOperationErrorGenerator.kt:139 */
  629   1171   
        }
        1172  +
        /* ServerOperationErrorGenerator.kt:101 */
        1173  +
    }
        1174  +
    /* ServerOperationErrorGenerator.kt:100 */
  630   1175   
}
        1176  +
/* ServerOperationErrorGenerator.kt:110 */
  631   1177   
impl ::std::convert::From<crate::error::InternalServerError>
  632   1178   
    for crate::error::EndpointOperationError
  633   1179   
{
        1180  +
    /* ServerOperationErrorGenerator.kt:111 */
  634   1181   
    fn from(variant: crate::error::InternalServerError) -> crate::error::EndpointOperationError {
        1182  +
        /* ServerOperationErrorGenerator.kt:112 */
  635   1183   
        Self::InternalServerError(variant)
        1184  +
        /* ServerOperationErrorGenerator.kt:111 */
  636   1185   
    }
        1186  +
    /* ServerOperationErrorGenerator.kt:110 */
  637   1187   
}
  638   1188   
        1189  +
/* PythonServerOperationErrorGenerator.kt:38 */
  639   1190   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EndpointOperationError {
  640   1191   
    fn from(variant: ::pyo3::PyErr) -> crate::error::EndpointOperationError {
  641   1192   
        ::pyo3::Python::with_gil(|py| {
  642   1193   
            let error = variant.value(py);
  643   1194   
  644   1195   
            crate::error::InternalServerError {
  645   1196   
                message: error.to_string(),
  646   1197   
            }
  647   1198   
            .into()
  648   1199   
        })
  649   1200   
    }
  650   1201   
}
  651   1202   
        1203  +
/* ServerOperationErrorGenerator.kt:63 */
  652   1204   
/// Error type for the `JsonUnions` operation.
        1205  +
/* ServerOperationErrorGenerator.kt:64 */
  653   1206   
/// Each variant represents an error that can occur for the `JsonUnions` operation.
        1207  +
/* RustType.kt:516 */
  654   1208   
#[derive(::std::fmt::Debug)]
  655         -
pub enum JsonUnionsError {
  656         -
    /// 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.
        1209  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum JsonUnionsError {
        1210  +
    /// /* 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.
        1211  +
    /* ServerOperationErrorGenerator.kt:71 */
  657   1212   
    ValidationException(crate::error::ValidationException),
        1213  +
    /* ServerOperationErrorGenerator.kt:68 */
  658   1214   
    #[allow(missing_docs)] // documentation missing in model
        1215  +
    /* ServerOperationErrorGenerator.kt:71 */
  659   1216   
    InternalServerError(crate::error::InternalServerError),
        1217  +
    /* ServerOperationErrorGenerator.kt:66 */
  660   1218   
}
        1219  +
/* ServerOperationErrorGenerator.kt:75 */
  661   1220   
impl ::std::fmt::Display for JsonUnionsError {
        1221  +
    /* ServerOperationErrorGenerator.kt:76 */
  662   1222   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1223  +
        /* ServerOperationErrorGenerator.kt:139 */
  663   1224   
        match &self {
  664         -
            JsonUnionsError::ValidationException(_inner) => _inner.fmt(f),
  665         -
            JsonUnionsError::InternalServerError(_inner) => _inner.fmt(f),
        1225  +
            /* ServerOperationErrorGenerator.kt:142 */
        1226  +
            JsonUnionsError::ValidationException(_inner) =>
        1227  +
            /* ServerOperationErrorGenerator.kt:78 */
        1228  +
            {
        1229  +
                _inner.fmt(f)
  666   1230   
            }
        1231  +
            ,
        1232  +
            /* ServerOperationErrorGenerator.kt:142 */
        1233  +
            JsonUnionsError::InternalServerError(_inner) =>
        1234  +
            /* ServerOperationErrorGenerator.kt:78 */
        1235  +
            {
        1236  +
                _inner.fmt(f)
        1237  +
            }
        1238  +
            /* ServerOperationErrorGenerator.kt:139 */
  667   1239   
        }
        1240  +
        /* ServerOperationErrorGenerator.kt:76 */
        1241  +
    }
        1242  +
    /* ServerOperationErrorGenerator.kt:75 */
  668   1243   
}
        1244  +
/* ServerOperationErrorGenerator.kt:83 */
  669   1245   
impl JsonUnionsError {
        1246  +
    /* ServerOperationErrorGenerator.kt:87 */
  670   1247   
    /// Returns `true` if the error kind is `JsonUnionsError::ValidationException`.
        1248  +
    /* ServerOperationErrorGenerator.kt:88 */
  671   1249   
    pub fn is_validation_exception(&self) -> bool {
        1250  +
        /* ServerOperationErrorGenerator.kt:89 */
  672   1251   
        matches!(&self, JsonUnionsError::ValidationException(_))
        1252  +
        /* ServerOperationErrorGenerator.kt:88 */
  673   1253   
    }
        1254  +
    /* ServerOperationErrorGenerator.kt:87 */
  674   1255   
    /// Returns `true` if the error kind is `JsonUnionsError::InternalServerError`.
        1256  +
    /* ServerOperationErrorGenerator.kt:88 */
  675   1257   
    pub fn is_internal_server_error(&self) -> bool {
        1258  +
        /* ServerOperationErrorGenerator.kt:89 */
  676   1259   
        matches!(&self, JsonUnionsError::InternalServerError(_))
        1260  +
        /* ServerOperationErrorGenerator.kt:88 */
  677   1261   
    }
        1262  +
    /* ServerOperationErrorGenerator.kt:92 */
  678   1263   
    /// Returns the error name string by matching the correct variant.
        1264  +
    /* ServerOperationErrorGenerator.kt:93 */
  679   1265   
    pub fn name(&self) -> &'static str {
        1266  +
        /* ServerOperationErrorGenerator.kt:139 */
  680   1267   
        match &self {
  681         -
            JsonUnionsError::ValidationException(_inner) => _inner.name(),
  682         -
            JsonUnionsError::InternalServerError(_inner) => _inner.name(),
        1268  +
            /* ServerOperationErrorGenerator.kt:142 */
        1269  +
            JsonUnionsError::ValidationException(_inner) =>
        1270  +
            /* ServerOperationErrorGenerator.kt:95 */
        1271  +
            {
        1272  +
                _inner.name()
  683   1273   
            }
        1274  +
            ,
        1275  +
            /* ServerOperationErrorGenerator.kt:142 */
        1276  +
            JsonUnionsError::InternalServerError(_inner) =>
        1277  +
            /* ServerOperationErrorGenerator.kt:95 */
        1278  +
            {
        1279  +
                _inner.name()
        1280  +
            }
        1281  +
            /* ServerOperationErrorGenerator.kt:139 */
        1282  +
        }
        1283  +
        /* ServerOperationErrorGenerator.kt:93 */
  684   1284   
    }
        1285  +
    /* ServerOperationErrorGenerator.kt:83 */
  685   1286   
}
        1287  +
/* ServerOperationErrorGenerator.kt:100 */
  686   1288   
impl ::std::error::Error for JsonUnionsError {
        1289  +
    /* ServerOperationErrorGenerator.kt:101 */
  687   1290   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1291  +
        /* ServerOperationErrorGenerator.kt:139 */
  688   1292   
        match &self {
  689         -
            JsonUnionsError::ValidationException(_inner) => Some(_inner),
  690         -
            JsonUnionsError::InternalServerError(_inner) => Some(_inner),
        1293  +
            /* ServerOperationErrorGenerator.kt:142 */
        1294  +
            JsonUnionsError::ValidationException(_inner) =>
        1295  +
            /* ServerOperationErrorGenerator.kt:103 */
        1296  +
            {
        1297  +
                Some(_inner)
  691   1298   
            }
        1299  +
            ,
        1300  +
            /* ServerOperationErrorGenerator.kt:142 */
        1301  +
            JsonUnionsError::InternalServerError(_inner) =>
        1302  +
            /* ServerOperationErrorGenerator.kt:103 */
        1303  +
            {
        1304  +
                Some(_inner)
  692   1305   
            }
        1306  +
            /* ServerOperationErrorGenerator.kt:139 */
        1307  +
        }
        1308  +
        /* ServerOperationErrorGenerator.kt:101 */
        1309  +
    }
        1310  +
    /* ServerOperationErrorGenerator.kt:100 */
  693   1311   
}
        1312  +
/* ServerOperationErrorGenerator.kt:110 */
  694   1313   
impl ::std::convert::From<crate::error::ValidationException> for crate::error::JsonUnionsError {
        1314  +
    /* ServerOperationErrorGenerator.kt:111 */
  695   1315   
    fn from(variant: crate::error::ValidationException) -> crate::error::JsonUnionsError {
        1316  +
        /* ServerOperationErrorGenerator.kt:112 */
  696   1317   
        Self::ValidationException(variant)
        1318  +
        /* ServerOperationErrorGenerator.kt:111 */
  697   1319   
    }
        1320  +
    /* ServerOperationErrorGenerator.kt:110 */
  698   1321   
}
        1322  +
/* ServerOperationErrorGenerator.kt:110 */
  699   1323   
impl ::std::convert::From<crate::error::InternalServerError> for crate::error::JsonUnionsError {
        1324  +
    /* ServerOperationErrorGenerator.kt:111 */
  700   1325   
    fn from(variant: crate::error::InternalServerError) -> crate::error::JsonUnionsError {
        1326  +
        /* ServerOperationErrorGenerator.kt:112 */
  701   1327   
        Self::InternalServerError(variant)
        1328  +
        /* ServerOperationErrorGenerator.kt:111 */
  702   1329   
    }
        1330  +
    /* ServerOperationErrorGenerator.kt:110 */
  703   1331   
}
  704   1332   
        1333  +
/* PythonServerOperationErrorGenerator.kt:38 */
  705   1334   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::JsonUnionsError {
  706   1335   
    fn from(variant: ::pyo3::PyErr) -> crate::error::JsonUnionsError {
  707   1336   
        ::pyo3::Python::with_gil(|py| {
  708   1337   
            let error = variant.value(py);
  709   1338   
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  710   1339   
                return error.into();
  711   1340   
            }
  712   1341   
            crate::error::InternalServerError {
  713   1342   
                message: error.to_string(),
  714   1343   
            }
  715   1344   
            .into()
  716   1345   
        })
  717   1346   
    }
  718   1347   
}
  719   1348   
        1349  +
/* ServerOperationErrorGenerator.kt:63 */
  720   1350   
/// Error type for the `GreetingWithErrors` operation.
        1351  +
/* ServerOperationErrorGenerator.kt:64 */
  721   1352   
/// Each variant represents an error that can occur for the `GreetingWithErrors` operation.
        1353  +
/* RustType.kt:516 */
  722   1354   
#[derive(::std::fmt::Debug)]
  723         -
pub enum GreetingWithErrorsError {
  724         -
    /// This error is thrown when an invalid greeting value is provided.
        1355  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum GreetingWithErrorsError {
        1356  +
    /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when an invalid greeting value is provided.
        1357  +
    /* ServerOperationErrorGenerator.kt:71 */
  725   1358   
    InvalidGreeting(crate::error::InvalidGreeting),
  726         -
    /// This error is thrown when a request is invalid.
        1359  +
    /// /* ServerOperationErrorGenerator.kt:68 */This error is thrown when a request is invalid.
        1360  +
    /* ServerOperationErrorGenerator.kt:71 */
  727   1361   
    ComplexError(crate::error::ComplexError),
  728         -
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
        1362  +
    /// /* ServerOperationErrorGenerator.kt:68 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
        1363  +
    /* ServerOperationErrorGenerator.kt:71 */
  729   1364   
    FooError(crate::error::FooError),
        1365  +
    /* ServerOperationErrorGenerator.kt:68 */
  730   1366   
    #[allow(missing_docs)] // documentation missing in model
        1367  +
    /* ServerOperationErrorGenerator.kt:71 */
  731   1368   
    InternalServerError(crate::error::InternalServerError),
        1369  +
    /* ServerOperationErrorGenerator.kt:66 */
  732   1370   
}
        1371  +
/* ServerOperationErrorGenerator.kt:75 */
  733   1372   
impl ::std::fmt::Display for GreetingWithErrorsError {
        1373  +
    /* ServerOperationErrorGenerator.kt:76 */
  734   1374   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1375  +
        /* ServerOperationErrorGenerator.kt:139 */
  735   1376   
        match &self {
  736         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.fmt(f),
  737         -
            GreetingWithErrorsError::ComplexError(_inner) => _inner.fmt(f),
  738         -
            GreetingWithErrorsError::FooError(_inner) => _inner.fmt(f),
  739         -
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.fmt(f),
        1377  +
            /* ServerOperationErrorGenerator.kt:142 */
        1378  +
            GreetingWithErrorsError::InvalidGreeting(_inner) =>
        1379  +
            /* ServerOperationErrorGenerator.kt:78 */
        1380  +
            {
        1381  +
                _inner.fmt(f)
        1382  +
            }
        1383  +
            ,
        1384  +
            /* ServerOperationErrorGenerator.kt:142 */
        1385  +
            GreetingWithErrorsError::ComplexError(_inner) =>
        1386  +
            /* ServerOperationErrorGenerator.kt:78 */
        1387  +
            {
        1388  +
                _inner.fmt(f)
        1389  +
            }
        1390  +
            ,
        1391  +
            /* ServerOperationErrorGenerator.kt:142 */
        1392  +
            GreetingWithErrorsError::FooError(_inner) =>
        1393  +
            /* ServerOperationErrorGenerator.kt:78 */
        1394  +
            {
        1395  +
                _inner.fmt(f)
        1396  +
            }
        1397  +
            ,
        1398  +
            /* ServerOperationErrorGenerator.kt:142 */
        1399  +
            GreetingWithErrorsError::InternalServerError(_inner) =>
        1400  +
            /* ServerOperationErrorGenerator.kt:78 */
        1401  +
            {
        1402  +
                _inner.fmt(f)
  740   1403   
            }
        1404  +
            /* ServerOperationErrorGenerator.kt:139 */
  741   1405   
        }
        1406  +
        /* ServerOperationErrorGenerator.kt:76 */
        1407  +
    }
        1408  +
    /* ServerOperationErrorGenerator.kt:75 */
  742   1409   
}
        1410  +
/* ServerOperationErrorGenerator.kt:83 */
  743   1411   
impl GreetingWithErrorsError {
        1412  +
    /* ServerOperationErrorGenerator.kt:87 */
  744   1413   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
        1414  +
    /* ServerOperationErrorGenerator.kt:88 */
  745   1415   
    pub fn is_invalid_greeting(&self) -> bool {
        1416  +
        /* ServerOperationErrorGenerator.kt:89 */
  746   1417   
        matches!(&self, GreetingWithErrorsError::InvalidGreeting(_))
        1418  +
        /* ServerOperationErrorGenerator.kt:88 */
  747   1419   
    }
        1420  +
    /* ServerOperationErrorGenerator.kt:87 */
  748   1421   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
        1422  +
    /* ServerOperationErrorGenerator.kt:88 */
  749   1423   
    pub fn is_complex_error(&self) -> bool {
        1424  +
        /* ServerOperationErrorGenerator.kt:89 */
  750   1425   
        matches!(&self, GreetingWithErrorsError::ComplexError(_))
        1426  +
        /* ServerOperationErrorGenerator.kt:88 */
  751   1427   
    }
        1428  +
    /* ServerOperationErrorGenerator.kt:87 */
  752   1429   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::FooError`.
        1430  +
    /* ServerOperationErrorGenerator.kt:88 */
  753   1431   
    pub fn is_foo_error(&self) -> bool {
        1432  +
        /* ServerOperationErrorGenerator.kt:89 */
  754   1433   
        matches!(&self, GreetingWithErrorsError::FooError(_))
        1434  +
        /* ServerOperationErrorGenerator.kt:88 */
  755   1435   
    }
        1436  +
    /* ServerOperationErrorGenerator.kt:87 */
  756   1437   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InternalServerError`.
        1438  +
    /* ServerOperationErrorGenerator.kt:88 */
  757   1439   
    pub fn is_internal_server_error(&self) -> bool {
        1440  +
        /* ServerOperationErrorGenerator.kt:89 */
  758   1441   
        matches!(&self, GreetingWithErrorsError::InternalServerError(_))
        1442  +
        /* ServerOperationErrorGenerator.kt:88 */
  759   1443   
    }
        1444  +
    /* ServerOperationErrorGenerator.kt:92 */
  760   1445   
    /// Returns the error name string by matching the correct variant.
        1446  +
    /* ServerOperationErrorGenerator.kt:93 */
  761   1447   
    pub fn name(&self) -> &'static str {
        1448  +
        /* ServerOperationErrorGenerator.kt:139 */
  762   1449   
        match &self {
  763         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => _inner.name(),
  764         -
            GreetingWithErrorsError::ComplexError(_inner) => _inner.name(),
  765         -
            GreetingWithErrorsError::FooError(_inner) => _inner.name(),
  766         -
            GreetingWithErrorsError::InternalServerError(_inner) => _inner.name(),
        1450  +
            /* ServerOperationErrorGenerator.kt:142 */
        1451  +
            GreetingWithErrorsError::InvalidGreeting(_inner) =>
        1452  +
            /* ServerOperationErrorGenerator.kt:95 */
        1453  +
            {
        1454  +
                _inner.name()
        1455  +
            }
        1456  +
            ,
        1457  +
            /* ServerOperationErrorGenerator.kt:142 */
        1458  +
            GreetingWithErrorsError::ComplexError(_inner) =>
        1459  +
            /* ServerOperationErrorGenerator.kt:95 */
        1460  +
            {
        1461  +
                _inner.name()
  767   1462   
            }
        1463  +
            ,
        1464  +
            /* ServerOperationErrorGenerator.kt:142 */
        1465  +
            GreetingWithErrorsError::FooError(_inner) =>
        1466  +
            /* ServerOperationErrorGenerator.kt:95 */
        1467  +
            {
        1468  +
                _inner.name()
        1469  +
            }
        1470  +
            ,
        1471  +
            /* ServerOperationErrorGenerator.kt:142 */
        1472  +
            GreetingWithErrorsError::InternalServerError(_inner) =>
        1473  +
            /* ServerOperationErrorGenerator.kt:95 */
        1474  +
            {
        1475  +
                _inner.name()
        1476  +
            }
        1477  +
            /* ServerOperationErrorGenerator.kt:139 */
        1478  +
        }
        1479  +
        /* ServerOperationErrorGenerator.kt:93 */
  768   1480   
    }
        1481  +
    /* ServerOperationErrorGenerator.kt:83 */
  769   1482   
}
        1483  +
/* ServerOperationErrorGenerator.kt:100 */
  770   1484   
impl ::std::error::Error for GreetingWithErrorsError {
        1485  +
    /* ServerOperationErrorGenerator.kt:101 */
  771   1486   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1487  +
        /* ServerOperationErrorGenerator.kt:139 */
  772   1488   
        match &self {
  773         -
            GreetingWithErrorsError::InvalidGreeting(_inner) => Some(_inner),
  774         -
            GreetingWithErrorsError::ComplexError(_inner) => Some(_inner),
  775         -
            GreetingWithErrorsError::FooError(_inner) => Some(_inner),
  776         -
            GreetingWithErrorsError::InternalServerError(_inner) => Some(_inner),
        1489  +
            /* ServerOperationErrorGenerator.kt:142 */
        1490  +
            GreetingWithErrorsError::InvalidGreeting(_inner) =>
        1491  +
            /* ServerOperationErrorGenerator.kt:103 */
        1492  +
            {
        1493  +
                Some(_inner)
        1494  +
            }
        1495  +
            ,
        1496  +
            /* ServerOperationErrorGenerator.kt:142 */
        1497  +
            GreetingWithErrorsError::ComplexError(_inner) =>
        1498  +
            /* ServerOperationErrorGenerator.kt:103 */
        1499  +
            {
        1500  +
                Some(_inner)
        1501  +
            }
        1502  +
            ,
        1503  +
            /* ServerOperationErrorGenerator.kt:142 */
        1504  +
            GreetingWithErrorsError::FooError(_inner) =>
        1505  +
            /* ServerOperationErrorGenerator.kt:103 */
        1506  +
            {
        1507  +
                Some(_inner)
        1508  +
            }
        1509  +
            ,
        1510  +
            /* ServerOperationErrorGenerator.kt:142 */
        1511  +
            GreetingWithErrorsError::InternalServerError(_inner) =>
        1512  +
            /* ServerOperationErrorGenerator.kt:103 */
        1513  +
            {
        1514  +
                Some(_inner)
  777   1515   
            }
        1516  +
            /* ServerOperationErrorGenerator.kt:139 */
  778   1517   
        }
        1518  +
        /* ServerOperationErrorGenerator.kt:101 */
        1519  +
    }
        1520  +
    /* ServerOperationErrorGenerator.kt:100 */
  779   1521   
}
        1522  +
/* ServerOperationErrorGenerator.kt:110 */
  780   1523   
impl ::std::convert::From<crate::error::InvalidGreeting> for crate::error::GreetingWithErrorsError {
        1524  +
    /* ServerOperationErrorGenerator.kt:111 */
  781   1525   
    fn from(variant: crate::error::InvalidGreeting) -> crate::error::GreetingWithErrorsError {
        1526  +
        /* ServerOperationErrorGenerator.kt:112 */
  782   1527   
        Self::InvalidGreeting(variant)
        1528  +
        /* ServerOperationErrorGenerator.kt:111 */
  783   1529   
    }
        1530  +
    /* ServerOperationErrorGenerator.kt:110 */
  784   1531   
}
        1532  +
/* ServerOperationErrorGenerator.kt:110 */
  785   1533   
impl ::std::convert::From<crate::error::ComplexError> for crate::error::GreetingWithErrorsError {
        1534  +
    /* ServerOperationErrorGenerator.kt:111 */
  786   1535   
    fn from(variant: crate::error::ComplexError) -> crate::error::GreetingWithErrorsError {
        1536  +
        /* ServerOperationErrorGenerator.kt:112 */
  787   1537   
        Self::ComplexError(variant)
        1538  +
        /* ServerOperationErrorGenerator.kt:111 */
  788   1539   
    }
        1540  +
    /* ServerOperationErrorGenerator.kt:110 */
  789   1541   
}
        1542  +
/* ServerOperationErrorGenerator.kt:110 */
  790   1543   
impl ::std::convert::From<crate::error::FooError> for crate::error::GreetingWithErrorsError {
        1544  +
    /* ServerOperationErrorGenerator.kt:111 */
  791   1545   
    fn from(variant: crate::error::FooError) -> crate::error::GreetingWithErrorsError {
        1546  +
        /* ServerOperationErrorGenerator.kt:112 */
  792   1547   
        Self::FooError(variant)
        1548  +
        /* ServerOperationErrorGenerator.kt:111 */
  793   1549   
    }
        1550  +
    /* ServerOperationErrorGenerator.kt:110 */
  794   1551   
}
        1552  +
/* ServerOperationErrorGenerator.kt:110 */
  795   1553   
impl ::std::convert::From<crate::error::InternalServerError>
  796   1554   
    for crate::error::GreetingWithErrorsError
  797   1555   
{
        1556  +
    /* ServerOperationErrorGenerator.kt:111 */
  798   1557   
    fn from(variant: crate::error::InternalServerError) -> crate::error::GreetingWithErrorsError {
        1558  +
        /* ServerOperationErrorGenerator.kt:112 */
  799   1559   
        Self::InternalServerError(variant)
        1560  +
        /* ServerOperationErrorGenerator.kt:111 */
  800   1561   
    }
        1562  +
    /* ServerOperationErrorGenerator.kt:110 */
  801   1563   
}
  802   1564   
        1565  +
/* PythonServerOperationErrorGenerator.kt:38 */
  803   1566   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::GreetingWithErrorsError {
  804   1567   
    fn from(variant: ::pyo3::PyErr) -> crate::error::GreetingWithErrorsError {
  805   1568   
        ::pyo3::Python::with_gil(|py| {
  806   1569   
            let error = variant.value(py);
  807   1570   
            if let Ok(error) = error.extract::<crate::error::InvalidGreeting>() {
  808   1571   
                return error.into();
  809   1572   
            }
  810   1573   
            if let Ok(error) = error.extract::<crate::error::ComplexError>() {
  811   1574   
                return error.into();
  812   1575   
            }
  813   1576   
            if let Ok(error) = error.extract::<crate::error::FooError>() {
  814   1577   
                return error.into();
  815   1578   
            }
  816   1579   
            crate::error::InternalServerError {
  817   1580   
                message: error.to_string(),
  818   1581   
            }
  819   1582   
            .into()
  820   1583   
        })
  821   1584   
    }
  822   1585   
}
  823   1586   
        1587  +
/* RustType.kt:516 */
  824   1588   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1589  +
/* PythonServerStructureGenerator.kt:63 */
  825   1590   
/// :rtype None:
  826         -
/// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
        1591  +
/// /* StructureGenerator.kt:197 */This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
        1592  +
/* RustType.kt:516 */
  827   1593   
#[derive(
  828   1594   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  829   1595   
)]
  830         -
pub struct FooError {}
        1596  +
pub /* StructureGenerator.kt:201 */ struct FooError {/* StructureGenerator.kt:201 */}
        1597  +
/* RustType.kt:516 */
  831   1598   
#[allow(clippy::new_without_default)]
        1599  +
/* RustType.kt:516 */
  832   1600   
#[allow(clippy::too_many_arguments)]
        1601  +
/* RustType.kt:516 */
  833   1602   
#[::pyo3::pymethods]
        1603  +
/* PythonServerStructureGenerator.kt:88 */
  834   1604   
impl FooError {
  835   1605   
    #[new]
  836   1606   
    pub fn new() -> Self {
  837   1607   
        Self {}
  838   1608   
    }
  839   1609   
    fn __repr__(&self) -> String {
  840   1610   
        format!("{self:?}")
  841   1611   
    }
  842   1612   
    fn __str__(&self) -> String {
  843   1613   
        format!("{self:?}")
  844   1614   
    }
  845   1615   
}
        1616  +
/* ErrorImplGenerator.kt:99 */
  846   1617   
impl FooError {
        1618  +
    /* ErrorImplGenerator.kt:141 */
  847   1619   
    #[doc(hidden)]
  848   1620   
    /// Returns the error name.
  849   1621   
    pub fn name(&self) -> &'static str {
  850   1622   
        "FooError"
  851   1623   
    }
        1624  +
    /* ErrorImplGenerator.kt:99 */
  852   1625   
}
        1626  +
/* ErrorImplGenerator.kt:153 */
  853   1627   
impl ::std::fmt::Display for FooError {
        1628  +
    /* ErrorImplGenerator.kt:154 */
  854   1629   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1630  +
        /* ErrorImplGenerator.kt:161 */
  855   1631   
        ::std::write!(f, "FooError")?;
        1632  +
        /* ErrorImplGenerator.kt:171 */
  856   1633   
        Ok(())
        1634  +
        /* ErrorImplGenerator.kt:154 */
  857   1635   
    }
        1636  +
    /* ErrorImplGenerator.kt:153 */
  858   1637   
}
        1638  +
/* ErrorImplGenerator.kt:175 */
  859   1639   
impl ::std::error::Error for FooError {}
        1640  +
/* ServerCodegenVisitor.kt:370 */
  860   1641   
impl FooError {
  861         -
    /// Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
        1642  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`FooError`](crate::error::FooError).
        1643  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  862   1644   
    pub fn builder() -> crate::error::foo_error::Builder {
        1645  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  863   1646   
        crate::error::foo_error::Builder::default()
        1647  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  864   1648   
    }
        1649  +
    /* ServerCodegenVisitor.kt:370 */
  865   1650   
}
  866   1651   
        1652  +
/* RustType.kt:516 */
  867   1653   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1654  +
/* PythonServerStructureGenerator.kt:63 */
  868   1655   
/// :param top_level typing.Optional\[str\]:
  869   1656   
/// :param nested typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
  870   1657   
/// :rtype None:
  871         -
/// This error is thrown when a request is invalid.
        1658  +
/// /* StructureGenerator.kt:197 */This error is thrown when a request is invalid.
        1659  +
/* RustType.kt:516 */
  872   1660   
#[derive(
  873   1661   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  874   1662   
)]
  875         -
pub struct ComplexError {
        1663  +
pub /* StructureGenerator.kt:201 */ struct ComplexError {
        1664  +
    /* RustType.kt:516 */
  876   1665   
    #[pyo3(get, set)]
        1666  +
    /* PythonServerStructureGenerator.kt:80 */
  877   1667   
    /// :type typing.Optional\[str\]:
        1668  +
    /* StructureGenerator.kt:231 */
  878   1669   
    #[allow(missing_docs)] // documentation missing in model
  879   1670   
    pub top_level: ::std::option::Option<::std::string::String>,
        1671  +
    /* RustType.kt:516 */
  880   1672   
    #[pyo3(get, set)]
        1673  +
    /* PythonServerStructureGenerator.kt:80 */
  881   1674   
    /// :type typing.Optional\[json_rpc10.model.ComplexNestedErrorData\]:
        1675  +
    /* StructureGenerator.kt:231 */
  882   1676   
    #[allow(missing_docs)] // documentation missing in model
  883   1677   
    pub nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
        1678  +
    /* StructureGenerator.kt:201 */
  884   1679   
}
        1680  +
/* StructureGenerator.kt:135 */
  885   1681   
impl ComplexError {
        1682  +
    /* StructureGenerator.kt:231 */
  886   1683   
    #[allow(missing_docs)] // documentation missing in model
        1684  +
                           /* StructureGenerator.kt:166 */
  887   1685   
    pub fn top_level(&self) -> ::std::option::Option<&str> {
        1686  +
        /* StructureGenerator.kt:169 */
  888   1687   
        self.top_level.as_deref()
        1688  +
        /* StructureGenerator.kt:166 */
  889   1689   
    }
        1690  +
    /* StructureGenerator.kt:231 */
  890   1691   
    #[allow(missing_docs)] // documentation missing in model
        1692  +
                           /* StructureGenerator.kt:166 */
  891   1693   
    pub fn nested(&self) -> ::std::option::Option<&crate::model::ComplexNestedErrorData> {
        1694  +
        /* StructureGenerator.kt:170 */
  892   1695   
        self.nested.as_ref()
        1696  +
        /* StructureGenerator.kt:166 */
  893   1697   
    }
        1698  +
    /* StructureGenerator.kt:135 */
  894   1699   
}
        1700  +
/* RustType.kt:516 */
  895   1701   
#[allow(clippy::new_without_default)]
        1702  +
/* RustType.kt:516 */
  896   1703   
#[allow(clippy::too_many_arguments)]
        1704  +
/* RustType.kt:516 */
  897   1705   
#[::pyo3::pymethods]
        1706  +
/* PythonServerStructureGenerator.kt:88 */
  898   1707   
impl ComplexError {
  899   1708   
    #[new]
  900   1709   
    pub fn new(
  901   1710   
        top_level: ::std::option::Option<::std::string::String>,
  902   1711   
        nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
  903   1712   
    ) -> Self {
  904   1713   
        Self { top_level, nested }
  905   1714   
    }
  906   1715   
    fn __repr__(&self) -> String {
  907   1716   
        format!("{self:?}")
  908   1717   
    }
  909   1718   
    fn __str__(&self) -> String {
  910   1719   
        format!("{self:?}")
  911   1720   
    }
  912   1721   
}
        1722  +
/* ErrorImplGenerator.kt:99 */
  913   1723   
impl ComplexError {
        1724  +
    /* ErrorImplGenerator.kt:141 */
  914   1725   
    #[doc(hidden)]
  915   1726   
    /// Returns the error name.
  916   1727   
    pub fn name(&self) -> &'static str {
  917   1728   
        "ComplexError"
  918   1729   
    }
        1730  +
    /* ErrorImplGenerator.kt:99 */
  919   1731   
}
        1732  +
/* ErrorImplGenerator.kt:153 */
  920   1733   
impl ::std::fmt::Display for ComplexError {
        1734  +
    /* ErrorImplGenerator.kt:154 */
  921   1735   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1736  +
        /* ErrorImplGenerator.kt:161 */
  922   1737   
        ::std::write!(f, "ComplexError")?;
        1738  +
        /* ErrorImplGenerator.kt:171 */
  923   1739   
        Ok(())
        1740  +
        /* ErrorImplGenerator.kt:154 */
  924   1741   
    }
        1742  +
    /* ErrorImplGenerator.kt:153 */
  925   1743   
}
        1744  +
/* ErrorImplGenerator.kt:175 */
  926   1745   
impl ::std::error::Error for ComplexError {}
        1746  +
/* ServerCodegenVisitor.kt:370 */
  927   1747   
impl ComplexError {
  928         -
    /// Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
        1748  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ComplexError`](crate::error::ComplexError).
        1749  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  929   1750   
    pub fn builder() -> crate::error::complex_error::Builder {
        1751  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  930   1752   
        crate::error::complex_error::Builder::default()
        1753  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  931   1754   
    }
        1755  +
    /* ServerCodegenVisitor.kt:370 */
  932   1756   
}
  933   1757   
        1758  +
/* RustType.kt:516 */
  934   1759   
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
        1760  +
/* PythonServerStructureGenerator.kt:63 */
  935   1761   
/// :param message typing.Optional\[str\]:
  936   1762   
/// :rtype None:
  937         -
/// This error is thrown when an invalid greeting value is provided.
        1763  +
/// /* StructureGenerator.kt:197 */This error is thrown when an invalid greeting value is provided.
        1764  +
/* RustType.kt:516 */
  938   1765   
#[derive(
  939   1766   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  940   1767   
)]
  941         -
pub struct InvalidGreeting {
        1768  +
pub /* StructureGenerator.kt:201 */ struct InvalidGreeting {
        1769  +
    /* RustType.kt:516 */
  942   1770   
    #[pyo3(get, set)]
        1771  +
    /* PythonServerStructureGenerator.kt:80 */
  943   1772   
    /// :type typing.Optional\[str\]:
        1773  +
    /* StructureGenerator.kt:231 */
  944   1774   
    #[allow(missing_docs)] // documentation missing in model
  945   1775   
    pub message: ::std::option::Option<::std::string::String>,
        1776  +
    /* StructureGenerator.kt:201 */
  946   1777   
}
        1778  +
/* RustType.kt:516 */
  947   1779   
#[allow(clippy::new_without_default)]
        1780  +
/* RustType.kt:516 */
  948   1781   
#[allow(clippy::too_many_arguments)]
        1782  +
/* RustType.kt:516 */
  949   1783   
#[::pyo3::pymethods]
        1784  +
/* PythonServerStructureGenerator.kt:88 */
  950   1785   
impl InvalidGreeting {
  951   1786   
    #[new]
  952   1787   
    pub fn new(message: ::std::option::Option<::std::string::String>) -> Self {
  953   1788   
        Self { message }
  954   1789   
    }
  955   1790   
    fn __repr__(&self) -> String {
  956   1791   
        format!("{self:?}")
  957   1792   
    }
  958   1793   
    fn __str__(&self) -> String {
  959   1794   
        format!("{self:?}")
  960   1795   
    }
  961   1796   
}
        1797  +
/* ErrorImplGenerator.kt:99 */
  962   1798   
impl InvalidGreeting {
        1799  +
    /* ErrorImplGenerator.kt:128 */
  963   1800   
    /// Returns the error message.
  964   1801   
    pub fn message(&self) -> ::std::option::Option<&str> {
  965   1802   
        self.message.as_deref()
  966   1803   
    }
        1804  +
    /* ErrorImplGenerator.kt:141 */
  967   1805   
    #[doc(hidden)]
  968   1806   
    /// Returns the error name.
  969   1807   
    pub fn name(&self) -> &'static str {
  970   1808   
        "InvalidGreeting"
  971   1809   
    }
        1810  +
    /* ErrorImplGenerator.kt:99 */
  972   1811   
}
        1812  +
/* ErrorImplGenerator.kt:153 */
  973   1813   
impl ::std::fmt::Display for InvalidGreeting {
        1814  +
    /* ErrorImplGenerator.kt:154 */
  974   1815   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1816  +
        /* ErrorImplGenerator.kt:161 */
  975   1817   
        ::std::write!(f, "InvalidGreeting")?;
        1818  +
        /* ErrorImplGenerator.kt:166 */
  976   1819   
        if let ::std::option::Option::Some(inner_1) = &self.message {
        1820  +
            /* ErrorImplGenerator.kt:166 */
  977   1821   
            {
        1822  +
                /* ErrorImplGenerator.kt:167 */
  978   1823   
                ::std::write!(f, ": {}", inner_1)?;
        1824  +
                /* ErrorImplGenerator.kt:166 */
  979   1825   
            }
        1826  +
            /* ErrorImplGenerator.kt:166 */
  980   1827   
        }
        1828  +
        /* ErrorImplGenerator.kt:171 */
  981   1829   
        Ok(())
        1830  +
        /* ErrorImplGenerator.kt:154 */
  982   1831   
    }
        1832  +
    /* ErrorImplGenerator.kt:153 */
  983   1833   
}
        1834  +
/* ErrorImplGenerator.kt:175 */
  984   1835   
impl ::std::error::Error for InvalidGreeting {}
        1836  +
/* ServerCodegenVisitor.kt:370 */
  985   1837   
impl InvalidGreeting {
  986         -
    /// Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
        1838  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`InvalidGreeting`](crate::error::InvalidGreeting).
        1839  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  987   1840   
    pub fn builder() -> crate::error::invalid_greeting::Builder {
        1841  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  988   1842   
        crate::error::invalid_greeting::Builder::default()
        1843  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  989   1844   
    }
        1845  +
    /* ServerCodegenVisitor.kt:370 */
  990   1846   
}
  991   1847   
        1848  +
/* ServerOperationErrorGenerator.kt:63 */
  992   1849   
/// Error type for the `SimpleScalarProperties` operation.
        1850  +
/* ServerOperationErrorGenerator.kt:64 */
  993   1851   
/// Each variant represents an error that can occur for the `SimpleScalarProperties` operation.
        1852  +
/* RustType.kt:516 */
  994   1853   
#[derive(::std::fmt::Debug)]
  995         -
pub enum SimpleScalarPropertiesError {
        1854  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum SimpleScalarPropertiesError {
        1855  +
    /* ServerOperationErrorGenerator.kt:68 */
  996   1856   
    #[allow(missing_docs)] // documentation missing in model
        1857  +
    /* ServerOperationErrorGenerator.kt:71 */
  997   1858   
    InternalServerError(crate::error::InternalServerError),
        1859  +
    /* ServerOperationErrorGenerator.kt:66 */
  998   1860   
}
        1861  +
/* ServerOperationErrorGenerator.kt:75 */
  999   1862   
impl ::std::fmt::Display for SimpleScalarPropertiesError {
        1863  +
    /* ServerOperationErrorGenerator.kt:76 */
 1000   1864   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1865  +
        /* ServerOperationErrorGenerator.kt:139 */
 1001   1866   
        match &self {
 1002         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.fmt(f),
        1867  +
            /* ServerOperationErrorGenerator.kt:142 */
        1868  +
            SimpleScalarPropertiesError::InternalServerError(_inner) =>
        1869  +
            /* ServerOperationErrorGenerator.kt:78 */
        1870  +
            {
        1871  +
                _inner.fmt(f)
 1003   1872   
            }
        1873  +
            /* ServerOperationErrorGenerator.kt:139 */
 1004   1874   
        }
        1875  +
        /* ServerOperationErrorGenerator.kt:76 */
        1876  +
    }
        1877  +
    /* ServerOperationErrorGenerator.kt:75 */
 1005   1878   
}
        1879  +
/* ServerOperationErrorGenerator.kt:83 */
 1006   1880   
impl SimpleScalarPropertiesError {
        1881  +
    /* ServerOperationErrorGenerator.kt:87 */
 1007   1882   
    /// Returns `true` if the error kind is `SimpleScalarPropertiesError::InternalServerError`.
        1883  +
    /* ServerOperationErrorGenerator.kt:88 */
 1008   1884   
    pub fn is_internal_server_error(&self) -> bool {
        1885  +
        /* ServerOperationErrorGenerator.kt:89 */
 1009   1886   
        matches!(&self, SimpleScalarPropertiesError::InternalServerError(_))
        1887  +
        /* ServerOperationErrorGenerator.kt:88 */
 1010   1888   
    }
        1889  +
    /* ServerOperationErrorGenerator.kt:92 */
 1011   1890   
    /// Returns the error name string by matching the correct variant.
        1891  +
    /* ServerOperationErrorGenerator.kt:93 */
 1012   1892   
    pub fn name(&self) -> &'static str {
        1893  +
        /* ServerOperationErrorGenerator.kt:139 */
 1013   1894   
        match &self {
 1014         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => _inner.name(),
        1895  +
            /* ServerOperationErrorGenerator.kt:142 */
        1896  +
            SimpleScalarPropertiesError::InternalServerError(_inner) =>
        1897  +
            /* ServerOperationErrorGenerator.kt:95 */
        1898  +
            {
        1899  +
                _inner.name()
 1015   1900   
            }
        1901  +
            /* ServerOperationErrorGenerator.kt:139 */
 1016   1902   
        }
        1903  +
        /* ServerOperationErrorGenerator.kt:93 */
        1904  +
    }
        1905  +
    /* ServerOperationErrorGenerator.kt:83 */
 1017   1906   
}
        1907  +
/* ServerOperationErrorGenerator.kt:100 */
 1018   1908   
impl ::std::error::Error for SimpleScalarPropertiesError {
        1909  +
    /* ServerOperationErrorGenerator.kt:101 */
 1019   1910   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        1911  +
        /* ServerOperationErrorGenerator.kt:139 */
 1020   1912   
        match &self {
 1021         -
            SimpleScalarPropertiesError::InternalServerError(_inner) => Some(_inner),
        1913  +
            /* ServerOperationErrorGenerator.kt:142 */
        1914  +
            SimpleScalarPropertiesError::InternalServerError(_inner) =>
        1915  +
            /* ServerOperationErrorGenerator.kt:103 */
        1916  +
            {
        1917  +
                Some(_inner)
 1022   1918   
            }
        1919  +
            /* ServerOperationErrorGenerator.kt:139 */
 1023   1920   
        }
        1921  +
        /* ServerOperationErrorGenerator.kt:101 */
        1922  +
    }
        1923  +
    /* ServerOperationErrorGenerator.kt:100 */
 1024   1924   
}
        1925  +
/* ServerOperationErrorGenerator.kt:110 */
 1025   1926   
impl ::std::convert::From<crate::error::InternalServerError>
 1026   1927   
    for crate::error::SimpleScalarPropertiesError
 1027   1928   
{
        1929  +
    /* ServerOperationErrorGenerator.kt:111 */
 1028   1930   
    fn from(
 1029   1931   
        variant: crate::error::InternalServerError,
 1030   1932   
    ) -> crate::error::SimpleScalarPropertiesError {
        1933  +
        /* ServerOperationErrorGenerator.kt:112 */
 1031   1934   
        Self::InternalServerError(variant)
        1935  +
        /* ServerOperationErrorGenerator.kt:111 */
 1032   1936   
    }
        1937  +
    /* ServerOperationErrorGenerator.kt:110 */
 1033   1938   
}
 1034   1939   
        1940  +
/* PythonServerOperationErrorGenerator.kt:38 */
 1035   1941   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::SimpleScalarPropertiesError {
 1036   1942   
    fn from(variant: ::pyo3::PyErr) -> crate::error::SimpleScalarPropertiesError {
 1037   1943   
        ::pyo3::Python::with_gil(|py| {
 1038   1944   
            let error = variant.value(py);
 1039   1945   
 1040   1946   
            crate::error::InternalServerError {
 1041   1947   
                message: error.to_string(),
 1042   1948   
            }
 1043   1949   
            .into()
 1044   1950   
        })
 1045   1951   
    }
 1046   1952   
}
 1047   1953   
        1954  +
/* ServerOperationErrorGenerator.kt:63 */
 1048   1955   
/// Error type for the `EmptyInputAndEmptyOutput` operation.
        1956  +
/* ServerOperationErrorGenerator.kt:64 */
 1049   1957   
/// Each variant represents an error that can occur for the `EmptyInputAndEmptyOutput` operation.
        1958  +
/* RustType.kt:516 */
 1050   1959   
#[derive(::std::fmt::Debug)]
 1051         -
pub enum EmptyInputAndEmptyOutputError {
        1960  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum EmptyInputAndEmptyOutputError {
        1961  +
    /* ServerOperationErrorGenerator.kt:68 */
 1052   1962   
    #[allow(missing_docs)] // documentation missing in model
        1963  +
    /* ServerOperationErrorGenerator.kt:71 */
 1053   1964   
    InternalServerError(crate::error::InternalServerError),
        1965  +
    /* ServerOperationErrorGenerator.kt:66 */
 1054   1966   
}
        1967  +
/* ServerOperationErrorGenerator.kt:75 */
 1055   1968   
impl ::std::fmt::Display for EmptyInputAndEmptyOutputError {
        1969  +
    /* ServerOperationErrorGenerator.kt:76 */
 1056   1970   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1971  +
        /* ServerOperationErrorGenerator.kt:139 */
 1057   1972   
        match &self {
 1058         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.fmt(f),
        1973  +
            /* ServerOperationErrorGenerator.kt:142 */
        1974  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
        1975  +
            /* ServerOperationErrorGenerator.kt:78 */
        1976  +
            {
        1977  +
                _inner.fmt(f)
        1978  +
            }
        1979  +
            /* ServerOperationErrorGenerator.kt:139 */
 1059   1980   
        }
        1981  +
        /* ServerOperationErrorGenerator.kt:76 */
 1060   1982   
    }
        1983  +
    /* ServerOperationErrorGenerator.kt:75 */
 1061   1984   
}
        1985  +
/* ServerOperationErrorGenerator.kt:83 */
 1062   1986   
impl EmptyInputAndEmptyOutputError {
        1987  +
    /* ServerOperationErrorGenerator.kt:87 */
 1063   1988   
    /// Returns `true` if the error kind is `EmptyInputAndEmptyOutputError::InternalServerError`.
        1989  +
    /* ServerOperationErrorGenerator.kt:88 */
 1064   1990   
    pub fn is_internal_server_error(&self) -> bool {
        1991  +
        /* ServerOperationErrorGenerator.kt:89 */
 1065   1992   
        matches!(&self, EmptyInputAndEmptyOutputError::InternalServerError(_))
        1993  +
        /* ServerOperationErrorGenerator.kt:88 */
 1066   1994   
    }
        1995  +
    /* ServerOperationErrorGenerator.kt:92 */
 1067   1996   
    /// Returns the error name string by matching the correct variant.
        1997  +
    /* ServerOperationErrorGenerator.kt:93 */
 1068   1998   
    pub fn name(&self) -> &'static str {
        1999  +
        /* ServerOperationErrorGenerator.kt:139 */
 1069   2000   
        match &self {
 1070         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => _inner.name(),
        2001  +
            /* ServerOperationErrorGenerator.kt:142 */
        2002  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
        2003  +
            /* ServerOperationErrorGenerator.kt:95 */
        2004  +
            {
        2005  +
                _inner.name()
        2006  +
            }
        2007  +
            /* ServerOperationErrorGenerator.kt:139 */
 1071   2008   
        }
        2009  +
        /* ServerOperationErrorGenerator.kt:93 */
 1072   2010   
    }
        2011  +
    /* ServerOperationErrorGenerator.kt:83 */
 1073   2012   
}
        2013  +
/* ServerOperationErrorGenerator.kt:100 */
 1074   2014   
impl ::std::error::Error for EmptyInputAndEmptyOutputError {
        2015  +
    /* ServerOperationErrorGenerator.kt:101 */
 1075   2016   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        2017  +
        /* ServerOperationErrorGenerator.kt:139 */
 1076   2018   
        match &self {
 1077         -
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) => Some(_inner),
        2019  +
            /* ServerOperationErrorGenerator.kt:142 */
        2020  +
            EmptyInputAndEmptyOutputError::InternalServerError(_inner) =>
        2021  +
            /* ServerOperationErrorGenerator.kt:103 */
        2022  +
            {
        2023  +
                Some(_inner)
        2024  +
            }
        2025  +
            /* ServerOperationErrorGenerator.kt:139 */
 1078   2026   
        }
        2027  +
        /* ServerOperationErrorGenerator.kt:101 */
 1079   2028   
    }
        2029  +
    /* ServerOperationErrorGenerator.kt:100 */
 1080   2030   
}
        2031  +
/* ServerOperationErrorGenerator.kt:110 */
 1081   2032   
impl ::std::convert::From<crate::error::InternalServerError>
 1082   2033   
    for crate::error::EmptyInputAndEmptyOutputError
 1083   2034   
{
        2035  +
    /* ServerOperationErrorGenerator.kt:111 */
 1084   2036   
    fn from(
 1085   2037   
        variant: crate::error::InternalServerError,
 1086   2038   
    ) -> crate::error::EmptyInputAndEmptyOutputError {
        2039  +
        /* ServerOperationErrorGenerator.kt:112 */
 1087   2040   
        Self::InternalServerError(variant)
        2041  +
        /* ServerOperationErrorGenerator.kt:111 */
 1088   2042   
    }
        2043  +
    /* ServerOperationErrorGenerator.kt:110 */
 1089   2044   
}
 1090   2045   
        2046  +
/* PythonServerOperationErrorGenerator.kt:38 */
 1091   2047   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::EmptyInputAndEmptyOutputError {
 1092   2048   
    fn from(variant: ::pyo3::PyErr) -> crate::error::EmptyInputAndEmptyOutputError {
 1093   2049   
        ::pyo3::Python::with_gil(|py| {
 1094   2050   
            let error = variant.value(py);
 1095   2051   
 1096   2052   
            crate::error::InternalServerError {
 1097   2053   
                message: error.to_string(),
 1098   2054   
            }
 1099   2055   
            .into()
 1100   2056   
        })
 1101   2057   
    }
 1102   2058   
}
 1103   2059   
        2060  +
/* ServerOperationErrorGenerator.kt:63 */
 1104   2061   
/// Error type for the `NoInputAndOutput` operation.
        2062  +
/* ServerOperationErrorGenerator.kt:64 */
 1105   2063   
/// Each variant represents an error that can occur for the `NoInputAndOutput` operation.
        2064  +
/* RustType.kt:516 */
 1106   2065   
#[derive(::std::fmt::Debug)]
 1107         -
pub enum NoInputAndOutputError {
        2066  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum NoInputAndOutputError {
        2067  +
    /* ServerOperationErrorGenerator.kt:68 */
 1108   2068   
    #[allow(missing_docs)] // documentation missing in model
        2069  +
    /* ServerOperationErrorGenerator.kt:71 */
 1109   2070   
    InternalServerError(crate::error::InternalServerError),
        2071  +
    /* ServerOperationErrorGenerator.kt:66 */
 1110   2072   
}
        2073  +
/* ServerOperationErrorGenerator.kt:75 */
 1111   2074   
impl ::std::fmt::Display for NoInputAndOutputError {
        2075  +
    /* ServerOperationErrorGenerator.kt:76 */
 1112   2076   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2077  +
        /* ServerOperationErrorGenerator.kt:139 */
 1113   2078   
        match &self {
 1114         -
            NoInputAndOutputError::InternalServerError(_inner) => _inner.fmt(f),
        2079  +
            /* ServerOperationErrorGenerator.kt:142 */
        2080  +
            NoInputAndOutputError::InternalServerError(_inner) =>
        2081  +
            /* ServerOperationErrorGenerator.kt:78 */
        2082  +
            {
        2083  +
                _inner.fmt(f)
        2084  +
            }
        2085  +
            /* ServerOperationErrorGenerator.kt:139 */
 1115   2086   
        }
        2087  +
        /* ServerOperationErrorGenerator.kt:76 */
 1116   2088   
    }
        2089  +
    /* ServerOperationErrorGenerator.kt:75 */
 1117   2090   
}
        2091  +
/* ServerOperationErrorGenerator.kt:83 */
 1118   2092   
impl NoInputAndOutputError {
        2093  +
    /* ServerOperationErrorGenerator.kt:87 */
 1119   2094   
    /// Returns `true` if the error kind is `NoInputAndOutputError::InternalServerError`.
        2095  +
    /* ServerOperationErrorGenerator.kt:88 */
 1120   2096   
    pub fn is_internal_server_error(&self) -> bool {
        2097  +
        /* ServerOperationErrorGenerator.kt:89 */
 1121   2098   
        matches!(&self, NoInputAndOutputError::InternalServerError(_))
        2099  +
        /* ServerOperationErrorGenerator.kt:88 */
 1122   2100   
    }
        2101  +
    /* ServerOperationErrorGenerator.kt:92 */
 1123   2102   
    /// Returns the error name string by matching the correct variant.
        2103  +
    /* ServerOperationErrorGenerator.kt:93 */
 1124   2104   
    pub fn name(&self) -> &'static str {
        2105  +
        /* ServerOperationErrorGenerator.kt:139 */
 1125   2106   
        match &self {
 1126         -
            NoInputAndOutputError::InternalServerError(_inner) => _inner.name(),
        2107  +
            /* ServerOperationErrorGenerator.kt:142 */
        2108  +
            NoInputAndOutputError::InternalServerError(_inner) =>
        2109  +
            /* ServerOperationErrorGenerator.kt:95 */
        2110  +
            {
        2111  +
                _inner.name()
        2112  +
            }
        2113  +
            /* ServerOperationErrorGenerator.kt:139 */
 1127   2114   
        }
        2115  +
        /* ServerOperationErrorGenerator.kt:93 */
 1128   2116   
    }
        2117  +
    /* ServerOperationErrorGenerator.kt:83 */
 1129   2118   
}
        2119  +
/* ServerOperationErrorGenerator.kt:100 */
 1130   2120   
impl ::std::error::Error for NoInputAndOutputError {
        2121  +
    /* ServerOperationErrorGenerator.kt:101 */
 1131   2122   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        2123  +
        /* ServerOperationErrorGenerator.kt:139 */
 1132   2124   
        match &self {
 1133         -
            NoInputAndOutputError::InternalServerError(_inner) => Some(_inner),
        2125  +
            /* ServerOperationErrorGenerator.kt:142 */
        2126  +
            NoInputAndOutputError::InternalServerError(_inner) =>
        2127  +
            /* ServerOperationErrorGenerator.kt:103 */
        2128  +
            {
        2129  +
                Some(_inner)
 1134   2130   
            }
        2131  +
            /* ServerOperationErrorGenerator.kt:139 */
 1135   2132   
        }
        2133  +
        /* ServerOperationErrorGenerator.kt:101 */
        2134  +
    }
        2135  +
    /* ServerOperationErrorGenerator.kt:100 */
 1136   2136   
}
        2137  +
/* ServerOperationErrorGenerator.kt:110 */
 1137   2138   
impl ::std::convert::From<crate::error::InternalServerError>
 1138   2139   
    for crate::error::NoInputAndOutputError
 1139   2140   
{
        2141  +
    /* ServerOperationErrorGenerator.kt:111 */
 1140   2142   
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndOutputError {
        2143  +
        /* ServerOperationErrorGenerator.kt:112 */
 1141   2144   
        Self::InternalServerError(variant)
        2145  +
        /* ServerOperationErrorGenerator.kt:111 */
 1142   2146   
    }
        2147  +
    /* ServerOperationErrorGenerator.kt:110 */
 1143   2148   
}
 1144   2149   
        2150  +
/* PythonServerOperationErrorGenerator.kt:38 */
 1145   2151   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndOutputError {
 1146   2152   
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndOutputError {
 1147   2153   
        ::pyo3::Python::with_gil(|py| {
 1148   2154   
            let error = variant.value(py);
 1149   2155   
 1150   2156   
            crate::error::InternalServerError {
 1151   2157   
                message: error.to_string(),
 1152   2158   
            }
 1153   2159   
            .into()
 1154   2160   
        })
 1155   2161   
    }
 1156   2162   
}
 1157   2163   
        2164  +
/* ServerOperationErrorGenerator.kt:63 */
 1158   2165   
/// Error type for the `NoInputAndNoOutput` operation.
        2166  +
/* ServerOperationErrorGenerator.kt:64 */
 1159   2167   
/// Each variant represents an error that can occur for the `NoInputAndNoOutput` operation.
        2168  +
/* RustType.kt:516 */
 1160   2169   
#[derive(::std::fmt::Debug)]
 1161         -
pub enum NoInputAndNoOutputError {
        2170  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum NoInputAndNoOutputError {
        2171  +
    /* ServerOperationErrorGenerator.kt:68 */
 1162   2172   
    #[allow(missing_docs)] // documentation missing in model
        2173  +
    /* ServerOperationErrorGenerator.kt:71 */
 1163   2174   
    InternalServerError(crate::error::InternalServerError),
        2175  +
    /* ServerOperationErrorGenerator.kt:66 */
 1164   2176   
}
        2177  +
/* ServerOperationErrorGenerator.kt:75 */
 1165   2178   
impl ::std::fmt::Display for NoInputAndNoOutputError {
        2179  +
    /* ServerOperationErrorGenerator.kt:76 */
 1166   2180   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2181  +
        /* ServerOperationErrorGenerator.kt:139 */
 1167   2182   
        match &self {
 1168         -
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.fmt(f),
        2183  +
            /* ServerOperationErrorGenerator.kt:142 */
        2184  +
            NoInputAndNoOutputError::InternalServerError(_inner) =>
        2185  +
            /* ServerOperationErrorGenerator.kt:78 */
        2186  +
            {
        2187  +
                _inner.fmt(f)
 1169   2188   
            }
        2189  +
            /* ServerOperationErrorGenerator.kt:139 */
 1170   2190   
        }
        2191  +
        /* ServerOperationErrorGenerator.kt:76 */
        2192  +
    }
        2193  +
    /* ServerOperationErrorGenerator.kt:75 */
 1171   2194   
}
        2195  +
/* ServerOperationErrorGenerator.kt:83 */
 1172   2196   
impl NoInputAndNoOutputError {
        2197  +
    /* ServerOperationErrorGenerator.kt:87 */
 1173   2198   
    /// Returns `true` if the error kind is `NoInputAndNoOutputError::InternalServerError`.
        2199  +
    /* ServerOperationErrorGenerator.kt:88 */
 1174   2200   
    pub fn is_internal_server_error(&self) -> bool {
        2201  +
        /* ServerOperationErrorGenerator.kt:89 */
 1175   2202   
        matches!(&self, NoInputAndNoOutputError::InternalServerError(_))
        2203  +
        /* ServerOperationErrorGenerator.kt:88 */
 1176   2204   
    }
        2205  +
    /* ServerOperationErrorGenerator.kt:92 */
 1177   2206   
    /// Returns the error name string by matching the correct variant.
        2207  +
    /* ServerOperationErrorGenerator.kt:93 */
 1178   2208   
    pub fn name(&self) -> &'static str {
        2209  +
        /* ServerOperationErrorGenerator.kt:139 */
 1179   2210   
        match &self {
 1180         -
            NoInputAndNoOutputError::InternalServerError(_inner) => _inner.name(),
        2211  +
            /* ServerOperationErrorGenerator.kt:142 */
        2212  +
            NoInputAndNoOutputError::InternalServerError(_inner) =>
        2213  +
            /* ServerOperationErrorGenerator.kt:95 */
        2214  +
            {
        2215  +
                _inner.name()
 1181   2216   
            }
        2217  +
            /* ServerOperationErrorGenerator.kt:139 */
 1182   2218   
        }
        2219  +
        /* ServerOperationErrorGenerator.kt:93 */
        2220  +
    }
        2221  +
    /* ServerOperationErrorGenerator.kt:83 */
 1183   2222   
}
        2223  +
/* ServerOperationErrorGenerator.kt:100 */
 1184   2224   
impl ::std::error::Error for NoInputAndNoOutputError {
        2225  +
    /* ServerOperationErrorGenerator.kt:101 */
 1185   2226   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        2227  +
        /* ServerOperationErrorGenerator.kt:139 */
 1186   2228   
        match &self {
 1187         -
            NoInputAndNoOutputError::InternalServerError(_inner) => Some(_inner),
        2229  +
            /* ServerOperationErrorGenerator.kt:142 */
        2230  +
            NoInputAndNoOutputError::InternalServerError(_inner) =>
        2231  +
            /* ServerOperationErrorGenerator.kt:103 */
        2232  +
            {
        2233  +
                Some(_inner)
 1188   2234   
            }
        2235  +
            /* ServerOperationErrorGenerator.kt:139 */
 1189   2236   
        }
        2237  +
        /* ServerOperationErrorGenerator.kt:101 */
        2238  +
    }
        2239  +
    /* ServerOperationErrorGenerator.kt:100 */
 1190   2240   
}
        2241  +
/* ServerOperationErrorGenerator.kt:110 */
 1191   2242   
impl ::std::convert::From<crate::error::InternalServerError>
 1192   2243   
    for crate::error::NoInputAndNoOutputError
 1193   2244   
{
        2245  +
    /* ServerOperationErrorGenerator.kt:111 */
 1194   2246   
    fn from(variant: crate::error::InternalServerError) -> crate::error::NoInputAndNoOutputError {
        2247  +
        /* ServerOperationErrorGenerator.kt:112 */
 1195   2248   
        Self::InternalServerError(variant)
        2249  +
        /* ServerOperationErrorGenerator.kt:111 */
 1196   2250   
    }
        2251  +
    /* ServerOperationErrorGenerator.kt:110 */
 1197   2252   
}
 1198   2253   
        2254  +
/* PythonServerOperationErrorGenerator.kt:38 */
 1199   2255   
impl ::std::convert::From<::pyo3::PyErr> for crate::error::NoInputAndNoOutputError {
 1200   2256   
    fn from(variant: ::pyo3::PyErr) -> crate::error::NoInputAndNoOutputError {
 1201   2257   
        ::pyo3::Python::with_gil(|py| {
 1202   2258   
            let error = variant.value(py);
 1203   2259   
 1204   2260   
            crate::error::InternalServerError {
 1205   2261   
                message: error.to_string(),
 1206   2262   
            }
 1207   2263   
            .into()
 1208   2264   
        })
 1209   2265   
    }
 1210   2266   
}
 1211         -
/// See [`InternalServerError`](crate::error::InternalServerError).
        2267  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InternalServerError`](crate::error::InternalServerError).
 1212   2268   
pub mod internal_server_error {
 1213   2269   
        2270  +
    /* RustType.kt:516 */
 1214   2271   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1215         -
    /// Holds one variant for each of the ways the builder can fail.
 1216         -
        2272  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        2273  +
    /* ServerBuilderConstraintViolations.kt:75 */
 1217   2274   
    #[allow(clippy::enum_variant_names)]
 1218   2275   
    pub enum ConstraintViolation {
 1219         -
        /// `message` was not provided but it is required when building `InternalServerError`.
        2276  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `InternalServerError`.
        2277  +
        /* ServerBuilderConstraintViolations.kt:143 */
 1220   2278   
        MissingMessage,
        2279  +
        /* ServerBuilderConstraintViolations.kt:75 */
 1221   2280   
    }
        2281  +
    /* ServerBuilderConstraintViolations.kt:117 */
 1222   2282   
    impl ::std::fmt::Display for ConstraintViolation {
        2283  +
        /* ServerBuilderConstraintViolations.kt:118 */
 1223   2284   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2285  +
            /* ServerBuilderConstraintViolations.kt:119 */
 1224   2286   
            match self {
 1225         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
 1226         -
            }
        2287  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `InternalServerError`"),
        2288  +
            /* ServerBuilderConstraintViolations.kt:119 */}
        2289  +
            /* ServerBuilderConstraintViolations.kt:118 */
 1227   2290   
        }
        2291  +
        /* ServerBuilderConstraintViolations.kt:117 */
 1228   2292   
    }
        2293  +
    /* ServerBuilderConstraintViolations.kt:84 */
 1229   2294   
    impl ::std::error::Error for ConstraintViolation {}
        2295  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
 1230   2296   
    impl ::std::convert::TryFrom<Builder> for crate::error::InternalServerError {
 1231   2297   
        type Error = ConstraintViolation;
 1232   2298   
 1233   2299   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 1234   2300   
            builder.build()
 1235   2301   
        }
 1236   2302   
    }
 1237         -
    /// A builder for [`InternalServerError`](crate::error::InternalServerError).
        2303  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InternalServerError`](crate::error::InternalServerError).
        2304  +
    /* RustType.kt:516 */
 1238   2305   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2306  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1239   2307   
    pub struct Builder {
        2308  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1240   2309   
        pub(crate) message: ::std::option::Option<::std::string::String>,
        2310  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1241   2311   
    }
        2312  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1242   2313   
    impl Builder {
        2314  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
 1243   2315   
        #[allow(missing_docs)] // documentation missing in model
        2316  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1244   2317   
        pub fn message(mut self, input: ::std::string::String) -> Self {
 1245         -
            self.message = Some(input);
        2318  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2319  +
            self.message =
        2320  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
        2321  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2322  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
        2323  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1246   2324   
            self
        2325  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1247   2326   
        }
 1248         -
        /// Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
 1249         -
        ///
        2327  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InternalServerError`](crate::error::InternalServerError).
        2328  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
 1250   2329   
        /// The builder fails to construct a [`InternalServerError`](crate::error::InternalServerError) if you do not provide a value for all non-`Option`al members.
 1251   2330   
        ///
        2331  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
 1252   2332   
        pub fn build(self) -> Result<crate::error::InternalServerError, ConstraintViolation> {
 1253   2333   
            self.build_enforcing_required_and_enum_traits()
 1254   2334   
        }
        2335  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1255   2336   
        fn build_enforcing_required_and_enum_traits(
 1256   2337   
            self,
 1257   2338   
        ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
 1258         -
            Ok(crate::error::InternalServerError {
 1259         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1260         -
            })
        2339  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        2340  +
            Ok(
        2341  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        2342  +
                crate::error::InternalServerError {
        2343  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        2344  +
                    message: self
        2345  +
                        .message
        2346  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
        2347  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
        2348  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        2349  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        2350  +
            )
        2351  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1261   2352   
        }
        2353  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1262   2354   
    }
        2355  +
        2356  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1263   2357   
}
 1264         -
/// See [`ValidationException`](crate::error::ValidationException).
        2358  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ValidationException`](crate::error::ValidationException).
 1265   2359   
pub mod validation_exception {
 1266   2360   
        2361  +
    /* RustType.kt:516 */
 1267   2362   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1268         -
    /// Holds one variant for each of the ways the builder can fail.
 1269         -
        2363  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        2364  +
    /* ServerBuilderConstraintViolations.kt:75 */
 1270   2365   
    #[allow(clippy::enum_variant_names)]
 1271   2366   
    pub enum ConstraintViolation {
 1272         -
        /// `message` was not provided but it is required when building `ValidationException`.
        2367  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
        2368  +
        /* ServerBuilderConstraintViolations.kt:143 */
 1273   2369   
        MissingMessage,
        2370  +
        /* ServerBuilderConstraintViolations.kt:75 */
 1274   2371   
    }
        2372  +
    /* ServerBuilderConstraintViolations.kt:117 */
 1275   2373   
    impl ::std::fmt::Display for ConstraintViolation {
        2374  +
        /* ServerBuilderConstraintViolations.kt:118 */
 1276   2375   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2376  +
            /* ServerBuilderConstraintViolations.kt:119 */
 1277   2377   
            match self {
 1278         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
 1279         -
            }
        2378  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
        2379  +
            /* ServerBuilderConstraintViolations.kt:119 */}
        2380  +
            /* ServerBuilderConstraintViolations.kt:118 */
 1280   2381   
        }
        2382  +
        /* ServerBuilderConstraintViolations.kt:117 */
 1281   2383   
    }
        2384  +
    /* ServerBuilderConstraintViolations.kt:84 */
 1282   2385   
    impl ::std::error::Error for ConstraintViolation {}
        2386  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
 1283   2387   
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
 1284   2388   
        type Error = ConstraintViolation;
 1285   2389   
 1286   2390   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 1287   2391   
            builder.build()
 1288   2392   
        }
 1289   2393   
    }
 1290         -
    /// A builder for [`ValidationException`](crate::error::ValidationException).
        2394  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ValidationException`](crate::error::ValidationException).
        2395  +
    /* RustType.kt:516 */
 1291   2396   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2397  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1292   2398   
    pub struct Builder {
        2399  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1293   2400   
        pub(crate) message: ::std::option::Option<::std::string::String>,
        2401  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1294   2402   
        pub(crate) field_list:
 1295   2403   
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
        2404  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1296   2405   
    }
        2406  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1297   2407   
    impl Builder {
 1298         -
        /// A summary of the validation failure.
        2408  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */A summary of the validation failure.
        2409  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1299   2410   
        pub fn message(mut self, input: ::std::string::String) -> Self {
 1300         -
            self.message = Some(input);
        2411  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2412  +
            self.message =
        2413  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
        2414  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2415  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
        2416  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1301   2417   
            self
        2418  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1302   2419   
        }
 1303         -
        /// 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.
        2420  +
        /// /* 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.
        2421  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1304   2422   
        pub fn field_list(
 1305   2423   
            mut self,
 1306   2424   
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
 1307   2425   
        ) -> Self {
 1308         -
            self.field_list = input;
        2426  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2427  +
            self.field_list =
        2428  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2429  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1309   2430   
            self
        2431  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1310   2432   
        }
 1311         -
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
 1312         -
        ///
        2433  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
        2434  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
 1313   2435   
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if you do not provide a value for all non-`Option`al members.
 1314   2436   
        ///
        2437  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
 1315   2438   
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
 1316   2439   
            self.build_enforcing_required_and_enum_traits()
 1317   2440   
        }
        2441  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1318   2442   
        fn build_enforcing_required_and_enum_traits(
 1319   2443   
            self,
 1320   2444   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
 1321         -
            Ok(crate::error::ValidationException {
 1322         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
        2445  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        2446  +
            Ok(
        2447  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        2448  +
                crate::error::ValidationException {
        2449  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
        2450  +
                    message: self
        2451  +
                        .message
        2452  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
        2453  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
        2454  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
 1323   2455   
                    field_list: self.field_list,
 1324         -
            })
        2456  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        2457  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
        2458  +
            )
        2459  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1325   2460   
        }
        2461  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1326   2462   
    }
        2463  +
        2464  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1327   2465   
}
 1328         -
/// See [`FooError`](crate::error::FooError).
        2466  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`FooError`](crate::error::FooError).
 1329   2467   
pub mod foo_error {
 1330   2468   
        2469  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
 1331   2470   
    impl ::std::convert::From<Builder> for crate::error::FooError {
 1332   2471   
        fn from(builder: Builder) -> Self {
 1333   2472   
            builder.build()
 1334   2473   
        }
 1335   2474   
    }
 1336         -
    /// A builder for [`FooError`](crate::error::FooError).
        2475  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`FooError`](crate::error::FooError).
        2476  +
    /* RustType.kt:516 */
 1337   2477   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1338         -
    pub struct Builder {}
        2478  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
        2479  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
        2480  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1339   2481   
    impl Builder {
 1340         -
        /// Consumes the builder and constructs a [`FooError`](crate::error::FooError).
        2482  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`FooError`](crate::error::FooError).
        2483  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
 1341   2484   
        pub fn build(self) -> crate::error::FooError {
 1342   2485   
            self.build_enforcing_required_and_enum_traits()
 1343   2486   
        }
        2487  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1344   2488   
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::FooError {
 1345         -
            crate::error::FooError {}
        2489  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
        2490  +
            crate::error::FooError {
        2491  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
        2492  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1346   2493   
        }
        2494  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1347   2495   
    }
        2496  +
        2497  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1348   2498   
}
 1349         -
/// See [`ComplexError`](crate::error::ComplexError).
        2499  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ComplexError`](crate::error::ComplexError).
 1350   2500   
pub mod complex_error {
 1351   2501   
        2502  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
 1352   2503   
    impl ::std::convert::From<Builder> for crate::error::ComplexError {
 1353   2504   
        fn from(builder: Builder) -> Self {
 1354   2505   
            builder.build()
 1355   2506   
        }
 1356   2507   
    }
 1357         -
    /// A builder for [`ComplexError`](crate::error::ComplexError).
        2508  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ComplexError`](crate::error::ComplexError).
        2509  +
    /* RustType.kt:516 */
 1358   2510   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2511  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1359   2512   
    pub struct Builder {
        2513  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1360   2514   
        pub(crate) top_level: ::std::option::Option<::std::string::String>,
        2515  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1361   2516   
        pub(crate) nested: ::std::option::Option<crate::model::ComplexNestedErrorData>,
        2517  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1362   2518   
    }
        2519  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1363   2520   
    impl Builder {
        2521  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
 1364   2522   
        #[allow(missing_docs)] // documentation missing in model
        2523  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1365   2524   
        pub fn top_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1366         -
            self.top_level = input;
        2525  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2526  +
            self.top_level =
        2527  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2528  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1367   2529   
            self
        2530  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1368   2531   
        }
        2532  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
 1369   2533   
        #[allow(missing_docs)] // documentation missing in model
        2534  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1370   2535   
        pub fn nested(
 1371   2536   
            mut self,
 1372   2537   
            input: ::std::option::Option<crate::model::ComplexNestedErrorData>,
 1373   2538   
        ) -> Self {
 1374         -
            self.nested = input;
        2539  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2540  +
            self.nested =
        2541  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2542  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1375   2543   
            self
        2544  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1376   2545   
        }
 1377         -
        /// Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
        2546  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ComplexError`](crate::error::ComplexError).
        2547  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
 1378   2548   
        pub fn build(self) -> crate::error::ComplexError {
 1379   2549   
            self.build_enforcing_required_and_enum_traits()
 1380   2550   
        }
        2551  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1381   2552   
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::ComplexError {
        2553  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
 1382   2554   
            crate::error::ComplexError {
        2555  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
 1383   2556   
                top_level: self.top_level,
        2557  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
 1384   2558   
                nested: self.nested,
        2559  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
 1385   2560   
            }
        2561  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1386   2562   
        }
        2563  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1387   2564   
    }
        2565  +
        2566  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1388   2567   
}
 1389         -
/// See [`InvalidGreeting`](crate::error::InvalidGreeting).
        2568  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`InvalidGreeting`](crate::error::InvalidGreeting).
 1390   2569   
pub mod invalid_greeting {
 1391   2570   
        2571  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
 1392   2572   
    impl ::std::convert::From<Builder> for crate::error::InvalidGreeting {
 1393   2573   
        fn from(builder: Builder) -> Self {
 1394   2574   
            builder.build()
 1395   2575   
        }
 1396   2576   
    }
 1397         -
    /// A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
        2577  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`InvalidGreeting`](crate::error::InvalidGreeting).
        2578  +
    /* RustType.kt:516 */
 1398   2579   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2580  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1399   2581   
    pub struct Builder {
        2582  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
 1400   2583   
        pub(crate) message: ::std::option::Option<::std::string::String>,
        2584  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
 1401   2585   
    }
        2586  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1402   2587   
    impl Builder {
        2588  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
 1403   2589   
        #[allow(missing_docs)] // documentation missing in model
        2590  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1404   2591   
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1405         -
            self.message = input;
        2592  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
        2593  +
            self.message =
        2594  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
        2595  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
 1406   2596   
            self
        2597  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
 1407   2598   
        }
 1408         -
        /// Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
        2599  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`InvalidGreeting`](crate::error::InvalidGreeting).
        2600  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
 1409   2601   
        pub fn build(self) -> crate::error::InvalidGreeting {
 1410   2602   
            self.build_enforcing_required_and_enum_traits()
 1411   2603   
        }
        2604  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1412   2605   
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::InvalidGreeting {
        2606  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
 1413   2607   
            crate::error::InvalidGreeting {
        2608  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
 1414   2609   
                message: self.message,
        2610  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
 1415   2611   
            }
        2612  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
 1416   2613   
        }
        2614  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
 1417   2615   
    }
        2616  +
        2617  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1418   2618   
}