aws_sdk_s3/protocol_serde/
shape_get_bucket_intelligent_tiering_configuration.rs
1#[allow(clippy::unnecessary_wraps)]
3pub fn de_get_bucket_intelligent_tiering_configuration_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::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
9 crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
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::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError::unhandled)?;
14 generic_builder = crate::s3_request_id::apply_extended_request_id(generic_builder, _response_headers);
15 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
16 let generic = generic_builder.build();
17 Err(crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError::generic(generic))
18}
19
20#[allow(clippy::unnecessary_wraps)]
21pub fn de_get_bucket_intelligent_tiering_configuration_http_response(
22 _response_status: u16,
23 _response_headers: &::aws_smithy_runtime_api::http::Headers,
24 _response_body: &[u8],
25) -> std::result::Result<
26 crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
27 crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
28> {
29 Ok({
30 #[allow(unused_mut)]
31 let mut output =
32 crate::operation::get_bucket_intelligent_tiering_configuration::builders::GetBucketIntelligentTieringConfigurationOutputBuilder::default(
33 );
34 output = output.set_intelligent_tiering_configuration(
35 crate::protocol_serde::shape_get_bucket_intelligent_tiering_configuration_output::de_intelligent_tiering_configuration_payload(
36 _response_body,
37 )?,
38 );
39 output._set_extended_request_id(crate::s3_request_id::RequestIdExt::extended_request_id(_response_headers).map(str::to_string));
40 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
41 output.build()
42 })
43}