3 3 | pub fn de_list_tags_for_resource_http_error(
|
4 4 | _response_status: u16,
|
5 5 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
6 6 | _response_body: &[u8],
|
7 7 | ) -> std::result::Result<
|
8 8 | crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
|
9 9 | crate::operation::list_tags_for_resource::ListTagsForResourceError,
|
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_tags_for_resource::ListTagsForResourceError::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 | let error_code = match generic.code() {
|
17 17 | Some(code) => code,
|
18 18 | None => return Err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled(generic)),
|
19 19 | };
|
20 20 |
|
21 21 | let _error_message = generic.message().map(|msg| msg.to_owned());
|
22 22 | Err(match error_code {
|
23 23 | "InvalidInput" => crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidInput({
|
24 24 | #[allow(unused_mut)]
|
25 25 | let mut tmp = {
|
26 26 | #[allow(unused_mut)]
|
27 27 | let mut output = crate::types::error::builders::InvalidInputBuilder::default();
|
28 28 | output = crate::protocol_serde::shape_invalid_input::de_invalid_input_xml_err(_response_body, output)
|
29 29 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
30 30 | let output = output.meta(generic);
|
31 31 | output.build()
|
32 32 | };
|
33 - | if tmp.message.is_none() {
|
34 - | tmp.message = _error_message;
|
35 - | }
|
36 33 | tmp
|
37 34 | }),
|
38 35 | "NoSuchHealthCheck" => crate::operation::list_tags_for_resource::ListTagsForResourceError::NoSuchHealthCheck({
|
39 36 | #[allow(unused_mut)]
|
40 37 | let mut tmp = {
|
41 38 | #[allow(unused_mut)]
|
42 39 | let mut output = crate::types::error::builders::NoSuchHealthCheckBuilder::default();
|
43 40 | output = crate::protocol_serde::shape_no_such_health_check::de_no_such_health_check_xml_err(_response_body, output)
|
44 41 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
45 42 | let output = output.meta(generic);
|
46 43 | output.build()
|
47 44 | };
|
48 - | if tmp.message.is_none() {
|
49 - | tmp.message = _error_message;
|
50 - | }
|
51 45 | tmp
|
52 46 | }),
|
53 47 | "NoSuchHostedZone" => crate::operation::list_tags_for_resource::ListTagsForResourceError::NoSuchHostedZone({
|
54 48 | #[allow(unused_mut)]
|
55 49 | let mut tmp = {
|
56 50 | #[allow(unused_mut)]
|
57 51 | let mut output = crate::types::error::builders::NoSuchHostedZoneBuilder::default();
|
58 52 | output = crate::protocol_serde::shape_no_such_hosted_zone::de_no_such_hosted_zone_xml_err(_response_body, output)
|
59 53 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
60 54 | let output = output.meta(generic);
|
61 55 | output.build()
|
62 56 | };
|
63 - | if tmp.message.is_none() {
|
64 - | tmp.message = _error_message;
|
65 - | }
|
66 57 | tmp
|
67 58 | }),
|
68 59 | "PriorRequestNotComplete" => crate::operation::list_tags_for_resource::ListTagsForResourceError::PriorRequestNotComplete({
|
69 60 | #[allow(unused_mut)]
|
70 61 | let mut tmp = {
|
71 62 | #[allow(unused_mut)]
|
72 63 | let mut output = crate::types::error::builders::PriorRequestNotCompleteBuilder::default();
|
73 64 | output = crate::protocol_serde::shape_prior_request_not_complete::de_prior_request_not_complete_xml_err(_response_body, output)
|
74 65 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
75 66 | let output = output.meta(generic);
|
76 67 | output.build()
|
77 68 | };
|
78 - | if tmp.message.is_none() {
|
79 - | tmp.message = _error_message;
|
80 - | }
|
81 69 | tmp
|
82 70 | }),
|
83 71 | "ThrottlingException" => crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException({
|
84 72 | #[allow(unused_mut)]
|
85 73 | let mut tmp = {
|
86 74 | #[allow(unused_mut)]
|
87 75 | let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
|
88 76 | output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_xml_err(_response_body, output)
|
89 77 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
90 78 | let output = output.meta(generic);
|
91 79 | output.build()
|
92 80 | };
|
93 - | if tmp.message.is_none() {
|
94 - | tmp.message = _error_message;
|
95 - | }
|
96 81 | tmp
|
97 82 | }),
|
98 83 | _ => crate::operation::list_tags_for_resource::ListTagsForResourceError::generic(generic),
|
99 84 | })
|
100 85 | }
|
101 86 |
|
102 87 | #[allow(clippy::unnecessary_wraps)]
|
103 88 | pub fn de_list_tags_for_resource_http_response(
|
104 89 | _response_status: u16,
|
105 90 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
106 91 | _response_body: &[u8],
|
107 92 | ) -> std::result::Result<
|
108 93 | crate::operation::list_tags_for_resource::ListTagsForResourceOutput,
|
109 94 | crate::operation::list_tags_for_resource::ListTagsForResourceError,
|
110 95 | > {
|
111 96 | Ok({
|
112 97 | #[allow(unused_mut)]
|
113 98 | let mut output = crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder::default();
|
114 99 | output = crate::protocol_serde::shape_list_tags_for_resource::de_list_tags_for_resource(_response_body, output)
|
115 100 | .map_err(crate::operation::list_tags_for_resource::ListTagsForResourceError::unhandled)?;
|
116 101 | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
117 102 | crate::serde_util::list_tags_for_resource_output_output_correct_errors(output).build()
|
118 103 | })
|
119 104 | }
|
120 105 |
|
121 106 | #[allow(unused_mut)]
|
122 107 | pub fn de_list_tags_for_resource(
|
123 108 | inp: &[u8],
|
124 109 | mut builder: crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder,
|
125 110 | ) -> std::result::Result<crate::operation::list_tags_for_resource::builders::ListTagsForResourceOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError>
|