aws_sdk_sagemaker/protocol_serde/
shape_delete_notebook_instance.rs1#[allow(clippy::unnecessary_wraps)]
3pub fn de_delete_notebook_instance_http_error(
4 _response_status: u16,
5 _response_headers: &::aws_smithy_runtime_api::http::Headers,
6 _response_body: &[u8],
7) -> std::result::Result<
8 crate::operation::delete_notebook_instance::DeleteNotebookInstanceOutput,
9 crate::operation::delete_notebook_instance::DeleteNotebookInstanceError,
10> {
11 #[allow(unused_mut)]
12 let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
13 .map_err(crate::operation::delete_notebook_instance::DeleteNotebookInstanceError::unhandled)?;
14 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
15 let generic = generic_builder.build();
16 Err(crate::operation::delete_notebook_instance::DeleteNotebookInstanceError::generic(generic))
17}
18
19#[allow(clippy::unnecessary_wraps)]
20pub fn de_delete_notebook_instance_http_response(
21 _response_status: u16,
22 _response_headers: &::aws_smithy_runtime_api::http::Headers,
23 _response_body: &[u8],
24) -> std::result::Result<
25 crate::operation::delete_notebook_instance::DeleteNotebookInstanceOutput,
26 crate::operation::delete_notebook_instance::DeleteNotebookInstanceError,
27> {
28 Ok({
29 #[allow(unused_mut)]
30 let mut output = crate::operation::delete_notebook_instance::builders::DeleteNotebookInstanceOutputBuilder::default();
31 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
32 output.build()
33 })
34}
35
36pub fn ser_delete_notebook_instance_input(
37 input: &crate::operation::delete_notebook_instance::DeleteNotebookInstanceInput,
38) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
39 let mut out = String::new();
40 let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
41 crate::protocol_serde::shape_delete_notebook_instance_input::ser_delete_notebook_instance_input_input(&mut object, input)?;
42 object.finish();
43 Ok(::aws_smithy_types::body::SdkBody::from(out))
44}