aws_sdk_sagemaker/protocol_serde/
shape_delete_notebook_instance_lifecycle_config.rs1#[allow(clippy::unnecessary_wraps)]
3pub fn de_delete_notebook_instance_lifecycle_config_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_lifecycle_config::DeleteNotebookInstanceLifecycleConfigOutput,
9 crate::operation::delete_notebook_instance_lifecycle_config::DeleteNotebookInstanceLifecycleConfigError,
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_lifecycle_config::DeleteNotebookInstanceLifecycleConfigError::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_lifecycle_config::DeleteNotebookInstanceLifecycleConfigError::generic(generic))
17}
18
19#[allow(clippy::unnecessary_wraps)]
20pub fn de_delete_notebook_instance_lifecycle_config_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_lifecycle_config::DeleteNotebookInstanceLifecycleConfigOutput,
26 crate::operation::delete_notebook_instance_lifecycle_config::DeleteNotebookInstanceLifecycleConfigError,
27> {
28 Ok({
29 #[allow(unused_mut)]
30 let mut output =
31 crate::operation::delete_notebook_instance_lifecycle_config::builders::DeleteNotebookInstanceLifecycleConfigOutputBuilder::default();
32 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
33 output.build()
34 })
35}
36
37pub fn ser_delete_notebook_instance_lifecycle_config_input(
38 input: &crate::operation::delete_notebook_instance_lifecycle_config::DeleteNotebookInstanceLifecycleConfigInput,
39) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
40 let mut out = String::new();
41 let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
42 crate::protocol_serde::shape_delete_notebook_instance_lifecycle_config_input::ser_delete_notebook_instance_lifecycle_config_input_input(
43 &mut object,
44 input,
45 )?;
46 object.finish();
47 Ok(::aws_smithy_types::body::SdkBody::from(out))
48}