10 10 | > {
|
11 11 | #[allow(unused_mut)]
|
12 12 | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
|
13 13 | .map_err(crate::operation::list_regional_buckets::ListRegionalBucketsError::unhandled)?;
|
14 14 | generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, _response_headers);
|
15 15 | let generic = generic_builder.build();
|
16 16 | Err(crate::operation::list_regional_buckets::ListRegionalBucketsError::generic(generic))
|
17 17 | }
|
18 18 |
|
19 19 | #[allow(clippy::unnecessary_wraps)]
|
20 20 | pub fn de_list_regional_buckets_http_response(
|
21 21 | _response_status: u16,
|
22 22 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
23 23 | _response_body: &[u8],
|
24 24 | ) -> std::result::Result<
|
25 25 | crate::operation::list_regional_buckets::ListRegionalBucketsOutput,
|
26 26 | crate::operation::list_regional_buckets::ListRegionalBucketsError,
|
27 27 | > {
|
28 28 | Ok({
|
29 29 | #[allow(unused_mut)]
|
30 30 | let mut output = crate::operation::list_regional_buckets::builders::ListRegionalBucketsOutputBuilder::default();
|
31 31 | output = crate::protocol_serde::shape_list_regional_buckets::de_list_regional_buckets(_response_body, output)
|
32 32 | .map_err(crate::operation::list_regional_buckets::ListRegionalBucketsError::unhandled)?;
|
33 33 | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
34 34 | output.build()
|
35 35 | })
|
36 36 | }
|
37 37 |
|
38 38 | pub fn ser_list_regional_buckets_headers(
|
39 39 | input: &crate::operation::list_regional_buckets::ListRegionalBucketsInput,
|
40 - | mut builder: ::http::request::Builder,
|
41 - | ) -> std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
40 + | mut builder: ::http_1x::request::Builder,
|
41 + | ) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
42 42 | if let ::std::option::Option::Some(inner_1) = &input.account_id {
|
43 43 | let formatted_2 = inner_1.as_str();
|
44 44 | let header_value = formatted_2;
|
45 - | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
45 + | let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
|
46 46 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
47 47 | "account_id",
|
48 48 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
49 49 | )
|
50 50 | })?;
|
51 51 | builder = builder.header("x-amz-account-id", header_value);
|
52 52 | }
|
53 53 | if let ::std::option::Option::Some(inner_3) = &input.outpost_id {
|
54 54 | let formatted_4 = inner_3.as_str();
|
55 55 | let header_value = formatted_4;
|
56 - | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
56 + | let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
|
57 57 | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
58 58 | "outpost_id",
|
59 59 | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
60 60 | )
|
61 61 | })?;
|
62 62 | builder = builder.header("x-amz-outpost-id", header_value);
|
63 63 | }
|
64 64 | Ok(builder)
|
65 65 | }
|
66 66 |
|
67 67 | #[allow(unused_mut)]
|
68 68 | pub fn de_list_regional_buckets(
|
69 69 | inp: &[u8],
|
70 70 | mut builder: crate::operation::list_regional_buckets::builders::ListRegionalBucketsOutputBuilder,
|
71 71 | ) -> std::result::Result<crate::operation::list_regional_buckets::builders::ListRegionalBucketsOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError>
|
72 72 | {
|
73 73 | let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
|
74 74 |
|
75 75 | #[allow(unused_mut)]
|
76 76 | let mut decoder = doc.root_element()?;
|
77 77 | #[allow(unused_variables)]
|
78 78 | let start_el = decoder.start_el();
|
79 79 | if !start_el.matches("ListRegionalBucketsResult") {
|
80 80 | return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
|
81 81 | "encountered invalid XML root: expected ListRegionalBucketsResult but got {start_el:?}. This is likely a bug in the SDK."
|
82 82 | )));
|
83 83 | }
|
84 84 | while let Some(mut tag) = decoder.next_tag() {
|
85 85 | match tag.start_el() {
|
86 86 | s if s.matches("RegionalBucketList") /* RegionalBucketList com.amazonaws.s3control.synthetic#ListRegionalBucketsOutput$RegionalBucketList */ => {
|