Server Test

Server Test

rev. d06a46cae0f385cdae37a9f8264db3469a090ab5

Files changed:

tmp-codegen-diff/codegen-server-test/pokemon-service-server-sdk-http0x/rust-server-codegen/src/types.rs

@@ -0,1 +0,15 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
           3  +
pub use ::aws_smithy_types::body::SdkBody;
           4  +
pub use ::aws_smithy_types::byte_stream::error::Error as ByteStreamError;
           5  +
pub use ::aws_smithy_types::byte_stream::AggregatedBytes;
           6  +
/* SmithyTypesPubUseExtra.kt:86 */ pub use ::aws_smithy_types::byte_stream::ByteStream;
           7  +
#[cfg(feature = "rt-tokio")]
           8  +
pub use ::aws_smithy_types::byte_stream::FsBuilder;
           9  +
#[cfg(feature = "rt-tokio")]
          10  +
pub use ::aws_smithy_types::byte_stream::Length;
          11  +
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
          12  +
/* ServerRequiredCustomizations.kt:76 */
          13  +
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
          14  +
pub use ::aws_smithy_types::Blob;
          15  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;

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

@@ -1,1 +51,59 @@
   13     13   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-eventstream"
   14     14   
[dependencies.aws-smithy-http]
   15     15   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http"
   16     16   
features = ["event-stream"]
   17     17   
[dependencies.aws-smithy-http-server]
   18     18   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-http-server"
   19     19   
[dependencies.aws-smithy-json]
   20     20   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-json"
   21     21   
[dependencies.aws-smithy-runtime-api]
   22     22   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-runtime-api"
          23  +
features = ["http-1x"]
   23     24   
[dependencies.aws-smithy-types]
   24     25   
path = "/home/build/workspace/smithy-rs/rust-runtime/aws-smithy-types"
          26  +
features = ["http-body-1-x"]
          27  +
[dependencies.bytes]
          28  +
version = "1.4.0"
   25     29   
[dependencies.futures-util]
   26     30   
version = "0.3"
   27         -
[dependencies.http]
   28         -
version = "0.2.9"
          31  +
[dependencies.http-1x]
          32  +
version = "1"
          33  +
package = "http"
          34  +
[dependencies.http-body-1x]
          35  +
version = "1"
          36  +
package = "http-body"
   29     37   
[dependencies.mime]
   30     38   
version = "0.3"
   31     39   
[dependencies.nom]
   32     40   
version = "7"
   33     41   
[dependencies.percent-encoding]
   34     42   
version = "2.0.0"
   35     43   
[dependencies.pin-project-lite]
   36     44   
version = "0.2"
   37     45   
[dependencies.tower]
   38     46   
version = "0.4"
   39     47   
[dependencies.tracing]
   40     48   
version = "0.1"
   41     49   
[dev-dependencies.hyper]
   42         -
version = "0.14.12"
          50  +
version = "1"
   43     51   
[dev-dependencies.tokio]
   44     52   
version = "1.23.1"
   45     53   
[features]
   46     54   
aws-lambda = ["aws-smithy-http-server/aws-lambda"]
   47     55   
request-id = ["aws-smithy-http-server/request-id"]
   48         -
rt-tokio = ["aws-smithy-types/rt-tokio"]
          56  +
rt-tokio = ["aws-smithy-types/http-body-1-x", "aws-smithy-types/rt-tokio"]
   49     57   
default = ["request-id", "rt-tokio"]
   50     58   
   51     59   

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

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