Server Test

Server Test

rev. 03e6e47f15dfd569240d570d98975ebba692c405

Files changed:

tmp-codegen-diff/codegen-server-test/ebs-http0x/rust-server-codegen/src/operation.rs

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

tmp-codegen-diff/codegen-server-test/ebs-http0x/rust-server-codegen/src/operation_shape.rs

@@ -0,1 +0,241 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
           3  +
/// <p>Creates a new Amazon EBS snapshot. The new snapshot enters the <code>pending</code> state after the request completes.</p>
           4  +
/// <p>After creating the snapshot, use <a href="https://docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html"> PutSnapshotBlock</a> to write blocks of data to the snapshot.</p>
           5  +
pub struct StartSnapshot;
           6  +
           7  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StartSnapshot {
           8  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           9  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
          10  +
            "com.amazonaws.ebs#StartSnapshot",
          11  +
            "com.amazonaws.ebs",
          12  +
            "StartSnapshot",
          13  +
        );
          14  +
          15  +
    type Input = crate::input::StartSnapshotInput;
          16  +
    type Output = crate::output::StartSnapshotOutput;
          17  +
    type Error = crate::error::StartSnapshotError;
          18  +
}
          19  +
          20  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for StartSnapshot {
          21  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          23  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          24  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          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  +
    }
          36  +
          37  +
    fn response_fmt() -> Self::ResponseFmt {
          38  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          39  +
    }
          40  +
}
          41  +
          42  +
/// <p>Writes a block of data to a snapshot. If the specified block contains data, the existing data is overwritten. The target snapshot must be in the <code>pending</code> state.</p>
          43  +
/// <p>Data written to a snapshot must be aligned with 512-byte sectors.</p>
          44  +
pub struct PutSnapshotBlock;
          45  +
          46  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for PutSnapshotBlock {
          47  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          48  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
          49  +
            "com.amazonaws.ebs#PutSnapshotBlock",
          50  +
            "com.amazonaws.ebs",
          51  +
            "PutSnapshotBlock",
          52  +
        );
          53  +
          54  +
    type Input = crate::input::PutSnapshotBlockInput;
          55  +
    type Output = crate::output::PutSnapshotBlockOutput;
          56  +
    type Error = crate::error::PutSnapshotBlockError;
          57  +
}
          58  +
          59  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
          60  +
    for PutSnapshotBlock
          61  +
{
          62  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
          63  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          64  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
          65  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          66  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          67  +
        >,
          68  +
    >;
          69  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
          70  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          71  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
          72  +
    >;
          73  +
          74  +
    fn request_fmt() -> Self::RequestFmt {
          75  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
          76  +
    }
          77  +
          78  +
    fn response_fmt() -> Self::ResponseFmt {
          79  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          80  +
    }
          81  +
}
          82  +
          83  +
/// <p>Returns information about the blocks in an Amazon Elastic Block Store snapshot.</p>
          84  +
pub struct ListSnapshotBlocks;
          85  +
          86  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ListSnapshotBlocks {
          87  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          88  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
          89  +
            "com.amazonaws.ebs#ListSnapshotBlocks",
          90  +
            "com.amazonaws.ebs",
          91  +
            "ListSnapshotBlocks",
          92  +
        );
          93  +
          94  +
    type Input = crate::input::ListSnapshotBlocksInput;
          95  +
    type Output = crate::output::ListSnapshotBlocksOutput;
          96  +
    type Error = crate::error::ListSnapshotBlocksError;
          97  +
}
          98  +
          99  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         100  +
    for ListSnapshotBlocks
         101  +
{
         102  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         103  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         104  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         105  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         106  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         107  +
        >,
         108  +
    >;
         109  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         110  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         111  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         112  +
    >;
         113  +
         114  +
    fn request_fmt() -> Self::RequestFmt {
         115  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         116  +
    }
         117  +
         118  +
    fn response_fmt() -> Self::ResponseFmt {
         119  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         120  +
    }
         121  +
}
         122  +
         123  +
/// <p>Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.</p>
         124  +
pub struct ListChangedBlocks;
         125  +
         126  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ListChangedBlocks {
         127  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         128  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         129  +
            "com.amazonaws.ebs#ListChangedBlocks",
         130  +
            "com.amazonaws.ebs",
         131  +
            "ListChangedBlocks",
         132  +
        );
         133  +
         134  +
    type Input = crate::input::ListChangedBlocksInput;
         135  +
    type Output = crate::output::ListChangedBlocksOutput;
         136  +
    type Error = crate::error::ListChangedBlocksError;
         137  +
}
         138  +
         139  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         140  +
    for ListChangedBlocks
         141  +
{
         142  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         143  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         144  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         145  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         146  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         147  +
        >,
         148  +
    >;
         149  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         150  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         151  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         152  +
    >;
         153  +
         154  +
    fn request_fmt() -> Self::RequestFmt {
         155  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         156  +
    }
         157  +
         158  +
    fn response_fmt() -> Self::ResponseFmt {
         159  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         160  +
    }
         161  +
}
         162  +
         163  +
/// <p>Returns the data in a block in an Amazon Elastic Block Store snapshot.</p>
         164  +
pub struct GetSnapshotBlock;
         165  +
         166  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for GetSnapshotBlock {
         167  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         168  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         169  +
            "com.amazonaws.ebs#GetSnapshotBlock",
         170  +
            "com.amazonaws.ebs",
         171  +
            "GetSnapshotBlock",
         172  +
        );
         173  +
         174  +
    type Input = crate::input::GetSnapshotBlockInput;
         175  +
    type Output = crate::output::GetSnapshotBlockOutput;
         176  +
    type Error = crate::error::GetSnapshotBlockError;
         177  +
}
         178  +
         179  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         180  +
    for GetSnapshotBlock
         181  +
{
         182  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         183  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         184  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         185  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         186  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         187  +
        >,
         188  +
    >;
         189  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         190  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         191  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         192  +
    >;
         193  +
         194  +
    fn request_fmt() -> Self::RequestFmt {
         195  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         196  +
    }
         197  +
         198  +
    fn response_fmt() -> Self::ResponseFmt {
         199  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         200  +
    }
         201  +
}
         202  +
         203  +
/// <p>Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to <code>completed</code>. You cannot write new blocks to a snapshot after it has been completed.</p>
         204  +
pub struct CompleteSnapshot;
         205  +
         206  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for CompleteSnapshot {
         207  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         208  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         209  +
            "com.amazonaws.ebs#CompleteSnapshot",
         210  +
            "com.amazonaws.ebs",
         211  +
            "CompleteSnapshot",
         212  +
        );
         213  +
         214  +
    type Input = crate::input::CompleteSnapshotInput;
         215  +
    type Output = crate::output::CompleteSnapshotOutput;
         216  +
    type Error = crate::error::CompleteSnapshotError;
         217  +
}
         218  +
         219  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         220  +
    for CompleteSnapshot
         221  +
{
         222  +
    type RequestFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt<
         223  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         224  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::uri::MakeUri<
         225  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         226  +
            ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         227  +
        >,
         228  +
    >;
         229  +
    type ResponseFmt = ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt<
         230  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         231  +
        ::aws_smithy_legacy_http_server::instrumentation::MakeIdentity,
         232  +
    >;
         233  +
         234  +
    fn request_fmt() -> Self::RequestFmt {
         235  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         236  +
    }
         237  +
         238  +
    fn response_fmt() -> Self::ResponseFmt {
         239  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         240  +
    }
         241  +
}

tmp-codegen-diff/codegen-server-test/ebs-http0x/rust-server-codegen/src/output.rs

@@ -0,1 +0,692 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::hash::Hash)]
           4  +
pub struct StartSnapshotOutput {
           5  +
    /// <p>The tags applied to the snapshot. You can specify up to 50 tags per snapshot. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html"> Tagging your Amazon EC2 resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
           6  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::model::Tag>>,
           7  +
    /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) used to encrypt the snapshot.</p>
           8  +
    pub kms_key_arn: ::std::option::Option<crate::model::KmsKeyArn>,
           9  +
    /// <p>The AWS account ID of the snapshot owner.</p>
          10  +
    pub owner_id: ::std::option::Option<crate::model::OwnerId>,
          11  +
    /// <p>The size of the volume, in GiB.</p>
          12  +
    pub volume_size: ::std::option::Option<crate::model::VolumeSize>,
          13  +
    /// <p>The ID of the parent snapshot.</p>
          14  +
    pub parent_snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
          15  +
    /// <p>The description of the snapshot.</p>
          16  +
    pub description: ::std::option::Option<crate::model::Description>,
          17  +
    /// <p>The ID of the snapshot.</p>
          18  +
    pub snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
          19  +
    /// <p>The size of the blocks in the snapshot, in bytes.</p>
          20  +
    pub block_size: ::std::option::Option<i32>,
          21  +
    /// <p>The timestamp when the snapshot was created.</p>
          22  +
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          23  +
    /// <p>The status of the snapshot.</p>
          24  +
    pub status: ::std::option::Option<crate::model::Status>,
          25  +
}
          26  +
impl StartSnapshotOutput {
          27  +
    /// <p>The tags applied to the snapshot. You can specify up to 50 tags per snapshot. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html"> Tagging your Amazon EC2 resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
          28  +
    pub fn tags(&self) -> ::std::option::Option<&[crate::model::Tag]> {
          29  +
        self.tags.as_deref()
          30  +
    }
          31  +
    /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) used to encrypt the snapshot.</p>
          32  +
    pub fn kms_key_arn(&self) -> ::std::option::Option<&crate::model::KmsKeyArn> {
          33  +
        self.kms_key_arn.as_ref()
          34  +
    }
          35  +
    /// <p>The AWS account ID of the snapshot owner.</p>
          36  +
    pub fn owner_id(&self) -> ::std::option::Option<&crate::model::OwnerId> {
          37  +
        self.owner_id.as_ref()
          38  +
    }
          39  +
    /// <p>The size of the volume, in GiB.</p>
          40  +
    pub fn volume_size(&self) -> ::std::option::Option<&crate::model::VolumeSize> {
          41  +
        self.volume_size.as_ref()
          42  +
    }
          43  +
    /// <p>The ID of the parent snapshot.</p>
          44  +
    pub fn parent_snapshot_id(&self) -> ::std::option::Option<&crate::model::SnapshotId> {
          45  +
        self.parent_snapshot_id.as_ref()
          46  +
    }
          47  +
    /// <p>The description of the snapshot.</p>
          48  +
    pub fn description(&self) -> ::std::option::Option<&crate::model::Description> {
          49  +
        self.description.as_ref()
          50  +
    }
          51  +
    /// <p>The ID of the snapshot.</p>
          52  +
    pub fn snapshot_id(&self) -> ::std::option::Option<&crate::model::SnapshotId> {
          53  +
        self.snapshot_id.as_ref()
          54  +
    }
          55  +
    /// <p>The size of the blocks in the snapshot, in bytes.</p>
          56  +
    pub fn block_size(&self) -> ::std::option::Option<i32> {
          57  +
        self.block_size
          58  +
    }
          59  +
    /// <p>The timestamp when the snapshot was created.</p>
          60  +
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          61  +
        self.start_time.as_ref()
          62  +
    }
          63  +
    /// <p>The status of the snapshot.</p>
          64  +
    pub fn status(&self) -> ::std::option::Option<&crate::model::Status> {
          65  +
        self.status.as_ref()
          66  +
    }
          67  +
}
          68  +
impl ::std::fmt::Debug for StartSnapshotOutput {
          69  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          70  +
        let mut formatter = f.debug_struct("StartSnapshotOutput");
          71  +
        formatter.field("tags", &self.tags);
          72  +
        formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
          73  +
        formatter.field("owner_id", &self.owner_id);
          74  +
        formatter.field("volume_size", &self.volume_size);
          75  +
        formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
          76  +
        formatter.field("description", &self.description);
          77  +
        formatter.field("snapshot_id", &self.snapshot_id);
          78  +
        formatter.field("block_size", &self.block_size);
          79  +
        formatter.field("start_time", &self.start_time);
          80  +
        formatter.field("status", &self.status);
          81  +
        formatter.finish()
          82  +
    }
          83  +
}
          84  +
impl StartSnapshotOutput {
          85  +
    /// Creates a new builder-style object to manufacture [`StartSnapshotOutput`](crate::output::StartSnapshotOutput).
          86  +
    pub fn builder() -> crate::output::start_snapshot_output::Builder {
          87  +
        crate::output::start_snapshot_output::Builder::default()
          88  +
    }
          89  +
}
          90  +
          91  +
#[allow(missing_docs)] // documentation missing in model
          92  +
#[derive(
          93  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          94  +
)]
          95  +
pub struct PutSnapshotBlockOutput {
          96  +
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
          97  +
    pub checksum_algorithm: ::std::option::Option<crate::model::ChecksumAlgorithm>,
          98  +
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
          99  +
    pub checksum: ::std::option::Option<crate::model::Checksum>,
         100  +
}
         101  +
impl PutSnapshotBlockOutput {
         102  +
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
         103  +
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::model::ChecksumAlgorithm> {
         104  +
        self.checksum_algorithm.as_ref()
         105  +
    }
         106  +
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
         107  +
    pub fn checksum(&self) -> ::std::option::Option<&crate::model::Checksum> {
         108  +
        self.checksum.as_ref()
         109  +
    }
         110  +
}
         111  +
impl PutSnapshotBlockOutput {
         112  +
    /// Creates a new builder-style object to manufacture [`PutSnapshotBlockOutput`](crate::output::PutSnapshotBlockOutput).
         113  +
    pub fn builder() -> crate::output::put_snapshot_block_output::Builder {
         114  +
        crate::output::put_snapshot_block_output::Builder::default()
         115  +
    }
         116  +
}
         117  +
         118  +
#[allow(missing_docs)] // documentation missing in model
         119  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::hash::Hash)]
         120  +
pub struct ListSnapshotBlocksOutput {
         121  +
    /// <p>The size of the volume in GB.</p>
         122  +
    pub volume_size: ::std::option::Option<crate::model::VolumeSize>,
         123  +
    /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         124  +
    pub next_token: ::std::option::Option<crate::model::PageToken>,
         125  +
    /// <p>The time when the <code>BlockToken</code> expires.</p>
         126  +
    pub expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         127  +
    /// <p>An array of objects containing information about the blocks.</p>
         128  +
    pub blocks: ::std::option::Option<::std::vec::Vec<crate::model::Block>>,
         129  +
    /// <p>The size of the block.</p>
         130  +
    pub block_size: ::std::option::Option<i32>,
         131  +
}
         132  +
impl ListSnapshotBlocksOutput {
         133  +
    /// <p>The size of the volume in GB.</p>
         134  +
    pub fn volume_size(&self) -> ::std::option::Option<&crate::model::VolumeSize> {
         135  +
        self.volume_size.as_ref()
         136  +
    }
         137  +
    /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         138  +
    pub fn next_token(&self) -> ::std::option::Option<&crate::model::PageToken> {
         139  +
        self.next_token.as_ref()
         140  +
    }
         141  +
    /// <p>The time when the <code>BlockToken</code> expires.</p>
         142  +
    pub fn expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         143  +
        self.expiry_time.as_ref()
         144  +
    }
         145  +
    /// <p>An array of objects containing information about the blocks.</p>
         146  +
    pub fn blocks(&self) -> ::std::option::Option<&[crate::model::Block]> {
         147  +
        self.blocks.as_deref()
         148  +
    }
         149  +
    /// <p>The size of the block.</p>
         150  +
    pub fn block_size(&self) -> ::std::option::Option<i32> {
         151  +
        self.block_size
         152  +
    }
         153  +
}
         154  +
impl ::std::fmt::Debug for ListSnapshotBlocksOutput {
         155  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         156  +
        let mut formatter = f.debug_struct("ListSnapshotBlocksOutput");
         157  +
        formatter.field("volume_size", &self.volume_size);
         158  +
        formatter.field("next_token", &self.next_token);
         159  +
        formatter.field("expiry_time", &self.expiry_time);
         160  +
        formatter.field("blocks", &"*** Sensitive Data Redacted ***");
         161  +
        formatter.field("block_size", &self.block_size);
         162  +
        formatter.finish()
         163  +
    }
         164  +
}
         165  +
impl ListSnapshotBlocksOutput {
         166  +
    /// Creates a new builder-style object to manufacture [`ListSnapshotBlocksOutput`](crate::output::ListSnapshotBlocksOutput).
         167  +
    pub fn builder() -> crate::output::list_snapshot_blocks_output::Builder {
         168  +
        crate::output::list_snapshot_blocks_output::Builder::default()
         169  +
    }
         170  +
}
         171  +
         172  +
#[allow(missing_docs)] // documentation missing in model
         173  +
#[derive(
         174  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         175  +
)]
         176  +
pub struct ListChangedBlocksOutput {
         177  +
    /// <p>The size of the block.</p>
         178  +
    pub block_size: ::std::option::Option<i32>,
         179  +
    /// <p>The time when the <code>BlockToken</code> expires.</p>
         180  +
    pub expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         181  +
    /// <p>The size of the volume in GB.</p>
         182  +
    pub volume_size: ::std::option::Option<crate::model::VolumeSize>,
         183  +
    /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         184  +
    pub next_token: ::std::option::Option<crate::model::PageToken>,
         185  +
    /// <p>An array of objects containing information about the changed blocks.</p>
         186  +
    pub changed_blocks: ::std::option::Option<::std::vec::Vec<crate::model::ChangedBlock>>,
         187  +
}
         188  +
impl ListChangedBlocksOutput {
         189  +
    /// <p>The size of the block.</p>
         190  +
    pub fn block_size(&self) -> ::std::option::Option<i32> {
         191  +
        self.block_size
         192  +
    }
         193  +
    /// <p>The time when the <code>BlockToken</code> expires.</p>
         194  +
    pub fn expiry_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
         195  +
        self.expiry_time.as_ref()
         196  +
    }
         197  +
    /// <p>The size of the volume in GB.</p>
         198  +
    pub fn volume_size(&self) -> ::std::option::Option<&crate::model::VolumeSize> {
         199  +
        self.volume_size.as_ref()
         200  +
    }
         201  +
    /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         202  +
    pub fn next_token(&self) -> ::std::option::Option<&crate::model::PageToken> {
         203  +
        self.next_token.as_ref()
         204  +
    }
         205  +
    /// <p>An array of objects containing information about the changed blocks.</p>
         206  +
    pub fn changed_blocks(&self) -> ::std::option::Option<&[crate::model::ChangedBlock]> {
         207  +
        self.changed_blocks.as_deref()
         208  +
    }
         209  +
}
         210  +
impl ListChangedBlocksOutput {
         211  +
    /// Creates a new builder-style object to manufacture [`ListChangedBlocksOutput`](crate::output::ListChangedBlocksOutput).
         212  +
    pub fn builder() -> crate::output::list_changed_blocks_output::Builder {
         213  +
        crate::output::list_changed_blocks_output::Builder::default()
         214  +
    }
         215  +
}
         216  +
         217  +
#[allow(missing_docs)] // documentation missing in model
         218  +
pub struct GetSnapshotBlockOutput {
         219  +
    /// <p>The size of the data in the block.</p>
         220  +
    pub data_length: ::std::option::Option<i32>,
         221  +
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         222  +
    pub checksum_algorithm: ::std::option::Option<crate::model::ChecksumAlgorithm>,
         223  +
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         224  +
    pub checksum: ::std::option::Option<crate::model::Checksum>,
         225  +
    /// <p>The data content of the block.</p>
         226  +
    pub block_data: ::aws_smithy_types::byte_stream::ByteStream,
         227  +
}
         228  +
impl GetSnapshotBlockOutput {
         229  +
    /// <p>The size of the data in the block.</p>
         230  +
    pub fn data_length(&self) -> ::std::option::Option<i32> {
         231  +
        self.data_length
         232  +
    }
         233  +
    /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         234  +
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::model::ChecksumAlgorithm> {
         235  +
        self.checksum_algorithm.as_ref()
         236  +
    }
         237  +
    /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         238  +
    pub fn checksum(&self) -> ::std::option::Option<&crate::model::Checksum> {
         239  +
        self.checksum.as_ref()
         240  +
    }
         241  +
    /// <p>The data content of the block.</p>
         242  +
    pub fn block_data(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
         243  +
        &self.block_data
         244  +
    }
         245  +
}
         246  +
impl ::std::fmt::Debug for GetSnapshotBlockOutput {
         247  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         248  +
        let mut formatter = f.debug_struct("GetSnapshotBlockOutput");
         249  +
        formatter.field("data_length", &self.data_length);
         250  +
        formatter.field("checksum_algorithm", &self.checksum_algorithm);
         251  +
        formatter.field("checksum", &self.checksum);
         252  +
        formatter.field("block_data", &"*** Sensitive Data Redacted ***");
         253  +
        formatter.finish()
         254  +
    }
         255  +
}
         256  +
impl GetSnapshotBlockOutput {
         257  +
    /// Creates a new builder-style object to manufacture [`GetSnapshotBlockOutput`](crate::output::GetSnapshotBlockOutput).
         258  +
    pub fn builder() -> crate::output::get_snapshot_block_output::Builder {
         259  +
        crate::output::get_snapshot_block_output::Builder::default()
         260  +
    }
         261  +
}
         262  +
         263  +
#[allow(missing_docs)] // documentation missing in model
         264  +
#[derive(
         265  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         266  +
)]
         267  +
pub struct CompleteSnapshotOutput {
         268  +
    /// <p>The status of the snapshot.</p>
         269  +
    pub status: ::std::option::Option<crate::model::Status>,
         270  +
}
         271  +
impl CompleteSnapshotOutput {
         272  +
    /// <p>The status of the snapshot.</p>
         273  +
    pub fn status(&self) -> ::std::option::Option<&crate::model::Status> {
         274  +
        self.status.as_ref()
         275  +
    }
         276  +
}
         277  +
impl CompleteSnapshotOutput {
         278  +
    /// Creates a new builder-style object to manufacture [`CompleteSnapshotOutput`](crate::output::CompleteSnapshotOutput).
         279  +
    pub fn builder() -> crate::output::complete_snapshot_output::Builder {
         280  +
        crate::output::complete_snapshot_output::Builder::default()
         281  +
    }
         282  +
}
         283  +
/// See [`StartSnapshotOutput`](crate::output::StartSnapshotOutput).
         284  +
pub mod start_snapshot_output {
         285  +
         286  +
    impl ::std::convert::From<Builder> for crate::output::StartSnapshotOutput {
         287  +
        fn from(builder: Builder) -> Self {
         288  +
            builder.build()
         289  +
        }
         290  +
    }
         291  +
    /// A builder for [`StartSnapshotOutput`](crate::output::StartSnapshotOutput).
         292  +
    #[derive(::std::clone::Clone, ::std::default::Default)]
         293  +
    pub struct Builder {
         294  +
        pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::model::Tag>>,
         295  +
        pub(crate) kms_key_arn: ::std::option::Option<crate::model::KmsKeyArn>,
         296  +
        pub(crate) owner_id: ::std::option::Option<crate::model::OwnerId>,
         297  +
        pub(crate) volume_size: ::std::option::Option<crate::model::VolumeSize>,
         298  +
        pub(crate) parent_snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
         299  +
        pub(crate) description: ::std::option::Option<crate::model::Description>,
         300  +
        pub(crate) snapshot_id: ::std::option::Option<crate::model::SnapshotId>,
         301  +
        pub(crate) block_size: ::std::option::Option<i32>,
         302  +
        pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         303  +
        pub(crate) status: ::std::option::Option<crate::model::Status>,
         304  +
    }
         305  +
    impl Builder {
         306  +
        /// <p>The tags applied to the snapshot. You can specify up to 50 tags per snapshot. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html"> Tagging your Amazon EC2 resources</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
         307  +
        pub fn tags(
         308  +
            mut self,
         309  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::Tag>>,
         310  +
        ) -> Self {
         311  +
            self.tags = input;
         312  +
            self
         313  +
        }
         314  +
        /// <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) used to encrypt the snapshot.</p>
         315  +
        pub fn kms_key_arn(
         316  +
            mut self,
         317  +
            input: ::std::option::Option<crate::model::KmsKeyArn>,
         318  +
        ) -> Self {
         319  +
            self.kms_key_arn = input;
         320  +
            self
         321  +
        }
         322  +
        /// <p>The AWS account ID of the snapshot owner.</p>
         323  +
        pub fn owner_id(mut self, input: ::std::option::Option<crate::model::OwnerId>) -> Self {
         324  +
            self.owner_id = input;
         325  +
            self
         326  +
        }
         327  +
        /// <p>The size of the volume, in GiB.</p>
         328  +
        pub fn volume_size(
         329  +
            mut self,
         330  +
            input: ::std::option::Option<crate::model::VolumeSize>,
         331  +
        ) -> Self {
         332  +
            self.volume_size = input;
         333  +
            self
         334  +
        }
         335  +
        /// <p>The ID of the parent snapshot.</p>
         336  +
        pub fn parent_snapshot_id(
         337  +
            mut self,
         338  +
            input: ::std::option::Option<crate::model::SnapshotId>,
         339  +
        ) -> Self {
         340  +
            self.parent_snapshot_id = input;
         341  +
            self
         342  +
        }
         343  +
        /// <p>The description of the snapshot.</p>
         344  +
        pub fn description(
         345  +
            mut self,
         346  +
            input: ::std::option::Option<crate::model::Description>,
         347  +
        ) -> Self {
         348  +
            self.description = input;
         349  +
            self
         350  +
        }
         351  +
        /// <p>The ID of the snapshot.</p>
         352  +
        pub fn snapshot_id(
         353  +
            mut self,
         354  +
            input: ::std::option::Option<crate::model::SnapshotId>,
         355  +
        ) -> Self {
         356  +
            self.snapshot_id = input;
         357  +
            self
         358  +
        }
         359  +
        /// <p>The size of the blocks in the snapshot, in bytes.</p>
         360  +
        pub fn block_size(mut self, input: ::std::option::Option<i32>) -> Self {
         361  +
            self.block_size = input;
         362  +
            self
         363  +
        }
         364  +
        /// <p>The timestamp when the snapshot was created.</p>
         365  +
        pub fn start_time(
         366  +
            mut self,
         367  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
         368  +
        ) -> Self {
         369  +
            self.start_time = input;
         370  +
            self
         371  +
        }
         372  +
        /// <p>The status of the snapshot.</p>
         373  +
        pub fn status(mut self, input: ::std::option::Option<crate::model::Status>) -> Self {
         374  +
            self.status = input;
         375  +
            self
         376  +
        }
         377  +
        /// Consumes the builder and constructs a [`StartSnapshotOutput`](crate::output::StartSnapshotOutput).
         378  +
        pub fn build(self) -> crate::output::StartSnapshotOutput {
         379  +
            self.build_enforcing_all_constraints()
         380  +
        }
         381  +
        fn build_enforcing_all_constraints(self) -> crate::output::StartSnapshotOutput {
         382  +
            crate::output::StartSnapshotOutput {
         383  +
                tags: self.tags,
         384  +
                kms_key_arn: self.kms_key_arn,
         385  +
                owner_id: self.owner_id,
         386  +
                volume_size: self.volume_size,
         387  +
                parent_snapshot_id: self.parent_snapshot_id,
         388  +
                description: self.description,
         389  +
                snapshot_id: self.snapshot_id,
         390  +
                block_size: self.block_size,
         391  +
                start_time: self.start_time,
         392  +
                status: self.status,
         393  +
            }
         394  +
        }
         395  +
    }
         396  +
    impl ::std::fmt::Debug for Builder {
         397  +
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         398  +
            let mut formatter = f.debug_struct("Builder");
         399  +
            formatter.field("tags", &self.tags);
         400  +
            formatter.field("kms_key_arn", &"*** Sensitive Data Redacted ***");
         401  +
            formatter.field("owner_id", &self.owner_id);
         402  +
            formatter.field("volume_size", &self.volume_size);
         403  +
            formatter.field("parent_snapshot_id", &self.parent_snapshot_id);
         404  +
            formatter.field("description", &self.description);
         405  +
            formatter.field("snapshot_id", &self.snapshot_id);
         406  +
            formatter.field("block_size", &self.block_size);
         407  +
            formatter.field("start_time", &self.start_time);
         408  +
            formatter.field("status", &self.status);
         409  +
            formatter.finish()
         410  +
        }
         411  +
    }
         412  +
}
         413  +
/// See [`PutSnapshotBlockOutput`](crate::output::PutSnapshotBlockOutput).
         414  +
pub mod put_snapshot_block_output {
         415  +
         416  +
    impl ::std::convert::From<Builder> for crate::output::PutSnapshotBlockOutput {
         417  +
        fn from(builder: Builder) -> Self {
         418  +
            builder.build()
         419  +
        }
         420  +
    }
         421  +
    /// A builder for [`PutSnapshotBlockOutput`](crate::output::PutSnapshotBlockOutput).
         422  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         423  +
    pub struct Builder {
         424  +
        pub(crate) checksum_algorithm: ::std::option::Option<crate::model::ChecksumAlgorithm>,
         425  +
        pub(crate) checksum: ::std::option::Option<crate::model::Checksum>,
         426  +
    }
         427  +
    impl Builder {
         428  +
        /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
         429  +
        pub fn checksum_algorithm(
         430  +
            mut self,
         431  +
            input: ::std::option::Option<crate::model::ChecksumAlgorithm>,
         432  +
        ) -> Self {
         433  +
            self.checksum_algorithm = input;
         434  +
            self
         435  +
        }
         436  +
        /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
         437  +
        pub fn checksum(mut self, input: ::std::option::Option<crate::model::Checksum>) -> Self {
         438  +
            self.checksum = input;
         439  +
            self
         440  +
        }
         441  +
        /// Consumes the builder and constructs a [`PutSnapshotBlockOutput`](crate::output::PutSnapshotBlockOutput).
         442  +
        pub fn build(self) -> crate::output::PutSnapshotBlockOutput {
         443  +
            self.build_enforcing_all_constraints()
         444  +
        }
         445  +
        fn build_enforcing_all_constraints(self) -> crate::output::PutSnapshotBlockOutput {
         446  +
            crate::output::PutSnapshotBlockOutput {
         447  +
                checksum_algorithm: self.checksum_algorithm,
         448  +
                checksum: self.checksum,
         449  +
            }
         450  +
        }
         451  +
    }
         452  +
}
         453  +
/// See [`ListSnapshotBlocksOutput`](crate::output::ListSnapshotBlocksOutput).
         454  +
pub mod list_snapshot_blocks_output {
         455  +
         456  +
    impl ::std::convert::From<Builder> for crate::output::ListSnapshotBlocksOutput {
         457  +
        fn from(builder: Builder) -> Self {
         458  +
            builder.build()
         459  +
        }
         460  +
    }
         461  +
    /// A builder for [`ListSnapshotBlocksOutput`](crate::output::ListSnapshotBlocksOutput).
         462  +
    #[derive(::std::clone::Clone, ::std::default::Default)]
         463  +
    pub struct Builder {
         464  +
        pub(crate) volume_size: ::std::option::Option<crate::model::VolumeSize>,
         465  +
        pub(crate) next_token: ::std::option::Option<crate::model::PageToken>,
         466  +
        pub(crate) expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         467  +
        pub(crate) blocks: ::std::option::Option<::std::vec::Vec<crate::model::Block>>,
         468  +
        pub(crate) block_size: ::std::option::Option<i32>,
         469  +
    }
         470  +
    impl Builder {
         471  +
        /// <p>The size of the volume in GB.</p>
         472  +
        pub fn volume_size(
         473  +
            mut self,
         474  +
            input: ::std::option::Option<crate::model::VolumeSize>,
         475  +
        ) -> Self {
         476  +
            self.volume_size = input;
         477  +
            self
         478  +
        }
         479  +
        /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         480  +
        pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
         481  +
            self.next_token = input;
         482  +
            self
         483  +
        }
         484  +
        /// <p>The time when the <code>BlockToken</code> expires.</p>
         485  +
        pub fn expiry_time(
         486  +
            mut self,
         487  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
         488  +
        ) -> Self {
         489  +
            self.expiry_time = input;
         490  +
            self
         491  +
        }
         492  +
        /// <p>An array of objects containing information about the blocks.</p>
         493  +
        pub fn blocks(
         494  +
            mut self,
         495  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::Block>>,
         496  +
        ) -> Self {
         497  +
            self.blocks = input;
         498  +
            self
         499  +
        }
         500  +
        /// <p>The size of the block.</p>
         501  +
        pub fn block_size(mut self, input: ::std::option::Option<i32>) -> Self {
         502  +
            self.block_size = input;
         503  +
            self
         504  +
        }
         505  +
        /// Consumes the builder and constructs a [`ListSnapshotBlocksOutput`](crate::output::ListSnapshotBlocksOutput).
         506  +
        pub fn build(self) -> crate::output::ListSnapshotBlocksOutput {
         507  +
            self.build_enforcing_all_constraints()
         508  +
        }
         509  +
        fn build_enforcing_all_constraints(self) -> crate::output::ListSnapshotBlocksOutput {
         510  +
            crate::output::ListSnapshotBlocksOutput {
         511  +
                volume_size: self.volume_size,
         512  +
                next_token: self.next_token,
         513  +
                expiry_time: self.expiry_time,
         514  +
                blocks: self.blocks,
         515  +
                block_size: self.block_size,
         516  +
            }
         517  +
        }
         518  +
    }
         519  +
    impl ::std::fmt::Debug for Builder {
         520  +
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         521  +
            let mut formatter = f.debug_struct("Builder");
         522  +
            formatter.field("volume_size", &self.volume_size);
         523  +
            formatter.field("next_token", &self.next_token);
         524  +
            formatter.field("expiry_time", &self.expiry_time);
         525  +
            formatter.field("blocks", &"*** Sensitive Data Redacted ***");
         526  +
            formatter.field("block_size", &self.block_size);
         527  +
            formatter.finish()
         528  +
        }
         529  +
    }
         530  +
}
         531  +
/// See [`ListChangedBlocksOutput`](crate::output::ListChangedBlocksOutput).
         532  +
pub mod list_changed_blocks_output {
         533  +
         534  +
    impl ::std::convert::From<Builder> for crate::output::ListChangedBlocksOutput {
         535  +
        fn from(builder: Builder) -> Self {
         536  +
            builder.build()
         537  +
        }
         538  +
    }
         539  +
    /// A builder for [`ListChangedBlocksOutput`](crate::output::ListChangedBlocksOutput).
         540  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         541  +
    pub struct Builder {
         542  +
        pub(crate) block_size: ::std::option::Option<i32>,
         543  +
        pub(crate) expiry_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         544  +
        pub(crate) volume_size: ::std::option::Option<crate::model::VolumeSize>,
         545  +
        pub(crate) next_token: ::std::option::Option<crate::model::PageToken>,
         546  +
        pub(crate) changed_blocks:
         547  +
            ::std::option::Option<::std::vec::Vec<crate::model::ChangedBlock>>,
         548  +
    }
         549  +
    impl Builder {
         550  +
        /// <p>The size of the block.</p>
         551  +
        pub fn block_size(mut self, input: ::std::option::Option<i32>) -> Self {
         552  +
            self.block_size = input;
         553  +
            self
         554  +
        }
         555  +
        /// <p>The time when the <code>BlockToken</code> expires.</p>
         556  +
        pub fn expiry_time(
         557  +
            mut self,
         558  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
         559  +
        ) -> Self {
         560  +
            self.expiry_time = input;
         561  +
            self
         562  +
        }
         563  +
        /// <p>The size of the volume in GB.</p>
         564  +
        pub fn volume_size(
         565  +
            mut self,
         566  +
            input: ::std::option::Option<crate::model::VolumeSize>,
         567  +
        ) -> Self {
         568  +
            self.volume_size = input;
         569  +
            self
         570  +
        }
         571  +
        /// <p>The token to use to retrieve the next page of results. This value is null when there are no more results to return.</p>
         572  +
        pub fn next_token(mut self, input: ::std::option::Option<crate::model::PageToken>) -> Self {
         573  +
            self.next_token = input;
         574  +
            self
         575  +
        }
         576  +
        /// <p>An array of objects containing information about the changed blocks.</p>
         577  +
        pub fn changed_blocks(
         578  +
            mut self,
         579  +
            input: ::std::option::Option<::std::vec::Vec<crate::model::ChangedBlock>>,
         580  +
        ) -> Self {
         581  +
            self.changed_blocks = input;
         582  +
            self
         583  +
        }
         584  +
        /// Consumes the builder and constructs a [`ListChangedBlocksOutput`](crate::output::ListChangedBlocksOutput).
         585  +
        pub fn build(self) -> crate::output::ListChangedBlocksOutput {
         586  +
            self.build_enforcing_all_constraints()
         587  +
        }
         588  +
        fn build_enforcing_all_constraints(self) -> crate::output::ListChangedBlocksOutput {
         589  +
            crate::output::ListChangedBlocksOutput {
         590  +
                block_size: self.block_size,
         591  +
                expiry_time: self.expiry_time,
         592  +
                volume_size: self.volume_size,
         593  +
                next_token: self.next_token,
         594  +
                changed_blocks: self.changed_blocks,
         595  +
            }
         596  +
        }
         597  +
    }
         598  +
}
         599  +
/// See [`GetSnapshotBlockOutput`](crate::output::GetSnapshotBlockOutput).
         600  +
pub mod get_snapshot_block_output {
         601  +
         602  +
    impl ::std::convert::From<Builder> for crate::output::GetSnapshotBlockOutput {
         603  +
        fn from(builder: Builder) -> Self {
         604  +
            builder.build()
         605  +
        }
         606  +
    }
         607  +
    /// A builder for [`GetSnapshotBlockOutput`](crate::output::GetSnapshotBlockOutput).
         608  +
    #[derive(::std::default::Default)]
         609  +
    pub struct Builder {
         610  +
        pub(crate) data_length: ::std::option::Option<i32>,
         611  +
        pub(crate) checksum_algorithm: ::std::option::Option<crate::model::ChecksumAlgorithm>,
         612  +
        pub(crate) checksum: ::std::option::Option<crate::model::Checksum>,
         613  +
        pub(crate) block_data: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
         614  +
    }
         615  +
    impl Builder {
         616  +
        /// <p>The size of the data in the block.</p>
         617  +
        pub fn data_length(mut self, input: ::std::option::Option<i32>) -> Self {
         618  +
            self.data_length = input;
         619  +
            self
         620  +
        }
         621  +
        /// <p>The algorithm used to generate the checksum for the block, such as SHA256.</p>
         622  +
        pub fn checksum_algorithm(
         623  +
            mut self,
         624  +
            input: ::std::option::Option<crate::model::ChecksumAlgorithm>,
         625  +
        ) -> Self {
         626  +
            self.checksum_algorithm = input;
         627  +
            self
         628  +
        }
         629  +
        /// <p>The checksum generated for the block, which is Base64 encoded.</p>
         630  +
        pub fn checksum(mut self, input: ::std::option::Option<crate::model::Checksum>) -> Self {
         631  +
            self.checksum = input;
         632  +
            self
         633  +
        }
         634  +
        /// <p>The data content of the block.</p>
         635  +
        pub fn block_data(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
         636  +
            self.block_data = Some(input);
         637  +
            self
         638  +
        }
         639  +
        /// Consumes the builder and constructs a [`GetSnapshotBlockOutput`](crate::output::GetSnapshotBlockOutput).
         640  +
        pub fn build(self) -> crate::output::GetSnapshotBlockOutput {
         641  +
            self.build_enforcing_all_constraints()
         642  +
        }
         643  +
        fn build_enforcing_all_constraints(self) -> crate::output::GetSnapshotBlockOutput {
         644  +
            crate::output::GetSnapshotBlockOutput {
         645  +
                data_length: self.data_length,
         646  +
                checksum_algorithm: self.checksum_algorithm,
         647  +
                checksum: self.checksum,
         648  +
                block_data: self.block_data.unwrap_or_default(),
         649  +
            }
         650  +
        }
         651  +
    }
         652  +
    impl ::std::fmt::Debug for Builder {
         653  +
        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         654  +
            let mut formatter = f.debug_struct("Builder");
         655  +
            formatter.field("data_length", &self.data_length);
         656  +
            formatter.field("checksum_algorithm", &self.checksum_algorithm);
         657  +
            formatter.field("checksum", &self.checksum);
         658  +
            formatter.field("block_data", &"*** Sensitive Data Redacted ***");
         659  +
            formatter.finish()
         660  +
        }
         661  +
    }
         662  +
}
         663  +
/// See [`CompleteSnapshotOutput`](crate::output::CompleteSnapshotOutput).
         664  +
pub mod complete_snapshot_output {
         665  +
         666  +
    impl ::std::convert::From<Builder> for crate::output::CompleteSnapshotOutput {
         667  +
        fn from(builder: Builder) -> Self {
         668  +
            builder.build()
         669  +
        }
         670  +
    }
         671  +
    /// A builder for [`CompleteSnapshotOutput`](crate::output::CompleteSnapshotOutput).
         672  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         673  +
    pub struct Builder {
         674  +
        pub(crate) status: ::std::option::Option<crate::model::Status>,
         675  +
    }
         676  +
    impl Builder {
         677  +
        /// <p>The status of the snapshot.</p>
         678  +
        pub fn status(mut self, input: ::std::option::Option<crate::model::Status>) -> Self {
         679  +
            self.status = input;
         680  +
            self
         681  +
        }
         682  +
        /// Consumes the builder and constructs a [`CompleteSnapshotOutput`](crate::output::CompleteSnapshotOutput).
         683  +
        pub fn build(self) -> crate::output::CompleteSnapshotOutput {
         684  +
            self.build_enforcing_all_constraints()
         685  +
        }
         686  +
        fn build_enforcing_all_constraints(self) -> crate::output::CompleteSnapshotOutput {
         687  +
            crate::output::CompleteSnapshotOutput {
         688  +
                status: self.status,
         689  +
            }
         690  +
        }
         691  +
    }
         692  +
}