7 7 | ) -> std::result::Result<
|
8 8 | crate::operation::create_open_id_connect_provider::CreateOpenIdConnectProviderOutput,
|
9 9 | crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError,
|
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::create_open_id_connect_provider::CreateOpenIDConnectProviderError::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::create_open_id_connect_provider::CreateOpenIDConnectProviderError::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 | "ConcurrentModification" => {
|
24 24 | crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::ConcurrentModificationException({
|
25 25 | #[allow(unused_mut)]
|
26 26 | let mut tmp = {
|
27 27 | #[allow(unused_mut)]
|
28 28 | let mut output = crate::types::error::builders::ConcurrentModificationExceptionBuilder::default();
|
29 29 | output = crate::protocol_serde::shape_concurrent_modification_exception::de_concurrent_modification_exception_xml_err(
|
30 30 | _response_body,
|
31 31 | output,
|
32 32 | )
|
33 33 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
34 34 | let output = output.meta(generic);
|
35 35 | output.build()
|
36 36 | };
|
37 - | if tmp.message.is_none() {
|
38 - | tmp.message = _error_message;
|
39 - | }
|
40 37 | tmp
|
41 38 | })
|
42 39 | }
|
43 40 | "EntityAlreadyExists" => crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::EntityAlreadyExistsException({
|
44 41 | #[allow(unused_mut)]
|
45 42 | let mut tmp = {
|
46 43 | #[allow(unused_mut)]
|
47 44 | let mut output = crate::types::error::builders::EntityAlreadyExistsExceptionBuilder::default();
|
48 45 | output =
|
49 46 | crate::protocol_serde::shape_entity_already_exists_exception::de_entity_already_exists_exception_xml_err(_response_body, output)
|
50 47 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
51 48 | let output = output.meta(generic);
|
52 49 | output.build()
|
53 50 | };
|
54 - | if tmp.message.is_none() {
|
55 - | tmp.message = _error_message;
|
56 - | }
|
57 51 | tmp
|
58 52 | }),
|
59 53 | "InvalidInput" => crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::InvalidInputException({
|
60 54 | #[allow(unused_mut)]
|
61 55 | let mut tmp = {
|
62 56 | #[allow(unused_mut)]
|
63 57 | let mut output = crate::types::error::builders::InvalidInputExceptionBuilder::default();
|
64 58 | output = crate::protocol_serde::shape_invalid_input_exception::de_invalid_input_exception_xml_err(_response_body, output)
|
65 59 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
66 60 | let output = output.meta(generic);
|
67 61 | output.build()
|
68 62 | };
|
69 - | if tmp.message.is_none() {
|
70 - | tmp.message = _error_message;
|
71 - | }
|
72 63 | tmp
|
73 64 | }),
|
74 65 | "LimitExceeded" => crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::LimitExceededException({
|
75 66 | #[allow(unused_mut)]
|
76 67 | let mut tmp = {
|
77 68 | #[allow(unused_mut)]
|
78 69 | let mut output = crate::types::error::builders::LimitExceededExceptionBuilder::default();
|
79 70 | output = crate::protocol_serde::shape_limit_exceeded_exception::de_limit_exceeded_exception_xml_err(_response_body, output)
|
80 71 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
81 72 | let output = output.meta(generic);
|
82 73 | output.build()
|
83 74 | };
|
84 - | if tmp.message.is_none() {
|
85 - | tmp.message = _error_message;
|
86 - | }
|
87 75 | tmp
|
88 76 | }),
|
89 77 | "OpenIdIdpCommunicationError" => {
|
90 78 | crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::OpenIdIdpCommunicationErrorException({
|
91 79 | #[allow(unused_mut)]
|
92 80 | let mut tmp = {
|
93 81 | #[allow(unused_mut)]
|
94 82 | let mut output = crate::types::error::builders::OpenIdIdpCommunicationErrorExceptionBuilder::default();
|
95 83 | output =
|
96 84 | crate::protocol_serde::shape_open_id_idp_communication_error_exception::de_open_id_idp_communication_error_exception_xml_err(
|
97 85 | _response_body,
|
98 86 | output,
|
99 87 | )
|
100 88 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
101 89 | let output = output.meta(generic);
|
102 90 | output.build()
|
103 91 | };
|
104 - | if tmp.message.is_none() {
|
105 - | tmp.message = _error_message;
|
106 - | }
|
107 92 | tmp
|
108 93 | })
|
109 94 | }
|
110 95 | "ServiceFailure" => crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::ServiceFailureException({
|
111 96 | #[allow(unused_mut)]
|
112 97 | let mut tmp = {
|
113 98 | #[allow(unused_mut)]
|
114 99 | let mut output = crate::types::error::builders::ServiceFailureExceptionBuilder::default();
|
115 100 | output = crate::protocol_serde::shape_service_failure_exception::de_service_failure_exception_xml_err(_response_body, output)
|
116 101 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
117 102 | let output = output.meta(generic);
|
118 103 | output.build()
|
119 104 | };
|
120 - | if tmp.message.is_none() {
|
121 - | tmp.message = _error_message;
|
122 - | }
|
123 105 | tmp
|
124 106 | }),
|
125 107 | _ => crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::generic(generic),
|
126 108 | })
|
127 109 | }
|
128 110 |
|
129 111 | #[allow(clippy::unnecessary_wraps)]
|
130 112 | pub fn de_create_open_id_connect_provider_http_response(
|
131 113 | _response_status: u16,
|
132 114 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
133 115 | _response_body: &[u8],
|
134 116 | ) -> std::result::Result<
|
135 117 | crate::operation::create_open_id_connect_provider::CreateOpenIdConnectProviderOutput,
|
136 118 | crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError,
|
137 119 | > {
|
138 120 | Ok({
|
139 121 | #[allow(unused_mut)]
|
140 122 | let mut output = crate::operation::create_open_id_connect_provider::builders::CreateOpenIdConnectProviderOutputBuilder::default();
|
141 123 | output = crate::protocol_serde::shape_create_open_id_connect_provider::de_create_open_id_connect_provider(_response_body, output)
|
142 124 | .map_err(crate::operation::create_open_id_connect_provider::CreateOpenIDConnectProviderError::unhandled)?;
|
143 125 | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
144 126 | output.build()
|
145 127 | })
|
146 128 | }
|
147 129 |
|
148 130 | #[allow(unused_mut)]
|
149 131 | pub fn de_create_open_id_connect_provider(
|
150 132 | inp: &[u8],
|
151 133 | mut builder: crate::operation::create_open_id_connect_provider::builders::CreateOpenIdConnectProviderOutputBuilder,
|
152 134 | ) -> std::result::Result<
|