Server Test

Server Test

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

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

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

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

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

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

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