Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

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

@@ -1,1 +316,289 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/* ServerHttpBoundProtocolGenerator.kt:280 */
    3      3   
::pin_project_lite::pin_project! {
    4      4   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    5         -
    /// [`GetStorageInput`](crate::input::GetStorageInput) using modelled bindings.
    6         -
    pub struct GetStorageInputFuture {
    7         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetStorageInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
           5  +
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
           6  +
    pub struct GetServerStatisticsInputFuture {
           7  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    8      8   
    }
    9      9   
}
   10     10   
   11         -
impl std::future::Future for GetStorageInputFuture {
          11  +
impl std::future::Future for GetServerStatisticsInputFuture {
   12     12   
    type Output = Result<
   13         -
        crate::input::GetStorageInput,
          13  +
        crate::input::GetServerStatisticsInput,
   14     14   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
   15     15   
    >;
   16     16   
   17     17   
    fn poll(
   18     18   
        self: std::pin::Pin<&mut Self>,
   19     19   
        cx: &mut std::task::Context<'_>,
   20     20   
    ) -> std::task::Poll<Self::Output> {
   21     21   
        let this = self.project();
   22     22   
        this.inner.as_mut().poll(cx)
   23     23   
    }
   24     24   
}
   25     25   
   26     26   
impl<B>
   27     27   
    ::aws_smithy_legacy_http_server::request::FromRequest<
   28     28   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   29     29   
        B,
   30         -
    > for crate::input::GetStorageInput
          30  +
    > for crate::input::GetServerStatisticsInput
   31     31   
where
   32     32   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   33     33   
    B: 'static,
   34     34   
   35     35   
    B::Data: Send,
   36     36   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   37     37   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   38     38   
{
   39     39   
    type Rejection =
   40     40   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
   41         -
    type Future = GetStorageInputFuture;
          41  +
    type Future = GetServerStatisticsInputFuture;
   42     42   
   43     43   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   44     44   
        let fut = async move {
   45     45   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
   46     46   
                request.headers(),
   47     47   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
   48     48   
            ) {
   49     49   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   50     50   
            }
   51         -
            crate::protocol_serde::shape_get_storage::de_get_storage_http_request(request).await
          51  +
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
          52  +
                            .await
   52     53   
        };
   53     54   
        use ::futures_util::future::TryFutureExt;
   54     55   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   55     56   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
   56     57   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
   57     58   
                    });
   58         -
        GetStorageInputFuture {
          59  +
        GetServerStatisticsInputFuture {
   59     60   
            inner: Box::pin(fut),
   60     61   
        }
   61     62   
    }
   62     63   
}
   63     64   
/* ServerHttpBoundProtocolGenerator.kt:339 */
   64     65   
impl
   65     66   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
   66     67   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   67         -
    > for crate::output::GetStorageOutput
   68         -
{
   69         -
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   70         -
        match crate::protocol_serde::shape_get_storage::ser_get_storage_http_response(self) {
   71         -
            Ok(response) => response,
   72         -
            Err(e) => {
   73         -
                ::tracing::error!(error = %e, "failed to serialize response");
   74         -
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   75         -
            }
   76         -
        }
   77         -
    }
   78         -
}
   79         -
/* ServerHttpBoundProtocolGenerator.kt:360 */
   80         -
impl
   81         -
    ::aws_smithy_legacy_http_server::response::IntoResponse<
   82         -
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   83         -
    > for crate::error::GetStorageError
          68  +
    > for crate::output::GetServerStatisticsOutput
   84     69   
{
   85     70   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   86         -
        match crate::protocol_serde::shape_get_storage::ser_get_storage_http_error(&self) {
   87         -
            Ok(mut response) => {
   88         -
                response.extensions_mut().insert(
   89         -
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
   90         -
                        self.name(),
   91         -
                    ),
   92         -
                );
   93         -
                response
   94         -
            }
   95         -
            Err(e) => {
   96         -
                ::tracing::error!(error = %e, "failed to serialize response");
   97         -
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   98         -
            }
   99         -
        }
          71  +
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
          72  +
                        Ok(response) => response,
          73  +
                        Err(e) => {
          74  +
                            ::tracing::error!(error = %e, "failed to serialize response");
          75  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
          76  +
                        }
          77  +
                    }
  100     78   
    }
  101     79   
}
  102     80   
  103     81   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  104     82   
::pin_project_lite::pin_project! {
  105     83   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  106         -
    /// [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) using modelled bindings.
  107         -
    pub struct GetPokemonSpeciesInputFuture {
  108         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
          84  +
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
          85  +
    pub struct DoNothingInputFuture {
          86  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  109     87   
    }
  110     88   
}
  111     89   
  112         -
impl std::future::Future for GetPokemonSpeciesInputFuture {
          90  +
impl std::future::Future for DoNothingInputFuture {
  113     91   
    type Output = Result<
  114         -
        crate::input::GetPokemonSpeciesInput,
          92  +
        crate::input::DoNothingInput,
  115     93   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  116     94   
    >;
  117     95   
  118     96   
    fn poll(
  119     97   
        self: std::pin::Pin<&mut Self>,
  120     98   
        cx: &mut std::task::Context<'_>,
  121     99   
    ) -> std::task::Poll<Self::Output> {
  122    100   
        let this = self.project();
  123    101   
        this.inner.as_mut().poll(cx)
  124    102   
    }
  125    103   
}
  126    104   
  127    105   
impl<B>
  128    106   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  129    107   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  130    108   
        B,
  131         -
    > for crate::input::GetPokemonSpeciesInput
         109  +
    > for crate::input::DoNothingInput
  132    110   
where
  133    111   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  134    112   
    B: 'static,
  135    113   
  136    114   
    B::Data: Send,
  137    115   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  138    116   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  139    117   
{
  140    118   
    type Rejection =
  141    119   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  142         -
    type Future = GetPokemonSpeciesInputFuture;
         120  +
    type Future = DoNothingInputFuture;
  143    121   
  144    122   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  145    123   
        let fut = async move {
  146    124   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  147    125   
                request.headers(),
  148    126   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  149    127   
            ) {
  150    128   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  151    129   
            }
  152         -
            crate::protocol_serde::shape_get_pokemon_species::de_get_pokemon_species_http_request(
  153         -
                request,
  154         -
            )
  155         -
            .await
         130  +
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
  156    131   
        };
  157    132   
        use ::futures_util::future::TryFutureExt;
  158    133   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  159    134   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  160    135   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  161    136   
                    });
  162         -
        GetPokemonSpeciesInputFuture {
         137  +
        DoNothingInputFuture {
  163    138   
            inner: Box::pin(fut),
  164    139   
        }
  165    140   
    }
  166    141   
}
  167    142   
/* ServerHttpBoundProtocolGenerator.kt:339 */
  168    143   
impl
  169    144   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  170    145   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  171         -
    > for crate::output::GetPokemonSpeciesOutput
  172         -
{
  173         -
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  174         -
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_response(self) {
  175         -
                        Ok(response) => response,
  176         -
                        Err(e) => {
  177         -
                            ::tracing::error!(error = %e, "failed to serialize response");
  178         -
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  179         -
                        }
  180         -
                    }
  181         -
    }
  182         -
}
  183         -
/* ServerHttpBoundProtocolGenerator.kt:360 */
  184         -
impl
  185         -
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  186         -
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  187         -
    > for crate::error::GetPokemonSpeciesError
         146  +
    > for crate::output::DoNothingOutput
  188    147   
{
  189    148   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  190         -
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_error(
  191         -
            &self,
  192         -
        ) {
  193         -
            Ok(mut response) => {
  194         -
                response.extensions_mut().insert(
  195         -
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
  196         -
                        self.name(),
  197         -
                    ),
  198         -
                );
  199         -
                response
  200         -
            }
         149  +
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
         150  +
            Ok(response) => response,
  201    151   
            Err(e) => {
  202    152   
                ::tracing::error!(error = %e, "failed to serialize response");
  203    153   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  204    154   
            }
  205    155   
        }
  206    156   
    }
  207    157   
}
  208    158   
  209    159   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  210    160   
::pin_project_lite::pin_project! {
  211    161   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  212         -
    /// [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput) using modelled bindings.
  213         -
    pub struct StreamPokemonRadioInputFuture {
  214         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamPokemonRadioInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         162  +
    /// [`CapturePokemonInput`](crate::input::CapturePokemonInput) using modelled bindings.
         163  +
    pub struct CapturePokemonInputFuture {
         164  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  215    165   
    }
  216    166   
}
  217    167   
  218         -
impl std::future::Future for StreamPokemonRadioInputFuture {
         168  +
impl std::future::Future for CapturePokemonInputFuture {
  219    169   
    type Output = Result<
  220         -
        crate::input::StreamPokemonRadioInput,
         170  +
        crate::input::CapturePokemonInput,
  221    171   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  222    172   
    >;
  223    173   
  224    174   
    fn poll(
  225    175   
        self: std::pin::Pin<&mut Self>,
  226    176   
        cx: &mut std::task::Context<'_>,
  227    177   
    ) -> std::task::Poll<Self::Output> {
  228    178   
        let this = self.project();
  229    179   
        this.inner.as_mut().poll(cx)
  230    180   
    }
  231    181   
}
  232    182   
  233    183   
impl<B>
  234    184   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  235    185   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  236    186   
        B,
  237         -
    > for crate::input::StreamPokemonRadioInput
         187  +
    > for crate::input::CapturePokemonInput
  238    188   
where
  239    189   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  240    190   
    B: 'static,
  241    191   
         192  +
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
  242    193   
    B::Data: Send,
  243    194   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  244    195   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  245    196   
{
  246    197   
    type Rejection =
  247    198   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  248         -
    type Future = StreamPokemonRadioInputFuture;
         199  +
    type Future = CapturePokemonInputFuture;
  249    200   
  250    201   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  251    202   
        let fut = async move {
  252    203   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  253    204   
                request.headers(),
  254         -
                &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
         205  +
                &crate::mimes::CONTENT_TYPE_APPLICATION_VND_AMAZON_EVENTSTREAM,
  255    206   
            ) {
  256    207   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  257    208   
            }
  258         -
            crate::protocol_serde::shape_stream_pokemon_radio::de_stream_pokemon_radio_http_request(
  259         -
                request,
  260         -
            )
  261         -
            .await
         209  +
            crate::protocol_serde::shape_capture_pokemon::de_capture_pokemon_http_request(request)
         210  +
                .await
  262    211   
        };
  263    212   
        use ::futures_util::future::TryFutureExt;
  264    213   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  265    214   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  266    215   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  267    216   
                    });
  268         -
        StreamPokemonRadioInputFuture {
         217  +
        CapturePokemonInputFuture {
  269    218   
            inner: Box::pin(fut),
  270    219   
        }
  271    220   
    }
  272    221   
}
  273    222   
/* ServerHttpBoundProtocolGenerator.kt:339 */
  274    223   
impl
  275    224   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  276    225   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  277         -
    > for crate::output::StreamPokemonRadioOutput
         226  +
    > for crate::output::CapturePokemonOutput
  278    227   
{
  279    228   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  280         -
        match crate::protocol_serde::shape_stream_pokemon_radio::ser_stream_pokemon_radio_http_response(self) {
  281         -
                        Ok(response) => response,
  282         -
                        Err(e) => {
  283         -
                            ::tracing::error!(error = %e, "failed to serialize response");
  284         -
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  285         -
                        }
  286         -
                    }
         229  +
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_response(self)
         230  +
        {
         231  +
            Ok(response) => response,
         232  +
            Err(e) => {
         233  +
                ::tracing::error!(error = %e, "failed to serialize response");
         234  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         235  +
            }
         236  +
        }
         237  +
    }
         238  +
}
         239  +
/* ServerHttpBoundProtocolGenerator.kt:360 */
         240  +
impl
         241  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         242  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
         243  +
    > for crate::error::CapturePokemonError
         244  +
{
         245  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
         246  +
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_error(&self) {
         247  +
            Ok(mut response) => {
         248  +
                response.extensions_mut().insert(
         249  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         250  +
                        self.name(),
         251  +
                    ),
         252  +
                );
         253  +
                response
         254  +
            }
         255  +
            Err(e) => {
         256  +
                ::tracing::error!(error = %e, "failed to serialize response");
         257  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         258  +
            }
         259  +
        }
  287    260   
    }
  288    261   
}
  289    262   
  290    263   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  291    264   
::pin_project_lite::pin_project! {
  292    265   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  293    266   
    /// [`CheckHealthInput`](crate::input::CheckHealthInput) using modelled bindings.
  294    267   
    pub struct CheckHealthInputFuture {
  295    268   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CheckHealthInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  296    269   
    }
@@ -341,314 +627,627 @@
  361    334   
                ::tracing::error!(error = %e, "failed to serialize response");
  362    335   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  363    336   
            }
  364    337   
        }
  365    338   
    }
  366    339   
}
  367    340   
  368    341   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  369    342   
::pin_project_lite::pin_project! {
  370    343   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  371         -
    /// [`CapturePokemonInput`](crate::input::CapturePokemonInput) using modelled bindings.
  372         -
    pub struct CapturePokemonInputFuture {
  373         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CapturePokemonInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         344  +
    /// [`StreamPokemonRadioInput`](crate::input::StreamPokemonRadioInput) using modelled bindings.
         345  +
    pub struct StreamPokemonRadioInputFuture {
         346  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StreamPokemonRadioInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  374    347   
    }
  375    348   
}
  376    349   
  377         -
impl std::future::Future for CapturePokemonInputFuture {
         350  +
impl std::future::Future for StreamPokemonRadioInputFuture {
  378    351   
    type Output = Result<
  379         -
        crate::input::CapturePokemonInput,
         352  +
        crate::input::StreamPokemonRadioInput,
  380    353   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  381    354   
    >;
  382    355   
  383    356   
    fn poll(
  384    357   
        self: std::pin::Pin<&mut Self>,
  385    358   
        cx: &mut std::task::Context<'_>,
  386    359   
    ) -> std::task::Poll<Self::Output> {
  387    360   
        let this = self.project();
  388    361   
        this.inner.as_mut().poll(cx)
  389    362   
    }
  390    363   
}
  391    364   
  392    365   
impl<B>
  393    366   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  394    367   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  395    368   
        B,
  396         -
    > for crate::input::CapturePokemonInput
         369  +
    > for crate::input::StreamPokemonRadioInput
  397    370   
where
  398    371   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  399    372   
    B: 'static,
  400    373   
  401         -
    B: Into<::aws_smithy_types::byte_stream::ByteStream>,
  402    374   
    B::Data: Send,
  403    375   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  404    376   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  405    377   
{
  406    378   
    type Rejection =
  407    379   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  408         -
    type Future = CapturePokemonInputFuture;
         380  +
    type Future = StreamPokemonRadioInputFuture;
  409    381   
  410    382   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  411    383   
        let fut = async move {
  412    384   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  413    385   
                request.headers(),
  414         -
                &crate::mimes::CONTENT_TYPE_APPLICATION_VND_AMAZON_EVENTSTREAM,
         386  +
                &crate::mimes::CONTENT_TYPE_APPLICATION_OCTET_STREAM,
  415    387   
            ) {
  416    388   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  417    389   
            }
  418         -
            crate::protocol_serde::shape_capture_pokemon::de_capture_pokemon_http_request(request)
  419         -
                .await
         390  +
            crate::protocol_serde::shape_stream_pokemon_radio::de_stream_pokemon_radio_http_request(
         391  +
                request,
         392  +
            )
         393  +
            .await
  420    394   
        };
  421    395   
        use ::futures_util::future::TryFutureExt;
  422    396   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  423    397   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  424    398   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  425    399   
                    });
  426         -
        CapturePokemonInputFuture {
         400  +
        StreamPokemonRadioInputFuture {
  427    401   
            inner: Box::pin(fut),
  428    402   
        }
  429    403   
    }
  430    404   
}
  431    405   
/* ServerHttpBoundProtocolGenerator.kt:339 */
  432    406   
impl
  433    407   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  434    408   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  435         -
    > for crate::output::CapturePokemonOutput
  436         -
{
  437         -
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  438         -
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_response(self)
  439         -
        {
  440         -
            Ok(response) => response,
  441         -
            Err(e) => {
  442         -
                ::tracing::error!(error = %e, "failed to serialize response");
  443         -
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  444         -
            }
  445         -
        }
  446         -
    }
  447         -
}
  448         -
/* ServerHttpBoundProtocolGenerator.kt:360 */
  449         -
impl
  450         -
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  451         -
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  452         -
    > for crate::error::CapturePokemonError
         409  +
    > for crate::output::StreamPokemonRadioOutput
  453    410   
{
  454    411   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  455         -
        match crate::protocol_serde::shape_capture_pokemon::ser_capture_pokemon_http_error(&self) {
  456         -
            Ok(mut response) => {
  457         -
                response.extensions_mut().insert(
  458         -
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
  459         -
                        self.name(),
  460         -
                    ),
  461         -
                );
  462         -
                response
  463         -
            }
  464         -
            Err(e) => {
  465         -
                ::tracing::error!(error = %e, "failed to serialize response");
  466         -
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  467         -
            }
  468         -
        }
         412  +
        match crate::protocol_serde::shape_stream_pokemon_radio::ser_stream_pokemon_radio_http_response(self) {
         413  +
                        Ok(response) => response,
         414  +
                        Err(e) => {
         415  +
                            ::tracing::error!(error = %e, "failed to serialize response");
         416  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         417  +
                        }
         418  +
                    }
  469    419   
    }
  470    420   
}
  471    421   
  472    422   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  473    423   
::pin_project_lite::pin_project! {
  474    424   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  475         -
    /// [`DoNothingInput`](crate::input::DoNothingInput) using modelled bindings.
  476         -
    pub struct DoNothingInputFuture {
  477         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::DoNothingInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         425  +
    /// [`GetPokemonSpeciesInput`](crate::input::GetPokemonSpeciesInput) using modelled bindings.
         426  +
    pub struct GetPokemonSpeciesInputFuture {
         427  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetPokemonSpeciesInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  478    428   
    }
  479    429   
}
  480    430   
  481         -
impl std::future::Future for DoNothingInputFuture {
         431  +
impl std::future::Future for GetPokemonSpeciesInputFuture {
  482    432   
    type Output = Result<
  483         -
        crate::input::DoNothingInput,
         433  +
        crate::input::GetPokemonSpeciesInput,
  484    434   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  485    435   
    >;
  486    436   
  487    437   
    fn poll(
  488    438   
        self: std::pin::Pin<&mut Self>,
  489    439   
        cx: &mut std::task::Context<'_>,
  490    440   
    ) -> std::task::Poll<Self::Output> {
  491    441   
        let this = self.project();
  492    442   
        this.inner.as_mut().poll(cx)
  493    443   
    }
  494    444   
}
  495    445   
  496    446   
impl<B>
  497    447   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  498    448   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  499    449   
        B,
  500         -
    > for crate::input::DoNothingInput
         450  +
    > for crate::input::GetPokemonSpeciesInput
  501    451   
where
  502    452   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  503    453   
    B: 'static,
  504    454   
  505    455   
    B::Data: Send,
  506    456   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  507    457   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  508    458   
{
  509    459   
    type Rejection =
  510    460   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  511         -
    type Future = DoNothingInputFuture;
         461  +
    type Future = GetPokemonSpeciesInputFuture;
  512    462   
  513    463   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  514    464   
        let fut = async move {
  515    465   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  516    466   
                request.headers(),
  517    467   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  518    468   
            ) {
  519    469   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  520    470   
            }
  521         -
            crate::protocol_serde::shape_do_nothing::de_do_nothing_http_request(request).await
         471  +
            crate::protocol_serde::shape_get_pokemon_species::de_get_pokemon_species_http_request(
         472  +
                request,
         473  +
            )
         474  +
            .await
  522    475   
        };
  523    476   
        use ::futures_util::future::TryFutureExt;
  524    477   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  525    478   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  526    479   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  527    480   
                    });
  528         -
        DoNothingInputFuture {
         481  +
        GetPokemonSpeciesInputFuture {
  529    482   
            inner: Box::pin(fut),
  530    483   
        }
  531    484   
    }
  532    485   
}
  533    486   
/* ServerHttpBoundProtocolGenerator.kt:339 */
  534    487   
impl
  535    488   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  536    489   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  537         -
    > for crate::output::DoNothingOutput
         490  +
    > for crate::output::GetPokemonSpeciesOutput
  538    491   
{
  539    492   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  540         -
        match crate::protocol_serde::shape_do_nothing::ser_do_nothing_http_response(self) {
  541         -
            Ok(response) => response,
         493  +
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_response(self) {
         494  +
                        Ok(response) => response,
         495  +
                        Err(e) => {
         496  +
                            ::tracing::error!(error = %e, "failed to serialize response");
         497  +
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         498  +
                        }
         499  +
                    }
         500  +
    }
         501  +
}
         502  +
/* ServerHttpBoundProtocolGenerator.kt:360 */
         503  +
impl
         504  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         505  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
         506  +
    > for crate::error::GetPokemonSpeciesError
         507  +
{
         508  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
         509  +
        match crate::protocol_serde::shape_get_pokemon_species::ser_get_pokemon_species_http_error(
         510  +
            &self,
         511  +
        ) {
         512  +
            Ok(mut response) => {
         513  +
                response.extensions_mut().insert(
         514  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         515  +
                        self.name(),
         516  +
                    ),
         517  +
                );
         518  +
                response
         519  +
            }
  542    520   
            Err(e) => {
  543    521   
                ::tracing::error!(error = %e, "failed to serialize response");
  544    522   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  545    523   
            }
  546    524   
        }
  547    525   
    }
  548    526   
}
  549    527   
  550    528   
/* ServerHttpBoundProtocolGenerator.kt:280 */
  551    529   
::pin_project_lite::pin_project! {
  552    530   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  553         -
    /// [`GetServerStatisticsInput`](crate::input::GetServerStatisticsInput) using modelled bindings.
  554         -
    pub struct GetServerStatisticsInputFuture {
  555         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetServerStatisticsInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         531  +
    /// [`GetStorageInput`](crate::input::GetStorageInput) using modelled bindings.
         532  +
    pub struct GetStorageInputFuture {
         533  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::GetStorageInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  556    534   
    }
  557    535   
}
  558    536   
  559         -
impl std::future::Future for GetServerStatisticsInputFuture {
         537  +
impl std::future::Future for GetStorageInputFuture {
  560    538   
    type Output = Result<
  561         -
        crate::input::GetServerStatisticsInput,
         539  +
        crate::input::GetStorageInput,
  562    540   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  563    541   
    >;
  564    542   
  565    543   
    fn poll(
  566    544   
        self: std::pin::Pin<&mut Self>,
  567    545   
        cx: &mut std::task::Context<'_>,
  568    546   
    ) -> std::task::Poll<Self::Output> {
  569    547   
        let this = self.project();
  570    548   
        this.inner.as_mut().poll(cx)
  571    549   
    }
  572    550   
}
  573    551   
  574    552   
impl<B>
  575    553   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  576    554   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  577    555   
        B,
  578         -
    > for crate::input::GetServerStatisticsInput
         556  +
    > for crate::input::GetStorageInput
  579    557   
where
  580    558   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  581    559   
    B: 'static,
  582    560   
  583    561   
    B::Data: Send,
  584    562   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  585    563   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  586    564   
{
  587    565   
    type Rejection =
  588    566   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  589         -
    type Future = GetServerStatisticsInputFuture;
         567  +
    type Future = GetStorageInputFuture;
  590    568   
  591    569   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  592    570   
        let fut = async move {
  593    571   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  594    572   
                request.headers(),
  595    573   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  596    574   
            ) {
  597    575   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  598    576   
            }
  599         -
            crate::protocol_serde::shape_get_server_statistics::de_get_server_statistics_http_request(request)
  600         -
                            .await
         577  +
            crate::protocol_serde::shape_get_storage::de_get_storage_http_request(request).await
  601    578   
        };
  602    579   
        use ::futures_util::future::TryFutureExt;
  603    580   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  604    581   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  605    582   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  606    583   
                    });
  607         -
        GetServerStatisticsInputFuture {
         584  +
        GetStorageInputFuture {
  608    585   
            inner: Box::pin(fut),
  609    586   
        }
  610    587   
    }
  611    588   
}
  612    589   
/* ServerHttpBoundProtocolGenerator.kt:339 */
  613    590   
impl
  614    591   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  615    592   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  616         -
    > for crate::output::GetServerStatisticsOutput
         593  +
    > for crate::output::GetStorageOutput
  617    594   
{
  618    595   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  619         -
        match crate::protocol_serde::shape_get_server_statistics::ser_get_server_statistics_http_response(self) {
  620         -
                        Ok(response) => response,
  621         -
                        Err(e) => {
  622         -
                            ::tracing::error!(error = %e, "failed to serialize response");
  623         -
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  624         -
                        }
  625         -
                    }
         596  +
        match crate::protocol_serde::shape_get_storage::ser_get_storage_http_response(self) {
         597  +
            Ok(response) => response,
         598  +
            Err(e) => {
         599  +
                ::tracing::error!(error = %e, "failed to serialize response");
         600  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         601  +
            }
         602  +
        }
         603  +
    }
         604  +
}
         605  +
/* ServerHttpBoundProtocolGenerator.kt:360 */
         606  +
impl
         607  +
    ::aws_smithy_legacy_http_server::response::IntoResponse<
         608  +
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
         609  +
    > for crate::error::GetStorageError
         610  +
{
         611  +
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
         612  +
        match crate::protocol_serde::shape_get_storage::ser_get_storage_http_error(&self) {
         613  +
            Ok(mut response) => {
         614  +
                response.extensions_mut().insert(
         615  +
                    ::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(
         616  +
                        self.name(),
         617  +
                    ),
         618  +
                );
         619  +
                response
         620  +
            }
         621  +
            Err(e) => {
         622  +
                ::tracing::error!(error = %e, "failed to serialize response");
         623  +
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         624  +
            }
         625  +
        }
  626    626   
    }
  627    627   
}

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

@@ -1,1 +145,132 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/* ServerOperationGenerator.kt:48 */
    3         -
/// /* ServerOperationGenerator.kt:48 */Retrieve information about your Pokédex.
           3  +
/// /* ServerOperationGenerator.kt:48 */Retrieve HTTP server statistiscs, such as calls count.
    4      4   
/* ServerOperationGenerator.kt:55 */
    5         -
pub struct GetStorage;
           5  +
pub struct GetServerStatistics;
    6      6   
    7         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetStorage {
           7  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetServerStatistics {
    8      8   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
    9      9   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   10         -
            "com.aws.example#GetStorage",
          10  +
            "com.aws.example#GetServerStatistics",
   11     11   
            "com.aws.example",
   12         -
            "GetStorage",
          12  +
            "GetServerStatistics",
   13     13   
        );
   14     14   
   15         -
    type Input = crate::input::GetStorageInput;
   16         -
    type Output = crate::output::GetStorageOutput;
   17         -
    type Error = crate::error::GetStorageError;
          15  +
    type Input = crate::input::GetServerStatisticsInput;
          16  +
    type Output = crate::output::GetServerStatisticsOutput;
          17  +
    type Error = std::convert::Infallible;
   18     18   
}
   19     19   
   20         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for GetStorage {
          20  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          21  +
    for GetServerStatistics
          22  +
{
   21     23   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
   22         -
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::MakeHeaders<fn(&::http::header::HeaderName) -> ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::HeaderMarker>,
   23         -
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
   24         -
                            ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeLabel<fn(usize) -> bool>,
   25         -
                            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity
   26         -
                        >
   27         -
                    >;
          24  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          25  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          26  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          27  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          28  +
        >,
          29  +
    >;
   28     30   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
   29     31   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   30     32   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   31     33   
    >;
   32     34   
   33     35   
    fn request_fmt() -> Self::RequestFmt {
   34     36   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   35         -
.header({
   36         -
                    |name: &::http::header::HeaderName| {
   37         -
                        let name_match = matches!(name.as_str(), "passcode");
   38         -
                        let key_suffix = None;
   39         -
let value = name_match;
   40         -
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::HeaderMarker { key_suffix, value }
   41         -
                    }
   42         -
                } as fn(&_) -> _)
   43         -
.label({
   44         -
                        |index: usize| matches!(index, 1)
   45         -
                    } as fn(usize) -> bool, None)
   46     37   
    }
   47     38   
   48     39   
    fn response_fmt() -> Self::ResponseFmt {
   49     40   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   50     41   
    }
   51     42   
}
   52     43   
/* ServerOperationGenerator.kt:88 */
   53     44   
   54         -
/// /* ServerOperationGenerator.kt:48 */Retrieve information about a Pokémon species.
          45  +
/// /* ServerOperationGenerator.kt:48 */DoNothing operation, used to stress test the framework.
   55     46   
/* ServerOperationGenerator.kt:55 */
   56         -
pub struct GetPokemonSpecies;
          47  +
pub struct DoNothing;
   57     48   
   58         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetPokemonSpecies {
          49  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for DoNothing {
   59     50   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
   60     51   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
   61         -
            "com.aws.example#GetPokemonSpecies",
          52  +
            "com.aws.example#DoNothing",
   62     53   
            "com.aws.example",
   63         -
            "GetPokemonSpecies",
          54  +
            "DoNothing",
   64     55   
        );
   65     56   
   66         -
    type Input = crate::input::GetPokemonSpeciesInput;
   67         -
    type Output = crate::output::GetPokemonSpeciesOutput;
   68         -
    type Error = crate::error::GetPokemonSpeciesError;
          57  +
    type Input = crate::input::DoNothingInput;
          58  +
    type Output = crate::output::DoNothingOutput;
          59  +
    type Error = std::convert::Infallible;
   69     60   
}
   70     61   
   71         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
   72         -
    for GetPokemonSpecies
   73         -
{
          62  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
   74     63   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
   75     64   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   76     65   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
   77     66   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   78     67   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   79     68   
        >,
   80     69   
    >;
   81     70   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
   82     71   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   83     72   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
   84     73   
    >;
   85     74   
   86     75   
    fn request_fmt() -> Self::RequestFmt {
   87     76   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
   88     77   
    }
   89     78   
   90     79   
    fn response_fmt() -> Self::ResponseFmt {
   91     80   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   92     81   
    }
   93     82   
}
   94     83   
/* ServerOperationGenerator.kt:88 */
   95     84   
   96         -
/// /* ServerOperationGenerator.kt:48 */Fetch a radio song from the database and stream it back as a playable audio.
          85  +
/// /* ServerOperationGenerator.kt:48 */Capture Pokémons via event streams.
   97     86   
/* ServerOperationGenerator.kt:55 */
   98         -
pub struct StreamPokemonRadio;
          87  +
pub struct CapturePokemon;
   99     88   
  100         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StreamPokemonRadio {
          89  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for CapturePokemon {
  101     90   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
  102     91   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  103         -
            "com.aws.example#StreamPokemonRadio",
          92  +
            "com.aws.example#CapturePokemon",
  104     93   
            "com.aws.example",
  105         -
            "StreamPokemonRadio",
          94  +
            "CapturePokemon",
  106     95   
        );
  107     96   
  108         -
    type Input = crate::input::StreamPokemonRadioInput;
  109         -
    type Output = crate::output::StreamPokemonRadioOutput;
  110         -
    type Error = std::convert::Infallible;
          97  +
    type Input = crate::input::CapturePokemonInput;
          98  +
    type Output = crate::output::CapturePokemonOutput;
          99  +
    type Error = crate::error::CapturePokemonError;
  111    100   
}
  112    101   
  113         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  114         -
    for StreamPokemonRadio
  115         -
{
         102  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for CapturePokemon {
  116    103   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
  117    104   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  118    105   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
  119    106   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  120    107   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  121    108   
        >,
  122    109   
    >;
  123    110   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
  124    111   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  125    112   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
@@ -148,135 +298,298 @@
  168    155   
    fn request_fmt() -> Self::RequestFmt {
  169    156   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  170    157   
    }
  171    158   
  172    159   
    fn response_fmt() -> Self::ResponseFmt {
  173    160   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  174    161   
    }
  175    162   
}
  176    163   
/* ServerOperationGenerator.kt:88 */
  177    164   
  178         -
/// /* ServerOperationGenerator.kt:48 */Capture Pokémons via event streams.
         165  +
/// /* ServerOperationGenerator.kt:48 */Fetch a radio song from the database and stream it back as a playable audio.
  179    166   
/* ServerOperationGenerator.kt:55 */
  180         -
pub struct CapturePokemon;
         167  +
pub struct StreamPokemonRadio;
  181    168   
  182         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for CapturePokemon {
         169  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StreamPokemonRadio {
  183    170   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
  184    171   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  185         -
            "com.aws.example#CapturePokemon",
         172  +
            "com.aws.example#StreamPokemonRadio",
  186    173   
            "com.aws.example",
  187         -
            "CapturePokemon",
         174  +
            "StreamPokemonRadio",
  188    175   
        );
  189    176   
  190         -
    type Input = crate::input::CapturePokemonInput;
  191         -
    type Output = crate::output::CapturePokemonOutput;
  192         -
    type Error = crate::error::CapturePokemonError;
         177  +
    type Input = crate::input::StreamPokemonRadioInput;
         178  +
    type Output = crate::output::StreamPokemonRadioOutput;
         179  +
    type Error = std::convert::Infallible;
  193    180   
}
  194    181   
  195         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for CapturePokemon {
         182  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         183  +
    for StreamPokemonRadio
         184  +
{
  196    185   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
  197    186   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  198    187   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
  199    188   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  200    189   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  201    190   
        >,
  202    191   
    >;
  203    192   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
  204    193   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  205    194   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  206    195   
    >;
  207    196   
  208    197   
    fn request_fmt() -> Self::RequestFmt {
  209    198   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  210    199   
    }
  211    200   
  212    201   
    fn response_fmt() -> Self::ResponseFmt {
  213    202   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  214    203   
    }
  215    204   
}
  216    205   
/* ServerOperationGenerator.kt:88 */
  217    206   
  218         -
/// /* ServerOperationGenerator.kt:48 */DoNothing operation, used to stress test the framework.
         207  +
/// /* ServerOperationGenerator.kt:48 */Retrieve information about a Pokémon species.
  219    208   
/* ServerOperationGenerator.kt:55 */
  220         -
pub struct DoNothing;
         209  +
pub struct GetPokemonSpecies;
  221    210   
  222         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for DoNothing {
         211  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetPokemonSpecies {
  223    212   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
  224    213   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  225         -
            "com.aws.example#DoNothing",
         214  +
            "com.aws.example#GetPokemonSpecies",
  226    215   
            "com.aws.example",
  227         -
            "DoNothing",
         216  +
            "GetPokemonSpecies",
  228    217   
        );
  229    218   
  230         -
    type Input = crate::input::DoNothingInput;
  231         -
    type Output = crate::output::DoNothingOutput;
  232         -
    type Error = std::convert::Infallible;
         219  +
    type Input = crate::input::GetPokemonSpeciesInput;
         220  +
    type Output = crate::output::GetPokemonSpeciesOutput;
         221  +
    type Error = crate::error::GetPokemonSpeciesError;
  233    222   
}
  234    223   
  235         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for DoNothing {
         224  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         225  +
    for GetPokemonSpecies
         226  +
{
  236    227   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
  237    228   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  238    229   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
  239    230   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  240    231   
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  241    232   
        >,
  242    233   
    >;
  243    234   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
  244    235   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  245    236   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  246    237   
    >;
  247    238   
  248    239   
    fn request_fmt() -> Self::RequestFmt {
  249    240   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
  250    241   
    }
  251    242   
  252    243   
    fn response_fmt() -> Self::ResponseFmt {
  253    244   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  254    245   
    }
  255    246   
}
  256    247   
/* ServerOperationGenerator.kt:88 */
  257    248   
  258         -
/// /* ServerOperationGenerator.kt:48 */Retrieve HTTP server statistiscs, such as calls count.
         249  +
/// /* ServerOperationGenerator.kt:48 */Retrieve information about your Pokédex.
  259    250   
/* ServerOperationGenerator.kt:55 */
  260         -
pub struct GetServerStatistics;
         251  +
pub struct GetStorage;
  261    252   
  262         -
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetServerStatistics {
         253  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetStorage {
  263    254   
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
  264    255   
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
  265         -
            "com.aws.example#GetServerStatistics",
         256  +
            "com.aws.example#GetStorage",
  266    257   
            "com.aws.example",
  267         -
            "GetServerStatistics",
         258  +
            "GetStorage",
  268    259   
        );
  269    260   
  270         -
    type Input = crate::input::GetServerStatisticsInput;
  271         -
    type Output = crate::output::GetServerStatisticsOutput;
  272         -
    type Error = std::convert::Infallible;
         261  +
    type Input = crate::input::GetStorageInput;
         262  +
    type Output = crate::output::GetStorageOutput;
         263  +
    type Error = crate::error::GetStorageError;
  273    264   
}
  274    265   
  275         -
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
  276         -
    for GetServerStatistics
  277         -
{
         266  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for GetStorage {
  278    267   
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
  279         -
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  280         -
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
  281         -
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  282         -
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  283         -
        >,
  284         -
    >;
         268  +
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::MakeHeaders<fn(&::http::header::HeaderName) -> ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::HeaderMarker>,
         269  +
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         270  +
                            ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeLabel<fn(usize) -> bool>,
         271  +
                            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity
         272  +
                        >
         273  +
                    >;
  285    274   
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
  286    275   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  287    276   
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
  288    277   
    >;
  289    278   
  290    279   
    fn request_fmt() -> Self::RequestFmt {
  291    280   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         281  +
.header({
         282  +
                    |name: &::http::header::HeaderName| {
         283  +
                        let name_match = matches!(name.as_str(), "passcode");
         284  +
                        let key_suffix = None;
         285  +
let value = name_match;
         286  +
                        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::headers::HeaderMarker { key_suffix, value }
         287  +
                    }
         288  +
                } as fn(&_) -> _)
         289  +
.label({
         290  +
                        |index: usize| matches!(index, 1)
         291  +
                    } as fn(usize) -> bool, None)
  292    292   
    }
  293    293   
  294    294   
    fn response_fmt() -> Self::ResponseFmt {
  295    295   
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  296    296   
    }
  297    297   
}
  298    298   
/* ServerOperationGenerator.kt:88 */

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

@@ -1,1 +551,376 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/* StructureGenerator.kt:197 */
    3         -
/// /* StructureGenerator.kt:197 */Contents of the Pokémon storage.
           3  +
#[allow(missing_docs)] // documentation missing in model
    4      4   
/* RustType.kt:534 */
    5      5   
#[derive(
    6      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    7      7   
)]
    8         -
pub /* StructureGenerator.kt:201 */ struct GetStorageOutput {
    9         -
    /// /* StructureGenerator.kt:231 */A list of Pokémon species.
   10         -
    pub collection: ::std::vec::Vec<::std::string::String>,
           8  +
pub /* StructureGenerator.kt:201 */ struct GetServerStatisticsOutput {
           9  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
          10  +
    pub calls_count: i64,
   11     11   
    /* StructureGenerator.kt:201 */
   12     12   
}
   13     13   
/* StructureGenerator.kt:135 */
   14         -
impl GetStorageOutput {
   15         -
    /// /* StructureGenerator.kt:231 */A list of Pokémon species.
          14  +
impl GetServerStatisticsOutput {
          15  +
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
   16     16   
    /* StructureGenerator.kt:166 */
   17         -
    pub fn collection(&self) -> &[::std::string::String] {
   18         -
        /* StructureGenerator.kt:171 */
   19         -
        use std::ops::Deref;
   20         -
        self.collection.deref()
          17  +
    pub fn calls_count(&self) -> i64 {
          18  +
        /* StructureGenerator.kt:168 */
          19  +
        self.calls_count
   21     20   
        /* StructureGenerator.kt:166 */
   22     21   
    }
   23     22   
    /* StructureGenerator.kt:135 */
   24     23   
}
   25     24   
/* ServerCodegenVisitor.kt:356 */
   26         -
impl GetStorageOutput {
   27         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetStorageOutput`](crate::output::GetStorageOutput).
          25  +
impl GetServerStatisticsOutput {
          26  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
   28     27   
    /* ServerBuilderGenerator.kt:295 */
   29         -
    pub fn builder() -> crate::output::get_storage_output::Builder {
          28  +
    pub fn builder() -> crate::output::get_server_statistics_output::Builder {
   30     29   
        /* ServerBuilderGenerator.kt:296 */
   31         -
        crate::output::get_storage_output::Builder::default()
          30  +
        crate::output::get_server_statistics_output::Builder::default()
   32     31   
        /* ServerBuilderGenerator.kt:295 */
   33     32   
    }
   34     33   
    /* ServerCodegenVisitor.kt:356 */
   35     34   
}
   36     35   
   37     36   
/* StructureGenerator.kt:197 */
   38     37   
#[allow(missing_docs)] // documentation missing in model
   39     38   
/* RustType.kt:534 */
   40     39   
#[derive(
   41     40   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   42     41   
)]
   43         -
pub /* StructureGenerator.kt:201 */ struct GetPokemonSpeciesOutput {
   44         -
    /// /* StructureGenerator.kt:231 */The name for this resource.
   45         -
    pub name: ::std::string::String,
   46         -
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
   47         -
    pub flavor_text_entries: ::std::vec::Vec<crate::model::FlavorText>,
   48         -
    /* StructureGenerator.kt:201 */
   49         -
}
   50         -
/* StructureGenerator.kt:135 */
   51         -
impl GetPokemonSpeciesOutput {
   52         -
    /// /* StructureGenerator.kt:231 */The name for this resource.
   53         -
    /* StructureGenerator.kt:166 */
   54         -
    pub fn name(&self) -> &str {
   55         -
        /* StructureGenerator.kt:171 */
   56         -
        use std::ops::Deref;
   57         -
        self.name.deref()
   58         -
        /* StructureGenerator.kt:166 */
   59         -
    }
   60         -
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
   61         -
    /* StructureGenerator.kt:166 */
   62         -
    pub fn flavor_text_entries(&self) -> &[crate::model::FlavorText] {
   63         -
        /* StructureGenerator.kt:171 */
   64         -
        use std::ops::Deref;
   65         -
        self.flavor_text_entries.deref()
   66         -
        /* StructureGenerator.kt:166 */
   67         -
    }
   68         -
    /* StructureGenerator.kt:135 */
   69         -
}
          42  +
pub /* StructureGenerator.kt:201 */ struct DoNothingOutput {/* StructureGenerator.kt:201 */}
   70     43   
/* ServerCodegenVisitor.kt:356 */
   71         -
impl GetPokemonSpeciesOutput {
   72         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
          44  +
impl DoNothingOutput {
          45  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
   73     46   
    /* ServerBuilderGenerator.kt:295 */
   74         -
    pub fn builder() -> crate::output::get_pokemon_species_output::Builder {
          47  +
    pub fn builder() -> crate::output::do_nothing_output::Builder {
   75     48   
        /* ServerBuilderGenerator.kt:296 */
   76         -
        crate::output::get_pokemon_species_output::Builder::default()
          49  +
        crate::output::do_nothing_output::Builder::default()
   77     50   
        /* ServerBuilderGenerator.kt:295 */
   78     51   
    }
   79     52   
    /* ServerCodegenVisitor.kt:356 */
   80     53   
}
   81     54   
   82     55   
/* StructureGenerator.kt:197 */
   83     56   
#[allow(missing_docs)] // documentation missing in model
   84     57   
/* RustType.kt:534 */
   85     58   
#[derive(::std::fmt::Debug)]
   86         -
pub /* StructureGenerator.kt:201 */ struct StreamPokemonRadioOutput {
          59  +
pub /* StructureGenerator.kt:201 */ struct CapturePokemonOutput {
   87     60   
    /* StructureGenerator.kt:231 */
   88     61   
    #[allow(missing_docs)] // documentation missing in model
   89         -
    pub data: ::aws_smithy_types::byte_stream::ByteStream,
          62  +
    pub events: ::aws_smithy_legacy_http::event_stream::EventStreamSender<
          63  +
        crate::model::CapturePokemonEvents,
          64  +
        crate::error::CapturePokemonEventsError,
          65  +
    >,
   90     66   
    /* StructureGenerator.kt:201 */
   91     67   
}
   92     68   
/* StructureGenerator.kt:135 */
   93         -
impl StreamPokemonRadioOutput {
          69  +
impl CapturePokemonOutput {
   94     70   
    /* StructureGenerator.kt:231 */
   95     71   
    #[allow(missing_docs)] // documentation missing in model
   96     72   
                           /* StructureGenerator.kt:166 */
   97         -
    pub fn data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
          73  +
    pub fn events(
          74  +
        &self,
          75  +
    ) -> &::aws_smithy_legacy_http::event_stream::EventStreamSender<
          76  +
        crate::model::CapturePokemonEvents,
          77  +
        crate::error::CapturePokemonEventsError,
          78  +
    > {
   98     79   
        /* StructureGenerator.kt:172 */
   99         -
        &self.data
          80  +
        &self.events
  100     81   
        /* StructureGenerator.kt:166 */
  101     82   
    }
  102     83   
    /* StructureGenerator.kt:135 */
  103     84   
}
  104     85   
/* ServerCodegenVisitor.kt:356 */
  105         -
impl StreamPokemonRadioOutput {
  106         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
          86  +
impl CapturePokemonOutput {
          87  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
  107     88   
    /* ServerBuilderGenerator.kt:295 */
  108         -
    pub fn builder() -> crate::output::stream_pokemon_radio_output::Builder {
          89  +
    pub fn builder() -> crate::output::capture_pokemon_output::Builder {
  109     90   
        /* ServerBuilderGenerator.kt:296 */
  110         -
        crate::output::stream_pokemon_radio_output::Builder::default()
          91  +
        crate::output::capture_pokemon_output::Builder::default()
  111     92   
        /* ServerBuilderGenerator.kt:295 */
  112     93   
    }
  113     94   
    /* ServerCodegenVisitor.kt:356 */
  114     95   
}
  115     96   
  116     97   
/* StructureGenerator.kt:197 */
  117     98   
#[allow(missing_docs)] // documentation missing in model
  118     99   
/* RustType.kt:534 */
  119    100   
#[derive(
  120    101   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  121    102   
)]
  122    103   
pub /* StructureGenerator.kt:201 */ struct CheckHealthOutput {/* StructureGenerator.kt:201 */}
  123    104   
/* ServerCodegenVisitor.kt:356 */
  124    105   
impl CheckHealthOutput {
  125    106   
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  126    107   
    /* ServerBuilderGenerator.kt:295 */
  127    108   
    pub fn builder() -> crate::output::check_health_output::Builder {
  128    109   
        /* ServerBuilderGenerator.kt:296 */
  129    110   
        crate::output::check_health_output::Builder::default()
  130    111   
        /* ServerBuilderGenerator.kt:295 */
  131    112   
    }
  132    113   
    /* ServerCodegenVisitor.kt:356 */
  133    114   
}
  134    115   
  135    116   
/* StructureGenerator.kt:197 */
  136    117   
#[allow(missing_docs)] // documentation missing in model
  137    118   
/* RustType.kt:534 */
  138    119   
#[derive(::std::fmt::Debug)]
  139         -
pub /* StructureGenerator.kt:201 */ struct CapturePokemonOutput {
         120  +
pub /* StructureGenerator.kt:201 */ struct StreamPokemonRadioOutput {
  140    121   
    /* StructureGenerator.kt:231 */
  141    122   
    #[allow(missing_docs)] // documentation missing in model
  142         -
    pub events: ::aws_smithy_legacy_http::event_stream::EventStreamSender<
  143         -
        crate::model::CapturePokemonEvents,
  144         -
        crate::error::CapturePokemonEventsError,
  145         -
    >,
         123  +
    pub data: ::aws_smithy_types::byte_stream::ByteStream,
  146    124   
    /* StructureGenerator.kt:201 */
  147    125   
}
  148    126   
/* StructureGenerator.kt:135 */
  149         -
impl CapturePokemonOutput {
         127  +
impl StreamPokemonRadioOutput {
  150    128   
    /* StructureGenerator.kt:231 */
  151    129   
    #[allow(missing_docs)] // documentation missing in model
  152    130   
                           /* StructureGenerator.kt:166 */
  153         -
    pub fn events(
  154         -
        &self,
  155         -
    ) -> &::aws_smithy_legacy_http::event_stream::EventStreamSender<
  156         -
        crate::model::CapturePokemonEvents,
  157         -
        crate::error::CapturePokemonEventsError,
  158         -
    > {
         131  +
    pub fn data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
  159    132   
        /* StructureGenerator.kt:172 */
  160         -
        &self.events
         133  +
        &self.data
  161    134   
        /* StructureGenerator.kt:166 */
  162    135   
    }
  163    136   
    /* StructureGenerator.kt:135 */
  164    137   
}
  165    138   
/* ServerCodegenVisitor.kt:356 */
  166         -
impl CapturePokemonOutput {
  167         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
         139  +
impl StreamPokemonRadioOutput {
         140  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
  168    141   
    /* ServerBuilderGenerator.kt:295 */
  169         -
    pub fn builder() -> crate::output::capture_pokemon_output::Builder {
         142  +
    pub fn builder() -> crate::output::stream_pokemon_radio_output::Builder {
  170    143   
        /* ServerBuilderGenerator.kt:296 */
  171         -
        crate::output::capture_pokemon_output::Builder::default()
         144  +
        crate::output::stream_pokemon_radio_output::Builder::default()
  172    145   
        /* ServerBuilderGenerator.kt:295 */
  173    146   
    }
  174    147   
    /* ServerCodegenVisitor.kt:356 */
  175    148   
}
  176    149   
  177    150   
/* StructureGenerator.kt:197 */
  178    151   
#[allow(missing_docs)] // documentation missing in model
  179    152   
/* RustType.kt:534 */
  180    153   
#[derive(
  181    154   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  182    155   
)]
  183         -
pub /* StructureGenerator.kt:201 */ struct DoNothingOutput {/* StructureGenerator.kt:201 */}
         156  +
pub /* StructureGenerator.kt:201 */ struct GetPokemonSpeciesOutput {
         157  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
         158  +
    pub name: ::std::string::String,
         159  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
         160  +
    pub flavor_text_entries: ::std::vec::Vec<crate::model::FlavorText>,
         161  +
    /* StructureGenerator.kt:201 */
         162  +
}
         163  +
/* StructureGenerator.kt:135 */
         164  +
impl GetPokemonSpeciesOutput {
         165  +
    /// /* StructureGenerator.kt:231 */The name for this resource.
         166  +
    /* StructureGenerator.kt:166 */
         167  +
    pub fn name(&self) -> &str {
         168  +
        /* StructureGenerator.kt:171 */
         169  +
        use std::ops::Deref;
         170  +
        self.name.deref()
         171  +
        /* StructureGenerator.kt:166 */
         172  +
    }
         173  +
    /// /* StructureGenerator.kt:231 */A list of flavor text entries for this Pokémon species.
         174  +
    /* StructureGenerator.kt:166 */
         175  +
    pub fn flavor_text_entries(&self) -> &[crate::model::FlavorText] {
         176  +
        /* StructureGenerator.kt:171 */
         177  +
        use std::ops::Deref;
         178  +
        self.flavor_text_entries.deref()
         179  +
        /* StructureGenerator.kt:166 */
         180  +
    }
         181  +
    /* StructureGenerator.kt:135 */
         182  +
}
  184    183   
/* ServerCodegenVisitor.kt:356 */
  185         -
impl DoNothingOutput {
  186         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
         184  +
impl GetPokemonSpeciesOutput {
         185  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  187    186   
    /* ServerBuilderGenerator.kt:295 */
  188         -
    pub fn builder() -> crate::output::do_nothing_output::Builder {
         187  +
    pub fn builder() -> crate::output::get_pokemon_species_output::Builder {
  189    188   
        /* ServerBuilderGenerator.kt:296 */
  190         -
        crate::output::do_nothing_output::Builder::default()
         189  +
        crate::output::get_pokemon_species_output::Builder::default()
  191    190   
        /* ServerBuilderGenerator.kt:295 */
  192    191   
    }
  193    192   
    /* ServerCodegenVisitor.kt:356 */
  194    193   
}
  195    194   
  196         -
/* StructureGenerator.kt:197 */
  197         -
#[allow(missing_docs)] // documentation missing in model
         195  +
/// /* StructureGenerator.kt:197 */Contents of the Pokémon storage.
  198    196   
/* RustType.kt:534 */
  199    197   
#[derive(
  200    198   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  201    199   
)]
  202         -
pub /* StructureGenerator.kt:201 */ struct GetServerStatisticsOutput {
  203         -
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
  204         -
    pub calls_count: i64,
         200  +
pub /* StructureGenerator.kt:201 */ struct GetStorageOutput {
         201  +
    /// /* StructureGenerator.kt:231 */A list of Pokémon species.
         202  +
    pub collection: ::std::vec::Vec<::std::string::String>,
  205    203   
    /* StructureGenerator.kt:201 */
  206    204   
}
  207    205   
/* StructureGenerator.kt:135 */
  208         -
impl GetServerStatisticsOutput {
  209         -
    /// /* StructureGenerator.kt:231 */The number of calls executed by the server.
         206  +
impl GetStorageOutput {
         207  +
    /// /* StructureGenerator.kt:231 */A list of Pokémon species.
  210    208   
    /* StructureGenerator.kt:166 */
  211         -
    pub fn calls_count(&self) -> i64 {
  212         -
        /* StructureGenerator.kt:168 */
  213         -
        self.calls_count
         209  +
    pub fn collection(&self) -> &[::std::string::String] {
         210  +
        /* StructureGenerator.kt:171 */
         211  +
        use std::ops::Deref;
         212  +
        self.collection.deref()
  214    213   
        /* StructureGenerator.kt:166 */
  215    214   
    }
  216    215   
    /* StructureGenerator.kt:135 */
  217    216   
}
  218    217   
/* ServerCodegenVisitor.kt:356 */
  219         -
impl GetServerStatisticsOutput {
  220         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         218  +
impl GetStorageOutput {
         219  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GetStorageOutput`](crate::output::GetStorageOutput).
  221    220   
    /* ServerBuilderGenerator.kt:295 */
  222         -
    pub fn builder() -> crate::output::get_server_statistics_output::Builder {
         221  +
    pub fn builder() -> crate::output::get_storage_output::Builder {
  223    222   
        /* ServerBuilderGenerator.kt:296 */
  224         -
        crate::output::get_server_statistics_output::Builder::default()
         223  +
        crate::output::get_storage_output::Builder::default()
  225    224   
        /* ServerBuilderGenerator.kt:295 */
  226    225   
    }
  227    226   
    /* ServerCodegenVisitor.kt:356 */
  228    227   
}
  229         -
/// /* ServerBuilderGenerator.kt:171 */See [`GetStorageOutput`](crate::output::GetStorageOutput).
  230         -
pub mod get_storage_output {
         228  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         229  +
pub mod get_server_statistics_output {
  231    230   
  232    231   
    /* RustType.kt:534 */
  233    232   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  234    233   
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
  235    234   
    /* RustType.kt:534 */
  236    235   
    #[non_exhaustive]
  237    236   
    /* ServerBuilderConstraintViolations.kt:75 */
  238    237   
    #[allow(clippy::enum_variant_names)]
  239    238   
    pub enum ConstraintViolation {
  240         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`collection` was not provided but it is required when building `GetStorageOutput`.
         239  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
  241    240   
        /* ServerBuilderConstraintViolations.kt:144 */
  242         -
        MissingCollection,
         241  +
        MissingCallsCount,
  243    242   
        /* ServerBuilderConstraintViolations.kt:75 */
  244    243   
    }
  245    244   
    /* ServerBuilderConstraintViolations.kt:116 */
  246    245   
    impl ::std::fmt::Display for ConstraintViolation {
  247    246   
        /* ServerBuilderConstraintViolations.kt:117 */
  248    247   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  249    248   
            /* ServerBuilderConstraintViolations.kt:118 */
  250    249   
            match self {
  251         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingCollection => write!(f, "`collection` was not provided but it is required when building `GetStorageOutput`"),
         250  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
  252    251   
            /* ServerBuilderConstraintViolations.kt:118 */}
  253    252   
            /* ServerBuilderConstraintViolations.kt:117 */
  254    253   
        }
  255    254   
        /* ServerBuilderConstraintViolations.kt:116 */
  256    255   
    }
  257    256   
    /* ServerBuilderConstraintViolations.kt:83 */
  258    257   
    impl ::std::error::Error for ConstraintViolation {}
  259    258   
    /* ServerBuilderGenerator.kt:446 */
  260         -
    impl ::std::convert::TryFrom<Builder> for crate::output::GetStorageOutput {
         259  +
    impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
  261    260   
        type Error = ConstraintViolation;
  262    261   
  263    262   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  264    263   
            builder.build()
  265    264   
        }
  266    265   
    }
  267         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetStorageOutput`](crate::output::GetStorageOutput).
         266  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  268    267   
    /* RustType.kt:534 */
  269    268   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  270    269   
    /* ServerBuilderGenerator.kt:211 */
  271    270   
    pub struct Builder {
  272    271   
        /* ServerBuilderGenerator.kt:308 */
  273         -
        pub(crate) collection: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         272  +
        pub(crate) calls_count: ::std::option::Option<i64>,
  274    273   
        /* ServerBuilderGenerator.kt:211 */
  275    274   
    }
  276    275   
    /* ServerBuilderGenerator.kt:215 */
  277    276   
    impl Builder {
  278         -
        /// /* ServerBuilderGenerator.kt:331 */A list of Pokémon species.
         277  +
        /// /* ServerBuilderGenerator.kt:331 */The number of calls executed by the server.
  279    278   
        /* ServerBuilderGenerator.kt:343 */
  280         -
        pub fn collection(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
         279  +
        pub fn calls_count(mut self, input: i64) -> Self {
  281    280   
            /* ServerBuilderGenerator.kt:344 */
  282         -
            self.collection =
         281  +
            self.calls_count =
  283    282   
                /* ServerBuilderGenerator.kt:345 */Some(
  284    283   
                    /* ServerBuilderGenerator.kt:376 */input
  285    284   
                /* ServerBuilderGenerator.kt:345 */)
  286    285   
            /* ServerBuilderGenerator.kt:344 */;
  287    286   
            self
  288    287   
            /* ServerBuilderGenerator.kt:343 */
  289    288   
        }
  290         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetStorageOutput`](crate::output::GetStorageOutput).
         289  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  291    290   
        /// /* ServerBuilderGenerator.kt:260 */
  292         -
        /// The builder fails to construct a [`GetStorageOutput`](crate::output::GetStorageOutput) if a [`ConstraintViolation`] occurs.
         291  +
        /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if a [`ConstraintViolation`] occurs.
  293    292   
        ///
  294    293   
        /* ServerBuilderGenerator.kt:271 */
  295         -
        pub fn build(self) -> Result<crate::output::GetStorageOutput, ConstraintViolation> {
  296         -
            self.build_enforcing_all_constraints()
  297         -
        }
  298         -
        /* ServerBuilderGenerator.kt:283 */
  299         -
        fn build_enforcing_all_constraints(
         294  +
        pub fn build(
  300    295   
            self,
  301         -
        ) -> Result<crate::output::GetStorageOutput, ConstraintViolation> {
  302         -
            /* ServerBuilderGenerator.kt:287 */
  303         -
            Ok(
  304         -
                /* ServerBuilderGenerator.kt:542 */
  305         -
                crate::output::GetStorageOutput {
  306         -
                    /* ServerBuilderGenerator.kt:546 */
  307         -
                    collection: self
  308         -
                        .collection
  309         -
                        /* ServerBuilderGenerator.kt:569 */
  310         -
                        .ok_or(ConstraintViolation::MissingCollection)?,
  311         -
                    /* ServerBuilderGenerator.kt:542 */
  312         -
                }, /* ServerBuilderGenerator.kt:287 */
  313         -
            )
  314         -
            /* ServerBuilderGenerator.kt:283 */
  315         -
        }
  316         -
        /* ServerBuilderGenerator.kt:215 */
  317         -
    }
  318         -
  319         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  320         -
}
  321         -
/// /* ServerBuilderGenerator.kt:171 */See [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  322         -
pub mod get_pokemon_species_output {
  323         -
  324         -
    /* RustType.kt:534 */
  325         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  326         -
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
  327         -
    /* RustType.kt:534 */
  328         -
    #[non_exhaustive]
  329         -
    /* ServerBuilderConstraintViolations.kt:75 */
  330         -
    #[allow(clippy::enum_variant_names)]
  331         -
    pub enum ConstraintViolation {
  332         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`name` was not provided but it is required when building `GetPokemonSpeciesOutput`.
  333         -
        /* ServerBuilderConstraintViolations.kt:144 */
  334         -
        MissingName,
  335         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`.
  336         -
        /* ServerBuilderConstraintViolations.kt:144 */
  337         -
        MissingFlavorTextEntries,
  338         -
        /* ServerBuilderConstraintViolations.kt:75 */
  339         -
    }
  340         -
    /* ServerBuilderConstraintViolations.kt:116 */
  341         -
    impl ::std::fmt::Display for ConstraintViolation {
  342         -
        /* ServerBuilderConstraintViolations.kt:117 */
  343         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  344         -
            /* ServerBuilderConstraintViolations.kt:118 */
  345         -
            match self {
  346         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
  347         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingFlavorTextEntries => write!(f, "`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
  348         -
            /* ServerBuilderConstraintViolations.kt:118 */}
  349         -
            /* ServerBuilderConstraintViolations.kt:117 */
  350         -
        }
  351         -
        /* ServerBuilderConstraintViolations.kt:116 */
  352         -
    }
  353         -
    /* ServerBuilderConstraintViolations.kt:83 */
  354         -
    impl ::std::error::Error for ConstraintViolation {}
  355         -
    /* ServerBuilderGenerator.kt:446 */
  356         -
    impl ::std::convert::TryFrom<Builder> for crate::output::GetPokemonSpeciesOutput {
  357         -
        type Error = ConstraintViolation;
  358         -
  359         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  360         -
            builder.build()
  361         -
        }
  362         -
    }
  363         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  364         -
    /* RustType.kt:534 */
  365         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  366         -
    /* ServerBuilderGenerator.kt:211 */
  367         -
    pub struct Builder {
  368         -
        /* ServerBuilderGenerator.kt:308 */
  369         -
        pub(crate) name: ::std::option::Option<::std::string::String>,
  370         -
        /* ServerBuilderGenerator.kt:308 */
  371         -
        pub(crate) flavor_text_entries:
  372         -
            ::std::option::Option<::std::vec::Vec<crate::model::FlavorText>>,
  373         -
        /* ServerBuilderGenerator.kt:211 */
  374         -
    }
  375         -
    /* ServerBuilderGenerator.kt:215 */
  376         -
    impl Builder {
  377         -
        /// /* ServerBuilderGenerator.kt:331 */The name for this resource.
  378         -
        /* ServerBuilderGenerator.kt:343 */
  379         -
        pub fn name(mut self, input: ::std::string::String) -> Self {
  380         -
            /* ServerBuilderGenerator.kt:344 */
  381         -
            self.name =
  382         -
                /* ServerBuilderGenerator.kt:345 */Some(
  383         -
                    /* ServerBuilderGenerator.kt:376 */input
  384         -
                /* ServerBuilderGenerator.kt:345 */)
  385         -
            /* ServerBuilderGenerator.kt:344 */;
  386         -
            self
  387         -
            /* ServerBuilderGenerator.kt:343 */
  388         -
        }
  389         -
        /// /* ServerBuilderGenerator.kt:331 */A list of flavor text entries for this Pokémon species.
  390         -
        /* ServerBuilderGenerator.kt:343 */
  391         -
        pub fn flavor_text_entries(
  392         -
            mut self,
  393         -
            input: ::std::vec::Vec<crate::model::FlavorText>,
  394         -
        ) -> Self {
  395         -
            /* ServerBuilderGenerator.kt:344 */
  396         -
            self.flavor_text_entries =
  397         -
                /* ServerBuilderGenerator.kt:345 */Some(
  398         -
                    /* ServerBuilderGenerator.kt:376 */input
  399         -
                /* ServerBuilderGenerator.kt:345 */)
  400         -
            /* ServerBuilderGenerator.kt:344 */;
  401         -
            self
  402         -
            /* ServerBuilderGenerator.kt:343 */
  403         -
        }
  404         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  405         -
        /// /* ServerBuilderGenerator.kt:260 */
  406         -
        /// The builder fails to construct a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput) if a [`ConstraintViolation`] occurs.
  407         -
        ///
  408         -
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  409         -
        /* ServerBuilderGenerator.kt:271 */
  410         -
        pub fn build(self) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
         296  +
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
  411    297   
            self.build_enforcing_all_constraints()
  412    298   
        }
  413    299   
        /* ServerBuilderGenerator.kt:283 */
  414    300   
        fn build_enforcing_all_constraints(
  415    301   
            self,
  416         -
        ) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
         302  +
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
  417    303   
            /* ServerBuilderGenerator.kt:287 */
  418    304   
            Ok(
  419    305   
                /* ServerBuilderGenerator.kt:542 */
  420         -
                crate::output::GetPokemonSpeciesOutput {
  421         -
                    /* ServerBuilderGenerator.kt:546 */
  422         -
                    name: self
  423         -
                        .name
  424         -
                        /* ServerBuilderGenerator.kt:569 */
  425         -
                        .ok_or(ConstraintViolation::MissingName)?,
  426         -
                    /* ServerBuilderGenerator.kt:546 */
  427         -
                    flavor_text_entries: self
  428         -
                        .flavor_text_entries
  429         -
                        /* ServerBuilderGenerator.kt:569 */
  430         -
                        .ok_or(ConstraintViolation::MissingFlavorTextEntries)?,
  431         -
                    /* ServerBuilderGenerator.kt:542 */
  432         -
                }, /* ServerBuilderGenerator.kt:287 */
  433         -
            )
  434         -
            /* ServerBuilderGenerator.kt:283 */
  435         -
        }
  436         -
        /* ServerBuilderGenerator.kt:215 */
  437         -
    }
  438         -
  439         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  440         -
}
  441         -
/// /* ServerBuilderGenerator.kt:171 */See [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
  442         -
pub mod stream_pokemon_radio_output {
  443         -
  444         -
    /* ServerBuilderGenerator.kt:461 */
  445         -
    impl ::std::convert::From<Builder> for crate::output::StreamPokemonRadioOutput {
  446         -
        fn from(builder: Builder) -> Self {
  447         -
            builder.build()
  448         -
        }
  449         -
    }
  450         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
  451         -
    /* RustType.kt:534 */
  452         -
    #[derive(::std::default::Default, ::std::fmt::Debug)]
  453         -
    /* ServerBuilderGenerator.kt:211 */
  454         -
    pub struct Builder {
  455         -
        /* ServerBuilderGenerator.kt:308 */
  456         -
        pub(crate) data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
  457         -
        /* ServerBuilderGenerator.kt:211 */
  458         -
    }
  459         -
    /* ServerBuilderGenerator.kt:215 */
  460         -
    impl Builder {
  461         -
        /* ServerBuilderGenerator.kt:331 */
  462         -
        #[allow(missing_docs)] // documentation missing in model
  463         -
                               /* ServerBuilderGenerator.kt:343 */
  464         -
        pub fn data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
  465         -
            /* ServerBuilderGenerator.kt:344 */
  466         -
            self.data =
  467         -
                /* ServerBuilderGenerator.kt:345 */Some(
  468         -
                    /* ServerBuilderGenerator.kt:376 */input
  469         -
                /* ServerBuilderGenerator.kt:345 */)
  470         -
            /* ServerBuilderGenerator.kt:344 */;
  471         -
            self
  472         -
            /* ServerBuilderGenerator.kt:343 */
  473         -
        }
  474         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
  475         -
        /* ServerBuilderGenerator.kt:271 */
  476         -
        pub fn build(self) -> crate::output::StreamPokemonRadioOutput {
  477         -
            self.build_enforcing_all_constraints()
  478         -
        }
  479         -
        /* ServerBuilderGenerator.kt:283 */
  480         -
        fn build_enforcing_all_constraints(self) -> crate::output::StreamPokemonRadioOutput {
  481         -
            /* ServerBuilderGenerator.kt:542 */
  482         -
            crate::output::StreamPokemonRadioOutput {
  483         -
                /* ServerBuilderGenerator.kt:546 */
  484         -
                data: self
  485         -
                    .data
  486         -
                    /* ServerBuilderGeneratorCommon.kt:95 */
  487         -
                    .unwrap_or_default(),
  488         -
                /* ServerBuilderGenerator.kt:542 */
  489         -
            }
         306  +
                crate::output::GetServerStatisticsOutput {
         307  +
                    /* ServerBuilderGenerator.kt:546 */
         308  +
                    calls_count: self
         309  +
                        .calls_count
         310  +
                        /* ServerBuilderGenerator.kt:569 */
         311  +
                        .ok_or(ConstraintViolation::MissingCallsCount)?,
         312  +
                    /* ServerBuilderGenerator.kt:542 */
         313  +
                }, /* ServerBuilderGenerator.kt:287 */
         314  +
            )
  490    315   
            /* ServerBuilderGenerator.kt:283 */
  491    316   
        }
  492    317   
        /* ServerBuilderGenerator.kt:215 */
  493    318   
    }
  494    319   
  495    320   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  496    321   
}
  497         -
/// /* ServerBuilderGenerator.kt:171 */See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  498         -
pub mod check_health_output {
         322  +
/// /* ServerBuilderGenerator.kt:171 */See [`DoNothingOutput`](crate::output::DoNothingOutput).
         323  +
pub mod do_nothing_output {
  499    324   
  500    325   
    /* ServerBuilderGenerator.kt:461 */
  501         -
    impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
         326  +
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
  502    327   
        fn from(builder: Builder) -> Self {
  503    328   
            builder.build()
  504    329   
        }
  505    330   
    }
  506         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         331  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
  507    332   
    /* RustType.kt:534 */
  508    333   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  509    334   
    /* ServerBuilderGenerator.kt:211 */
  510    335   
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
  511    336   
    /* ServerBuilderGenerator.kt:215 */
  512    337   
    impl Builder {
  513         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         338  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
  514    339   
        /* ServerBuilderGenerator.kt:271 */
  515         -
        pub fn build(self) -> crate::output::CheckHealthOutput {
         340  +
        pub fn build(self) -> crate::output::DoNothingOutput {
  516    341   
            self.build_enforcing_all_constraints()
  517    342   
        }
  518    343   
        /* ServerBuilderGenerator.kt:283 */
  519         -
        fn build_enforcing_all_constraints(self) -> crate::output::CheckHealthOutput {
         344  +
        fn build_enforcing_all_constraints(self) -> crate::output::DoNothingOutput {
  520    345   
            /* ServerBuilderGenerator.kt:542 */
  521         -
            crate::output::CheckHealthOutput {
         346  +
            crate::output::DoNothingOutput {
  522    347   
            /* ServerBuilderGenerator.kt:542 */}
  523    348   
            /* ServerBuilderGenerator.kt:283 */
  524    349   
        }
  525    350   
        /* ServerBuilderGenerator.kt:215 */
  526    351   
    }
  527    352   
  528    353   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  529    354   
}
  530    355   
/// /* ServerBuilderGenerator.kt:171 */See [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
  531    356   
pub mod capture_pokemon_output {
@@ -604,429 +760,759 @@
  624    449   
                    /* ServerBuilderGenerator.kt:542 */
  625    450   
                }, /* ServerBuilderGenerator.kt:287 */
  626    451   
            )
  627    452   
            /* ServerBuilderGenerator.kt:283 */
  628    453   
        }
  629    454   
        /* ServerBuilderGenerator.kt:215 */
  630    455   
    }
  631    456   
  632    457   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  633    458   
}
  634         -
/// /* ServerBuilderGenerator.kt:171 */See [`DoNothingOutput`](crate::output::DoNothingOutput).
  635         -
pub mod do_nothing_output {
         459  +
/// /* ServerBuilderGenerator.kt:171 */See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
         460  +
pub mod check_health_output {
  636    461   
  637    462   
    /* ServerBuilderGenerator.kt:461 */
  638         -
    impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
         463  +
    impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
  639    464   
        fn from(builder: Builder) -> Self {
  640    465   
            builder.build()
  641    466   
        }
  642    467   
    }
  643         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
         468  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  644    469   
    /* RustType.kt:534 */
  645    470   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  646    471   
    /* ServerBuilderGenerator.kt:211 */
  647    472   
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
  648    473   
    /* ServerBuilderGenerator.kt:215 */
  649    474   
    impl Builder {
  650         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
         475  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
  651    476   
        /* ServerBuilderGenerator.kt:271 */
  652         -
        pub fn build(self) -> crate::output::DoNothingOutput {
         477  +
        pub fn build(self) -> crate::output::CheckHealthOutput {
  653    478   
            self.build_enforcing_all_constraints()
  654    479   
        }
  655    480   
        /* ServerBuilderGenerator.kt:283 */
  656         -
        fn build_enforcing_all_constraints(self) -> crate::output::DoNothingOutput {
         481  +
        fn build_enforcing_all_constraints(self) -> crate::output::CheckHealthOutput {
  657    482   
            /* ServerBuilderGenerator.kt:542 */
  658         -
            crate::output::DoNothingOutput {
         483  +
            crate::output::CheckHealthOutput {
  659    484   
            /* ServerBuilderGenerator.kt:542 */}
  660    485   
            /* ServerBuilderGenerator.kt:283 */
  661    486   
        }
  662    487   
        /* ServerBuilderGenerator.kt:215 */
  663    488   
    }
  664    489   
  665    490   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  666    491   
}
  667         -
/// /* ServerBuilderGenerator.kt:171 */See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
  668         -
pub mod get_server_statistics_output {
         492  +
/// /* ServerBuilderGenerator.kt:171 */See [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
         493  +
pub mod stream_pokemon_radio_output {
         494  +
         495  +
    /* ServerBuilderGenerator.kt:461 */
         496  +
    impl ::std::convert::From<Builder> for crate::output::StreamPokemonRadioOutput {
         497  +
        fn from(builder: Builder) -> Self {
         498  +
            builder.build()
         499  +
        }
         500  +
    }
         501  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
         502  +
    /* RustType.kt:534 */
         503  +
    #[derive(::std::default::Default, ::std::fmt::Debug)]
         504  +
    /* ServerBuilderGenerator.kt:211 */
         505  +
    pub struct Builder {
         506  +
        /* ServerBuilderGenerator.kt:308 */
         507  +
        pub(crate) data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
         508  +
        /* ServerBuilderGenerator.kt:211 */
         509  +
    }
         510  +
    /* ServerBuilderGenerator.kt:215 */
         511  +
    impl Builder {
         512  +
        /* ServerBuilderGenerator.kt:331 */
         513  +
        #[allow(missing_docs)] // documentation missing in model
         514  +
                               /* ServerBuilderGenerator.kt:343 */
         515  +
        pub fn data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
         516  +
            /* ServerBuilderGenerator.kt:344 */
         517  +
            self.data =
         518  +
                /* ServerBuilderGenerator.kt:345 */Some(
         519  +
                    /* ServerBuilderGenerator.kt:376 */input
         520  +
                /* ServerBuilderGenerator.kt:345 */)
         521  +
            /* ServerBuilderGenerator.kt:344 */;
         522  +
            self
         523  +
            /* ServerBuilderGenerator.kt:343 */
         524  +
        }
         525  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StreamPokemonRadioOutput`](crate::output::StreamPokemonRadioOutput).
         526  +
        /* ServerBuilderGenerator.kt:271 */
         527  +
        pub fn build(self) -> crate::output::StreamPokemonRadioOutput {
         528  +
            self.build_enforcing_all_constraints()
         529  +
        }
         530  +
        /* ServerBuilderGenerator.kt:283 */
         531  +
        fn build_enforcing_all_constraints(self) -> crate::output::StreamPokemonRadioOutput {
         532  +
            /* ServerBuilderGenerator.kt:542 */
         533  +
            crate::output::StreamPokemonRadioOutput {
         534  +
                /* ServerBuilderGenerator.kt:546 */
         535  +
                data: self
         536  +
                    .data
         537  +
                    /* ServerBuilderGeneratorCommon.kt:95 */
         538  +
                    .unwrap_or_default(),
         539  +
                /* ServerBuilderGenerator.kt:542 */
         540  +
            }
         541  +
            /* ServerBuilderGenerator.kt:283 */
         542  +
        }
         543  +
        /* ServerBuilderGenerator.kt:215 */
         544  +
    }
         545  +
         546  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
         547  +
}
         548  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
         549  +
pub mod get_pokemon_species_output {
  669    550   
  670    551   
    /* RustType.kt:534 */
  671    552   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  672    553   
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
  673    554   
    /* RustType.kt:534 */
  674    555   
    #[non_exhaustive]
  675    556   
    /* ServerBuilderConstraintViolations.kt:75 */
  676    557   
    #[allow(clippy::enum_variant_names)]
  677    558   
    pub enum ConstraintViolation {
  678         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
         559  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`name` was not provided but it is required when building `GetPokemonSpeciesOutput`.
  679    560   
        /* ServerBuilderConstraintViolations.kt:144 */
  680         -
        MissingCallsCount,
         561  +
        MissingName,
         562  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`.
         563  +
        /* ServerBuilderConstraintViolations.kt:144 */
         564  +
        MissingFlavorTextEntries,
  681    565   
        /* ServerBuilderConstraintViolations.kt:75 */
  682    566   
    }
  683    567   
    /* ServerBuilderConstraintViolations.kt:116 */
  684    568   
    impl ::std::fmt::Display for ConstraintViolation {
  685    569   
        /* ServerBuilderConstraintViolations.kt:117 */
  686    570   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  687    571   
            /* ServerBuilderConstraintViolations.kt:118 */
  688    572   
            match self {
  689         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
         573  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingName => write!(f, "`name` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
         574  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingFlavorTextEntries => write!(f, "`flavor_text_entries` was not provided but it is required when building `GetPokemonSpeciesOutput`"),
  690    575   
            /* ServerBuilderConstraintViolations.kt:118 */}
  691    576   
            /* ServerBuilderConstraintViolations.kt:117 */
  692    577   
        }
  693    578   
        /* ServerBuilderConstraintViolations.kt:116 */
  694    579   
    }
  695    580   
    /* ServerBuilderConstraintViolations.kt:83 */
  696    581   
    impl ::std::error::Error for ConstraintViolation {}
  697    582   
    /* ServerBuilderGenerator.kt:446 */
  698         -
    impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
         583  +
    impl ::std::convert::TryFrom<Builder> for crate::output::GetPokemonSpeciesOutput {
  699    584   
        type Error = ConstraintViolation;
  700    585   
  701    586   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  702    587   
            builder.build()
  703    588   
        }
  704    589   
    }
  705         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         590  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  706    591   
    /* RustType.kt:534 */
  707    592   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  708    593   
    /* ServerBuilderGenerator.kt:211 */
  709    594   
    pub struct Builder {
  710    595   
        /* ServerBuilderGenerator.kt:308 */
  711         -
        pub(crate) calls_count: ::std::option::Option<i64>,
         596  +
        pub(crate) name: ::std::option::Option<::std::string::String>,
         597  +
        /* ServerBuilderGenerator.kt:308 */
         598  +
        pub(crate) flavor_text_entries:
         599  +
            ::std::option::Option<::std::vec::Vec<crate::model::FlavorText>>,
  712    600   
        /* ServerBuilderGenerator.kt:211 */
  713    601   
    }
  714    602   
    /* ServerBuilderGenerator.kt:215 */
  715    603   
    impl Builder {
  716         -
        /// /* ServerBuilderGenerator.kt:331 */The number of calls executed by the server.
         604  +
        /// /* ServerBuilderGenerator.kt:331 */The name for this resource.
  717    605   
        /* ServerBuilderGenerator.kt:343 */
  718         -
        pub fn calls_count(mut self, input: i64) -> Self {
         606  +
        pub fn name(mut self, input: ::std::string::String) -> Self {
  719    607   
            /* ServerBuilderGenerator.kt:344 */
  720         -
            self.calls_count =
         608  +
            self.name =
  721    609   
                /* ServerBuilderGenerator.kt:345 */Some(
  722    610   
                    /* ServerBuilderGenerator.kt:376 */input
  723    611   
                /* ServerBuilderGenerator.kt:345 */)
  724    612   
            /* ServerBuilderGenerator.kt:344 */;
  725    613   
            self
  726    614   
            /* ServerBuilderGenerator.kt:343 */
  727    615   
        }
  728         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
         616  +
        /// /* ServerBuilderGenerator.kt:331 */A list of flavor text entries for this Pokémon species.
         617  +
        /* ServerBuilderGenerator.kt:343 */
         618  +
        pub fn flavor_text_entries(
         619  +
            mut self,
         620  +
            input: ::std::vec::Vec<crate::model::FlavorText>,
         621  +
        ) -> Self {
         622  +
            /* ServerBuilderGenerator.kt:344 */
         623  +
            self.flavor_text_entries =
         624  +
                /* ServerBuilderGenerator.kt:345 */Some(
         625  +
                    /* ServerBuilderGenerator.kt:376 */input
         626  +
                /* ServerBuilderGenerator.kt:345 */)
         627  +
            /* ServerBuilderGenerator.kt:344 */;
         628  +
            self
         629  +
            /* ServerBuilderGenerator.kt:343 */
         630  +
        }
         631  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput).
  729    632   
        /// /* ServerBuilderGenerator.kt:260 */
  730         -
        /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if a [`ConstraintViolation`] occurs.
         633  +
        /// The builder fails to construct a [`GetPokemonSpeciesOutput`](crate::output::GetPokemonSpeciesOutput) if a [`ConstraintViolation`] occurs.
  731    634   
        ///
         635  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  732    636   
        /* ServerBuilderGenerator.kt:271 */
  733         -
        pub fn build(
         637  +
        pub fn build(self) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
         638  +
            self.build_enforcing_all_constraints()
         639  +
        }
         640  +
        /* ServerBuilderGenerator.kt:283 */
         641  +
        fn build_enforcing_all_constraints(
  734    642   
            self,
  735         -
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
         643  +
        ) -> Result<crate::output::GetPokemonSpeciesOutput, ConstraintViolation> {
         644  +
            /* ServerBuilderGenerator.kt:287 */
         645  +
            Ok(
         646  +
                /* ServerBuilderGenerator.kt:542 */
         647  +
                crate::output::GetPokemonSpeciesOutput {
         648  +
                    /* ServerBuilderGenerator.kt:546 */
         649  +
                    name: self
         650  +
                        .name
         651  +
                        /* ServerBuilderGenerator.kt:569 */
         652  +
                        .ok_or(ConstraintViolation::MissingName)?,
         653  +
                    /* ServerBuilderGenerator.kt:546 */
         654  +
                    flavor_text_entries: self
         655  +
                        .flavor_text_entries
         656  +
                        /* ServerBuilderGenerator.kt:569 */
         657  +
                        .ok_or(ConstraintViolation::MissingFlavorTextEntries)?,
         658  +
                    /* ServerBuilderGenerator.kt:542 */
         659  +
                }, /* ServerBuilderGenerator.kt:287 */
         660  +
            )
         661  +
            /* ServerBuilderGenerator.kt:283 */
         662  +
        }
         663  +
        /* ServerBuilderGenerator.kt:215 */
         664  +
    }
         665  +
         666  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
         667  +
}
         668  +
/// /* ServerBuilderGenerator.kt:171 */See [`GetStorageOutput`](crate::output::GetStorageOutput).
         669  +
pub mod get_storage_output {
         670  +
         671  +
    /* RustType.kt:534 */
         672  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         673  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         674  +
    /* RustType.kt:534 */
         675  +
    #[non_exhaustive]
         676  +
    /* ServerBuilderConstraintViolations.kt:75 */
         677  +
    #[allow(clippy::enum_variant_names)]
         678  +
    pub enum ConstraintViolation {
         679  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`collection` was not provided but it is required when building `GetStorageOutput`.
         680  +
        /* ServerBuilderConstraintViolations.kt:144 */
         681  +
        MissingCollection,
         682  +
        /* ServerBuilderConstraintViolations.kt:75 */
         683  +
    }
         684  +
    /* ServerBuilderConstraintViolations.kt:116 */
         685  +
    impl ::std::fmt::Display for ConstraintViolation {
         686  +
        /* ServerBuilderConstraintViolations.kt:117 */
         687  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         688  +
            /* ServerBuilderConstraintViolations.kt:118 */
         689  +
            match self {
         690  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingCollection => write!(f, "`collection` was not provided but it is required when building `GetStorageOutput`"),
         691  +
            /* ServerBuilderConstraintViolations.kt:118 */}
         692  +
            /* ServerBuilderConstraintViolations.kt:117 */
         693  +
        }
         694  +
        /* ServerBuilderConstraintViolations.kt:116 */
         695  +
    }
         696  +
    /* ServerBuilderConstraintViolations.kt:83 */
         697  +
    impl ::std::error::Error for ConstraintViolation {}
         698  +
    /* ServerBuilderGenerator.kt:446 */
         699  +
    impl ::std::convert::TryFrom<Builder> for crate::output::GetStorageOutput {
         700  +
        type Error = ConstraintViolation;
         701  +
         702  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         703  +
            builder.build()
         704  +
        }
         705  +
    }
         706  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GetStorageOutput`](crate::output::GetStorageOutput).
         707  +
    /* RustType.kt:534 */
         708  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         709  +
    /* ServerBuilderGenerator.kt:211 */
         710  +
    pub struct Builder {
         711  +
        /* ServerBuilderGenerator.kt:308 */
         712  +
        pub(crate) collection: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         713  +
        /* ServerBuilderGenerator.kt:211 */
         714  +
    }
         715  +
    /* ServerBuilderGenerator.kt:215 */
         716  +
    impl Builder {
         717  +
        /// /* ServerBuilderGenerator.kt:331 */A list of Pokémon species.
         718  +
        /* ServerBuilderGenerator.kt:343 */
         719  +
        pub fn collection(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
         720  +
            /* ServerBuilderGenerator.kt:344 */
         721  +
            self.collection =
         722  +
                /* ServerBuilderGenerator.kt:345 */Some(
         723  +
                    /* ServerBuilderGenerator.kt:376 */input
         724  +
                /* ServerBuilderGenerator.kt:345 */)
         725  +
            /* ServerBuilderGenerator.kt:344 */;
         726  +
            self
         727  +
            /* ServerBuilderGenerator.kt:343 */
         728  +
        }
         729  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GetStorageOutput`](crate::output::GetStorageOutput).
         730  +
        /// /* ServerBuilderGenerator.kt:260 */
         731  +
        /// The builder fails to construct a [`GetStorageOutput`](crate::output::GetStorageOutput) if a [`ConstraintViolation`] occurs.
         732  +
        ///
         733  +
        /* ServerBuilderGenerator.kt:271 */
         734  +
        pub fn build(self) -> Result<crate::output::GetStorageOutput, ConstraintViolation> {
  736    735   
            self.build_enforcing_all_constraints()
  737    736   
        }
  738    737   
        /* ServerBuilderGenerator.kt:283 */
  739    738   
        fn build_enforcing_all_constraints(
  740    739   
            self,
  741         -
        ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
         740  +
        ) -> Result<crate::output::GetStorageOutput, ConstraintViolation> {
  742    741   
            /* ServerBuilderGenerator.kt:287 */
  743    742   
            Ok(
  744    743   
                /* ServerBuilderGenerator.kt:542 */
  745         -
                crate::output::GetServerStatisticsOutput {
         744  +
                crate::output::GetStorageOutput {
  746    745   
                    /* ServerBuilderGenerator.kt:546 */
  747         -
                    calls_count: self
  748         -
                        .calls_count
         746  +
                    collection: self
         747  +
                        .collection
  749    748   
                        /* ServerBuilderGenerator.kt:569 */
  750         -
                        .ok_or(ConstraintViolation::MissingCallsCount)?,
         749  +
                        .ok_or(ConstraintViolation::MissingCollection)?,
  751    750   
                    /* ServerBuilderGenerator.kt:542 */
  752    751   
                }, /* ServerBuilderGenerator.kt:287 */
  753    752   
            )
  754    753   
            /* ServerBuilderGenerator.kt:283 */
  755    754   
        }
  756    755   
        /* ServerBuilderGenerator.kt:215 */
  757    756   
    }
  758    757   
  759    758   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  760    759   
}