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::delete_multi_region_access_point::DeleteMultiRegionAccessPointError::generic(generic))
|
17 17 | }
|
18 18 |
|
19 19 | #[allow(clippy::unnecessary_wraps)]
|
20 20 | pub fn de_delete_multi_region_access_point_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::delete_multi_region_access_point::DeleteMultiRegionAccessPointOutput,
|
26 26 | crate::operation::delete_multi_region_access_point::DeleteMultiRegionAccessPointError,
|
27 27 | > {
|
28 28 | Ok({
|
29 29 | #[allow(unused_mut)]
|
30 30 | let mut output = crate::operation::delete_multi_region_access_point::builders::DeleteMultiRegionAccessPointOutputBuilder::default();
|
31 31 | output = crate::protocol_serde::shape_delete_multi_region_access_point::de_delete_multi_region_access_point(_response_body, output)
|
32 32 | .map_err(crate::operation::delete_multi_region_access_point::DeleteMultiRegionAccessPointError::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_delete_multi_region_access_point_headers(
|
39 39 | input: &crate::operation::delete_multi_region_access_point::DeleteMultiRegionAccessPointInput,
|
40 40 | mut builder: ::http::request::Builder,
|
41 41 | ) -> std::result::Result<::http::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 - | let header_value = formatted_2;
|
45 - | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
46 - | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
47 - | "account_id",
|
48 - | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
49 - | )
|
50 - | })?;
|
51 - | builder = builder.header("x-amz-account-id", header_value);
|
44 + | if !formatted_2.is_empty() {
|
45 + | let header_value = formatted_2;
|
46 + | let header_value: ::http::HeaderValue = header_value.parse().map_err(|err| {
|
47 + | ::aws_smithy_types::error::operation::BuildError::invalid_field(
|
48 + | "account_id",
|
49 + | format!("`{}` cannot be used as a header value: {}", &header_value, err),
|
50 + | )
|
51 + | })?;
|
52 + | builder = builder.header("x-amz-account-id", header_value);
|
53 + | }
|
52 54 | }
|
53 55 | Ok(builder)
|
54 56 | }
|
55 57 |
|
56 58 | pub fn ser_delete_multi_region_access_point_op_input(
|
57 59 | input: &crate::operation::delete_multi_region_access_point::DeleteMultiRegionAccessPointInput,
|
58 60 | ) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
|
59 61 | let mut out = String::new();
|
60 62 | {
|
61 63 | let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
|
62 64 | #[allow(unused_mut)]
|
63 65 | let mut root = writer
|
64 66 | .start_el("DeleteMultiRegionAccessPointRequest")
|
65 67 | .write_ns("http://awss3control.amazonaws.com/doc/2018-08-20/", None);
|
66 68 | crate::protocol_serde::shape_delete_multi_region_access_point_input::ser_delete_multi_region_access_point_input_input_input(input, root)?
|
67 69 | }
|
68 70 | Ok(::aws_smithy_types::body::SdkBody::from(out))
|
69 71 | }
|
70 72 |
|
71 73 | #[allow(unused_mut)]
|
72 74 | pub fn de_delete_multi_region_access_point(
|
73 75 | inp: &[u8],
|
74 76 | mut builder: crate::operation::delete_multi_region_access_point::builders::DeleteMultiRegionAccessPointOutputBuilder,
|
75 77 | ) -> Result<
|
76 78 | crate::operation::delete_multi_region_access_point::builders::DeleteMultiRegionAccessPointOutputBuilder,
|
77 79 | ::aws_smithy_xml::decode::XmlDecodeError,
|
78 80 | > {
|
79 81 | let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
|
80 82 |
|
81 83 | #[allow(unused_mut)]
|