1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 BadGatewayException(crate::types::error::BadGatewayException),
10 ConflictException(crate::types::error::ConflictException),
12 DependencyFailedException(crate::types::error::DependencyFailedException),
14 InternalServerException(crate::types::error::InternalServerException),
16 ModelNotReadyException(crate::types::error::ModelNotReadyException),
18 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
22 ThrottlingException(crate::types::error::ThrottlingException),
24 ValidationException(crate::types::error::ValidationException),
26 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28 variable wildcard pattern and check `.code()`:
29 \
30 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
31 \
32 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
33 Unhandled(crate::error::sealed_unhandled::Unhandled),
34}
35impl ::std::fmt::Display for Error {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37 match self {
38 Error::AccessDeniedException(inner) => inner.fmt(f),
39 Error::BadGatewayException(inner) => inner.fmt(f),
40 Error::ConflictException(inner) => inner.fmt(f),
41 Error::DependencyFailedException(inner) => inner.fmt(f),
42 Error::InternalServerException(inner) => inner.fmt(f),
43 Error::ModelNotReadyException(inner) => inner.fmt(f),
44 Error::ResourceNotFoundException(inner) => inner.fmt(f),
45 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
46 Error::ThrottlingException(inner) => inner.fmt(f),
47 Error::ValidationException(inner) => inner.fmt(f),
48 Error::Unhandled(_) => {
49 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
50 write!(f, "unhandled error ({code})")
51 } else {
52 f.write_str("unhandled error")
53 }
54 }
55 }
56 }
57}
58impl From<::aws_smithy_types::error::operation::BuildError> for Error {
59 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
60 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
61 source: value.into(),
62 meta: ::std::default::Default::default(),
63 })
64 }
65}
66impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
67 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
68 match self {
69 Self::AccessDeniedException(inner) => inner.meta(),
70 Self::BadGatewayException(inner) => inner.meta(),
71 Self::ConflictException(inner) => inner.meta(),
72 Self::DependencyFailedException(inner) => inner.meta(),
73 Self::InternalServerException(inner) => inner.meta(),
74 Self::ModelNotReadyException(inner) => inner.meta(),
75 Self::ResourceNotFoundException(inner) => inner.meta(),
76 Self::ServiceQuotaExceededException(inner) => inner.meta(),
77 Self::ThrottlingException(inner) => inner.meta(),
78 Self::ValidationException(inner) => inner.meta(),
79 Self::Unhandled(inner) => &inner.meta,
80 }
81 }
82}
83impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>> for Error
84where
85 R: Send + Sync + std::fmt::Debug + 'static,
86{
87 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>) -> Self {
88 match err {
89 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
90 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
92 source: err.into(),
93 }),
94 }
95 }
96}
97impl From<crate::operation::create_invocation::CreateInvocationError> for Error {
98 fn from(err: crate::operation::create_invocation::CreateInvocationError) -> Self {
99 match err {
100 crate::operation::create_invocation::CreateInvocationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
101 crate::operation::create_invocation::CreateInvocationError::ConflictException(inner) => Error::ConflictException(inner),
102 crate::operation::create_invocation::CreateInvocationError::InternalServerException(inner) => Error::InternalServerException(inner),
103 crate::operation::create_invocation::CreateInvocationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
104 crate::operation::create_invocation::CreateInvocationError::ServiceQuotaExceededException(inner) => {
105 Error::ServiceQuotaExceededException(inner)
106 }
107 crate::operation::create_invocation::CreateInvocationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
108 crate::operation::create_invocation::CreateInvocationError::ValidationException(inner) => Error::ValidationException(inner),
109 crate::operation::create_invocation::CreateInvocationError::Unhandled(inner) => Error::Unhandled(inner),
110 }
111 }
112}
113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>> for Error
114where
115 R: Send + Sync + std::fmt::Debug + 'static,
116{
117 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>) -> Self {
118 match err {
119 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
120 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
121 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
122 source: err.into(),
123 }),
124 }
125 }
126}
127impl From<crate::operation::create_session::CreateSessionError> for Error {
128 fn from(err: crate::operation::create_session::CreateSessionError) -> Self {
129 match err {
130 crate::operation::create_session::CreateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
131 crate::operation::create_session::CreateSessionError::ConflictException(inner) => Error::ConflictException(inner),
132 crate::operation::create_session::CreateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
133 crate::operation::create_session::CreateSessionError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
134 crate::operation::create_session::CreateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
135 crate::operation::create_session::CreateSessionError::ValidationException(inner) => Error::ValidationException(inner),
136 crate::operation::create_session::CreateSessionError::Unhandled(inner) => Error::Unhandled(inner),
137 }
138 }
139}
140impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>> for Error
141where
142 R: Send + Sync + std::fmt::Debug + 'static,
143{
144 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>) -> Self {
145 match err {
146 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
147 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
148 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
149 source: err.into(),
150 }),
151 }
152 }
153}
154impl From<crate::operation::delete_agent_memory::DeleteAgentMemoryError> for Error {
155 fn from(err: crate::operation::delete_agent_memory::DeleteAgentMemoryError) -> Self {
156 match err {
157 crate::operation::delete_agent_memory::DeleteAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
158 crate::operation::delete_agent_memory::DeleteAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
159 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
160 crate::operation::delete_agent_memory::DeleteAgentMemoryError::DependencyFailedException(inner) => {
161 Error::DependencyFailedException(inner)
162 }
163 crate::operation::delete_agent_memory::DeleteAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
164 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ResourceNotFoundException(inner) => {
165 Error::ResourceNotFoundException(inner)
166 }
167 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ServiceQuotaExceededException(inner) => {
168 Error::ServiceQuotaExceededException(inner)
169 }
170 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
171 crate::operation::delete_agent_memory::DeleteAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
172 crate::operation::delete_agent_memory::DeleteAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
173 }
174 }
175}
176impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>> for Error
177where
178 R: Send + Sync + std::fmt::Debug + 'static,
179{
180 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>) -> Self {
181 match err {
182 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
183 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
184 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
185 source: err.into(),
186 }),
187 }
188 }
189}
190impl From<crate::operation::delete_session::DeleteSessionError> for Error {
191 fn from(err: crate::operation::delete_session::DeleteSessionError) -> Self {
192 match err {
193 crate::operation::delete_session::DeleteSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
194 crate::operation::delete_session::DeleteSessionError::ConflictException(inner) => Error::ConflictException(inner),
195 crate::operation::delete_session::DeleteSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
196 crate::operation::delete_session::DeleteSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
197 crate::operation::delete_session::DeleteSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
198 crate::operation::delete_session::DeleteSessionError::ValidationException(inner) => Error::ValidationException(inner),
199 crate::operation::delete_session::DeleteSessionError::Unhandled(inner) => Error::Unhandled(inner),
200 }
201 }
202}
203impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>> for Error
204where
205 R: Send + Sync + std::fmt::Debug + 'static,
206{
207 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>) -> Self {
208 match err {
209 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
210 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
211 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
212 source: err.into(),
213 }),
214 }
215 }
216}
217impl From<crate::operation::end_session::EndSessionError> for Error {
218 fn from(err: crate::operation::end_session::EndSessionError) -> Self {
219 match err {
220 crate::operation::end_session::EndSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
221 crate::operation::end_session::EndSessionError::ConflictException(inner) => Error::ConflictException(inner),
222 crate::operation::end_session::EndSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
223 crate::operation::end_session::EndSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
224 crate::operation::end_session::EndSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
225 crate::operation::end_session::EndSessionError::ValidationException(inner) => Error::ValidationException(inner),
226 crate::operation::end_session::EndSessionError::Unhandled(inner) => Error::Unhandled(inner),
227 }
228 }
229}
230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>> for Error
231where
232 R: Send + Sync + std::fmt::Debug + 'static,
233{
234 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>) -> Self {
235 match err {
236 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239 source: err.into(),
240 }),
241 }
242 }
243}
244impl From<crate::operation::generate_query::GenerateQueryError> for Error {
245 fn from(err: crate::operation::generate_query::GenerateQueryError) -> Self {
246 match err {
247 crate::operation::generate_query::GenerateQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
248 crate::operation::generate_query::GenerateQueryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
249 crate::operation::generate_query::GenerateQueryError::ConflictException(inner) => Error::ConflictException(inner),
250 crate::operation::generate_query::GenerateQueryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
251 crate::operation::generate_query::GenerateQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
252 crate::operation::generate_query::GenerateQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
253 crate::operation::generate_query::GenerateQueryError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
254 crate::operation::generate_query::GenerateQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
255 crate::operation::generate_query::GenerateQueryError::ValidationException(inner) => Error::ValidationException(inner),
256 crate::operation::generate_query::GenerateQueryError::Unhandled(inner) => Error::Unhandled(inner),
257 }
258 }
259}
260impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>> for Error
261where
262 R: Send + Sync + std::fmt::Debug + 'static,
263{
264 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>) -> Self {
265 match err {
266 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
267 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
268 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
269 source: err.into(),
270 }),
271 }
272 }
273}
274impl From<crate::operation::get_agent_memory::GetAgentMemoryError> for Error {
275 fn from(err: crate::operation::get_agent_memory::GetAgentMemoryError) -> Self {
276 match err {
277 crate::operation::get_agent_memory::GetAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
278 crate::operation::get_agent_memory::GetAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
279 crate::operation::get_agent_memory::GetAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
280 crate::operation::get_agent_memory::GetAgentMemoryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
281 crate::operation::get_agent_memory::GetAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
282 crate::operation::get_agent_memory::GetAgentMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
283 crate::operation::get_agent_memory::GetAgentMemoryError::ServiceQuotaExceededException(inner) => {
284 Error::ServiceQuotaExceededException(inner)
285 }
286 crate::operation::get_agent_memory::GetAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
287 crate::operation::get_agent_memory::GetAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
288 crate::operation::get_agent_memory::GetAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
289 }
290 }
291}
292impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>>
293 for Error
294where
295 R: Send + Sync + std::fmt::Debug + 'static,
296{
297 fn from(
298 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>,
299 ) -> Self {
300 match err {
301 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
302 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
303 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
304 source: err.into(),
305 }),
306 }
307 }
308}
309impl From<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError> for Error {
310 fn from(err: crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError) -> Self {
311 match err {
312 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::AccessDeniedException(inner) => {
313 Error::AccessDeniedException(inner)
314 }
315 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::InternalServerException(inner) => {
316 Error::InternalServerException(inner)
317 }
318 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ResourceNotFoundException(inner) => {
319 Error::ResourceNotFoundException(inner)
320 }
321 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ThrottlingException(inner) => {
322 Error::ThrottlingException(inner)
323 }
324 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ValidationException(inner) => {
325 Error::ValidationException(inner)
326 }
327 crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
328 }
329 }
330}
331impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>> for Error
332where
333 R: Send + Sync + std::fmt::Debug + 'static,
334{
335 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>) -> Self {
336 match err {
337 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
338 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
339 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
340 source: err.into(),
341 }),
342 }
343 }
344}
345impl From<crate::operation::get_flow_execution::GetFlowExecutionError> for Error {
346 fn from(err: crate::operation::get_flow_execution::GetFlowExecutionError) -> Self {
347 match err {
348 crate::operation::get_flow_execution::GetFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
349 crate::operation::get_flow_execution::GetFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
350 crate::operation::get_flow_execution::GetFlowExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
351 crate::operation::get_flow_execution::GetFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
352 crate::operation::get_flow_execution::GetFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
353 crate::operation::get_flow_execution::GetFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
354 }
355 }
356}
357impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>> for Error
358where
359 R: Send + Sync + std::fmt::Debug + 'static,
360{
361 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>) -> Self {
362 match err {
363 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
364 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
365 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
366 source: err.into(),
367 }),
368 }
369 }
370}
371impl From<crate::operation::get_invocation_step::GetInvocationStepError> for Error {
372 fn from(err: crate::operation::get_invocation_step::GetInvocationStepError) -> Self {
373 match err {
374 crate::operation::get_invocation_step::GetInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
375 crate::operation::get_invocation_step::GetInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
376 crate::operation::get_invocation_step::GetInvocationStepError::ResourceNotFoundException(inner) => {
377 Error::ResourceNotFoundException(inner)
378 }
379 crate::operation::get_invocation_step::GetInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
380 crate::operation::get_invocation_step::GetInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
381 crate::operation::get_invocation_step::GetInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
382 }
383 }
384}
385impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>> for Error
386where
387 R: Send + Sync + std::fmt::Debug + 'static,
388{
389 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>) -> Self {
390 match err {
391 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
392 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
393 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
394 source: err.into(),
395 }),
396 }
397 }
398}
399impl From<crate::operation::get_session::GetSessionError> for Error {
400 fn from(err: crate::operation::get_session::GetSessionError) -> Self {
401 match err {
402 crate::operation::get_session::GetSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
403 crate::operation::get_session::GetSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
404 crate::operation::get_session::GetSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
405 crate::operation::get_session::GetSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
406 crate::operation::get_session::GetSessionError::ValidationException(inner) => Error::ValidationException(inner),
407 crate::operation::get_session::GetSessionError::Unhandled(inner) => Error::Unhandled(inner),
408 }
409 }
410}
411impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>> for Error
412where
413 R: Send + Sync + std::fmt::Debug + 'static,
414{
415 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>) -> Self {
416 match err {
417 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
418 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
419 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
420 source: err.into(),
421 }),
422 }
423 }
424}
425impl From<crate::operation::invoke_agent::InvokeAgentError> for Error {
426 fn from(err: crate::operation::invoke_agent::InvokeAgentError) -> Self {
427 match err {
428 crate::operation::invoke_agent::InvokeAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
429 crate::operation::invoke_agent::InvokeAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
430 crate::operation::invoke_agent::InvokeAgentError::ConflictException(inner) => Error::ConflictException(inner),
431 crate::operation::invoke_agent::InvokeAgentError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
432 crate::operation::invoke_agent::InvokeAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
433 crate::operation::invoke_agent::InvokeAgentError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
434 crate::operation::invoke_agent::InvokeAgentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
435 crate::operation::invoke_agent::InvokeAgentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
436 crate::operation::invoke_agent::InvokeAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
437 crate::operation::invoke_agent::InvokeAgentError::ValidationException(inner) => Error::ValidationException(inner),
438 crate::operation::invoke_agent::InvokeAgentError::Unhandled(inner) => Error::Unhandled(inner),
439 }
440 }
441}
442impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>> for Error
443where
444 R: Send + Sync + std::fmt::Debug + 'static,
445{
446 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>) -> Self {
447 match err {
448 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
449 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
450 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
451 source: err.into(),
452 }),
453 }
454 }
455}
456impl From<crate::operation::invoke_flow::InvokeFlowError> for Error {
457 fn from(err: crate::operation::invoke_flow::InvokeFlowError) -> Self {
458 match err {
459 crate::operation::invoke_flow::InvokeFlowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
460 crate::operation::invoke_flow::InvokeFlowError::BadGatewayException(inner) => Error::BadGatewayException(inner),
461 crate::operation::invoke_flow::InvokeFlowError::ConflictException(inner) => Error::ConflictException(inner),
462 crate::operation::invoke_flow::InvokeFlowError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
463 crate::operation::invoke_flow::InvokeFlowError::InternalServerException(inner) => Error::InternalServerException(inner),
464 crate::operation::invoke_flow::InvokeFlowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
465 crate::operation::invoke_flow::InvokeFlowError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
466 crate::operation::invoke_flow::InvokeFlowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
467 crate::operation::invoke_flow::InvokeFlowError::ValidationException(inner) => Error::ValidationException(inner),
468 crate::operation::invoke_flow::InvokeFlowError::Unhandled(inner) => Error::Unhandled(inner),
469 }
470 }
471}
472impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>> for Error
473where
474 R: Send + Sync + std::fmt::Debug + 'static,
475{
476 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>) -> Self {
477 match err {
478 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
479 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
480 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
481 source: err.into(),
482 }),
483 }
484 }
485}
486impl From<crate::operation::invoke_inline_agent::InvokeInlineAgentError> for Error {
487 fn from(err: crate::operation::invoke_inline_agent::InvokeInlineAgentError) -> Self {
488 match err {
489 crate::operation::invoke_inline_agent::InvokeInlineAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
490 crate::operation::invoke_inline_agent::InvokeInlineAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
491 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ConflictException(inner) => Error::ConflictException(inner),
492 crate::operation::invoke_inline_agent::InvokeInlineAgentError::DependencyFailedException(inner) => {
493 Error::DependencyFailedException(inner)
494 }
495 crate::operation::invoke_inline_agent::InvokeInlineAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
496 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ResourceNotFoundException(inner) => {
497 Error::ResourceNotFoundException(inner)
498 }
499 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ServiceQuotaExceededException(inner) => {
500 Error::ServiceQuotaExceededException(inner)
501 }
502 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
503 crate::operation::invoke_inline_agent::InvokeInlineAgentError::ValidationException(inner) => Error::ValidationException(inner),
504 crate::operation::invoke_inline_agent::InvokeInlineAgentError::Unhandled(inner) => Error::Unhandled(inner),
505 }
506 }
507}
508impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>>
509 for Error
510where
511 R: Send + Sync + std::fmt::Debug + 'static,
512{
513 fn from(
514 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>,
515 ) -> Self {
516 match err {
517 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
518 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
519 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
520 source: err.into(),
521 }),
522 }
523 }
524}
525impl From<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError> for Error {
526 fn from(err: crate::operation::list_flow_execution_events::ListFlowExecutionEventsError) -> Self {
527 match err {
528 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::AccessDeniedException(inner) => {
529 Error::AccessDeniedException(inner)
530 }
531 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::InternalServerException(inner) => {
532 Error::InternalServerException(inner)
533 }
534 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ResourceNotFoundException(inner) => {
535 Error::ResourceNotFoundException(inner)
536 }
537 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ThrottlingException(inner) => {
538 Error::ThrottlingException(inner)
539 }
540 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ValidationException(inner) => {
541 Error::ValidationException(inner)
542 }
543 crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::Unhandled(inner) => Error::Unhandled(inner),
544 }
545 }
546}
547impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>> for Error
548where
549 R: Send + Sync + std::fmt::Debug + 'static,
550{
551 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>) -> Self {
552 match err {
553 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
554 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
555 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
556 source: err.into(),
557 }),
558 }
559 }
560}
561impl From<crate::operation::list_flow_executions::ListFlowExecutionsError> for Error {
562 fn from(err: crate::operation::list_flow_executions::ListFlowExecutionsError) -> Self {
563 match err {
564 crate::operation::list_flow_executions::ListFlowExecutionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
565 crate::operation::list_flow_executions::ListFlowExecutionsError::InternalServerException(inner) => Error::InternalServerException(inner),
566 crate::operation::list_flow_executions::ListFlowExecutionsError::ResourceNotFoundException(inner) => {
567 Error::ResourceNotFoundException(inner)
568 }
569 crate::operation::list_flow_executions::ListFlowExecutionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
570 crate::operation::list_flow_executions::ListFlowExecutionsError::ValidationException(inner) => Error::ValidationException(inner),
571 crate::operation::list_flow_executions::ListFlowExecutionsError::Unhandled(inner) => Error::Unhandled(inner),
572 }
573 }
574}
575impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>> for Error
576where
577 R: Send + Sync + std::fmt::Debug + 'static,
578{
579 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>) -> Self {
580 match err {
581 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
582 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
583 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
584 source: err.into(),
585 }),
586 }
587 }
588}
589impl From<crate::operation::list_invocations::ListInvocationsError> for Error {
590 fn from(err: crate::operation::list_invocations::ListInvocationsError) -> Self {
591 match err {
592 crate::operation::list_invocations::ListInvocationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
593 crate::operation::list_invocations::ListInvocationsError::InternalServerException(inner) => Error::InternalServerException(inner),
594 crate::operation::list_invocations::ListInvocationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
595 crate::operation::list_invocations::ListInvocationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
596 crate::operation::list_invocations::ListInvocationsError::ValidationException(inner) => Error::ValidationException(inner),
597 crate::operation::list_invocations::ListInvocationsError::Unhandled(inner) => Error::Unhandled(inner),
598 }
599 }
600}
601impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>> for Error
602where
603 R: Send + Sync + std::fmt::Debug + 'static,
604{
605 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>) -> Self {
606 match err {
607 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
608 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
609 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
610 source: err.into(),
611 }),
612 }
613 }
614}
615impl From<crate::operation::list_invocation_steps::ListInvocationStepsError> for Error {
616 fn from(err: crate::operation::list_invocation_steps::ListInvocationStepsError) -> Self {
617 match err {
618 crate::operation::list_invocation_steps::ListInvocationStepsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
619 crate::operation::list_invocation_steps::ListInvocationStepsError::InternalServerException(inner) => {
620 Error::InternalServerException(inner)
621 }
622 crate::operation::list_invocation_steps::ListInvocationStepsError::ResourceNotFoundException(inner) => {
623 Error::ResourceNotFoundException(inner)
624 }
625 crate::operation::list_invocation_steps::ListInvocationStepsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
626 crate::operation::list_invocation_steps::ListInvocationStepsError::ValidationException(inner) => Error::ValidationException(inner),
627 crate::operation::list_invocation_steps::ListInvocationStepsError::Unhandled(inner) => Error::Unhandled(inner),
628 }
629 }
630}
631impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>> for Error
632where
633 R: Send + Sync + std::fmt::Debug + 'static,
634{
635 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>) -> Self {
636 match err {
637 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
638 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
639 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
640 source: err.into(),
641 }),
642 }
643 }
644}
645impl From<crate::operation::list_sessions::ListSessionsError> for Error {
646 fn from(err: crate::operation::list_sessions::ListSessionsError) -> Self {
647 match err {
648 crate::operation::list_sessions::ListSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
649 crate::operation::list_sessions::ListSessionsError::InternalServerException(inner) => Error::InternalServerException(inner),
650 crate::operation::list_sessions::ListSessionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
651 crate::operation::list_sessions::ListSessionsError::ValidationException(inner) => Error::ValidationException(inner),
652 crate::operation::list_sessions::ListSessionsError::Unhandled(inner) => Error::Unhandled(inner),
653 }
654 }
655}
656impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
657where
658 R: Send + Sync + std::fmt::Debug + 'static,
659{
660 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
661 match err {
662 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
663 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
664 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
665 source: err.into(),
666 }),
667 }
668 }
669}
670impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
671 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
672 match err {
673 crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
674 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
675 Error::InternalServerException(inner)
676 }
677 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
678 Error::ResourceNotFoundException(inner)
679 }
680 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
681 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
682 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
683 }
684 }
685}
686impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>> for Error
687where
688 R: Send + Sync + std::fmt::Debug + 'static,
689{
690 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>) -> Self {
691 match err {
692 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
693 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
694 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
695 source: err.into(),
696 }),
697 }
698 }
699}
700impl From<crate::operation::optimize_prompt::OptimizePromptError> for Error {
701 fn from(err: crate::operation::optimize_prompt::OptimizePromptError) -> Self {
702 match err {
703 crate::operation::optimize_prompt::OptimizePromptError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
704 crate::operation::optimize_prompt::OptimizePromptError::BadGatewayException(inner) => Error::BadGatewayException(inner),
705 crate::operation::optimize_prompt::OptimizePromptError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
706 crate::operation::optimize_prompt::OptimizePromptError::InternalServerException(inner) => Error::InternalServerException(inner),
707 crate::operation::optimize_prompt::OptimizePromptError::ThrottlingException(inner) => Error::ThrottlingException(inner),
708 crate::operation::optimize_prompt::OptimizePromptError::ValidationException(inner) => Error::ValidationException(inner),
709 crate::operation::optimize_prompt::OptimizePromptError::Unhandled(inner) => Error::Unhandled(inner),
710 }
711 }
712}
713impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>> for Error
714where
715 R: Send + Sync + std::fmt::Debug + 'static,
716{
717 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>) -> Self {
718 match err {
719 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
720 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
721 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
722 source: err.into(),
723 }),
724 }
725 }
726}
727impl From<crate::operation::put_invocation_step::PutInvocationStepError> for Error {
728 fn from(err: crate::operation::put_invocation_step::PutInvocationStepError) -> Self {
729 match err {
730 crate::operation::put_invocation_step::PutInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
731 crate::operation::put_invocation_step::PutInvocationStepError::ConflictException(inner) => Error::ConflictException(inner),
732 crate::operation::put_invocation_step::PutInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
733 crate::operation::put_invocation_step::PutInvocationStepError::ResourceNotFoundException(inner) => {
734 Error::ResourceNotFoundException(inner)
735 }
736 crate::operation::put_invocation_step::PutInvocationStepError::ServiceQuotaExceededException(inner) => {
737 Error::ServiceQuotaExceededException(inner)
738 }
739 crate::operation::put_invocation_step::PutInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
740 crate::operation::put_invocation_step::PutInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
741 crate::operation::put_invocation_step::PutInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
742 }
743 }
744}
745impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>> for Error
746where
747 R: Send + Sync + std::fmt::Debug + 'static,
748{
749 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>) -> Self {
750 match err {
751 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
752 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
753 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
754 source: err.into(),
755 }),
756 }
757 }
758}
759impl From<crate::operation::rerank::RerankError> for Error {
760 fn from(err: crate::operation::rerank::RerankError) -> Self {
761 match err {
762 crate::operation::rerank::RerankError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
763 crate::operation::rerank::RerankError::BadGatewayException(inner) => Error::BadGatewayException(inner),
764 crate::operation::rerank::RerankError::ConflictException(inner) => Error::ConflictException(inner),
765 crate::operation::rerank::RerankError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
766 crate::operation::rerank::RerankError::InternalServerException(inner) => Error::InternalServerException(inner),
767 crate::operation::rerank::RerankError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
768 crate::operation::rerank::RerankError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
769 crate::operation::rerank::RerankError::ThrottlingException(inner) => Error::ThrottlingException(inner),
770 crate::operation::rerank::RerankError::ValidationException(inner) => Error::ValidationException(inner),
771 crate::operation::rerank::RerankError::Unhandled(inner) => Error::Unhandled(inner),
772 }
773 }
774}
775impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>> for Error
776where
777 R: Send + Sync + std::fmt::Debug + 'static,
778{
779 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>) -> Self {
780 match err {
781 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
782 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
783 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
784 source: err.into(),
785 }),
786 }
787 }
788}
789impl From<crate::operation::retrieve::RetrieveError> for Error {
790 fn from(err: crate::operation::retrieve::RetrieveError) -> Self {
791 match err {
792 crate::operation::retrieve::RetrieveError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
793 crate::operation::retrieve::RetrieveError::BadGatewayException(inner) => Error::BadGatewayException(inner),
794 crate::operation::retrieve::RetrieveError::ConflictException(inner) => Error::ConflictException(inner),
795 crate::operation::retrieve::RetrieveError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
796 crate::operation::retrieve::RetrieveError::InternalServerException(inner) => Error::InternalServerException(inner),
797 crate::operation::retrieve::RetrieveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
798 crate::operation::retrieve::RetrieveError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
799 crate::operation::retrieve::RetrieveError::ThrottlingException(inner) => Error::ThrottlingException(inner),
800 crate::operation::retrieve::RetrieveError::ValidationException(inner) => Error::ValidationException(inner),
801 crate::operation::retrieve::RetrieveError::Unhandled(inner) => Error::Unhandled(inner),
802 }
803 }
804}
805impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>> for Error
806where
807 R: Send + Sync + std::fmt::Debug + 'static,
808{
809 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>) -> Self {
810 match err {
811 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
812 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
813 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
814 source: err.into(),
815 }),
816 }
817 }
818}
819impl From<crate::operation::retrieve_and_generate::RetrieveAndGenerateError> for Error {
820 fn from(err: crate::operation::retrieve_and_generate::RetrieveAndGenerateError) -> Self {
821 match err {
822 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
823 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::BadGatewayException(inner) => Error::BadGatewayException(inner),
824 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ConflictException(inner) => Error::ConflictException(inner),
825 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::DependencyFailedException(inner) => {
826 Error::DependencyFailedException(inner)
827 }
828 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::InternalServerException(inner) => {
829 Error::InternalServerException(inner)
830 }
831 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ResourceNotFoundException(inner) => {
832 Error::ResourceNotFoundException(inner)
833 }
834 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ServiceQuotaExceededException(inner) => {
835 Error::ServiceQuotaExceededException(inner)
836 }
837 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
838 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ValidationException(inner) => Error::ValidationException(inner),
839 crate::operation::retrieve_and_generate::RetrieveAndGenerateError::Unhandled(inner) => Error::Unhandled(inner),
840 }
841 }
842}
843impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>>
844 for Error
845where
846 R: Send + Sync + std::fmt::Debug + 'static,
847{
848 fn from(
849 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>,
850 ) -> Self {
851 match err {
852 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
853 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
854 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
855 source: err.into(),
856 }),
857 }
858 }
859}
860impl From<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError> for Error {
861 fn from(err: crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError) -> Self {
862 match err {
863 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::AccessDeniedException(inner) => {
864 Error::AccessDeniedException(inner)
865 }
866 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::BadGatewayException(inner) => {
867 Error::BadGatewayException(inner)
868 }
869 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ConflictException(inner) => {
870 Error::ConflictException(inner)
871 }
872 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::DependencyFailedException(inner) => {
873 Error::DependencyFailedException(inner)
874 }
875 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::InternalServerException(inner) => {
876 Error::InternalServerException(inner)
877 }
878 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ResourceNotFoundException(inner) => {
879 Error::ResourceNotFoundException(inner)
880 }
881 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ServiceQuotaExceededException(inner) => {
882 Error::ServiceQuotaExceededException(inner)
883 }
884 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ThrottlingException(inner) => {
885 Error::ThrottlingException(inner)
886 }
887 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ValidationException(inner) => {
888 Error::ValidationException(inner)
889 }
890 crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::Unhandled(inner) => Error::Unhandled(inner),
891 }
892 }
893}
894impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>> for Error
895where
896 R: Send + Sync + std::fmt::Debug + 'static,
897{
898 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>) -> Self {
899 match err {
900 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
901 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
902 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
903 source: err.into(),
904 }),
905 }
906 }
907}
908impl From<crate::operation::start_flow_execution::StartFlowExecutionError> for Error {
909 fn from(err: crate::operation::start_flow_execution::StartFlowExecutionError) -> Self {
910 match err {
911 crate::operation::start_flow_execution::StartFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
912 crate::operation::start_flow_execution::StartFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
913 crate::operation::start_flow_execution::StartFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
914 crate::operation::start_flow_execution::StartFlowExecutionError::DependencyFailedException(inner) => {
915 Error::DependencyFailedException(inner)
916 }
917 crate::operation::start_flow_execution::StartFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
918 crate::operation::start_flow_execution::StartFlowExecutionError::ResourceNotFoundException(inner) => {
919 Error::ResourceNotFoundException(inner)
920 }
921 crate::operation::start_flow_execution::StartFlowExecutionError::ServiceQuotaExceededException(inner) => {
922 Error::ServiceQuotaExceededException(inner)
923 }
924 crate::operation::start_flow_execution::StartFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
925 crate::operation::start_flow_execution::StartFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
926 crate::operation::start_flow_execution::StartFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
927 }
928 }
929}
930impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_flow_execution::StopFlowExecutionError, R>> for Error
931where
932 R: Send + Sync + std::fmt::Debug + 'static,
933{
934 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_flow_execution::StopFlowExecutionError, R>) -> Self {
935 match err {
936 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
937 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
938 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
939 source: err.into(),
940 }),
941 }
942 }
943}
944impl From<crate::operation::stop_flow_execution::StopFlowExecutionError> for Error {
945 fn from(err: crate::operation::stop_flow_execution::StopFlowExecutionError) -> Self {
946 match err {
947 crate::operation::stop_flow_execution::StopFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
948 crate::operation::stop_flow_execution::StopFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
949 crate::operation::stop_flow_execution::StopFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
950 crate::operation::stop_flow_execution::StopFlowExecutionError::DependencyFailedException(inner) => {
951 Error::DependencyFailedException(inner)
952 }
953 crate::operation::stop_flow_execution::StopFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
954 crate::operation::stop_flow_execution::StopFlowExecutionError::ResourceNotFoundException(inner) => {
955 Error::ResourceNotFoundException(inner)
956 }
957 crate::operation::stop_flow_execution::StopFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
958 crate::operation::stop_flow_execution::StopFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
959 crate::operation::stop_flow_execution::StopFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
960 }
961 }
962}
963impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
964where
965 R: Send + Sync + std::fmt::Debug + 'static,
966{
967 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
968 match err {
969 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
970 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
971 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
972 source: err.into(),
973 }),
974 }
975 }
976}
977impl From<crate::operation::tag_resource::TagResourceError> for Error {
978 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
979 match err {
980 crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
981 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
982 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
983 crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
984 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
985 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
986 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
987 }
988 }
989}
990impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
991where
992 R: Send + Sync + std::fmt::Debug + 'static,
993{
994 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
995 match err {
996 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
997 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
998 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
999 source: err.into(),
1000 }),
1001 }
1002 }
1003}
1004impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1005 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1006 match err {
1007 crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1008 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1009 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1010 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1011 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1012 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1013 }
1014 }
1015}
1016impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>> for Error
1017where
1018 R: Send + Sync + std::fmt::Debug + 'static,
1019{
1020 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>) -> Self {
1021 match err {
1022 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1023 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1024 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1025 source: err.into(),
1026 }),
1027 }
1028 }
1029}
1030impl From<crate::operation::update_session::UpdateSessionError> for Error {
1031 fn from(err: crate::operation::update_session::UpdateSessionError) -> Self {
1032 match err {
1033 crate::operation::update_session::UpdateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1034 crate::operation::update_session::UpdateSessionError::ConflictException(inner) => Error::ConflictException(inner),
1035 crate::operation::update_session::UpdateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
1036 crate::operation::update_session::UpdateSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1037 crate::operation::update_session::UpdateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1038 crate::operation::update_session::UpdateSessionError::ValidationException(inner) => Error::ValidationException(inner),
1039 crate::operation::update_session::UpdateSessionError::Unhandled(inner) => Error::Unhandled(inner),
1040 }
1041 }
1042}
1043impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>> for Error
1044where
1045 R: Send + Sync + std::fmt::Debug + 'static,
1046{
1047 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>) -> Self {
1048 match err {
1049 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1050 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1051 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1052 source: err.into(),
1053 }),
1054 }
1055 }
1056}
1057impl From<crate::types::error::ResponseStreamError> for Error {
1058 fn from(err: crate::types::error::ResponseStreamError) -> Self {
1059 match err {
1060 crate::types::error::ResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1061 crate::types::error::ResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1062 crate::types::error::ResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1063 crate::types::error::ResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1064 crate::types::error::ResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1065 crate::types::error::ResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1066 crate::types::error::ResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1067 crate::types::error::ResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1068 crate::types::error::ResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1069 crate::types::error::ResponseStreamError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
1070 crate::types::error::ResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1071 }
1072 }
1073}
1074impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>> for Error
1075where
1076 R: Send + Sync + std::fmt::Debug + 'static,
1077{
1078 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>) -> Self {
1079 match err {
1080 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1081 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1082 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1083 source: err.into(),
1084 }),
1085 }
1086 }
1087}
1088impl From<crate::types::error::FlowResponseStreamError> for Error {
1089 fn from(err: crate::types::error::FlowResponseStreamError) -> Self {
1090 match err {
1091 crate::types::error::FlowResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1092 crate::types::error::FlowResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1093 crate::types::error::FlowResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1094 crate::types::error::FlowResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1095 crate::types::error::FlowResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1096 crate::types::error::FlowResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1097 crate::types::error::FlowResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1098 crate::types::error::FlowResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1099 crate::types::error::FlowResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1100 crate::types::error::FlowResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1101 }
1102 }
1103}
1104impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>> for Error
1105where
1106 R: Send + Sync + std::fmt::Debug + 'static,
1107{
1108 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>) -> Self {
1109 match err {
1110 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1111 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1112 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1113 source: err.into(),
1114 }),
1115 }
1116 }
1117}
1118impl From<crate::types::error::InlineAgentResponseStreamError> for Error {
1119 fn from(err: crate::types::error::InlineAgentResponseStreamError) -> Self {
1120 match err {
1121 crate::types::error::InlineAgentResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1122 crate::types::error::InlineAgentResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1123 crate::types::error::InlineAgentResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1124 crate::types::error::InlineAgentResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1125 crate::types::error::InlineAgentResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1126 crate::types::error::InlineAgentResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1127 crate::types::error::InlineAgentResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1128 crate::types::error::InlineAgentResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1129 crate::types::error::InlineAgentResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1130 crate::types::error::InlineAgentResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1131 }
1132 }
1133}
1134impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>> for Error
1135where
1136 R: Send + Sync + std::fmt::Debug + 'static,
1137{
1138 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>) -> Self {
1139 match err {
1140 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1141 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1142 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1143 source: err.into(),
1144 }),
1145 }
1146 }
1147}
1148impl From<crate::types::error::OptimizedPromptStreamError> for Error {
1149 fn from(err: crate::types::error::OptimizedPromptStreamError) -> Self {
1150 match err {
1151 crate::types::error::OptimizedPromptStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1152 crate::types::error::OptimizedPromptStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1153 crate::types::error::OptimizedPromptStreamError::ValidationException(inner) => Error::ValidationException(inner),
1154 crate::types::error::OptimizedPromptStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1155 crate::types::error::OptimizedPromptStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1156 crate::types::error::OptimizedPromptStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1157 crate::types::error::OptimizedPromptStreamError::Unhandled(inner) => Error::Unhandled(inner),
1158 }
1159 }
1160}
1161impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>> for Error
1162where
1163 R: Send + Sync + std::fmt::Debug + 'static,
1164{
1165 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>) -> Self {
1166 match err {
1167 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1168 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1169 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1170 source: err.into(),
1171 }),
1172 }
1173 }
1174}
1175impl From<crate::types::error::RetrieveAndGenerateStreamResponseOutputError> for Error {
1176 fn from(err: crate::types::error::RetrieveAndGenerateStreamResponseOutputError) -> Self {
1177 match err {
1178 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::InternalServerException(inner) => {
1179 Error::InternalServerException(inner)
1180 }
1181 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
1182 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ResourceNotFoundException(inner) => {
1183 Error::ResourceNotFoundException(inner)
1184 }
1185 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
1186 Error::ServiceQuotaExceededException(inner)
1187 }
1188 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1189 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1190 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
1191 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::DependencyFailedException(inner) => {
1192 Error::DependencyFailedException(inner)
1193 }
1194 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1195 crate::types::error::RetrieveAndGenerateStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
1196 }
1197 }
1198}
1199impl ::std::error::Error for Error {
1200 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1201 match self {
1202 Error::AccessDeniedException(inner) => inner.source(),
1203 Error::BadGatewayException(inner) => inner.source(),
1204 Error::ConflictException(inner) => inner.source(),
1205 Error::DependencyFailedException(inner) => inner.source(),
1206 Error::InternalServerException(inner) => inner.source(),
1207 Error::ModelNotReadyException(inner) => inner.source(),
1208 Error::ResourceNotFoundException(inner) => inner.source(),
1209 Error::ServiceQuotaExceededException(inner) => inner.source(),
1210 Error::ThrottlingException(inner) => inner.source(),
1211 Error::ValidationException(inner) => inner.source(),
1212 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1213 }
1214 }
1215}
1216impl ::aws_types::request_id::RequestId for Error {
1217 fn request_id(&self) -> Option<&str> {
1218 match self {
1219 Self::AccessDeniedException(e) => e.request_id(),
1220 Self::BadGatewayException(e) => e.request_id(),
1221 Self::ConflictException(e) => e.request_id(),
1222 Self::DependencyFailedException(e) => e.request_id(),
1223 Self::InternalServerException(e) => e.request_id(),
1224 Self::ModelNotReadyException(e) => e.request_id(),
1225 Self::ResourceNotFoundException(e) => e.request_id(),
1226 Self::ServiceQuotaExceededException(e) => e.request_id(),
1227 Self::ThrottlingException(e) => e.request_id(),
1228 Self::ValidationException(e) => e.request_id(),
1229 Self::Unhandled(e) => e.meta.request_id(),
1230 }
1231 }
1232}