Server Test Python

Server Test Python

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +59,109 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:213 */
    2      3   
pub fn ser_structs_output_output_output(
    3      4   
    value: &crate::output::StructsOutput,
    4      5   
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    /* JsonSerializerGenerator.kt:218 */
    5      7   
    let mut out = ::std::string::String::new();
    6      8   
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           9  +
    /* JsonSerializerGenerator.kt:375 */
    7     10   
    crate::protocol_serde::shape_structs_output::ser_structs_output_output(&mut object, value)?;
          11  +
    /* JsonSerializerGenerator.kt:227 */
    8     12   
    object.finish();
    9     13   
    Ok(out)
          14  +
    /* JsonSerializerGenerator.kt:213 */
   10     15   
}
   11     16   
          17  +
/* JsonSerializerGenerator.kt:358 */
   12     18   
pub fn ser_structs_output_output(
   13     19   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   14     20   
    input: &crate::output::StructsOutput,
   15     21   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          22  +
    /* JsonSerializerGenerator.kt:382 */
   16     23   
    if let Some(var_1) = &input.result {
          24  +
        /* JsonSerializerGenerator.kt:495 */
   17     25   
        #[allow(unused_mut)]
          26  +
        /* JsonSerializerGenerator.kt:496 */
   18     27   
        let mut object_2 = object.key("result").start_object();
          28  +
        /* JsonSerializerGenerator.kt:375 */
   19     29   
        crate::protocol_serde::shape_result::ser_result(&mut object_2, var_1)?;
          30  +
        /* JsonSerializerGenerator.kt:515 */
   20     31   
        object_2.finish();
          32  +
        /* JsonSerializerGenerator.kt:382 */
   21     33   
    }
          34  +
    /* JsonSerializerGenerator.kt:382 */
   22     35   
    if let Some(var_3) = &input.result_list {
          36  +
        /* JsonSerializerGenerator.kt:484 */
   23     37   
        let mut array_4 = object.key("resultList").start_array();
          38  +
        /* JsonSerializerGenerator.kt:524 */
   24     39   
        for item_5 in var_3 {
          40  +
            /* SerializerUtil.kt:42 */
   25     41   
            {
          42  +
                /* JsonSerializerGenerator.kt:495 */
   26     43   
                #[allow(unused_mut)]
          44  +
                /* JsonSerializerGenerator.kt:496 */
   27     45   
                let mut object_6 = array_4.value().start_object();
          46  +
                /* JsonSerializerGenerator.kt:375 */
   28     47   
                crate::protocol_serde::shape_result::ser_result(&mut object_6, item_5)?;
          48  +
                /* JsonSerializerGenerator.kt:515 */
   29     49   
                object_6.finish();
          50  +
                /* SerializerUtil.kt:42 */
   30     51   
            }
          52  +
            /* JsonSerializerGenerator.kt:524 */
   31     53   
        }
          54  +
        /* JsonSerializerGenerator.kt:486 */
   32     55   
        array_4.finish();
          56  +
        /* JsonSerializerGenerator.kt:382 */
   33     57   
    }
          58  +
    /* JsonSerializerGenerator.kt:382 */
   34     59   
    if let Some(var_7) = &input.option {
          60  +
        /* JsonSerializerGenerator.kt:495 */
   35     61   
        #[allow(unused_mut)]
          62  +
        /* JsonSerializerGenerator.kt:496 */
   36     63   
        let mut object_8 = object.key("option").start_object();
          64  +
        /* JsonSerializerGenerator.kt:375 */
   37     65   
        crate::protocol_serde::shape_option::ser_option(&mut object_8, var_7)?;
          66  +
        /* JsonSerializerGenerator.kt:515 */
   38     67   
        object_8.finish();
          68  +
        /* JsonSerializerGenerator.kt:382 */
   39     69   
    }
          70  +
    /* JsonSerializerGenerator.kt:382 */
   40     71   
    if let Some(var_9) = &input.option_list {
          72  +
        /* JsonSerializerGenerator.kt:484 */
   41     73   
        let mut array_10 = object.key("optionList").start_array();
          74  +
        /* JsonSerializerGenerator.kt:524 */
   42     75   
        for item_11 in var_9 {
          76  +
            /* SerializerUtil.kt:42 */
   43     77   
            {
          78  +
                /* JsonSerializerGenerator.kt:495 */
   44     79   
                #[allow(unused_mut)]
          80  +
                /* JsonSerializerGenerator.kt:496 */
   45     81   
                let mut object_12 = array_10.value().start_object();
          82  +
                /* JsonSerializerGenerator.kt:375 */
   46     83   
                crate::protocol_serde::shape_result::ser_result(&mut object_12, item_11)?;
          84  +
                /* JsonSerializerGenerator.kt:515 */
   47     85   
                object_12.finish();
          86  +
                /* SerializerUtil.kt:42 */
   48     87   
            }
          88  +
            /* JsonSerializerGenerator.kt:524 */
   49     89   
        }
          90  +
        /* JsonSerializerGenerator.kt:486 */
   50     91   
        array_10.finish();
          92  +
        /* JsonSerializerGenerator.kt:382 */
   51     93   
    }
          94  +
    /* JsonSerializerGenerator.kt:382 */
   52     95   
    if let Some(var_13) = &input.something_else {
          96  +
        /* JsonSerializerGenerator.kt:495 */
   53     97   
        #[allow(unused_mut)]
          98  +
        /* JsonSerializerGenerator.kt:496 */
   54     99   
        let mut object_14 = object.key("somethingElse").start_object();
         100  +
        /* JsonSerializerGenerator.kt:375 */
   55    101   
        crate::protocol_serde::shape_something_else::ser_something_else(&mut object_14, var_13)?;
         102  +
        /* JsonSerializerGenerator.kt:515 */
   56    103   
        object_14.finish();
         104  +
        /* JsonSerializerGenerator.kt:382 */
   57    105   
    }
         106  +
    /* JsonSerializerGenerator.kt:372 */
   58    107   
    Ok(())
         108  +
    /* JsonSerializerGenerator.kt:358 */
   59    109   
}

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

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

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

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* PythonServerOperationHandlerGenerator.kt:61 */
    2      3   
/// Python handler for operation `Structs`.
    3      4   
pub(crate) async fn structs(
    4      5   
    input: crate::input::StructsInput,
    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::StructsOutput, crate::error::StructsError> {
    8      9   
    // Async block used to run the handler and catch any Python error.
    9     10   
    let result = if handler.is_coroutine {
   10     11   
        ::tracing::trace!(name = "structs", "executing python handler coroutine");
   11     12   
        let result = ::pyo3::Python::with_gil(|py| {

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

@@ -1,1 +155,174 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* PythonApplicationGenerator.kt:386 */
    2      3   
#[allow(clippy::tabs_in_doc_comments)]
    3      4   
/// Main Python application, used to register operations and context and start multiple
    4      5   
/// workers on the same shared socket.
    5      6   
///
    6      7   
/// Operations can be registered using the application object as a decorator (`@app.operation_name`).
    7      8   
///
    8      9   
/// Here's a full example to get you started:
    9     10   
///
   10     11   
/// ```python
          12  +
/* PythonApplicationGenerator.kt:399 */
   11     13   
/// from naming_test_structs import input
   12     14   
/// from naming_test_structs import output
          15  +
/* PythonApplicationGenerator.kt:406 */
   13     16   
/// from naming_test_structs import error
          17  +
/* PythonApplicationGenerator.kt:408 */
   14     18   
/// from naming_test_structs import middleware
   15     19   
/// from naming_test_structs import App
   16     20   
///
   17     21   
/// @dataclass
   18     22   
/// class Context:
   19     23   
///     counter: int = 0
   20     24   
///
   21     25   
/// app = App()
   22     26   
/// app.context(Context())
   23     27   
///
   24     28   
/// @app.request_middleware
   25     29   
/// def request_middleware(request: middleware::Request):
   26     30   
///     if request.get_header("x-amzn-id") != "secret":
   27     31   
///         raise middleware.MiddlewareException("Unsupported `x-amz-id` header", 401)
   28     32   
///
          33  +
/* PythonApplicationGenerator.kt:441 */
   29     34   
/// @app.structs
   30     35   
/// def structs(input: input::StructsInput, ctx: Context) -> output::StructsOutput:
   31     36   
///     raise NotImplementedError
          37  +
/* PythonApplicationGenerator.kt:428 */
   32     38   
///
   33     39   
/// app.run()
   34     40   
/// ```
   35     41   
///
   36     42   
/// Any of operations above can be written as well prepending the `async` keyword and
   37     43   
/// the Python application will automatically handle it and schedule it on the event loop for you.
          44  +
/* PythonApplicationGenerator.kt:112 */
   38     45   
#[::pyo3::pyclass]
   39     46   
#[derive(Debug)]
   40     47   
/// :generic Ctx:
   41     48   
/// :extends typing.Generic\[Ctx\]:
   42     49   
/// :rtype None:
   43     50   
pub struct App {
   44     51   
    handlers: ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler>,
   45     52   
    middlewares: Vec<::aws_smithy_http_server_python::PyMiddlewareHandler>,
   46     53   
    context: Option<::pyo3::PyObject>,
   47     54   
    workers: ::parking_lot::Mutex<Vec<::pyo3::PyObject>>,
   48     55   
}
          56  +
/* PythonApplicationGenerator.kt:149 */
   49     57   
impl Default for App {
   50     58   
    fn default() -> Self {
   51     59   
        Self {
   52     60   
            handlers: Default::default(),
   53     61   
            middlewares: vec![],
   54     62   
            context: None,
   55     63   
            workers: ::parking_lot::Mutex::new(vec![]),
   56     64   
        }
   57     65   
    }
   58     66   
}
          67  +
/* PythonApplicationGenerator.kt:131 */
   59     68   
impl Clone for App {
   60     69   
    fn clone(&self) -> Self {
   61     70   
        Self {
   62     71   
            handlers: self.handlers.clone(),
   63     72   
            middlewares: self.middlewares.clone(),
   64     73   
            context: self.context.clone(),
   65     74   
            workers: ::parking_lot::Mutex::new(vec![]),
   66     75   
        }
   67     76   
    }
   68     77   
}
          78  +
/* PythonApplicationGenerator.kt:168 */
   69     79   
impl ::aws_smithy_http_server_python::PyApp for App {
          80  +
    /* PythonApplicationGenerator.kt:174 */
   70     81   
    fn workers(&self) -> &::parking_lot::Mutex<Vec<::pyo3::PyObject>> {
   71     82   
        &self.workers
   72     83   
    }
   73     84   
    fn context(&self) -> &Option<::pyo3::PyObject> {
   74     85   
        &self.context
   75     86   
    }
   76     87   
    fn handlers(
   77     88   
        &mut self,
   78     89   
    ) -> &mut ::std::collections::HashMap<String, ::aws_smithy_http_server_python::PyHandler> {
   79     90   
        &mut self.handlers
   80     91   
    }
          92  +
    /* PythonApplicationGenerator.kt:189 */
   81     93   
    fn build_service(
   82     94   
        &mut self,
   83     95   
        event_loop: &::pyo3::PyAny,
   84     96   
    ) -> ::pyo3::PyResult<
   85     97   
        ::tower::util::BoxCloneService<
   86     98   
            ::http::Request<::aws_smithy_http_server::body::Body>,
   87     99   
            ::http::Response<::aws_smithy_http_server::body::BoxBody>,
   88    100   
            std::convert::Infallible,
   89    101   
        >,
   90    102   
    > {
         103  +
        /* PythonApplicationGenerator.kt:201 */
   91    104   
        let builder = crate::service::NamingObstacleCourseStructs::builder_without_plugins();
         105  +
        /* PythonApplicationGenerator.kt:209 */
   92    106   
        let structs_locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
   93    107   
        let handler = self
   94    108   
            .handlers
   95    109   
            .get("structs")
   96    110   
            .expect("Python handler for operation `structs` not found")
   97    111   
            .clone();
   98    112   
        let builder = builder.structs(move |input, state| {
   99    113   
            ::pyo3_asyncio::tokio::scope(
  100    114   
                structs_locals.clone(),
  101    115   
                crate::python_operation_adaptor::structs(input, state, handler.clone()),
  102    116   
            )
  103    117   
        });
         118  +
        /* PythonApplicationGenerator.kt:220 */
  104    119   
        let mut service = ::tower::util::BoxCloneService::new(builder.build().expect("one or more operations do not have a registered handler; this is a bug in the Python code generator, please file a bug report under https://github.com/smithy-lang/smithy-rs/issues"));
  105    120   
  106    121   
        {
  107    122   
            use ::tower::Layer;
  108    123   
            ::tracing::trace!("adding middlewares to rust python router");
  109    124   
            let mut middlewares = self.middlewares.clone();
  110    125   
            // Reverse the middlewares, so they run with same order as they defined
  111    126   
            middlewares.reverse();
  112    127   
            for handler in middlewares {
  113    128   
                ::tracing::trace!(name = &handler.name, "adding python middleware");
  114    129   
                let locals = ::pyo3_asyncio::TaskLocals::new(event_loop);
  115    130   
                let layer = ::aws_smithy_http_server_python::PyMiddlewareLayer::<
  116    131   
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  117    132   
                >::new(handler, locals);
  118    133   
                service = ::tower::util::BoxCloneService::new(layer.layer(service));
  119    134   
            }
  120    135   
        }
  121    136   
        Ok(service)
         137  +
        /* PythonApplicationGenerator.kt:189 */
  122    138   
    }
         139  +
    /* PythonApplicationGenerator.kt:168 */
  123    140   
}
         141  +
/* PythonApplicationGenerator.kt:247 */
  124    142   
#[::pyo3::pymethods]
  125    143   
impl App {
         144  +
    /* PythonApplicationGenerator.kt:260 */
  126    145   
    /// Create a new [App].
  127    146   
    #[new]
  128    147   
    pub fn new() -> Self {
  129    148   
        Self::default()
  130    149   
    }
  131    150   
  132    151   
    /// Register a context object that will be shared between handlers.
  133    152   
    ///
  134    153   
    /// :param context Ctx:
  135    154   
    /// :rtype None:
@@ -178,197 +218,239 @@
  198    217   
        py: pyo3::Python,
  199    218   
        socket: &pyo3::PyCell<::aws_smithy_http_server_python::PySocket>,
  200    219   
        worker_number: isize,
  201    220   
        tls: Option<::aws_smithy_http_server_python::tls::PyTlsConfig>,
  202    221   
    ) -> pyo3::PyResult<()> {
  203    222   
        use ::aws_smithy_http_server_python::PyApp;
  204    223   
        let event_loop = self.configure_python_event_loop(py)?;
  205    224   
        let service = self.build_and_configure_service(py, event_loop)?;
  206    225   
        self.start_hyper_worker(py, socket, event_loop, service, worker_number, tls)
  207    226   
    }
         227  +
    /* PythonApplicationGenerator.kt:366 */
  208    228   
    /// Method to register `structs` Python implementation inside the handlers map.
  209    229   
    /// It can be used as a function decorator in Python.
  210    230   
    ///
  211    231   
    /// :param func typing.Union\[typing.Callable\[\[naming_test_structs.input.StructsInput, Ctx\], typing.Union\[naming_test_structs.output.StructsOutput, typing.Awaitable\[naming_test_structs.output.StructsOutput\]\]\], typing.Callable\[\[naming_test_structs.input.StructsInput\], typing.Union\[naming_test_structs.output.StructsOutput, typing.Awaitable\[naming_test_structs.output.StructsOutput\]\]\]\]:
  212    232   
    /// :rtype None:
  213    233   
    #[pyo3(text_signature = "($self, func)")]
  214    234   
    pub fn structs(&mut self, py: ::pyo3::Python, func: ::pyo3::PyObject) -> ::pyo3::PyResult<()> {
  215    235   
        use ::aws_smithy_http_server_python::PyApp;
  216    236   
        self.register_operation(py, "structs", func)
  217    237   
    }
         238  +
    /* PythonApplicationGenerator.kt:247 */
  218    239   
}

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

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

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

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/Cargo.toml

@@ -12,12 +69,69 @@
   32     32   
version = "0.3"
   33     33   
[dependencies.nom]
   34     34   
version = "7"
   35     35   
[dependencies.parking_lot]
   36     36   
version = "0.12"
   37     37   
[dependencies.percent-encoding]
   38     38   
version = "2.0.0"
   39     39   
[dependencies.pin-project-lite]
   40     40   
version = "0.2"
   41     41   
[dependencies.pyo3]
   42         -
version = "0.18"
          42  +
version = "0.20"
   43     43   
[dependencies.pyo3-asyncio]
   44         -
version = "0.18"
          44  +
version = "0.20"
   45     45   
features = ["attributes", "tokio-runtime", "unstable-streams"]
   46     46   
[dependencies.tokio]
   47     47   
version = "1.20.1"
   48     48   
features = ["full"]
   49     49   
[dependencies.tokio-stream]
   50     50   
version = "0.1.12"
   51     51   
[dependencies.tower]
   52     52   
version = "0.4"
   53     53   
[dependencies.tracing]
   54     54   
version = "0.1"

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/python/pokemon_service_server_sdk/error/__init__.pyi

@@ -4,4 +70,70 @@
   24     24   
   25     25   
class ResourceNotFoundException(Exception):
   26     26   
    message: str
   27     27   
   28     28   
    def __init__(self, message: str) -> None:
   29     29   
        ...
   30     30   
   31     31   
   32     32   
class StorageAccessNotAuthorized(Exception):
   33     33   
    """
   34         -
    Not authorized to access Pokémon storage.
          34  +
    /* StructureGenerator.kt:197 */Not authorized to access Pokémon storage.
   35     35   
    """
   36     36   
   37     37   
    def __init__(self) -> None:
   38     38   
        ...
   39     39   
   40     40   
   41     41   
class ThrottlingError(Exception):
   42     42   
    def __init__(self) -> None:
   43     43   
        ...
   44     44   
   45     45   
   46     46   
class UnsupportedRegionError(Exception):
   47     47   
    region: str
   48     48   
   49     49   
    def __init__(self, region: str) -> None:
   50     50   
        ...
   51     51   
   52     52   
   53     53   
class ValidationException(Exception):
   54     54   
    """
   55         -
    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.
          55  +
    /* 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.
   56     56   
    """
   57     57   
   58     58   
    field_list: typing.Optional[typing.List[pokemon_service_server_sdk.model.ValidationExceptionField]]
   59     59   
    """
   60         -
    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.
          60  +
    /* 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.
   61     61   
    """
   62     62   
   63     63   
    message: str
   64     64   
    """
   65         -
    A summary of the validation failure.
          65  +
    /* StructureGenerator.kt:231 */A summary of the validation failure.
   66     66   
    """
   67     67   
   68     68   
    def __init__(self, message: str, field_list: typing.Optional[typing.List[pokemon_service_server_sdk.model.ValidationExceptionField]] = ...) -> None:
   69     69   
        ...
   70     70   

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/python/pokemon_service_server_sdk/input/__init__.pyi

@@ -7,7 +51,51 @@
   27     27   
        ...
   28     28   
   29     29   
   30     30   
class GetServerStatisticsInput:
   31     31   
    def __init__(self) -> None:
   32     32   
        ...
   33     33   
   34     34   
   35     35   
class GetStorageInput:
   36     36   
    """
   37         -
    A request to access Pokémon storage.
          37  +
    /* StructureGenerator.kt:197 */A request to access Pokémon storage.
   38     38   
    """
   39     39   
   40     40   
    passcode: str
   41     41   
   42     42   
    user: str
   43     43   
   44     44   
    def __init__(self, user: str, passcode: str) -> None:
   45     45   
        ...
   46     46   
   47     47   

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/python/pokemon_service_server_sdk/model/__init__.pyi

@@ -53,53 +141,141 @@
   73     73   
   74     74   
    pokeball: typing.Optional[str]
   75     75   
   76     76   
    def __init__(self, name: typing.Optional[str] = ..., pokeball: typing.Optional[str] = ...) -> None:
   77     77   
        ...
   78     78   
   79     79   
   80     80   
class FlavorText:
   81     81   
    flavor_text: str
   82     82   
    """
   83         -
    The localized flavor text for an API resource in a specific language.
          83  +
    /* StructureGenerator.kt:231 */The localized flavor text for an API resource in a specific language.
   84     84   
    """
   85     85   
   86     86   
    language: pokemon_service_server_sdk.model.Language
   87     87   
    """
   88         -
    The language this name is in.
          88  +
    /* StructureGenerator.kt:231 */The language this name is in.
   89     89   
    """
   90     90   
   91     91   
    def __init__(self, flavor_text: str, language: pokemon_service_server_sdk.model.Language) -> None:
   92     92   
        ...
   93     93   
   94     94   
   95     95   
class Language:
   96     96   
    """
   97         -
    Supported languages for FlavorText entries.
          97  +
    /* EnumGenerator.kt:156 */Supported languages for FlavorText entries.
   98     98   
    """
   99     99   
  100    100   
    English: Language
  101    101   
    """
  102         -
    Supported languages for FlavorText entries.
         102  +
    /* EnumGenerator.kt:156 */Supported languages for FlavorText entries.
  103    103   
    """
  104    104   
  105    105   
    Italian: Language
  106    106   
    """
  107         -
    Supported languages for FlavorText entries.
         107  +
    /* EnumGenerator.kt:156 */Supported languages for FlavorText entries.
  108    108   
    """
  109    109   
  110    110   
    Japanese: Language
  111    111   
    """
  112         -
    Supported languages for FlavorText entries.
         112  +
    /* EnumGenerator.kt:156 */Supported languages for FlavorText entries.
  113    113   
    """
  114    114   
  115    115   
    Spanish: Language
  116    116   
    """
  117         -
    Supported languages for FlavorText entries.
         117  +
    /* EnumGenerator.kt:156 */Supported languages for FlavorText entries.
  118    118   
    """
  119    119   
  120    120   
    name: typing.Any
  121    121   
  122    122   
    value: typing.Any
  123    123   
  124    124   
class ValidationExceptionField:
  125    125   
    """
  126         -
    Describes one specific validation failure for an input member.
         126  +
    /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
  127    127   
    """
  128    128   
  129    129   
    message: str
  130    130   
    """
  131         -
    A detailed description of the validation failure.
         131  +
    /* StructureGenerator.kt:231 */A detailed description of the validation failure.
  132    132   
    """
  133    133   
  134    134   
    path: str
  135    135   
    """
  136         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         136  +
    /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  137    137   
    """
  138    138   
  139    139   
    def __init__(self, path: str, message: str) -> None:
  140    140   
        ...
  141    141   

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/python/pokemon_service_server_sdk/output/__init__.pyi

@@ -1,1 +66,66 @@
   15     15   
   16     16   
   17     17   
class DoNothingOutput:
   18     18   
    def __init__(self) -> None:
   19     19   
        ...
   20     20   
   21     21   
   22     22   
class GetPokemonSpeciesOutput:
   23     23   
    flavor_text_entries: typing.List[pokemon_service_server_sdk.model.FlavorText]
   24     24   
    """
   25         -
    A list of flavor text entries for this Pokémon species.
          25  +
    /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
   26     26   
    """
   27     27   
   28     28   
    name: str
   29     29   
    """
   30         -
    The name for this resource.
          30  +
    /* StructureGenerator.kt:231 */The name for this resource.
   31     31   
    """
   32     32   
   33     33   
    def __init__(self, name: str, flavor_text_entries: typing.List[pokemon_service_server_sdk.model.FlavorText]) -> None:
   34     34   
        ...
   35     35   
   36     36   
   37     37   
class GetServerStatisticsOutput:
   38     38   
    calls_count: int
   39     39   
    """
   40         -
    The number of calls executed by the server.
          40  +
    /* StructureGenerator.kt:231 */The number of calls executed by the server.
   41     41   
    """
   42     42   
   43     43   
    def __init__(self, calls_count: int) -> None:
   44     44   
        ...
   45     45   
   46     46   
   47     47   
class GetStorageOutput:
   48     48   
    """
   49         -
    Contents of the Pokémon storage.
          49  +
    /* StructureGenerator.kt:197 */Contents of the Pokémon storage.
   50     50   
    """
   51     51   
   52     52   
    collection: typing.List[str]
   53     53   
    """
   54         -
    A list of Pokémon species.
          54  +
    /* StructureGenerator.kt:231 */A list of Pokémon species.
   55     55   
    """
   56     56   
   57     57   
    def __init__(self, collection: typing.List[str]) -> None:
   58     58   
        ...
   59     59   
   60     60   
   61     61   
class StreamPokemonRadioOutput:
   62     62   
    data: pokemon_service_server_sdk.types.ByteStream
   63     63   
   64     64   
    def __init__(self, data: pokemon_service_server_sdk.types.ByteStream) -> None:

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/src/error.rs

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