Server Test Python

Server Test Python

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

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

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

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

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

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

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

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

@@ -1,1 +31,100 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[::pyo3::pyclass]
           3  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
           4  +
pub struct CapturePokemonInputEventsReceiver {
           5  +
    inner: ::std::sync::Arc<
           6  +
        ::tokio::sync::Mutex<
           7  +
            ::aws_smithy_legacy_http::event_stream::Receiver<
           8  +
                crate::model::AttemptCapturingPokemonEvent,
           9  +
                crate::error::AttemptCapturingPokemonEventError,
          10  +
            >,
          11  +
        >,
          12  +
    >,
          13  +
}
          14  +
impl CapturePokemonInputEventsReceiver {
          15  +
    pub fn new(
          16  +
        unmarshaller: impl ::aws_smithy_eventstream::frame::UnmarshallMessage<
          17  +
                Output = crate::model::AttemptCapturingPokemonEvent,
          18  +
                Error = crate::error::AttemptCapturingPokemonEventError,
          19  +
            > + ::std::marker::Send
          20  +
            + ::std::marker::Sync
          21  +
            + 'static,
          22  +
        body: ::aws_smithy_types::body::SdkBody,
          23  +
    ) -> CapturePokemonInputEventsReceiver {
          24  +
        let inner = ::aws_smithy_legacy_http::event_stream::Receiver::new(unmarshaller, body);
          25  +
        let inner = ::std::sync::Arc::new(::tokio::sync::Mutex::new(inner));
          26  +
        CapturePokemonInputEventsReceiver { inner }
          27  +
    }
          28  +
          29  +
    pub async fn try_recv_initial(
          30  +
        &mut self,
          31  +
        message_type: ::aws_smithy_legacy_http::event_stream::InitialMessageType,
          32  +
    ) -> Result<
          33  +
        ::std::option::Option<::aws_smithy_types::event_stream::Message>,
          34  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          35  +
            crate::error::AttemptCapturingPokemonEventError,
          36  +
            ::aws_smithy_types::event_stream::RawMessage,
          37  +
        >,
          38  +
    > {
          39  +
        let mut inner = self.inner.lock().await;
          40  +
        inner.try_recv_initial(message_type).await
          41  +
    }
          42  +
}
          43  +
#[::pyo3::pymethods]
          44  +
impl CapturePokemonInputEventsReceiver {
          45  +
    pub fn __aiter__(slf: ::pyo3::PyRef<Self>) -> ::pyo3::PyRef<Self> {
          46  +
        slf
          47  +
    }
          48  +
          49  +
    pub fn __anext__(slf: ::pyo3::PyRefMut<Self>) -> ::pyo3::PyResult<Option<::pyo3::PyObject>> {
          50  +
        let body = slf.inner.clone();
          51  +
        let fut = ::pyo3_asyncio::tokio::future_into_py(slf.py(), async move {
          52  +
            let mut inner = body.lock().await;
          53  +
            let next = inner.recv().await;
          54  +
            match next {
          55  +
                Ok(Some(data)) => Ok(::pyo3::Python::with_gil(|py| {
          56  +
                    ::pyo3::IntoPy::into_py(data, py)
          57  +
                })),
          58  +
                Ok(None) => Err(::pyo3::exceptions::PyStopAsyncIteration::new_err(
          59  +
                    "stream exhausted",
          60  +
                )),
          61  +
                Err(::aws_smithy_runtime_api::client::result::SdkError::ServiceError(
          62  +
                    service_err,
          63  +
                )) => Err(service_err.into_err().into()),
          64  +
                Err(err) => Err(::pyo3::exceptions::PyRuntimeError::new_err(err.to_string())),
          65  +
            }
          66  +
        })?;
          67  +
        Ok(Some(fut.into()))
          68  +
    }
          69  +
}
          70  +
    2     71   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
    3     72   
pub struct CapturePokemonOutputEventsEventStreamSender {
    4     73   
    inner: ::std::sync::Arc<
    5     74   
        ::parking_lot::Mutex<
    6     75   
            ::std::option::Option<
    7     76   
                ::aws_smithy_legacy_http::event_stream::EventStreamSender<
    8     77   
                    crate::model::CapturePokemonEvents,
    9     78   
                    crate::error::CapturePokemonEventsError,
   10     79   
                >,
   11     80   
            >,
@@ -59,128 +157,0 @@
   79    148   
            inner: ::std::sync::Arc::new(::parking_lot::Mutex::new(Some(stream.into()))),
   80    149   
        })
   81    150   
    }
   82    151   
}
   83    152   
   84    153   
impl ::pyo3::IntoPy<::pyo3::PyObject> for CapturePokemonOutputEventsEventStreamSender {
   85    154   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   86    155   
        ::pyo3::exceptions::PyAttributeError::new_err("this is a write-only object").into_py(py)
   87    156   
    }
   88    157   
}
   89         -
   90         -
#[::pyo3::pyclass]
   91         -
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   92         -
pub struct CapturePokemonInputEventsReceiver {
   93         -
    inner: ::std::sync::Arc<
   94         -
        ::tokio::sync::Mutex<
   95         -
            ::aws_smithy_legacy_http::event_stream::Receiver<
   96         -
                crate::model::AttemptCapturingPokemonEvent,
   97         -
                crate::error::AttemptCapturingPokemonEventError,
   98         -
            >,
   99         -
        >,
  100         -
    >,
  101         -
}
  102         -
impl CapturePokemonInputEventsReceiver {
  103         -
    pub fn new(
  104         -
        unmarshaller: impl ::aws_smithy_eventstream::frame::UnmarshallMessage<
  105         -
                Output = crate::model::AttemptCapturingPokemonEvent,
  106         -
                Error = crate::error::AttemptCapturingPokemonEventError,
  107         -
            > + ::std::marker::Send
  108         -
            + ::std::marker::Sync
  109         -
            + 'static,
  110         -
        body: ::aws_smithy_types::body::SdkBody,
  111         -
    ) -> CapturePokemonInputEventsReceiver {
  112         -
        let inner = ::aws_smithy_legacy_http::event_stream::Receiver::new(unmarshaller, body);
  113         -
        let inner = ::std::sync::Arc::new(::tokio::sync::Mutex::new(inner));
  114         -
        CapturePokemonInputEventsReceiver { inner }
  115         -
    }
  116         -
  117         -
    pub async fn try_recv_initial(
  118         -
        &mut self,
  119         -
        message_type: ::aws_smithy_legacy_http::event_stream::InitialMessageType,
  120         -
    ) -> Result<
  121         -
        ::std::option::Option<::aws_smithy_types::event_stream::Message>,
  122         -
        ::aws_smithy_runtime_api::client::result::SdkError<
  123         -
            crate::error::AttemptCapturingPokemonEventError,
  124         -
            ::aws_smithy_types::event_stream::RawMessage,
  125         -
        >,
  126         -
    > {
  127         -
        let mut inner = self.inner.lock().await;
  128         -
        inner.try_recv_initial(message_type).await
  129         -
    }
  130         -
}
  131         -
#[::pyo3::pymethods]
  132         -
impl CapturePokemonInputEventsReceiver {
  133         -
    pub fn __aiter__(slf: ::pyo3::PyRef<Self>) -> ::pyo3::PyRef<Self> {
  134         -
        slf
  135         -
    }
  136         -
  137         -
    pub fn __anext__(slf: ::pyo3::PyRefMut<Self>) -> ::pyo3::PyResult<Option<::pyo3::PyObject>> {
  138         -
        let body = slf.inner.clone();
  139         -
        let fut = ::pyo3_asyncio::tokio::future_into_py(slf.py(), async move {
  140         -
            let mut inner = body.lock().await;
  141         -
            let next = inner.recv().await;
  142         -
            match next {
  143         -
                Ok(Some(data)) => Ok(::pyo3::Python::with_gil(|py| {
  144         -
                    ::pyo3::IntoPy::into_py(data, py)
  145         -
                })),
  146         -
                Ok(None) => Err(::pyo3::exceptions::PyStopAsyncIteration::new_err(
  147         -
                    "stream exhausted",
  148         -
                )),
  149         -
                Err(::aws_smithy_runtime_api::client::result::SdkError::ServiceError(
  150         -
                    service_err,
  151         -
                )) => Err(service_err.into_err().into()),
  152         -
                Err(err) => Err(::pyo3::exceptions::PyRuntimeError::new_err(err.to_string())),
  153         -
            }
  154         -
        })?;
  155         -
        Ok(Some(fut.into()))
  156         -
    }
  157         -
}