Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

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

@@ -1,1 +123,144 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[derive(
    4      4   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      5   
)]
    6         -
pub struct CheckHealthInput {}
    7         -
impl CheckHealthInput {
    8         -
    /// Creates a new builder-style object to manufacture [`CheckHealthInput`](crate::input::CheckHealthInput).
    9         -
    pub fn builder() -> crate::input::check_health_input::Builder {
   10         -
        crate::input::check_health_input::Builder::default()
           6  +
pub struct GetServerStatisticsInput {}
           7  +
impl GetServerStatisticsInput {
           8  +
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
           9  +
    pub fn builder() -> crate::input::get_server_statistics_input::Builder {
          10  +
        crate::input::get_server_statistics_input::Builder::default()
   11     11   
    }
   12     12   
}
   13         -
impl crate::constrained::Constrained for crate::input::CheckHealthInput {
   14         -
    type Unconstrained = crate::input::check_health_input::Builder;
          13  +
impl crate::constrained::Constrained for crate::input::GetServerStatisticsInput {
          14  +
    type Unconstrained = crate::input::get_server_statistics_input::Builder;
          15  +
}
          16  +
          17  +
#[allow(missing_docs)] // documentation missing in model
          18  +
#[derive(
          19  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          20  +
)]
          21  +
pub struct DoNothingInput {}
          22  +
impl DoNothingInput {
          23  +
    /// Creates a new builder-style object to manufacture [`DoNothingInput`](crate::input::DoNothingInput).
          24  +
    pub fn builder() -> crate::input::do_nothing_input::Builder {
          25  +
        crate::input::do_nothing_input::Builder::default()
          26  +
    }
          27  +
}
          28  +
impl crate::constrained::Constrained for crate::input::DoNothingInput {
          29  +
    type Unconstrained = crate::input::do_nothing_input::Builder;
   15     30   
}
   16     31   
   17     32   
#[allow(missing_docs)] // documentation missing in model
   18     33   
#[derive(::std::fmt::Debug)]
   19     34   
pub struct CapturePokemonInput {
   20     35   
    #[allow(missing_docs)] // documentation missing in model
   21     36   
    pub events: ::aws_smithy_http::event_stream::Receiver<
   22     37   
        crate::model::AttemptCapturingPokemonEvent,
   23     38   
        crate::error::AttemptCapturingPokemonEventError,
   24     39   
    >,
   25     40   
}
   26     41   
impl CapturePokemonInput {
   27     42   
    #[allow(missing_docs)] // documentation missing in model
   28     43   
    pub fn events(
   29     44   
        &self,
   30     45   
    ) -> &::aws_smithy_http::event_stream::Receiver<
   31     46   
        crate::model::AttemptCapturingPokemonEvent,
   32     47   
        crate::error::AttemptCapturingPokemonEventError,
   33     48   
    > {
   34     49   
        &self.events
   35     50   
    }
   36     51   
}
   37     52   
impl CapturePokemonInput {
   38     53   
    /// Creates a new builder-style object to manufacture [`CapturePokemonInput`](crate::input::CapturePokemonInput).
   39     54   
    pub fn builder() -> crate::input::capture_pokemon_input::Builder {
   40     55   
        crate::input::capture_pokemon_input::Builder::default()
   41     56   
    }
   42     57   
}
   43     58   
impl crate::constrained::Constrained for crate::input::CapturePokemonInput {
   44     59   
    type Unconstrained = crate::input::capture_pokemon_input::Builder;
   45     60   
}
   46     61   
   47     62   
#[allow(missing_docs)] // documentation missing in model
   48     63   
#[derive(
   49     64   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50     65   
)]
   51         -
pub struct DoNothingInput {}
   52         -
impl DoNothingInput {
   53         -
    /// Creates a new builder-style object to manufacture [`DoNothingInput`](crate::input::DoNothingInput).
   54         -
    pub fn builder() -> crate::input::do_nothing_input::Builder {
   55         -
        crate::input::do_nothing_input::Builder::default()
          66  +
pub struct CheckHealthInput {}
          67  +
impl CheckHealthInput {
          68  +
    /// Creates a new builder-style object to manufacture [`CheckHealthInput`](crate::input::CheckHealthInput).
          69  +
    pub fn builder() -> crate::input::check_health_input::Builder {
          70  +
        crate::input::check_health_input::Builder::default()
   56     71   
    }
   57     72   
}
   58         -
impl crate::constrained::Constrained for crate::input::DoNothingInput {
   59         -
    type Unconstrained = crate::input::do_nothing_input::Builder;
          73  +
impl crate::constrained::Constrained for crate::input::CheckHealthInput {
          74  +
    type Unconstrained = crate::input::check_health_input::Builder;
   60     75   
}
          76  +
/// See [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
          77  +
pub mod get_server_statistics_input {
   61     78   
   62         -
#[allow(missing_docs)] // documentation missing in model
   63         -
#[derive(
   64         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   65         -
)]
   66         -
pub struct GetServerStatisticsInput {}
   67         -
impl GetServerStatisticsInput {
   68         -
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
   69         -
    pub fn builder() -> crate::input::get_server_statistics_input::Builder {
   70         -
        crate::input::get_server_statistics_input::Builder::default()
          79  +
    impl ::std::convert::From<Builder> for crate::input::GetServerStatisticsInput {
          80  +
        fn from(builder: Builder) -> Self {
          81  +
            builder.build()
          82  +
        }
          83  +
    }
          84  +
    /// A builder for [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
          85  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
          86  +
    pub struct Builder {}
          87  +
    impl Builder {
          88  +
        /// Consumes the builder and constructs a [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
          89  +
        pub fn build(self) -> crate::input::GetServerStatisticsInput {
          90  +
            self.build_enforcing_all_constraints()
          91  +
        }
          92  +
        fn build_enforcing_all_constraints(self) -> crate::input::GetServerStatisticsInput {
          93  +
            crate::input::GetServerStatisticsInput {}
          94  +
        }
   71     95   
    }
   72     96   
}
   73         -
impl crate::constrained::Constrained for crate::input::GetServerStatisticsInput {
   74         -
    type Unconstrained = crate::input::get_server_statistics_input::Builder;
   75         -
}
   76         -
/// See [`CheckHealthInput`](crate::input::CheckHealthInput).
   77         -
pub mod check_health_input {
          97  +
/// See [`DoNothingInput`](crate::input::DoNothingInput).
          98  +
pub mod do_nothing_input {
   78     99   
   79         -
    impl ::std::convert::From<Builder> for crate::input::CheckHealthInput {
         100  +
    impl ::std::convert::From<Builder> for crate::input::DoNothingInput {
   80    101   
        fn from(builder: Builder) -> Self {
   81    102   
            builder.build()
   82    103   
        }
   83    104   
    }
   84         -
    /// A builder for [`CheckHealthInput`](crate::input::CheckHealthInput).
         105  +
    /// A builder for [`DoNothingInput`](crate::input::DoNothingInput).
   85    106   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
   86    107   
    pub struct Builder {}
   87    108   
    impl Builder {
   88         -
        /// Consumes the builder and constructs a [`CheckHealthInput`](crate::input::CheckHealthInput).
   89         -
        pub fn build(self) -> crate::input::CheckHealthInput {
         109  +
        /// Consumes the builder and constructs a [`DoNothingInput`](crate::input::DoNothingInput).
         110  +
        pub fn build(self) -> crate::input::DoNothingInput {
   90    111   
            self.build_enforcing_all_constraints()
   91    112   
        }
   92         -
        fn build_enforcing_all_constraints(self) -> crate::input::CheckHealthInput {
   93         -
            crate::input::CheckHealthInput {}
         113  +
        fn build_enforcing_all_constraints(self) -> crate::input::DoNothingInput {
         114  +
            crate::input::DoNothingInput {}
   94    115   
        }
   95    116   
    }
   96    117   
}
   97    118   
/// See [`CapturePokemonInput`](crate::input::CapturePokemonInput).
   98    119   
pub mod capture_pokemon_input {
   99    120   
  100    121   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  101    122   
    /// Holds one variant for each of the ways the builder can fail.
  102    123   
    #[non_exhaustive]
  103    124   
    #[allow(clippy::enum_variant_names)]
@@ -183,204 +254,254 @@
  203    224   
        }
  204    225   
        fn build_enforcing_all_constraints(
  205    226   
            self,
  206    227   
        ) -> Result<crate::input::CapturePokemonInput, ConstraintViolation> {
  207    228   
            Ok(crate::input::CapturePokemonInput {
  208    229   
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
  209    230   
            })
  210    231   
        }
  211    232   
    }
  212    233   
}
  213         -
/// See [`DoNothingInput`](crate::input::DoNothingInput).
  214         -
pub mod do_nothing_input {
  215         -
  216         -
    impl ::std::convert::From<Builder> for crate::input::DoNothingInput {
  217         -
        fn from(builder: Builder) -> Self {
  218         -
            builder.build()
  219         -
        }
  220         -
    }
  221         -
    /// A builder for [`DoNothingInput`](crate::input::DoNothingInput).
  222         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  223         -
    pub struct Builder {}
  224         -
    impl Builder {
  225         -
        /// Consumes the builder and constructs a [`DoNothingInput`](crate::input::DoNothingInput).
  226         -
        pub fn build(self) -> crate::input::DoNothingInput {
  227         -
            self.build_enforcing_all_constraints()
  228         -
        }
  229         -
        fn build_enforcing_all_constraints(self) -> crate::input::DoNothingInput {
  230         -
            crate::input::DoNothingInput {}
  231         -
        }
  232         -
    }
  233         -
}
  234         -
/// See [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
  235         -
pub mod get_server_statistics_input {
         234  +
/// See [`CheckHealthInput`](crate::input::CheckHealthInput).
         235  +
pub mod check_health_input {
  236    236   
  237         -
    impl ::std::convert::From<Builder> for crate::input::GetServerStatisticsInput {
         237  +
    impl ::std::convert::From<Builder> for crate::input::CheckHealthInput {
  238    238   
        fn from(builder: Builder) -> Self {
  239    239   
            builder.build()
  240    240   
        }
  241    241   
    }
  242         -
    /// A builder for [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
         242  +
    /// A builder for [`CheckHealthInput`](crate::input::CheckHealthInput).
  243    243   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  244    244   
    pub struct Builder {}
  245    245   
    impl Builder {
  246         -
        /// Consumes the builder and constructs a [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput).
  247         -
        pub fn build(self) -> crate::input::GetServerStatisticsInput {
         246  +
        /// Consumes the builder and constructs a [`CheckHealthInput`](crate::input::CheckHealthInput).
         247  +
        pub fn build(self) -> crate::input::CheckHealthInput {
  248    248   
            self.build_enforcing_all_constraints()
  249    249   
        }
  250         -
        fn build_enforcing_all_constraints(self) -> crate::input::GetServerStatisticsInput {
  251         -
            crate::input::GetServerStatisticsInput {}
         250  +
        fn build_enforcing_all_constraints(self) -> crate::input::CheckHealthInput {
         251  +
            crate::input::CheckHealthInput {}
  252    252   
        }
  253    253   
    }
  254    254   
}

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

@@ -1,1 +355,354 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Describes one specific validation failure for an input member.
    4         -
#[derive(
    5         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6         -
)]
    7         -
pub struct ValidationExceptionField {
    8         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    9         -
    pub path: ::std::string::String,
   10         -
    /// A detailed description of the validation failure.
   11         -
    pub message: ::std::string::String,
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           4  +
pub enum AttemptCapturingPokemonEvent {
           5  +
    #[allow(missing_docs)] // documentation missing in model
           6  +
    Event(crate::model::CapturingEvent),
   12      7   
}
   13         -
impl ValidationExceptionField {
   14         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   15         -
    pub fn path(&self) -> &str {
   16         -
        use std::ops::Deref;
   17         -
        self.path.deref()
   18         -
    }
   19         -
    /// A detailed description of the validation failure.
   20         -
    pub fn message(&self) -> &str {
   21         -
        use std::ops::Deref;
   22         -
        self.message.deref()
           8  +
impl AttemptCapturingPokemonEvent {
           9  +
    #[allow(irrefutable_let_patterns)]
          10  +
    /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
          11  +
    /// Returns `Err(&Self)` if it can't be converted.
          12  +
    pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
          13  +
        if let AttemptCapturingPokemonEvent::Event(val) = &self {
          14  +
            ::std::result::Result::Ok(val)
          15  +
        } else {
          16  +
            ::std::result::Result::Err(self)
          17  +
        }
   23     18   
    }
   24         -
}
   25         -
impl ValidationExceptionField {
   26         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
   27         -
    pub fn builder() -> crate::model::validation_exception_field::Builder {
   28         -
        crate::model::validation_exception_field::Builder::default()
          19  +
    /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
          20  +
    pub fn is_event(&self) -> bool {
          21  +
        self.as_event().is_ok()
   29     22   
    }
   30     23   
}
   31     24   
   32     25   
#[allow(missing_docs)] // documentation missing in model
   33     26   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   34     27   
pub enum CapturePokemonEvents {
   35     28   
    #[allow(missing_docs)] // documentation missing in model
   36     29   
    Event(crate::model::CaptureEvent),
   37     30   
}
   38     31   
impl CapturePokemonEvents {
   39     32   
    #[allow(irrefutable_let_patterns)]
   40     33   
    /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
   41     34   
    /// Returns `Err(&Self)` if it can't be converted.
   42     35   
    pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
   43     36   
        if let CapturePokemonEvents::Event(val) = &self {
   44     37   
            ::std::result::Result::Ok(val)
   45     38   
        } else {
   46     39   
            ::std::result::Result::Err(self)
   47     40   
        }
   48     41   
    }
   49     42   
    /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
   50     43   
    pub fn is_event(&self) -> bool {
   51     44   
        self.as_event().is_ok()
   52     45   
    }
   53     46   
}
   54     47   
          48  +
#[allow(missing_docs)] // documentation missing in model
          49  +
#[derive(
          50  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          51  +
)]
          52  +
pub struct CapturingEvent {
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub payload: ::std::option::Option<crate::model::CapturingPayload>,
          55  +
}
          56  +
impl CapturingEvent {
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
          59  +
        self.payload.as_ref()
          60  +
    }
          61  +
}
          62  +
impl CapturingEvent {
          63  +
    /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
          64  +
    pub fn builder() -> crate::model::capturing_event::Builder {
          65  +
        crate::model::capturing_event::Builder::default()
          66  +
    }
          67  +
}
          68  +
impl crate::constrained::Constrained for crate::model::CapturingEvent {
          69  +
    type Unconstrained = crate::model::capturing_event::Builder;
          70  +
}
          71  +
   55     72   
#[allow(missing_docs)] // documentation missing in model
   56     73   
#[derive(
   57     74   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   58     75   
)]
   59     76   
pub struct CaptureEvent {
   60     77   
    #[allow(missing_docs)] // documentation missing in model
   61     78   
    pub name: ::std::option::Option<::std::string::String>,
   62     79   
    #[allow(missing_docs)] // documentation missing in model
   63     80   
    pub captured: ::std::option::Option<bool>,
   64     81   
    #[allow(missing_docs)] // documentation missing in model
   65     82   
    pub shiny: ::std::option::Option<bool>,
   66     83   
    #[allow(missing_docs)] // documentation missing in model
   67     84   
    pub pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
   68     85   
}
   69     86   
impl CaptureEvent {
   70     87   
    #[allow(missing_docs)] // documentation missing in model
   71     88   
    pub fn name(&self) -> ::std::option::Option<&str> {
   72     89   
        self.name.as_deref()
   73     90   
    }
   74     91   
    #[allow(missing_docs)] // documentation missing in model
   75     92   
    pub fn captured(&self) -> ::std::option::Option<bool> {
   76     93   
        self.captured
   77     94   
    }
   78     95   
    #[allow(missing_docs)] // documentation missing in model
   79     96   
    pub fn shiny(&self) -> ::std::option::Option<bool> {
   80     97   
        self.shiny
   81     98   
    }
   82     99   
    #[allow(missing_docs)] // documentation missing in model
   83    100   
    pub fn pokedex_update(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
   84    101   
        self.pokedex_update.as_ref()
   85    102   
    }
   86    103   
}
   87    104   
impl CaptureEvent {
   88    105   
    /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
   89    106   
    pub fn builder() -> crate::model::capture_event::Builder {
   90    107   
        crate::model::capture_event::Builder::default()
   91    108   
    }
   92    109   
}
   93    110   
   94         -
#[allow(missing_docs)] // documentation missing in model
   95         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   96         -
pub enum AttemptCapturingPokemonEvent {
   97         -
    #[allow(missing_docs)] // documentation missing in model
   98         -
    Event(crate::model::CapturingEvent),
   99         -
}
  100         -
impl AttemptCapturingPokemonEvent {
  101         -
    #[allow(irrefutable_let_patterns)]
  102         -
    /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
  103         -
    /// Returns `Err(&Self)` if it can't be converted.
  104         -
    pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
  105         -
        if let AttemptCapturingPokemonEvent::Event(val) = &self {
  106         -
            ::std::result::Result::Ok(val)
  107         -
        } else {
  108         -
            ::std::result::Result::Err(self)
  109         -
        }
  110         -
    }
  111         -
    /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
  112         -
    pub fn is_event(&self) -> bool {
  113         -
        self.as_event().is_ok()
  114         -
    }
  115         -
}
  116         -
  117         -
#[allow(missing_docs)] // documentation missing in model
         111  +
/// Describes one specific validation failure for an input member.
  118    112   
#[derive(
  119    113   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  120    114   
)]
  121         -
pub struct CapturingEvent {
  122         -
    #[allow(missing_docs)] // documentation missing in model
  123         -
    pub payload: ::std::option::Option<crate::model::CapturingPayload>,
         115  +
pub struct ValidationExceptionField {
         116  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         117  +
    pub path: ::std::string::String,
         118  +
    /// A detailed description of the validation failure.
         119  +
    pub message: ::std::string::String,
  124    120   
}
  125         -
impl CapturingEvent {
  126         -
    #[allow(missing_docs)] // documentation missing in model
  127         -
    pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
  128         -
        self.payload.as_ref()
         121  +
impl ValidationExceptionField {
         122  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         123  +
    pub fn path(&self) -> &str {
         124  +
        use std::ops::Deref;
         125  +
        self.path.deref()
  129    126   
    }
  130         -
}
  131         -
impl CapturingEvent {
  132         -
    /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
  133         -
    pub fn builder() -> crate::model::capturing_event::Builder {
  134         -
        crate::model::capturing_event::Builder::default()
         127  +
    /// A detailed description of the validation failure.
         128  +
    pub fn message(&self) -> &str {
         129  +
        use std::ops::Deref;
         130  +
        self.message.deref()
  135    131   
    }
  136    132   
}
  137         -
impl crate::constrained::Constrained for crate::model::CapturingEvent {
  138         -
    type Unconstrained = crate::model::capturing_event::Builder;
         133  +
impl ValidationExceptionField {
         134  +
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         135  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
         136  +
        crate::model::validation_exception_field::Builder::default()
         137  +
    }
  139    138   
}
  140    139   
  141    140   
#[allow(missing_docs)] // documentation missing in model
  142    141   
#[derive(
  143    142   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  144    143   
)]
  145    144   
pub struct CapturingPayload {
  146    145   
    #[allow(missing_docs)] // documentation missing in model
  147    146   
    pub name: ::std::option::Option<::std::string::String>,
  148    147   
    #[allow(missing_docs)] // documentation missing in model
  149    148   
    pub pokeball: ::std::option::Option<::std::string::String>,
  150    149   
}
  151    150   
impl CapturingPayload {
  152    151   
    #[allow(missing_docs)] // documentation missing in model
  153    152   
    pub fn name(&self) -> ::std::option::Option<&str> {
  154    153   
        self.name.as_deref()
  155    154   
    }
  156    155   
    #[allow(missing_docs)] // documentation missing in model
  157    156   
    pub fn pokeball(&self) -> ::std::option::Option<&str> {
  158    157   
        self.pokeball.as_deref()
  159    158   
    }
  160    159   
}
  161    160   
impl CapturingPayload {
  162    161   
    /// Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
  163    162   
    pub fn builder() -> crate::model::capturing_payload::Builder {
  164    163   
        crate::model::capturing_payload::Builder::default()
  165    164   
    }
  166    165   
}
  167    166   
impl crate::constrained::Constrained for crate::model::CapturingPayload {
  168    167   
    type Unconstrained = crate::model::capturing_payload::Builder;
  169    168   
}
  170         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  171         -
pub mod validation_exception_field {
  172         -
  173         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  174         -
    /// Holds one variant for each of the ways the builder can fail.
  175         -
    #[non_exhaustive]
  176         -
    #[allow(clippy::enum_variant_names)]
  177         -
    pub enum ConstraintViolation {
  178         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
  179         -
        MissingPath,
  180         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
  181         -
        MissingMessage,
  182         -
    }
  183         -
    impl ::std::fmt::Display for ConstraintViolation {
  184         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  185         -
            match self {
  186         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
  187         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
  188         -
            }
  189         -
        }
  190         -
    }
  191         -
    impl ::std::error::Error for ConstraintViolation {}
  192         -
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
  193         -
        type Error = ConstraintViolation;
         169  +
/// See [`CapturingEvent`](crate::model::CapturingEvent).
         170  +
pub mod capturing_event {
  194    171   
  195         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         172  +
    impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
         173  +
        fn from(builder: Builder) -> Self {
  196    174   
            builder.build()
  197    175   
        }
  198    176   
    }
  199         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         177  +
    /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
  200    178   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  201    179   
    pub struct Builder {
  202         -
        pub(crate) path: ::std::option::Option<::std::string::String>,
  203         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
         180  +
        pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
  204    181   
    }
  205    182   
    impl Builder {
  206         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  207         -
        pub fn path(mut self, input: ::std::string::String) -> Self {
  208         -
            self.path = Some(input);
         183  +
        #[allow(missing_docs)] // documentation missing in model
         184  +
        pub fn payload(
         185  +
            mut self,
         186  +
            input: ::std::option::Option<crate::model::CapturingPayload>,
         187  +
        ) -> Self {
         188  +
            self.payload = input;
  209    189   
            self
  210    190   
        }
  211         -
        /// A detailed description of the validation failure.
  212         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
  213         -
            self.message = Some(input);
         191  +
        #[allow(missing_docs)] // documentation missing in model
         192  +
        pub(crate) fn set_payload(
         193  +
            mut self,
         194  +
            input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
         195  +
        ) -> Self {
         196  +
            self.payload = input.map(|v| v.into());
  214    197   
            self
  215    198   
        }
  216         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  217         -
        ///
  218         -
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
  219         -
        ///
  220         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  221         -
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
         199  +
        /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
         200  +
        pub fn build(self) -> crate::model::CapturingEvent {
  222    201   
            self.build_enforcing_all_constraints()
  223    202   
        }
  224         -
        fn build_enforcing_all_constraints(
  225         -
            self,
  226         -
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  227         -
            Ok(crate::model::ValidationExceptionField {
  228         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  229         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  230         -
            })
         203  +
        fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
         204  +
            crate::model::CapturingEvent {
         205  +
                payload: self.payload,
         206  +
            }
  231    207   
        }
  232    208   
    }
  233    209   
}
  234    210   
/// See [`CaptureEvent`](crate::model::CaptureEvent).
  235    211   
pub mod capture_event {
  236    212   
  237    213   
    impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
  238    214   
        fn from(builder: Builder) -> Self {
  239    215   
            builder.build()
  240    216   
        }
  241    217   
    }
  242    218   
    /// A builder for [`CaptureEvent`](crate::model::CaptureEvent).
  243    219   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  244    220   
    pub struct Builder {
  245    221   
        pub(crate) name: ::std::option::Option<::std::string::String>,
  246    222   
        pub(crate) captured: ::std::option::Option<bool>,
  247    223   
        pub(crate) shiny: ::std::option::Option<bool>,
  248    224   
        pub(crate) pokedex_update: ::std::option::Option<::aws_smithy_types::Blob>,
  249    225   
    }
  250    226   
    impl Builder {
  251    227   
        #[allow(missing_docs)] // documentation missing in model
  252    228   
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  253    229   
            self.name = input;
  254    230   
            self
  255    231   
        }
  256    232   
        #[allow(missing_docs)] // documentation missing in model
  257    233   
        pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
  258    234   
            self.captured = input;
  259    235   
            self
  260    236   
        }
  261    237   
        #[allow(missing_docs)] // documentation missing in model
  262    238   
        pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
  263    239   
            self.shiny = input;
  264    240   
            self
  265    241   
        }
  266    242   
        #[allow(missing_docs)] // documentation missing in model
  267    243   
        pub fn pokedex_update(
  268    244   
            mut self,
  269    245   
            input: ::std::option::Option<::aws_smithy_types::Blob>,
  270    246   
        ) -> Self {
  271    247   
            self.pokedex_update = input;
  272    248   
            self
  273    249   
        }
  274    250   
        /// Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
  275    251   
        pub fn build(self) -> crate::model::CaptureEvent {
  276    252   
            self.build_enforcing_all_constraints()
  277    253   
        }
  278    254   
        fn build_enforcing_all_constraints(self) -> crate::model::CaptureEvent {
  279    255   
            crate::model::CaptureEvent {
  280    256   
                name: self.name,
  281    257   
                captured: self.captured,
  282    258   
                shiny: self.shiny,
  283    259   
                pokedex_update: self.pokedex_update,
  284    260   
            }
  285    261   
        }
  286    262   
    }
  287    263   
}
  288         -
/// See [`CapturingEvent`](crate::model::CapturingEvent).
  289         -
pub mod capturing_event {
         264  +
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         265  +
pub mod validation_exception_field {
  290    266   
  291         -
    impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
  292         -
        fn from(builder: Builder) -> Self {
         267  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         268  +
    /// Holds one variant for each of the ways the builder can fail.
         269  +
    #[non_exhaustive]
         270  +
    #[allow(clippy::enum_variant_names)]
         271  +
    pub enum ConstraintViolation {
         272  +
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
         273  +
        MissingPath,
         274  +
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
         275  +
        MissingMessage,
         276  +
    }
         277  +
    impl ::std::fmt::Display for ConstraintViolation {
         278  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         279  +
            match self {
         280  +
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
         281  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
         282  +
            }
         283  +
        }
         284  +
    }
         285  +
    impl ::std::error::Error for ConstraintViolation {}
         286  +
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
         287  +
        type Error = ConstraintViolation;
         288  +
         289  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  293    290   
            builder.build()
  294    291   
        }
  295    292   
    }
  296         -
    /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
         293  +
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  297    294   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  298    295   
    pub struct Builder {
  299         -
        pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
         296  +
        pub(crate) path: ::std::option::Option<::std::string::String>,
         297  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
  300    298   
    }
  301    299   
    impl Builder {
  302         -
        #[allow(missing_docs)] // documentation missing in model
  303         -
        pub fn payload(
  304         -
            mut self,
  305         -
            input: ::std::option::Option<crate::model::CapturingPayload>,
  306         -
        ) -> Self {
  307         -
            self.payload = input;
         300  +
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         301  +
        pub fn path(mut self, input: ::std::string::String) -> Self {
         302  +
            self.path = Some(input);
  308    303   
            self
  309    304   
        }
  310         -
        #[allow(missing_docs)] // documentation missing in model
  311         -
        pub(crate) fn set_payload(
  312         -
            mut self,
  313         -
            input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
  314         -
        ) -> Self {
  315         -
            self.payload = input.map(|v| v.into());
         305  +
        /// A detailed description of the validation failure.
         306  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         307  +
            self.message = Some(input);
  316    308   
            self
  317    309   
        }
  318         -
        /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
  319         -
        pub fn build(self) -> crate::model::CapturingEvent {
         310  +
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         311  +
        ///
         312  +
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
         313  +
        ///
         314  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         315  +
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  320    316   
            self.build_enforcing_all_constraints()
  321    317   
        }
  322         -
        fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
  323         -
            crate::model::CapturingEvent {
  324         -
                payload: self.payload,
  325         -
            }
         318  +
        fn build_enforcing_all_constraints(
         319  +
            self,
         320  +
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
         321  +
            Ok(crate::model::ValidationExceptionField {
         322  +
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
         323  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         324  +
            })
  326    325   
        }
  327    326   
    }
  328    327   
}
  329    328   
/// See [`CapturingPayload`](crate::model::CapturingPayload).
  330    329   
pub mod capturing_payload {
  331    330   
  332    331   
    impl ::std::convert::From<Builder> for crate::model::CapturingPayload {
  333    332   
        fn from(builder: Builder) -> Self {
  334    333   
            builder.build()
  335    334   
        }

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

@@ -1,1 +361,361 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4         -
    /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
    5         -
    pub struct CheckHealthInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
           4  +
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
           5  +
    pub struct GetServerStatisticsInputFuture {
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10         -
impl std::future::Future for CheckHealthInputFuture {
          10  +
impl std::future::Future for GetServerStatisticsInputFuture {
   11     11   
    type Output = Result<
   12         -
        crate::input::CheckHealthInput,
          12  +
        crate::input::GetServerStatisticsInput,
   13     13   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26     26   
    ::aws_smithy_http_server::request::FromRequest<
   27     27   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
   28     28   
        B,
   29         -
    > for crate::input::CheckHealthInput
          29  +
    > for crate::input::GetServerStatisticsInput
   30     30   
where
   31     31   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35     35   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   36     36   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38     38   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
   39         -
    type Future = CheckHealthInputFuture;
          39  +
    type Future = GetServerStatisticsInputFuture;
   40     40   
   41     41   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
   42     42   
        let fut = async move {
   43     43   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   44     44   
                request.headers(),
   45     45   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
   46     46   
            ) {
   47     47   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
   48     48   
            }
   49         -
            crate::protocol_serde::shape_check_health::de_check_health_http_request(request).await
          49  +
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
          50  +
                            .await
   50     51   
        };
   51     52   
        use ::futures_util::future::TryFutureExt;
   52     53   
        let fut = fut.map_err(
   53     54   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
   54     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   55     56   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
   56     57   
            },
   57     58   
        );
   58         -
        CheckHealthInputFuture {
          59  +
        GetServerStatisticsInputFuture {
   59     60   
            inner: Box::pin(fut),
   60     61   
        }
   61     62   
    }
   62     63   
}
   63     64   
impl
   64     65   
    ::aws_smithy_http_server::response::IntoResponse<
   65     66   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
   66         -
    > for crate::output::CheckHealthOutput
          67  +
    > for crate::output::GetServerStatisticsOutput
   67     68   
{
   68     69   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   69         -
        match crate::protocol_serde::shape_check_health::ser_check_health_http_response(self) {
   70         -
            Ok(response) => response,
   71         -
            Err(e) => {
   72         -
                ::tracing::error!(error = %e, "failed to serialize response");
   73         -
                ::aws_smithy_http_server::response::IntoResponse::<
   74         -
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
   75         -
                >::into_response(
   76         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
   77         -
                        e,
   78         -
                    ),
   79         -
                )
   80         -
            }
   81         -
        }
          70  +
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
          71  +
                        Ok(response) => response,
          72  +
                        Err(e) => {
          73  +
                            ::tracing::error!(error = %e, "failed to serialize response");
          74  +
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
          75  +
                        }
          76  +
                    }
   82     77   
    }
   83     78   
}
   84     79   
   85     80   
::pin_project_lite::pin_project! {
   86     81   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
   87         -
    /// [`CapturePokemonInput`](crate::input::CapturePokemonInput) using modelled bindings.
   88         -
    pub struct CapturePokemonInputFuture {
   89         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
          82  +
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
          83  +
    pub struct DoNothingInputFuture {
          84  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
   90     85   
    }
   91     86   
}
   92     87   
   93         -
impl std::future::Future for CapturePokemonInputFuture {
          88  +
impl std::future::Future for DoNothingInputFuture {
   94     89   
    type Output = Result<
   95         -
        crate::input::CapturePokemonInput,
          90  +
        crate::input::DoNothingInput,
   96     91   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
   97     92   
    >;
   98     93   
   99     94   
    fn poll(
  100     95   
        self: std::pin::Pin<&mut Self>,
  101     96   
        cx: &mut std::task::Context<'_>,
  102     97   
    ) -> std::task::Poll<Self::Output> {
  103     98   
        let this = self.project();
  104     99   
        this.inner.as_mut().poll(cx)
  105    100   
    }
  106    101   
}
  107    102   
  108    103   
impl<B>
  109    104   
    ::aws_smithy_http_server::request::FromRequest<
  110    105   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  111    106   
        B,
  112         -
    > for crate::input::CapturePokemonInput
         107  +
    > for crate::input::DoNothingInput
  113    108   
where
  114    109   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  115    110   
    B: 'static,
  116    111   
  117         -
    B: ::http_body_1x::Body<Data = ::bytes::Bytes>
  118         -
        + ::std::marker::Send
  119         -
        + ::std::marker::Sync
  120         -
        + 'static,
  121         -
    B::Error: Into<::aws_smithy_types::body::Error> + 'static,
  122         -
  123    112   
    B::Data: Send,
  124    113   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  125    114   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  126    115   
{
  127    116   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  128         -
    type Future = CapturePokemonInputFuture;
         117  +
    type Future = DoNothingInputFuture;
  129    118   
  130    119   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  131    120   
        let fut = async move {
  132    121   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  133    122   
                request.headers(),
  134    123   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  135    124   
            ) {
  136    125   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  137    126   
            }
  138         -
            crate::protocol_serde::shape_capture_pokemon::de_capture_pokemon_http_request(request)
  139         -
                .await
         127  +
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
  140    128   
        };
  141    129   
        use ::futures_util::future::TryFutureExt;
  142    130   
        let fut = fut.map_err(
  143    131   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  144    132   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  145    133   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  146    134   
            },
  147    135   
        );
  148         -
        CapturePokemonInputFuture {
         136  +
        DoNothingInputFuture {
  149    137   
            inner: Box::pin(fut),
  150    138   
        }
  151    139   
    }
  152    140   
}
  153    141   
impl
  154    142   
    ::aws_smithy_http_server::response::IntoResponse<
  155    143   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  156         -
    > for crate::output::CapturePokemonOutput
         144  +
    > for crate::output::DoNothingOutput
  157    145   
{
  158    146   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  159         -
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_response(self)
  160         -
        {
         147  +
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
  161    148   
            Ok(response) => response,
  162    149   
            Err(e) => {
  163    150   
                ::tracing::error!(error = %e, "failed to serialize response");
  164    151   
                ::aws_smithy_http_server::response::IntoResponse::<
  165    152   
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  166    153   
                >::into_response(
  167    154   
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  168    155   
                        e,
  169    156   
                    ),
  170    157   
                )
  171    158   
            }
  172    159   
        }
  173    160   
    }
  174    161   
}
  175         -
impl
  176         -
    ::aws_smithy_http_server::response::IntoResponse<
  177         -
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  178         -
    > for crate::error::CapturePokemonError
  179         -
{
  180         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  181         -
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_error(&self) {
  182         -
            Ok(mut response) => {
  183         -
                response.extensions_mut().insert(
  184         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  185         -
                );
  186         -
                response
  187         -
            }
  188         -
            Err(e) => {
  189         -
                ::tracing::error!(error = %e, "failed to serialize response");
  190         -
                ::aws_smithy_http_server::response::IntoResponse::<
  191         -
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  192         -
                >::into_response(
  193         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  194         -
                        e,
  195         -
                    ),
  196         -
                )
  197         -
            }
  198         -
        }
  199         -
    }
  200         -
}
  201    162   
  202    163   
::pin_project_lite::pin_project! {
  203    164   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  204         -
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
  205         -
    pub struct DoNothingInputFuture {
  206         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         165  +
    /// [`CapturePokemonInput`](crate::input::CapturePokemonInput) using modelled bindings.
         166  +
    pub struct CapturePokemonInputFuture {
         167  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  207    168   
    }
  208    169   
}
  209    170   
  210         -
impl std::future::Future for DoNothingInputFuture {
         171  +
impl std::future::Future for CapturePokemonInputFuture {
  211    172   
    type Output = Result<
  212         -
        crate::input::DoNothingInput,
         173  +
        crate::input::CapturePokemonInput,
  213    174   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  214    175   
    >;
  215    176   
  216    177   
    fn poll(
  217    178   
        self: std::pin::Pin<&mut Self>,
  218    179   
        cx: &mut std::task::Context<'_>,
  219    180   
    ) -> std::task::Poll<Self::Output> {
  220    181   
        let this = self.project();
  221    182   
        this.inner.as_mut().poll(cx)
  222    183   
    }
  223    184   
}
  224    185   
  225    186   
impl<B>
  226    187   
    ::aws_smithy_http_server::request::FromRequest<
  227    188   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  228    189   
        B,
  229         -
    > for crate::input::DoNothingInput
         190  +
    > for crate::input::CapturePokemonInput
  230    191   
where
  231    192   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  232    193   
    B: 'static,
  233    194   
         195  +
    B: ::http_body_1x::Body<Data = ::bytes::Bytes>
         196  +
        + ::std::marker::Send
         197  +
        + ::std::marker::Sync
         198  +
        + 'static,
         199  +
    B::Error: Into<::aws_smithy_types::body::Error> + 'static,
         200  +
  234    201   
    B::Data: Send,
  235    202   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  236    203   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  237    204   
{
  238    205   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  239         -
    type Future = DoNothingInputFuture;
         206  +
    type Future = CapturePokemonInputFuture;
  240    207   
  241    208   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  242    209   
        let fut = async move {
  243    210   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  244    211   
                request.headers(),
  245    212   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  246    213   
            ) {
  247    214   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  248    215   
            }
  249         -
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
         216  +
            crate::protocol_serde::shape_capture_pokemon::de_capture_pokemon_http_request(request)
         217  +
                .await
  250    218   
        };
  251    219   
        use ::futures_util::future::TryFutureExt;
  252    220   
        let fut = fut.map_err(
  253    221   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  254    222   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  255    223   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  256    224   
            },
  257    225   
        );
  258         -
        DoNothingInputFuture {
         226  +
        CapturePokemonInputFuture {
  259    227   
            inner: Box::pin(fut),
  260    228   
        }
  261    229   
    }
  262    230   
}
  263    231   
impl
  264    232   
    ::aws_smithy_http_server::response::IntoResponse<
  265    233   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  266         -
    > for crate::output::DoNothingOutput
         234  +
    > for crate::output::CapturePokemonOutput
  267    235   
{
  268    236   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  269         -
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
         237  +
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_response(self)
         238  +
        {
  270    239   
            Ok(response) => response,
  271    240   
            Err(e) => {
  272    241   
                ::tracing::error!(error = %e, "failed to serialize response");
  273    242   
                ::aws_smithy_http_server::response::IntoResponse::<
  274    243   
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  275    244   
                >::into_response(
  276    245   
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  277    246   
                        e,
  278    247   
                    ),
  279    248   
                )
  280    249   
            }
  281    250   
        }
  282    251   
    }
  283    252   
}
         253  +
impl
         254  +
    ::aws_smithy_http_server::response::IntoResponse<
         255  +
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
         256  +
    > for crate::error::CapturePokemonError
         257  +
{
         258  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         259  +
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_error(&self) {
         260  +
            Ok(mut response) => {
         261  +
                response.extensions_mut().insert(
         262  +
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         263  +
                );
         264  +
                response
         265  +
            }
         266  +
            Err(e) => {
         267  +
                ::tracing::error!(error = %e, "failed to serialize response");
         268  +
                ::aws_smithy_http_server::response::IntoResponse::<
         269  +
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
         270  +
                >::into_response(
         271  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         272  +
                        e,
         273  +
                    ),
         274  +
                )
         275  +
            }
         276  +
        }
         277  +
    }
         278  +
}
  284    279   
  285    280   
::pin_project_lite::pin_project! {
  286    281   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  287         -
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
  288         -
    pub struct GetServerStatisticsInputFuture {
  289         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         282  +
    /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
         283  +
    pub struct CheckHealthInputFuture {
         284  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  290    285   
    }
  291    286   
}
  292    287   
  293         -
impl std::future::Future for GetServerStatisticsInputFuture {
         288  +
impl std::future::Future for CheckHealthInputFuture {
  294    289   
    type Output = Result<
  295         -
        crate::input::GetServerStatisticsInput,
         290  +
        crate::input::CheckHealthInput,
  296    291   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  297    292   
    >;
  298    293   
  299    294   
    fn poll(
  300    295   
        self: std::pin::Pin<&mut Self>,
  301    296   
        cx: &mut std::task::Context<'_>,
  302    297   
    ) -> std::task::Poll<Self::Output> {
  303    298   
        let this = self.project();
  304    299   
        this.inner.as_mut().poll(cx)
  305    300   
    }
  306    301   
}
  307    302   
  308    303   
impl<B>
  309    304   
    ::aws_smithy_http_server::request::FromRequest<
  310    305   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  311    306   
        B,
  312         -
    > for crate::input::GetServerStatisticsInput
         307  +
    > for crate::input::CheckHealthInput
  313    308   
where
  314    309   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  315    310   
    B: 'static,
  316    311   
  317    312   
    B::Data: Send,
  318    313   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  319    314   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  320    315   
{
  321    316   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  322         -
    type Future = GetServerStatisticsInputFuture;
         317  +
    type Future = CheckHealthInputFuture;
  323    318   
  324    319   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  325    320   
        let fut = async move {
  326    321   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  327    322   
                request.headers(),
  328    323   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_0,
  329    324   
            ) {
  330    325   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  331    326   
            }
  332         -
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
  333         -
                            .await
         327  +
            crate::protocol_serde::shape_check_health::de_check_health_http_request(request).await
  334    328   
        };
  335    329   
        use ::futures_util::future::TryFutureExt;
  336    330   
        let fut = fut.map_err(
  337    331   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  338    332   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  339    333   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  340    334   
            },
  341    335   
        );
  342         -
        GetServerStatisticsInputFuture {
         336  +
        CheckHealthInputFuture {
  343    337   
            inner: Box::pin(fut),
  344    338   
        }
  345    339   
    }
  346    340   
}
  347    341   
impl
  348    342   
    ::aws_smithy_http_server::response::IntoResponse<
  349    343   
        ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
  350         -
    > for crate::output::GetServerStatisticsOutput
         344  +
    > for crate::output::CheckHealthOutput
  351    345   
{
  352    346   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  353         -
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
  354         -
                        Ok(response) => response,
  355         -
                        Err(e) => {
  356         -
                            ::tracing::error!(error = %e, "failed to serialize response");
  357         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  358         -
                        }
  359         -
                    }
         347  +
        match crate::protocol_serde::shape_check_health::ser_check_health_http_response(self) {
         348  +
            Ok(response) => response,
         349  +
            Err(e) => {
         350  +
                ::tracing::error!(error = %e, "failed to serialize response");
         351  +
                ::aws_smithy_http_server::response::IntoResponse::<
         352  +
                    ::aws_smithy_http_server::protocol::aws_json_10::AwsJson1_0,
         353  +
                >::into_response(
         354  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         355  +
                        e,
         356  +
                    ),
         357  +
                )
         358  +
            }
         359  +
        }
  360    360   
    }
  361    361   
}

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

@@ -1,1 +144,144 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// Health check operation, to check the service is up Not yet a deep check
    4         -
pub struct CheckHealth;
           3  +
/// Retrieve HTTP server statistiscs, such as calls count.
           4  +
pub struct GetServerStatistics;
    5      5   
    6         -
impl ::aws_smithy_http_server::operation::OperationShape for CheckHealth {
           6  +
impl ::aws_smithy_http_server::operation::OperationShape for GetServerStatistics {
    7      7   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8      8   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    9         -
            "com.aws.example#CheckHealth",
           9  +
            "com.aws.example#GetServerStatistics",
   10     10   
            "com.aws.example",
   11         -
            "CheckHealth",
          11  +
            "GetServerStatistics",
   12     12   
        );
   13     13   
   14         -
    type Input = crate::input::CheckHealthInput;
   15         -
    type Output = crate::output::CheckHealthOutput;
          14  +
    type Input = crate::input::GetServerStatisticsInput;
          15  +
    type Output = crate::output::GetServerStatisticsOutput;
   16     16   
    type Error = std::convert::Infallible;
   17     17   
}
   18     18   
   19         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CheckHealth {
          19  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetServerStatistics {
   20     20   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   21     21   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   22     22   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   23     23   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     24   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   25     25   
        >,
   26     26   
    >;
   27     27   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   28     28   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   29     29   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   30     30   
    >;
   31     31   
   32     32   
    fn request_fmt() -> Self::RequestFmt {
   33     33   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   34     34   
    }
   35     35   
   36     36   
    fn response_fmt() -> Self::ResponseFmt {
   37     37   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   38     38   
    }
   39     39   
}
   40     40   
   41         -
/// Capture Pokémons via event streams.
   42         -
pub struct CapturePokemon;
   43         -
   44         -
impl ::aws_smithy_http_server::operation::OperationShape for CapturePokemon {
   45         -
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   46         -
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   47         -
            "com.aws.example#CapturePokemon",
   48         -
            "com.aws.example",
   49         -
            "CapturePokemon",
   50         -
        );
   51         -
   52         -
    type Input = crate::input::CapturePokemonInput;
   53         -
    type Output = crate::output::CapturePokemonOutput;
   54         -
    type Error = crate::error::CapturePokemonError;
   55         -
}
   56         -
   57         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CapturePokemon {
   58         -
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
   59         -
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
   60         -
   61         -
    fn request_fmt() -> Self::RequestFmt {
   62         -
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   63         -
    }
   64         -
   65         -
    fn response_fmt() -> Self::ResponseFmt {
   66         -
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   67         -
    }
   68         -
}
   69         -
   70     41   
/// DoNothing operation, used to stress test the framework.
   71     42   
pub struct DoNothing;
   72     43   
   73     44   
impl ::aws_smithy_http_server::operation::OperationShape for DoNothing {
   74     45   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   75     46   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   76     47   
            "com.aws.example#DoNothing",
   77     48   
            "com.aws.example",
   78     49   
            "DoNothing",
   79     50   
        );
   80     51   
   81     52   
    type Input = crate::input::DoNothingInput;
   82     53   
    type Output = crate::output::DoNothingOutput;
   83     54   
    type Error = std::convert::Infallible;
   84     55   
}
   85     56   
   86     57   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
   87     58   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   88     59   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   89     60   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   90     61   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   91     62   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   92     63   
        >,
   93     64   
    >;
   94     65   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   95     66   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   96     67   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   97     68   
    >;
   98     69   
   99     70   
    fn request_fmt() -> Self::RequestFmt {
  100     71   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  101     72   
    }
  102     73   
  103     74   
    fn response_fmt() -> Self::ResponseFmt {
  104     75   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  105     76   
    }
  106     77   
}
  107     78   
  108         -
/// Retrieve HTTP server statistiscs, such as calls count.
  109         -
pub struct GetServerStatistics;
          79  +
/// Capture Pokémons via event streams.
          80  +
pub struct CapturePokemon;
  110     81   
  111         -
impl ::aws_smithy_http_server::operation::OperationShape for GetServerStatistics {
          82  +
impl ::aws_smithy_http_server::operation::OperationShape for CapturePokemon {
  112     83   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  113     84   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  114         -
            "com.aws.example#GetServerStatistics",
          85  +
            "com.aws.example#CapturePokemon",
  115     86   
            "com.aws.example",
  116         -
            "GetServerStatistics",
          87  +
            "CapturePokemon",
  117     88   
        );
  118     89   
  119         -
    type Input = crate::input::GetServerStatisticsInput;
  120         -
    type Output = crate::output::GetServerStatisticsOutput;
          90  +
    type Input = crate::input::CapturePokemonInput;
          91  +
    type Output = crate::output::CapturePokemonOutput;
          92  +
    type Error = crate::error::CapturePokemonError;
          93  +
}
          94  +
          95  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CapturePokemon {
          96  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          97  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          98  +
          99  +
    fn request_fmt() -> Self::RequestFmt {
         100  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         101  +
    }
         102  +
         103  +
    fn response_fmt() -> Self::ResponseFmt {
         104  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         105  +
    }
         106  +
}
         107  +
         108  +
/// Health check operation, to check the service is up Not yet a deep check
         109  +
pub struct CheckHealth;
         110  +
         111  +
impl ::aws_smithy_http_server::operation::OperationShape for CheckHealth {
         112  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
         113  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         114  +
            "com.aws.example#CheckHealth",
         115  +
            "com.aws.example",
         116  +
            "CheckHealth",
         117  +
        );
         118  +
         119  +
    type Input = crate::input::CheckHealthInput;
         120  +
    type Output = crate::output::CheckHealthOutput;
  121    121   
    type Error = std::convert::Infallible;
  122    122   
}
  123    123   
  124         -
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for GetServerStatistics {
         124  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for CheckHealth {
  125    125   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  126    126   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  127    127   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  128    128   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  129    129   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  130    130   
        >,
  131    131   
    >;
  132    132   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  133    133   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  134    134   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,

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

@@ -1,1 +120,177 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[derive(
    4      4   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      5   
)]
    6         -
pub struct CheckHealthOutput {}
    7         -
impl CheckHealthOutput {
    8         -
    /// Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
    9         -
    pub fn builder() -> crate::output::check_health_output::Builder {
   10         -
        crate::output::check_health_output::Builder::default()
           6  +
pub struct GetServerStatisticsOutput {
           7  +
    /// The number of calls executed by the server.
           8  +
    pub calls_count: i64,
           9  +
}
          10  +
impl GetServerStatisticsOutput {
          11  +
    /// The number of calls executed by the server.
          12  +
    pub fn calls_count(&self) -> i64 {
          13  +
        self.calls_count
          14  +
    }
          15  +
}
          16  +
impl GetServerStatisticsOutput {
          17  +
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
          18  +
    pub fn builder() -> crate::output::get_server_statistics_output::Builder {
          19  +
        crate::output::get_server_statistics_output::Builder::default()
          20  +
    }
          21  +
}
          22  +
          23  +
#[allow(missing_docs)] // documentation missing in model
          24  +
#[derive(
          25  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          26  +
)]
          27  +
pub struct DoNothingOutput {}
          28  +
impl DoNothingOutput {
          29  +
    /// Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
          30  +
    pub fn builder() -> crate::output::do_nothing_output::Builder {
          31  +
        crate::output::do_nothing_output::Builder::default()
   11     32   
    }
   12     33   
}
   13     34   
   14     35   
#[allow(missing_docs)] // documentation missing in model
   15     36   
#[derive(::std::fmt::Debug)]
   16     37   
pub struct CapturePokemonOutput {
   17     38   
    #[allow(missing_docs)] // documentation missing in model
   18     39   
    pub events: ::aws_smithy_http::event_stream::EventStreamSender<
   19     40   
        crate::model::CapturePokemonEvents,
   20     41   
        crate::error::CapturePokemonEventsError,
   21     42   
    >,
   22     43   
}
   23     44   
impl CapturePokemonOutput {
   24     45   
    #[allow(missing_docs)] // documentation missing in model
   25     46   
    pub fn events(
   26     47   
        &self,
   27     48   
    ) -> &::aws_smithy_http::event_stream::EventStreamSender<
   28     49   
        crate::model::CapturePokemonEvents,
   29     50   
        crate::error::CapturePokemonEventsError,
   30     51   
    > {
   31     52   
        &self.events
   32     53   
    }
   33     54   
}
   34     55   
impl CapturePokemonOutput {
   35     56   
    /// Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
   36     57   
    pub fn builder() -> crate::output::capture_pokemon_output::Builder {
   37     58   
        crate::output::capture_pokemon_output::Builder::default()
   38     59   
    }
   39     60   
}
   40     61   
   41     62   
#[allow(missing_docs)] // documentation missing in model
   42     63   
#[derive(
   43     64   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   44     65   
)]
   45         -
pub struct DoNothingOutput {}
   46         -
impl DoNothingOutput {
   47         -
    /// Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
   48         -
    pub fn builder() -> crate::output::do_nothing_output::Builder {
   49         -
        crate::output::do_nothing_output::Builder::default()
          66  +
pub struct CheckHealthOutput {}
          67  +
impl CheckHealthOutput {
          68  +
    /// Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
          69  +
    pub fn builder() -> crate::output::check_health_output::Builder {
          70  +
        crate::output::check_health_output::Builder::default()
   50     71   
    }
   51     72   
}
          73  +
/// See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
          74  +
pub mod get_server_statistics_output {
   52     75   
   53         -
#[allow(missing_docs)] // documentation missing in model
   54         -
#[derive(
   55         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   56         -
)]
   57         -
pub struct GetServerStatisticsOutput {
   58         -
    /// The number of calls executed by the server.
   59         -
    pub calls_count: i64,
   60         -
}
   61         -
impl GetServerStatisticsOutput {
   62         -
    /// The number of calls executed by the server.
   63         -
    pub fn calls_count(&self) -> i64 {
   64         -
        self.calls_count
          76  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
          77  +
    /// Holds one variant for each of the ways the builder can fail.
          78  +
    #[non_exhaustive]
          79  +
    #[allow(clippy::enum_variant_names)]
          80  +
    pub enum ConstraintViolation {
          81  +
        /// `calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
          82  +
        MissingCallsCount,
   65     83   
    }
   66         -
}
   67         -
impl GetServerStatisticsOutput {
   68         -
    /// Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
   69         -
    pub fn builder() -> crate::output::get_server_statistics_output::Builder {
   70         -
        crate::output::get_server_statistics_output::Builder::default()
          84  +
    impl ::std::fmt::Display for ConstraintViolation {
          85  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          86  +
            match self {
          87  +
                ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
          88  +
            }
          89  +
        }
          90  +
    }
          91  +
    impl ::std::error::Error for ConstraintViolation {}
          92  +
    impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
          93  +
        type Error = ConstraintViolation;
          94  +
          95  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
          96  +
            builder.build()
          97  +
        }
          98  +
    }
          99  +
    /// A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         100  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         101  +
    pub struct Builder {
         102  +
        pub(crate) calls_count: ::std::option::Option<i64>,
         103  +
    }
         104  +
    impl Builder {
         105  +
        /// The number of calls executed by the server.
         106  +
        pub fn calls_count(mut self, input: i64) -> Self {
         107  +
            self.calls_count = Some(input);
         108  +
            self
         109  +
        }
         110  +
        /// Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         111  +
        ///
         112  +
        /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if a [`ConstraintViolation`] occurs.
         113  +
        ///
         114  +
        pub fn build(
         115  +
            self,
         116  +
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
         117  +
            self.build_enforcing_all_constraints()
         118  +
        }
         119  +
        fn build_enforcing_all_constraints(
         120  +
            self,
         121  +
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
         122  +
            Ok(crate::output::GetServerStatisticsOutput {
         123  +
                calls_count: self
         124  +
                    .calls_count
         125  +
                    .ok_or(ConstraintViolation::MissingCallsCount)?,
         126  +
            })
         127  +
        }
   71    128   
    }
   72    129   
}
   73         -
/// See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
   74         -
pub mod check_health_output {
         130  +
/// See [`DoNothingOutput`](crate::output::DoNothingOutput).
         131  +
pub mod do_nothing_output {
   75    132   
   76         -
    impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
         133  +
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
   77    134   
        fn from(builder: Builder) -> Self {
   78    135   
            builder.build()
   79    136   
        }
   80    137   
    }
   81         -
    /// A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         138  +
    /// A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
   82    139   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
   83    140   
    pub struct Builder {}
   84    141   
    impl Builder {
   85         -
        /// Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
   86         -
        pub fn build(self) -> crate::output::CheckHealthOutput {
         142  +
        /// Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
         143  +
        pub fn build(self) -> crate::output::DoNothingOutput {
   87    144   
            self.build_enforcing_all_constraints()
   88    145   
        }
   89         -
        fn build_enforcing_all_constraints(self) -> crate::output::CheckHealthOutput {
   90         -
            crate::output::CheckHealthOutput {}
         146  +
        fn build_enforcing_all_constraints(self) -> crate::output::DoNothingOutput {
         147  +
            crate::output::DoNothingOutput {}
   91    148   
        }
   92    149   
    }
   93    150   
}
   94    151   
/// See [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
   95    152   
pub mod capture_pokemon_output {
   96    153   
   97    154   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
   98    155   
    /// Holds one variant for each of the ways the builder can fail.
   99    156   
    #[non_exhaustive]
  100    157   
    #[allow(clippy::enum_variant_names)]
@@ -128,185 +235,235 @@
  148    205   
        }
  149    206   
        fn build_enforcing_all_constraints(
  150    207   
            self,
  151    208   
        ) -> Result<crate::output::CapturePokemonOutput, ConstraintViolation> {
  152    209   
            Ok(crate::output::CapturePokemonOutput {
  153    210   
                events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
  154    211   
            })
  155    212   
        }
  156    213   
    }
  157    214   
}
  158         -
/// See [`DoNothingOutput`](crate::output::DoNothingOutput).
  159         -
pub mod do_nothing_output {
         215  +
/// See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         216  +
pub mod check_health_output {
  160    217   
  161         -
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
         218  +
    impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
  162    219   
        fn from(builder: Builder) -> Self {
  163    220   
            builder.build()
  164    221   
        }
  165    222   
    }
  166         -
    /// A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
         223  +
    /// A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  167    224   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  168    225   
    pub struct Builder {}
  169    226   
    impl Builder {
  170         -
        /// Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
  171         -
        pub fn build(self) -> crate::output::DoNothingOutput {
  172         -
            self.build_enforcing_all_constraints()
  173         -
        }
  174         -
        fn build_enforcing_all_constraints(self) -> crate::output::DoNothingOutput {
  175         -
            crate::output::DoNothingOutput {}
  176         -
        }
  177         -
    }
  178         -
}
  179         -
/// See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  180         -
pub mod get_server_statistics_output {
  181         -
  182         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  183         -
    /// Holds one variant for each of the ways the builder can fail.
  184         -
    #[non_exhaustive]
  185         -
    #[allow(clippy::enum_variant_names)]
  186         -
    pub enum ConstraintViolation {
  187         -
        /// `calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
  188         -
        MissingCallsCount,
  189         -
    }
  190         -
    impl ::std::fmt::Display for ConstraintViolation {
  191         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  192         -
            match self {
  193         -
                ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
  194         -
            }
  195         -
        }
  196         -
    }
  197         -
    impl ::std::error::Error for ConstraintViolation {}
  198         -
    impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
  199         -
        type Error = ConstraintViolation;
  200         -
  201         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  202         -
            builder.build()
  203         -
        }
  204         -
    }
  205         -
    /// A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  206         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  207         -
    pub struct Builder {
  208         -
        pub(crate) calls_count: ::std::option::Option<i64>,
  209         -
    }
  210         -
    impl Builder {
  211         -
        /// The number of calls executed by the server.
  212         -
        pub fn calls_count(mut self, input: i64) -> Self {
  213         -
            self.calls_count = Some(input);
  214         -
            self
  215         -
        }
  216         -
        /// Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  217         -
        ///
  218         -
        /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if a [`ConstraintViolation`] occurs.
  219         -
        ///
  220         -
        pub fn build(
  221         -
            self,
  222         -
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
         227  +
        /// Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         228  +
        pub fn build(self) -> crate::output::CheckHealthOutput {
  223    229   
            self.build_enforcing_all_constraints()
  224    230   
        }
  225         -
        fn build_enforcing_all_constraints(
  226         -
            self,
  227         -
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
  228         -
            Ok(crate::output::GetServerStatisticsOutput {
  229         -
                calls_count: self
  230         -
                    .calls_count
  231         -
                    .ok_or(ConstraintViolation::MissingCallsCount)?,
  232         -
            })
         231  +
        fn build_enforcing_all_constraints(self) -> crate::output::CheckHealthOutput {
         232  +
            crate::output::CheckHealthOutput {}
  233    233   
        }
  234    234   
    }
  235    235   
}

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

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