56 56 | "ModelTimeoutException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelTimeoutException({
|
57 57 | #[allow(unused_mut)]
|
58 58 | let mut tmp = {
|
59 59 | #[allow(unused_mut)]
|
60 60 | let mut output = crate::types::error::builders::ModelTimeoutExceptionBuilder::default();
|
61 61 | output = crate::protocol_serde::shape_model_timeout_exception::de_model_timeout_exception_json_err(_response_body, output)
|
62 62 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
63 63 | let output = output.meta(generic);
|
64 64 | output.build()
|
65 65 | };
|
66 - | if tmp.message.is_none() {
|
67 - | tmp.message = _error_message;
|
68 - | }
|
69 66 | tmp
|
70 67 | }),
|
71 68 | "AccessDeniedException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::AccessDeniedException({
|
72 69 | #[allow(unused_mut)]
|
73 70 | let mut tmp = {
|
74 71 | #[allow(unused_mut)]
|
75 72 | let mut output = crate::types::error::builders::AccessDeniedExceptionBuilder::default();
|
76 73 | output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
|
77 74 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
78 75 | let output = output.meta(generic);
|
79 76 | output.build()
|
80 77 | };
|
81 - | if tmp.message.is_none() {
|
82 - | tmp.message = _error_message;
|
83 - | }
|
84 78 | tmp
|
85 79 | }),
|
86 80 | "ResourceNotFoundException" => {
|
87 81 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ResourceNotFoundException({
|
88 82 | #[allow(unused_mut)]
|
89 83 | let mut tmp = {
|
90 84 | #[allow(unused_mut)]
|
91 85 | let mut output = crate::types::error::builders::ResourceNotFoundExceptionBuilder::default();
|
92 86 | output =
|
93 87 | crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
|
94 88 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
95 89 | let output = output.meta(generic);
|
96 90 | output.build()
|
97 91 | };
|
98 - | if tmp.message.is_none() {
|
99 - | tmp.message = _error_message;
|
100 - | }
|
101 92 | tmp
|
102 93 | })
|
103 94 | }
|
104 95 | "ThrottlingException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ThrottlingException({
|
105 96 | #[allow(unused_mut)]
|
106 97 | let mut tmp = {
|
107 98 | #[allow(unused_mut)]
|
108 99 | let mut output = crate::types::error::builders::ThrottlingExceptionBuilder::default();
|
109 100 | output = crate::protocol_serde::shape_throttling_exception::de_throttling_exception_json_err(_response_body, output)
|
110 101 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
111 102 | let output = output.meta(generic);
|
112 103 | output.build()
|
113 104 | };
|
114 - | if tmp.message.is_none() {
|
115 - | tmp.message = _error_message;
|
116 - | }
|
117 105 | tmp
|
118 106 | }),
|
119 107 | "InternalServerException" => {
|
120 108 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::InternalServerException({
|
121 109 | #[allow(unused_mut)]
|
122 110 | let mut tmp = {
|
123 111 | #[allow(unused_mut)]
|
124 112 | let mut output = crate::types::error::builders::InternalServerExceptionBuilder::default();
|
125 113 | output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
|
126 114 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
127 115 | let output = output.meta(generic);
|
128 116 | output.build()
|
129 117 | };
|
130 - | if tmp.message.is_none() {
|
131 - | tmp.message = _error_message;
|
132 - | }
|
133 118 | tmp
|
134 119 | })
|
135 120 | }
|
136 121 | "ModelStreamErrorException" => {
|
137 122 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelStreamErrorException({
|
138 123 | #[allow(unused_mut)]
|
139 124 | let mut tmp = {
|
140 125 | #[allow(unused_mut)]
|
141 126 | let mut output = crate::types::error::builders::ModelStreamErrorExceptionBuilder::default();
|
142 127 | output =
|
143 128 | crate::protocol_serde::shape_model_stream_error_exception::de_model_stream_error_exception_json_err(_response_body, output)
|
144 129 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
145 130 | let output = output.meta(generic);
|
146 131 | output.build()
|
147 132 | };
|
148 - | if tmp.message.is_none() {
|
149 - | tmp.message = _error_message;
|
150 - | }
|
151 133 | tmp
|
152 134 | })
|
153 135 | }
|
154 136 | "ValidationException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ValidationException({
|
155 137 | #[allow(unused_mut)]
|
156 138 | let mut tmp = {
|
157 139 | #[allow(unused_mut)]
|
158 140 | let mut output = crate::types::error::builders::ValidationExceptionBuilder::default();
|
159 141 | output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
|
160 142 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
161 143 | let output = output.meta(generic);
|
162 144 | output.build()
|
163 145 | };
|
164 - | if tmp.message.is_none() {
|
165 - | tmp.message = _error_message;
|
166 - | }
|
167 146 | tmp
|
168 147 | }),
|
169 148 | "ModelNotReadyException" => {
|
170 149 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelNotReadyException({
|
171 150 | #[allow(unused_mut)]
|
172 151 | let mut tmp = {
|
173 152 | #[allow(unused_mut)]
|
174 153 | let mut output = crate::types::error::builders::ModelNotReadyExceptionBuilder::default();
|
175 154 | output = crate::protocol_serde::shape_model_not_ready_exception::de_model_not_ready_exception_json_err(_response_body, output)
|
176 155 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
177 156 | let output = output.meta(generic);
|
178 157 | output.build()
|
179 158 | };
|
180 - | if tmp.message.is_none() {
|
181 - | tmp.message = _error_message;
|
182 - | }
|
183 159 | tmp
|
184 160 | })
|
185 161 | }
|
186 162 | "ModelErrorException" => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ModelErrorException({
|
187 163 | #[allow(unused_mut)]
|
188 164 | let mut tmp = {
|
189 165 | #[allow(unused_mut)]
|
190 166 | let mut output = crate::types::error::builders::ModelErrorExceptionBuilder::default();
|
191 167 | output = crate::protocol_serde::shape_model_error_exception::de_model_error_exception_json_err(_response_body, output)
|
192 168 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
193 169 | let output = output.meta(generic);
|
194 170 | output.build()
|
195 171 | };
|
196 - | if tmp.message.is_none() {
|
197 - | tmp.message = _error_message;
|
198 - | }
|
199 172 | tmp
|
200 173 | }),
|
201 174 | "ServiceQuotaExceededException" => {
|
202 175 | crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::ServiceQuotaExceededException({
|
203 176 | #[allow(unused_mut)]
|
204 177 | let mut tmp = {
|
205 178 | #[allow(unused_mut)]
|
206 179 | let mut output = crate::types::error::builders::ServiceQuotaExceededExceptionBuilder::default();
|
207 180 | output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
|
208 181 | _response_body,
|
209 182 | output,
|
210 183 | )
|
211 184 | .map_err(crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::unhandled)?;
|
212 185 | let output = output.meta(generic);
|
213 186 | output.build()
|
214 187 | };
|
215 - | if tmp.message.is_none() {
|
216 - | tmp.message = _error_message;
|
217 - | }
|
218 188 | tmp
|
219 189 | })
|
220 190 | }
|
221 191 | _ => crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamError::generic(generic),
|
222 192 | })
|
223 193 | }
|
224 194 |
|
225 195 | pub fn ser_invoke_model_with_response_stream_headers(
|
226 196 | input: &crate::operation::invoke_model_with_response_stream::InvokeModelWithResponseStreamInput,
|
227 197 | mut builder: ::http::request::Builder,
|