1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | pub fn parse_http_error_metadata(
|
3 + | _response_status: u16,
|
4 + | response_headers: &::aws_smithy_runtime_api::http::Headers,
|
5 + | response_body: &[u8],
|
6 + | ) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
|
7 + | crate::json_errors::parse_error_metadata(response_body, response_headers)
|
8 + | }
|
9 + |
|
2 10 | pub(crate) fn type_erase_result<O, E>(
|
3 11 | result: ::std::result::Result<O, E>,
|
4 12 | ) -> ::std::result::Result<
|
5 13 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
6 14 | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
|
7 15 | >
|
8 16 | where
|
9 17 | O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
|
10 18 | E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
|
11 19 | {
|
12 20 | result
|
13 21 | .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
|
14 22 | .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
|
15 23 | .map_err(::std::convert::Into::into)
|
16 24 | }
|
17 25 |
|
18 - | pub fn parse_http_error_metadata(
|
19 - | _response_status: u16,
|
20 - | response_headers: &::aws_smithy_runtime_api::http::Headers,
|
21 - | response_body: &[u8],
|
22 - | ) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
|
23 - | crate::json_errors::parse_error_metadata(response_body, response_headers)
|
24 - | }
|
25 - |
|
26 - | pub(crate) mod shape_apply_guardrail;
|
27 - |
|
28 - | pub(crate) mod shape_converse;
|
29 - |
|
30 26 | pub(crate) mod shape_converse_stream;
|
31 27 |
|
32 - | pub(crate) mod shape_count_tokens;
|
33 - |
|
34 - | pub(crate) mod shape_get_async_invoke;
|
28 + | pub(crate) mod shape_invoke_model_with_bidirectional_stream;
|
35 29 |
|
36 - | pub(crate) mod shape_invoke_model;
|
30 + | pub(crate) mod shape_invoke_model_with_response_stream;
|
37 31 |
|
38 - | pub(crate) mod shape_invoke_model_input;
|
32 + | pub(crate) mod shape_converse_stream_output;
|
39 33 |
|
40 - | pub(crate) mod shape_invoke_model_with_bidirectional_stream;
|
34 + | pub(crate) mod shape_invoke_model_with_bidirectional_stream_input;
|
41 35 |
|
42 - | pub(crate) mod shape_invoke_model_with_response_stream;
|
36 + | pub(crate) mod shape_invoke_model_with_bidirectional_stream_output;
|
43 37 |
|
44 - | pub(crate) mod shape_invoke_model_with_response_stream_input;
|
38 + | pub(crate) mod shape_invoke_model_with_response_stream_output;
|
45 39 |
|
46 - | pub(crate) mod shape_list_async_invokes;
|
40 + | pub fn parse_event_stream_error_metadata(
|
41 + | payload: &::bytes::Bytes,
|
42 + | ) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
|
43 + | crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
|
44 + | }
|
47 45 |
|
48 - | pub(crate) mod shape_start_async_invoke;
|
46 + | pub(crate) mod shape_bidirectional_input_payload_part;
|
49 47 |
|
50 48 | pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
|
51 49 | if data.is_empty() {
|
52 50 | b"{}"
|
53 51 | } else {
|
54 52 | data
|
55 53 | }
|
56 54 | }
|
57 55 |
|
58 - | pub(crate) mod shape_access_denied_exception;
|
59 - |
|
60 - | pub(crate) mod shape_apply_guardrail_input;
|
61 - |
|
62 - | pub(crate) mod shape_conflict_exception;
|
56 + | pub(crate) mod shape_bidirectional_output_payload_part;
|
63 57 |
|
64 - | pub(crate) mod shape_converse_input;
|
58 + | pub(crate) mod shape_content_block_delta_event;
|
65 59 |
|
66 - | pub(crate) mod shape_converse_stream_input;
|
60 + | pub(crate) mod shape_content_block_start_event;
|
67 61 |
|
68 - | pub(crate) mod shape_converse_stream_output;
|
62 + | pub(crate) mod shape_content_block_stop_event;
|
69 63 |
|
70 - | pub(crate) mod shape_count_tokens_input;
|
64 + | pub(crate) mod shape_converse_stream_metadata_event;
|
71 65 |
|
72 66 | pub(crate) mod shape_internal_server_exception;
|
73 67 |
|
74 - | pub(crate) mod shape_invoke_model_output;
|
75 - |
|
76 - | pub(crate) mod shape_invoke_model_with_bidirectional_stream_input;
|
77 - |
|
78 - | pub(crate) mod shape_invoke_model_with_bidirectional_stream_output;
|
79 - |
|
80 - | pub(crate) mod shape_invoke_model_with_response_stream_output;
|
81 - |
|
82 - | pub(crate) mod shape_model_error_exception;
|
68 + | pub(crate) mod shape_message_start_event;
|
83 69 |
|
84 - | pub(crate) mod shape_model_not_ready_exception;
|
70 + | pub(crate) mod shape_message_stop_event;
|
85 71 |
|
86 72 | pub(crate) mod shape_model_stream_error_exception;
|
87 73 |
|
88 74 | pub(crate) mod shape_model_timeout_exception;
|
89 75 |
|
90 - | pub(crate) mod shape_resource_not_found_exception;
|
91 - |
|
92 - | pub(crate) mod shape_service_quota_exceeded_exception;
|
76 + | pub(crate) mod shape_payload_part;
|
93 77 |
|
94 78 | pub(crate) mod shape_service_unavailable_exception;
|
95 79 |
|
96 - | pub(crate) mod shape_start_async_invoke_input;
|
97 - |
|
98 80 | pub(crate) mod shape_throttling_exception;
|
99 81 |
|
100 82 | pub(crate) mod shape_validation_exception;
|
101 83 |
|
102 - | pub fn parse_event_stream_error_metadata(
|
103 - | payload: &::bytes::Bytes,
|
104 - | ) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
|
105 - | crate::json_errors::parse_error_metadata(payload, &::aws_smithy_runtime_api::http::Headers::new())
|
106 - | }
|
107 - |
|
108 - | pub(crate) mod shape_async_invoke_output_data_config;
|
109 - |
|
110 - | pub(crate) mod shape_async_invoke_summaries;
|
111 - |
|
112 - | pub(crate) mod shape_bidirectional_input_payload_part;
|
113 - |
|
114 - | pub(crate) mod shape_converse_metrics;
|
115 - |
|
116 - | pub(crate) mod shape_converse_output;
|
117 - |
|
118 - | pub(crate) mod shape_converse_trace;
|
119 - |
|
120 - | pub(crate) mod shape_guardrail_assessment_list;
|
121 - |
|
122 - | pub(crate) mod shape_guardrail_configuration;
|
123 - |
|
124 - | pub(crate) mod shape_guardrail_content_block;
|
125 - |
|
126 - | pub(crate) mod shape_guardrail_coverage;
|
127 - |
|
128 - | pub(crate) mod shape_guardrail_output_content_list;
|
129 - |
|
130 - | pub(crate) mod shape_guardrail_stream_configuration;
|
84 + | pub(crate) mod shape_content_block_delta;
|
131 85 |
|
132 - | pub(crate) mod shape_guardrail_usage;
|
86 + | pub(crate) mod shape_content_block_start;
|
133 87 |
|
134 - | pub(crate) mod shape_inference_configuration;
|
88 + | pub(crate) mod shape_converse_stream_metrics;
|
135 89 |
|
136 - | pub(crate) mod shape_message;
|
90 + | pub(crate) mod shape_converse_stream_trace;
|
137 91 |
|
138 92 | pub(crate) mod shape_performance_configuration;
|
139 93 |
|
140 - | pub(crate) mod shape_prompt_variable_values;
|
141 - |
|
142 - | pub(crate) mod shape_system_content_block;
|
143 - |
|
144 - | pub(crate) mod shape_tag;
|
145 - |
|
146 94 | pub(crate) mod shape_token_usage;
|
147 95 |
|
148 - | pub(crate) mod shape_tool_configuration;
|
149 - |
|
150 - | pub(crate) mod shape_async_invoke_s3_output_data_config;
|
151 - |
|
152 - | pub(crate) mod shape_async_invoke_summary;
|
153 - |
|
154 - | pub(crate) mod shape_bidirectional_output_payload_part;
|
155 - |
|
156 - | pub(crate) mod shape_cache_point_block;
|
157 - |
|
158 - | pub(crate) mod shape_content_block;
|
159 - |
|
160 - | pub(crate) mod shape_content_block_delta_event;
|
161 - |
|
162 - | pub(crate) mod shape_content_block_start_event;
|
163 - |
|
164 - | pub(crate) mod shape_content_block_stop_event;
|
165 - |
|
166 - | pub(crate) mod shape_converse_stream_metadata_event;
|
167 - |
|
168 - | pub(crate) mod shape_converse_tokens_request;
|
169 - |
|
170 - | pub(crate) mod shape_guardrail_assessment;
|
171 - |
|
172 - | pub(crate) mod shape_guardrail_converse_content_block;
|
173 - |
|
174 - | pub(crate) mod shape_guardrail_image_block;
|
175 - |
|
176 - | pub(crate) mod shape_guardrail_image_coverage;
|
177 - |
|
178 - | pub(crate) mod shape_guardrail_output_content;
|
179 - |
|
180 - | pub(crate) mod shape_guardrail_text_block;
|
181 - |
|
182 - | pub(crate) mod shape_guardrail_text_characters_coverage;
|
96 + | pub(crate) mod shape_citations_delta;
|
183 97 |
|
184 98 | pub(crate) mod shape_guardrail_trace_assessment;
|
185 99 |
|
186 - | pub(crate) mod shape_invoke_model_tokens_request;
|
100 + | pub(crate) mod shape_prompt_router_trace;
|
101 + |
|
102 + | pub(crate) mod shape_reasoning_content_block_delta;
|
187 103 |
|
188 - | pub(crate) mod shape_message_start_event;
|
104 + | pub(crate) mod shape_tool_use_block_delta;
|
189 105 |
|
190 - | pub(crate) mod shape_message_stop_event;
|
106 + | pub(crate) mod shape_tool_use_block_start;
|
191 107 |
|
192 - | pub(crate) mod shape_payload_part;
|
108 + | pub(crate) mod shape_citation_location;
|
193 109 |
|
194 - | pub(crate) mod shape_prompt_router_trace;
|
110 + | pub(crate) mod shape_citation_source_content_list_delta;
|
195 111 |
|
196 - | pub(crate) mod shape_tool;
|
112 + | pub(crate) mod shape_guardrail_assessment_list_map;
|
197 113 |
|
198 - | pub(crate) mod shape_tool_choice;
|
114 + | pub(crate) mod shape_guardrail_assessment_map;
|
199 115 |
|
200 - | pub(crate) mod shape_any_tool_choice;
|
116 + | pub(crate) mod shape_model_outputs;
|
201 117 |
|
202 - | pub(crate) mod shape_auto_tool_choice;
|
118 + | pub(crate) mod shape_citation_source_content_delta;
|
203 119 |
|
204 - | pub(crate) mod shape_citations_content_block;
|
120 + | pub(crate) mod shape_document_char_location;
|
205 121 |
|
206 - | pub(crate) mod shape_content_blocks;
|
122 + | pub(crate) mod shape_document_chunk_location;
|
207 123 |
|
208 - | pub(crate) mod shape_document_block;
|
124 + | pub(crate) mod shape_document_page_location;
|
209 125 |
|
210 - | pub(crate) mod shape_guardrail_assessment_list_map;
|
126 + | pub(crate) mod shape_guardrail_assessment;
|
211 127 |
|
212 - | pub(crate) mod shape_guardrail_assessment_map;
|
128 + | pub(crate) mod shape_guardrail_assessment_list;
|
213 129 |
|
214 130 | pub(crate) mod shape_guardrail_automated_reasoning_policy_assessment;
|
215 131 |
|
216 132 | pub(crate) mod shape_guardrail_content_policy_assessment;
|
217 133 |
|
218 134 | pub(crate) mod shape_guardrail_contextual_grounding_policy_assessment;
|
219 135 |
|
220 - | pub(crate) mod shape_guardrail_converse_image_block;
|
221 - |
|
222 - | pub(crate) mod shape_guardrail_converse_text_block;
|
223 - |
|
224 - | pub(crate) mod shape_guardrail_image_source;
|
225 - |
|
226 136 | pub(crate) mod shape_guardrail_invocation_metrics;
|
227 137 |
|
228 138 | pub(crate) mod shape_guardrail_sensitive_information_policy_assessment;
|
229 139 |
|
230 140 | pub(crate) mod shape_guardrail_topic_policy_assessment;
|
231 141 |
|
232 142 | pub(crate) mod shape_guardrail_word_policy_assessment;
|
233 143 |
|
234 - | pub(crate) mod shape_image_block;
|
235 - |
|
236 - | pub(crate) mod shape_model_outputs;
|
237 - |
|
238 - | pub(crate) mod shape_reasoning_content_block;
|
239 - |
|
240 - | pub(crate) mod shape_specific_tool_choice;
|
241 - |
|
242 - | pub(crate) mod shape_tool_result_block;
|
243 - |
|
244 - | pub(crate) mod shape_tool_specification;
|
245 - |
|
246 - | pub(crate) mod shape_tool_use_block;
|
247 - |
|
248 - | pub(crate) mod shape_video_block;
|
249 - |
|
250 - | pub(crate) mod shape_citation;
|
251 - |
|
252 - | pub(crate) mod shape_citation_generated_content;
|
253 - |
|
254 - | pub(crate) mod shape_citations_config;
|
255 - |
|
256 - | pub(crate) mod shape_content_block_delta;
|
257 - |
|
258 - | pub(crate) mod shape_content_block_start;
|
259 - |
|
260 - | pub(crate) mod shape_converse_stream_metrics;
|
261 - |
|
262 - | pub(crate) mod shape_converse_stream_trace;
|
263 - |
|
264 - | pub(crate) mod shape_document_source;
|
265 - |
|
266 144 | pub(crate) mod shape_guardrail_automated_reasoning_finding_list;
|
267 145 |
|
268 146 | pub(crate) mod shape_guardrail_content_filter_list;
|
269 147 |
|
270 148 | pub(crate) mod shape_guardrail_contextual_grounding_filters;
|
271 149 |
|
272 - | pub(crate) mod shape_guardrail_converse_image_source;
|
150 + | pub(crate) mod shape_guardrail_coverage;
|
273 151 |
|
274 152 | pub(crate) mod shape_guardrail_custom_word_list;
|
275 153 |
|
276 154 | pub(crate) mod shape_guardrail_managed_word_list;
|
277 155 |
|
278 156 | pub(crate) mod shape_guardrail_pii_entity_filter_list;
|
279 157 |
|
280 158 | pub(crate) mod shape_guardrail_regex_filter_list;
|
281 159 |
|
282 160 | pub(crate) mod shape_guardrail_topic_list;
|
283 161 |
|
284 - | pub(crate) mod shape_image_source;
|
285 - |
|
286 - | pub(crate) mod shape_reasoning_text_block;
|
287 - |
|
288 - | pub(crate) mod shape_tool_input_schema;
|
289 - |
|
290 - | pub(crate) mod shape_tool_result_content_block;
|
291 - |
|
292 - | pub(crate) mod shape_video_source;
|
293 - |
|
294 - | pub(crate) mod shape_citation_location;
|
295 - |
|
296 - | pub(crate) mod shape_citation_source_content;
|
297 - |
|
298 - | pub(crate) mod shape_citations_delta;
|
299 - |
|
300 - | pub(crate) mod shape_document_content_block;
|
162 + | pub(crate) mod shape_guardrail_usage;
|
301 163 |
|
302 164 | pub(crate) mod shape_guardrail_automated_reasoning_finding;
|
303 165 |
|
304 166 | pub(crate) mod shape_guardrail_content_filter;
|
305 167 |
|
306 168 | pub(crate) mod shape_guardrail_contextual_grounding_filter;
|
307 169 |
|
308 170 | pub(crate) mod shape_guardrail_custom_word;
|
309 171 |
|
172 + | pub(crate) mod shape_guardrail_image_coverage;
|
173 + |
|
310 174 | pub(crate) mod shape_guardrail_managed_word;
|
311 175 |
|
312 176 | pub(crate) mod shape_guardrail_pii_entity_filter;
|
313 177 |
|
314 178 | pub(crate) mod shape_guardrail_regex_filter;
|
315 179 |
|
316 - | pub(crate) mod shape_guardrail_topic;
|
317 - |
|
318 - | pub(crate) mod shape_reasoning_content_block_delta;
|
319 - |
|
320 - | pub(crate) mod shape_s3_location;
|
321 - |
|
322 - | pub(crate) mod shape_tool_use_block_delta;
|
323 - |
|
324 - | pub(crate) mod shape_tool_use_block_start;
|
325 - |
|
326 - | pub(crate) mod shape_citation_generated_content_list;
|
327 - |
|
328 - | pub(crate) mod shape_citation_source_content_list_delta;
|
329 - |
|
330 - | pub(crate) mod shape_citations;
|
331 - |
|
332 - | pub(crate) mod shape_document_char_location;
|
333 - |
|
334 - | pub(crate) mod shape_document_chunk_location;
|
180 + | pub(crate) mod shape_guardrail_text_characters_coverage;
|
335 181 |
|
336 - | pub(crate) mod shape_document_page_location;
|
182 + | pub(crate) mod shape_guardrail_topic;
|
337 183 |
|
338 184 | pub(crate) mod shape_guardrail_automated_reasoning_impossible_finding;
|
339 185 |
|
340 186 | pub(crate) mod shape_guardrail_automated_reasoning_invalid_finding;
|
341 187 |
|
342 188 | pub(crate) mod shape_guardrail_automated_reasoning_no_translations_finding;
|
343 189 |
|
344 190 | pub(crate) mod shape_guardrail_automated_reasoning_satisfiable_finding;
|
345 191 |
|
346 192 | pub(crate) mod shape_guardrail_automated_reasoning_too_complex_finding;
|
347 193 |
|
348 194 | pub(crate) mod shape_guardrail_automated_reasoning_translation_ambiguous_finding;
|
349 195 |
|
350 196 | pub(crate) mod shape_guardrail_automated_reasoning_valid_finding;
|
351 197 |
|
352 - | pub(crate) mod shape_tool_result_content_blocks;
|
353 - |
|
354 - | pub(crate) mod shape_citation_source_content_delta;
|
355 - |
|
356 - | pub(crate) mod shape_document_content_blocks;
|
357 - |
|
358 198 | pub(crate) mod shape_guardrail_automated_reasoning_difference_scenario_list;
|
359 199 |
|
360 200 | pub(crate) mod shape_guardrail_automated_reasoning_logic_warning;
|
361 201 |
|
362 202 | pub(crate) mod shape_guardrail_automated_reasoning_rule_list;
|
363 203 |
|
364 204 | pub(crate) mod shape_guardrail_automated_reasoning_scenario;
|
365 205 |
|
366 206 | pub(crate) mod shape_guardrail_automated_reasoning_translation;
|
367 207 |
|
368 208 | pub(crate) mod shape_guardrail_automated_reasoning_translation_option_list;
|
369 209 |
|
370 - | pub(crate) mod shape_guardrail_converse_content_qualifier_list;
|
371 - |
|
372 - | pub(crate) mod shape_citation_source_content_list;
|
373 - |
|
374 210 | pub(crate) mod shape_guardrail_automated_reasoning_input_text_reference_list;
|
375 211 |
|
376 212 | pub(crate) mod shape_guardrail_automated_reasoning_rule;
|
377 213 |
|
378 214 | pub(crate) mod shape_guardrail_automated_reasoning_statement_list;
|
379 215 |
|
380 216 | pub(crate) mod shape_guardrail_automated_reasoning_translation_option;
|
381 217 |
|
382 218 | pub(crate) mod shape_guardrail_automated_reasoning_input_text_reference;
|
383 219 |
|