Skip to main content

aws_sdk_bedrockagentruntime/
error_meta.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// All possible error types for this service.
3#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6    /// <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
7    AccessDeniedException(crate::types::error::AccessDeniedException),
8    /// <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
9    BadGatewayException(crate::types::error::BadGatewayException),
10    /// <p>There was a conflict performing an operation. Resolve the conflict and retry your request.</p>
11    ConflictException(crate::types::error::ConflictException),
12    /// <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
13    DependencyFailedException(crate::types::error::DependencyFailedException),
14    /// <p>An internal server error occurred. Retry your request.</p>
15    InternalServerException(crate::types::error::InternalServerException),
16    /// <p>The model specified in the request is not ready to serve inference requests. The AWS SDK will automatically retry the operation up to 5 times. For information about configuring automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i> reference guide.</p>
17    ModelNotReadyException(crate::types::error::ModelNotReadyException),
18    /// <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
19    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
20    /// <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
21    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
22    /// <p>The number of requests exceeds the limit. Resubmit your request later.</p>
23    ThrottlingException(crate::types::error::ThrottlingException),
24    /// <p>Input validation failed. Check your request parameters and retry the request.</p>
25    ValidationException(crate::types::error::ValidationException),
26    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
27    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
28    variable wildcard pattern and check `.code()`:
29     \
30    &nbsp;&nbsp;&nbsp;`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::agentic_retrieve_stream::AgenticRetrieveStreamError, R>> for Error
84where
85    R: Send + Sync + std::fmt::Debug + 'static,
86{
87    fn from(
88        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError, R>,
89    ) -> Self {
90        match err {
91            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
92            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
93                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
94                source: err.into(),
95            }),
96        }
97    }
98}
99impl From<crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError> for Error {
100    fn from(err: crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError) -> Self {
101        match err {
102            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::AccessDeniedException(inner) => {
103                Error::AccessDeniedException(inner)
104            }
105            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
106            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ConflictException(inner) => Error::ConflictException(inner),
107            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::DependencyFailedException(inner) => {
108                Error::DependencyFailedException(inner)
109            }
110            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::InternalServerException(inner) => {
111                Error::InternalServerException(inner)
112            }
113            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ResourceNotFoundException(inner) => {
114                Error::ResourceNotFoundException(inner)
115            }
116            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ServiceQuotaExceededException(inner) => {
117                Error::ServiceQuotaExceededException(inner)
118            }
119            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
120            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::ValidationException(inner) => Error::ValidationException(inner),
121            crate::operation::agentic_retrieve_stream::AgenticRetrieveStreamError::Unhandled(inner) => Error::Unhandled(inner),
122        }
123    }
124}
125impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError, R>>
126    for Error
127where
128    R: Send + Sync + std::fmt::Debug + 'static,
129{
130    fn from(
131        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError, R>,
132    ) -> Self {
133        match err {
134            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
135            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
136                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
137                source: err.into(),
138            }),
139        }
140    }
141}
142impl From<crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError> for Error {
143    fn from(err: crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError) -> Self {
144        match err {
145            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::AccessDeniedException(inner) => {
146                Error::AccessDeniedException(inner)
147            }
148            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::InternalServerException(inner) => {
149                Error::InternalServerException(inner)
150            }
151            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::ResourceNotFoundException(inner) => {
152                Error::ResourceNotFoundException(inner)
153            }
154            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::ThrottlingException(inner) => {
155                Error::ThrottlingException(inner)
156            }
157            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::ValidationException(inner) => {
158                Error::ValidationException(inner)
159            }
160            crate::operation::check_ingested_document_acl::CheckIngestedDocumentAclError::Unhandled(inner) => Error::Unhandled(inner),
161        }
162    }
163}
164impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>> for Error
165where
166    R: Send + Sync + std::fmt::Debug + 'static,
167{
168    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>) -> Self {
169        match err {
170            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
171            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
172                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
173                source: err.into(),
174            }),
175        }
176    }
177}
178impl From<crate::operation::create_invocation::CreateInvocationError> for Error {
179    fn from(err: crate::operation::create_invocation::CreateInvocationError) -> Self {
180        match err {
181            crate::operation::create_invocation::CreateInvocationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
182            crate::operation::create_invocation::CreateInvocationError::ConflictException(inner) => Error::ConflictException(inner),
183            crate::operation::create_invocation::CreateInvocationError::InternalServerException(inner) => Error::InternalServerException(inner),
184            crate::operation::create_invocation::CreateInvocationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
185            crate::operation::create_invocation::CreateInvocationError::ServiceQuotaExceededException(inner) => {
186                Error::ServiceQuotaExceededException(inner)
187            }
188            crate::operation::create_invocation::CreateInvocationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
189            crate::operation::create_invocation::CreateInvocationError::ValidationException(inner) => Error::ValidationException(inner),
190            crate::operation::create_invocation::CreateInvocationError::Unhandled(inner) => Error::Unhandled(inner),
191        }
192    }
193}
194impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>> for Error
195where
196    R: Send + Sync + std::fmt::Debug + 'static,
197{
198    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>) -> Self {
199        match err {
200            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
201            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
202                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
203                source: err.into(),
204            }),
205        }
206    }
207}
208impl From<crate::operation::create_session::CreateSessionError> for Error {
209    fn from(err: crate::operation::create_session::CreateSessionError) -> Self {
210        match err {
211            crate::operation::create_session::CreateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
212            crate::operation::create_session::CreateSessionError::ConflictException(inner) => Error::ConflictException(inner),
213            crate::operation::create_session::CreateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
214            crate::operation::create_session::CreateSessionError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
215            crate::operation::create_session::CreateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
216            crate::operation::create_session::CreateSessionError::ValidationException(inner) => Error::ValidationException(inner),
217            crate::operation::create_session::CreateSessionError::Unhandled(inner) => Error::Unhandled(inner),
218        }
219    }
220}
221impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>> for Error
222where
223    R: Send + Sync + std::fmt::Debug + 'static,
224{
225    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>) -> Self {
226        match err {
227            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
228            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
229                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
230                source: err.into(),
231            }),
232        }
233    }
234}
235impl From<crate::operation::delete_agent_memory::DeleteAgentMemoryError> for Error {
236    fn from(err: crate::operation::delete_agent_memory::DeleteAgentMemoryError) -> Self {
237        match err {
238            crate::operation::delete_agent_memory::DeleteAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
239            crate::operation::delete_agent_memory::DeleteAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
240            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
241            crate::operation::delete_agent_memory::DeleteAgentMemoryError::DependencyFailedException(inner) => {
242                Error::DependencyFailedException(inner)
243            }
244            crate::operation::delete_agent_memory::DeleteAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
245            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ResourceNotFoundException(inner) => {
246                Error::ResourceNotFoundException(inner)
247            }
248            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ServiceQuotaExceededException(inner) => {
249                Error::ServiceQuotaExceededException(inner)
250            }
251            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
252            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
253            crate::operation::delete_agent_memory::DeleteAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
254        }
255    }
256}
257impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>> for Error
258where
259    R: Send + Sync + std::fmt::Debug + 'static,
260{
261    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>) -> Self {
262        match err {
263            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
264            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
265                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
266                source: err.into(),
267            }),
268        }
269    }
270}
271impl From<crate::operation::delete_session::DeleteSessionError> for Error {
272    fn from(err: crate::operation::delete_session::DeleteSessionError) -> Self {
273        match err {
274            crate::operation::delete_session::DeleteSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
275            crate::operation::delete_session::DeleteSessionError::ConflictException(inner) => Error::ConflictException(inner),
276            crate::operation::delete_session::DeleteSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
277            crate::operation::delete_session::DeleteSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
278            crate::operation::delete_session::DeleteSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
279            crate::operation::delete_session::DeleteSessionError::ValidationException(inner) => Error::ValidationException(inner),
280            crate::operation::delete_session::DeleteSessionError::Unhandled(inner) => Error::Unhandled(inner),
281        }
282    }
283}
284impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>> for Error
285where
286    R: Send + Sync + std::fmt::Debug + 'static,
287{
288    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>) -> Self {
289        match err {
290            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
291            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
292                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
293                source: err.into(),
294            }),
295        }
296    }
297}
298impl From<crate::operation::end_session::EndSessionError> for Error {
299    fn from(err: crate::operation::end_session::EndSessionError) -> Self {
300        match err {
301            crate::operation::end_session::EndSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
302            crate::operation::end_session::EndSessionError::ConflictException(inner) => Error::ConflictException(inner),
303            crate::operation::end_session::EndSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
304            crate::operation::end_session::EndSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
305            crate::operation::end_session::EndSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
306            crate::operation::end_session::EndSessionError::ValidationException(inner) => Error::ValidationException(inner),
307            crate::operation::end_session::EndSessionError::Unhandled(inner) => Error::Unhandled(inner),
308        }
309    }
310}
311impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>> for Error
312where
313    R: Send + Sync + std::fmt::Debug + 'static,
314{
315    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>) -> Self {
316        match err {
317            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
318            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
319                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
320                source: err.into(),
321            }),
322        }
323    }
324}
325impl From<crate::operation::generate_query::GenerateQueryError> for Error {
326    fn from(err: crate::operation::generate_query::GenerateQueryError) -> Self {
327        match err {
328            crate::operation::generate_query::GenerateQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
329            crate::operation::generate_query::GenerateQueryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
330            crate::operation::generate_query::GenerateQueryError::ConflictException(inner) => Error::ConflictException(inner),
331            crate::operation::generate_query::GenerateQueryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
332            crate::operation::generate_query::GenerateQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
333            crate::operation::generate_query::GenerateQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
334            crate::operation::generate_query::GenerateQueryError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
335            crate::operation::generate_query::GenerateQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
336            crate::operation::generate_query::GenerateQueryError::ValidationException(inner) => Error::ValidationException(inner),
337            crate::operation::generate_query::GenerateQueryError::Unhandled(inner) => Error::Unhandled(inner),
338        }
339    }
340}
341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>> for Error
342where
343    R: Send + Sync + std::fmt::Debug + 'static,
344{
345    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>) -> Self {
346        match err {
347            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
348            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
349                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
350                source: err.into(),
351            }),
352        }
353    }
354}
355impl From<crate::operation::get_agent_memory::GetAgentMemoryError> for Error {
356    fn from(err: crate::operation::get_agent_memory::GetAgentMemoryError) -> Self {
357        match err {
358            crate::operation::get_agent_memory::GetAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
359            crate::operation::get_agent_memory::GetAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
360            crate::operation::get_agent_memory::GetAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
361            crate::operation::get_agent_memory::GetAgentMemoryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
362            crate::operation::get_agent_memory::GetAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
363            crate::operation::get_agent_memory::GetAgentMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
364            crate::operation::get_agent_memory::GetAgentMemoryError::ServiceQuotaExceededException(inner) => {
365                Error::ServiceQuotaExceededException(inner)
366            }
367            crate::operation::get_agent_memory::GetAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
368            crate::operation::get_agent_memory::GetAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
369            crate::operation::get_agent_memory::GetAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
370        }
371    }
372}
373impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_document_content::GetDocumentContentError, R>> for Error
374where
375    R: Send + Sync + std::fmt::Debug + 'static,
376{
377    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_document_content::GetDocumentContentError, R>) -> Self {
378        match err {
379            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
380            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
381                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
382                source: err.into(),
383            }),
384        }
385    }
386}
387impl From<crate::operation::get_document_content::GetDocumentContentError> for Error {
388    fn from(err: crate::operation::get_document_content::GetDocumentContentError) -> Self {
389        match err {
390            crate::operation::get_document_content::GetDocumentContentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
391            crate::operation::get_document_content::GetDocumentContentError::InternalServerException(inner) => Error::InternalServerException(inner),
392            crate::operation::get_document_content::GetDocumentContentError::ResourceNotFoundException(inner) => {
393                Error::ResourceNotFoundException(inner)
394            }
395            crate::operation::get_document_content::GetDocumentContentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
396            crate::operation::get_document_content::GetDocumentContentError::ValidationException(inner) => Error::ValidationException(inner),
397            crate::operation::get_document_content::GetDocumentContentError::Unhandled(inner) => Error::Unhandled(inner),
398        }
399    }
400}
401impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>>
402    for Error
403where
404    R: Send + Sync + std::fmt::Debug + 'static,
405{
406    fn from(
407        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError, R>,
408    ) -> Self {
409        match err {
410            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
411            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
412                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
413                source: err.into(),
414            }),
415        }
416    }
417}
418impl From<crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError> for Error {
419    fn from(err: crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError) -> Self {
420        match err {
421            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::AccessDeniedException(inner) => {
422                Error::AccessDeniedException(inner)
423            }
424            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::InternalServerException(inner) => {
425                Error::InternalServerException(inner)
426            }
427            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ResourceNotFoundException(inner) => {
428                Error::ResourceNotFoundException(inner)
429            }
430            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ThrottlingException(inner) => {
431                Error::ThrottlingException(inner)
432            }
433            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::ValidationException(inner) => {
434                Error::ValidationException(inner)
435            }
436            crate::operation::get_execution_flow_snapshot::GetExecutionFlowSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
437        }
438    }
439}
440impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>> for Error
441where
442    R: Send + Sync + std::fmt::Debug + 'static,
443{
444    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_flow_execution::GetFlowExecutionError, R>) -> Self {
445        match err {
446            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
447            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
448                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
449                source: err.into(),
450            }),
451        }
452    }
453}
454impl From<crate::operation::get_flow_execution::GetFlowExecutionError> for Error {
455    fn from(err: crate::operation::get_flow_execution::GetFlowExecutionError) -> Self {
456        match err {
457            crate::operation::get_flow_execution::GetFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
458            crate::operation::get_flow_execution::GetFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
459            crate::operation::get_flow_execution::GetFlowExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
460            crate::operation::get_flow_execution::GetFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
461            crate::operation::get_flow_execution::GetFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
462            crate::operation::get_flow_execution::GetFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
463        }
464    }
465}
466impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError, R>>
467    for Error
468where
469    R: Send + Sync + std::fmt::Debug + 'static,
470{
471    fn from(
472        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError, R>,
473    ) -> Self {
474        match err {
475            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
476            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
477                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
478                source: err.into(),
479            }),
480        }
481    }
482}
483impl From<crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError> for Error {
484    fn from(err: crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError) -> Self {
485        match err {
486            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::AccessDeniedException(inner) => {
487                Error::AccessDeniedException(inner)
488            }
489            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::InternalServerException(inner) => {
490                Error::InternalServerException(inner)
491            }
492            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::ResourceNotFoundException(inner) => {
493                Error::ResourceNotFoundException(inner)
494            }
495            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::ThrottlingException(inner) => Error::ThrottlingException(inner),
496            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::ValidationException(inner) => Error::ValidationException(inner),
497            crate::operation::get_ingested_document_acl::GetIngestedDocumentAclError::Unhandled(inner) => Error::Unhandled(inner),
498        }
499    }
500}
501impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>> for Error
502where
503    R: Send + Sync + std::fmt::Debug + 'static,
504{
505    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>) -> Self {
506        match err {
507            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
508            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
509                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
510                source: err.into(),
511            }),
512        }
513    }
514}
515impl From<crate::operation::get_invocation_step::GetInvocationStepError> for Error {
516    fn from(err: crate::operation::get_invocation_step::GetInvocationStepError) -> Self {
517        match err {
518            crate::operation::get_invocation_step::GetInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
519            crate::operation::get_invocation_step::GetInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
520            crate::operation::get_invocation_step::GetInvocationStepError::ResourceNotFoundException(inner) => {
521                Error::ResourceNotFoundException(inner)
522            }
523            crate::operation::get_invocation_step::GetInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
524            crate::operation::get_invocation_step::GetInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
525            crate::operation::get_invocation_step::GetInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
526        }
527    }
528}
529impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>> for Error
530where
531    R: Send + Sync + std::fmt::Debug + 'static,
532{
533    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>) -> Self {
534        match err {
535            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
536            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
537                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
538                source: err.into(),
539            }),
540        }
541    }
542}
543impl From<crate::operation::get_session::GetSessionError> for Error {
544    fn from(err: crate::operation::get_session::GetSessionError) -> Self {
545        match err {
546            crate::operation::get_session::GetSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
547            crate::operation::get_session::GetSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
548            crate::operation::get_session::GetSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
549            crate::operation::get_session::GetSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
550            crate::operation::get_session::GetSessionError::ValidationException(inner) => Error::ValidationException(inner),
551            crate::operation::get_session::GetSessionError::Unhandled(inner) => Error::Unhandled(inner),
552        }
553    }
554}
555impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>> for Error
556where
557    R: Send + Sync + std::fmt::Debug + 'static,
558{
559    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>) -> Self {
560        match err {
561            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
562            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
563                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
564                source: err.into(),
565            }),
566        }
567    }
568}
569impl From<crate::operation::invoke_agent::InvokeAgentError> for Error {
570    fn from(err: crate::operation::invoke_agent::InvokeAgentError) -> Self {
571        match err {
572            crate::operation::invoke_agent::InvokeAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
573            crate::operation::invoke_agent::InvokeAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
574            crate::operation::invoke_agent::InvokeAgentError::ConflictException(inner) => Error::ConflictException(inner),
575            crate::operation::invoke_agent::InvokeAgentError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
576            crate::operation::invoke_agent::InvokeAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
577            crate::operation::invoke_agent::InvokeAgentError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
578            crate::operation::invoke_agent::InvokeAgentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
579            crate::operation::invoke_agent::InvokeAgentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
580            crate::operation::invoke_agent::InvokeAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
581            crate::operation::invoke_agent::InvokeAgentError::ValidationException(inner) => Error::ValidationException(inner),
582            crate::operation::invoke_agent::InvokeAgentError::Unhandled(inner) => Error::Unhandled(inner),
583        }
584    }
585}
586impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>> for Error
587where
588    R: Send + Sync + std::fmt::Debug + 'static,
589{
590    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>) -> Self {
591        match err {
592            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
593            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
594                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
595                source: err.into(),
596            }),
597        }
598    }
599}
600impl From<crate::operation::invoke_flow::InvokeFlowError> for Error {
601    fn from(err: crate::operation::invoke_flow::InvokeFlowError) -> Self {
602        match err {
603            crate::operation::invoke_flow::InvokeFlowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
604            crate::operation::invoke_flow::InvokeFlowError::BadGatewayException(inner) => Error::BadGatewayException(inner),
605            crate::operation::invoke_flow::InvokeFlowError::ConflictException(inner) => Error::ConflictException(inner),
606            crate::operation::invoke_flow::InvokeFlowError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
607            crate::operation::invoke_flow::InvokeFlowError::InternalServerException(inner) => Error::InternalServerException(inner),
608            crate::operation::invoke_flow::InvokeFlowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
609            crate::operation::invoke_flow::InvokeFlowError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
610            crate::operation::invoke_flow::InvokeFlowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
611            crate::operation::invoke_flow::InvokeFlowError::ValidationException(inner) => Error::ValidationException(inner),
612            crate::operation::invoke_flow::InvokeFlowError::Unhandled(inner) => Error::Unhandled(inner),
613        }
614    }
615}
616impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>> for Error
617where
618    R: Send + Sync + std::fmt::Debug + 'static,
619{
620    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>) -> Self {
621        match err {
622            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
623            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
624                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
625                source: err.into(),
626            }),
627        }
628    }
629}
630impl From<crate::operation::invoke_inline_agent::InvokeInlineAgentError> for Error {
631    fn from(err: crate::operation::invoke_inline_agent::InvokeInlineAgentError) -> Self {
632        match err {
633            crate::operation::invoke_inline_agent::InvokeInlineAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
634            crate::operation::invoke_inline_agent::InvokeInlineAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
635            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ConflictException(inner) => Error::ConflictException(inner),
636            crate::operation::invoke_inline_agent::InvokeInlineAgentError::DependencyFailedException(inner) => {
637                Error::DependencyFailedException(inner)
638            }
639            crate::operation::invoke_inline_agent::InvokeInlineAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
640            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ResourceNotFoundException(inner) => {
641                Error::ResourceNotFoundException(inner)
642            }
643            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ServiceQuotaExceededException(inner) => {
644                Error::ServiceQuotaExceededException(inner)
645            }
646            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
647            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ValidationException(inner) => Error::ValidationException(inner),
648            crate::operation::invoke_inline_agent::InvokeInlineAgentError::Unhandled(inner) => Error::Unhandled(inner),
649        }
650    }
651}
652impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>>
653    for Error
654where
655    R: Send + Sync + std::fmt::Debug + 'static,
656{
657    fn from(
658        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError, R>,
659    ) -> Self {
660        match err {
661            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
662            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
663                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
664                source: err.into(),
665            }),
666        }
667    }
668}
669impl From<crate::operation::list_flow_execution_events::ListFlowExecutionEventsError> for Error {
670    fn from(err: crate::operation::list_flow_execution_events::ListFlowExecutionEventsError) -> Self {
671        match err {
672            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::AccessDeniedException(inner) => {
673                Error::AccessDeniedException(inner)
674            }
675            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::InternalServerException(inner) => {
676                Error::InternalServerException(inner)
677            }
678            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ResourceNotFoundException(inner) => {
679                Error::ResourceNotFoundException(inner)
680            }
681            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ThrottlingException(inner) => {
682                Error::ThrottlingException(inner)
683            }
684            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::ValidationException(inner) => {
685                Error::ValidationException(inner)
686            }
687            crate::operation::list_flow_execution_events::ListFlowExecutionEventsError::Unhandled(inner) => Error::Unhandled(inner),
688        }
689    }
690}
691impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>> for Error
692where
693    R: Send + Sync + std::fmt::Debug + 'static,
694{
695    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_flow_executions::ListFlowExecutionsError, R>) -> Self {
696        match err {
697            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
698            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
699                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
700                source: err.into(),
701            }),
702        }
703    }
704}
705impl From<crate::operation::list_flow_executions::ListFlowExecutionsError> for Error {
706    fn from(err: crate::operation::list_flow_executions::ListFlowExecutionsError) -> Self {
707        match err {
708            crate::operation::list_flow_executions::ListFlowExecutionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
709            crate::operation::list_flow_executions::ListFlowExecutionsError::InternalServerException(inner) => Error::InternalServerException(inner),
710            crate::operation::list_flow_executions::ListFlowExecutionsError::ResourceNotFoundException(inner) => {
711                Error::ResourceNotFoundException(inner)
712            }
713            crate::operation::list_flow_executions::ListFlowExecutionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
714            crate::operation::list_flow_executions::ListFlowExecutionsError::ValidationException(inner) => Error::ValidationException(inner),
715            crate::operation::list_flow_executions::ListFlowExecutionsError::Unhandled(inner) => Error::Unhandled(inner),
716        }
717    }
718}
719impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>> for Error
720where
721    R: Send + Sync + std::fmt::Debug + 'static,
722{
723    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>) -> Self {
724        match err {
725            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
726            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
727                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
728                source: err.into(),
729            }),
730        }
731    }
732}
733impl From<crate::operation::list_invocations::ListInvocationsError> for Error {
734    fn from(err: crate::operation::list_invocations::ListInvocationsError) -> Self {
735        match err {
736            crate::operation::list_invocations::ListInvocationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
737            crate::operation::list_invocations::ListInvocationsError::InternalServerException(inner) => Error::InternalServerException(inner),
738            crate::operation::list_invocations::ListInvocationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
739            crate::operation::list_invocations::ListInvocationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
740            crate::operation::list_invocations::ListInvocationsError::ValidationException(inner) => Error::ValidationException(inner),
741            crate::operation::list_invocations::ListInvocationsError::Unhandled(inner) => Error::Unhandled(inner),
742        }
743    }
744}
745impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, 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::list_invocation_steps::ListInvocationStepsError, 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::list_invocation_steps::ListInvocationStepsError> for Error {
760    fn from(err: crate::operation::list_invocation_steps::ListInvocationStepsError) -> Self {
761        match err {
762            crate::operation::list_invocation_steps::ListInvocationStepsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
763            crate::operation::list_invocation_steps::ListInvocationStepsError::InternalServerException(inner) => {
764                Error::InternalServerException(inner)
765            }
766            crate::operation::list_invocation_steps::ListInvocationStepsError::ResourceNotFoundException(inner) => {
767                Error::ResourceNotFoundException(inner)
768            }
769            crate::operation::list_invocation_steps::ListInvocationStepsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
770            crate::operation::list_invocation_steps::ListInvocationStepsError::ValidationException(inner) => Error::ValidationException(inner),
771            crate::operation::list_invocation_steps::ListInvocationStepsError::Unhandled(inner) => Error::Unhandled(inner),
772        }
773    }
774}
775impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, 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::list_sessions::ListSessionsError, 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::list_sessions::ListSessionsError> for Error {
790    fn from(err: crate::operation::list_sessions::ListSessionsError) -> Self {
791        match err {
792            crate::operation::list_sessions::ListSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
793            crate::operation::list_sessions::ListSessionsError::InternalServerException(inner) => Error::InternalServerException(inner),
794            crate::operation::list_sessions::ListSessionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
795            crate::operation::list_sessions::ListSessionsError::ValidationException(inner) => Error::ValidationException(inner),
796            crate::operation::list_sessions::ListSessionsError::Unhandled(inner) => Error::Unhandled(inner),
797        }
798    }
799}
800impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
801where
802    R: Send + Sync + std::fmt::Debug + 'static,
803{
804    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
805        match err {
806            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
807            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
808                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
809                source: err.into(),
810            }),
811        }
812    }
813}
814impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
815    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
816        match err {
817            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
818            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
819                Error::InternalServerException(inner)
820            }
821            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
822                Error::ResourceNotFoundException(inner)
823            }
824            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
825            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
826            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
827        }
828    }
829}
830impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>> for Error
831where
832    R: Send + Sync + std::fmt::Debug + 'static,
833{
834    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>) -> Self {
835        match err {
836            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
837            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
838                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
839                source: err.into(),
840            }),
841        }
842    }
843}
844impl From<crate::operation::optimize_prompt::OptimizePromptError> for Error {
845    fn from(err: crate::operation::optimize_prompt::OptimizePromptError) -> Self {
846        match err {
847            crate::operation::optimize_prompt::OptimizePromptError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
848            crate::operation::optimize_prompt::OptimizePromptError::BadGatewayException(inner) => Error::BadGatewayException(inner),
849            crate::operation::optimize_prompt::OptimizePromptError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
850            crate::operation::optimize_prompt::OptimizePromptError::InternalServerException(inner) => Error::InternalServerException(inner),
851            crate::operation::optimize_prompt::OptimizePromptError::ThrottlingException(inner) => Error::ThrottlingException(inner),
852            crate::operation::optimize_prompt::OptimizePromptError::ValidationException(inner) => Error::ValidationException(inner),
853            crate::operation::optimize_prompt::OptimizePromptError::Unhandled(inner) => Error::Unhandled(inner),
854        }
855    }
856}
857impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>> for Error
858where
859    R: Send + Sync + std::fmt::Debug + 'static,
860{
861    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>) -> Self {
862        match err {
863            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
864            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
865                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
866                source: err.into(),
867            }),
868        }
869    }
870}
871impl From<crate::operation::put_invocation_step::PutInvocationStepError> for Error {
872    fn from(err: crate::operation::put_invocation_step::PutInvocationStepError) -> Self {
873        match err {
874            crate::operation::put_invocation_step::PutInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
875            crate::operation::put_invocation_step::PutInvocationStepError::ConflictException(inner) => Error::ConflictException(inner),
876            crate::operation::put_invocation_step::PutInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
877            crate::operation::put_invocation_step::PutInvocationStepError::ResourceNotFoundException(inner) => {
878                Error::ResourceNotFoundException(inner)
879            }
880            crate::operation::put_invocation_step::PutInvocationStepError::ServiceQuotaExceededException(inner) => {
881                Error::ServiceQuotaExceededException(inner)
882            }
883            crate::operation::put_invocation_step::PutInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
884            crate::operation::put_invocation_step::PutInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
885            crate::operation::put_invocation_step::PutInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
886        }
887    }
888}
889impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>> for Error
890where
891    R: Send + Sync + std::fmt::Debug + 'static,
892{
893    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>) -> Self {
894        match err {
895            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
896            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
897                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
898                source: err.into(),
899            }),
900        }
901    }
902}
903impl From<crate::operation::rerank::RerankError> for Error {
904    fn from(err: crate::operation::rerank::RerankError) -> Self {
905        match err {
906            crate::operation::rerank::RerankError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
907            crate::operation::rerank::RerankError::BadGatewayException(inner) => Error::BadGatewayException(inner),
908            crate::operation::rerank::RerankError::ConflictException(inner) => Error::ConflictException(inner),
909            crate::operation::rerank::RerankError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
910            crate::operation::rerank::RerankError::InternalServerException(inner) => Error::InternalServerException(inner),
911            crate::operation::rerank::RerankError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
912            crate::operation::rerank::RerankError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
913            crate::operation::rerank::RerankError::ThrottlingException(inner) => Error::ThrottlingException(inner),
914            crate::operation::rerank::RerankError::ValidationException(inner) => Error::ValidationException(inner),
915            crate::operation::rerank::RerankError::Unhandled(inner) => Error::Unhandled(inner),
916        }
917    }
918}
919impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>> for Error
920where
921    R: Send + Sync + std::fmt::Debug + 'static,
922{
923    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>) -> Self {
924        match err {
925            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
926            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
927                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
928                source: err.into(),
929            }),
930        }
931    }
932}
933impl From<crate::operation::retrieve::RetrieveError> for Error {
934    fn from(err: crate::operation::retrieve::RetrieveError) -> Self {
935        match err {
936            crate::operation::retrieve::RetrieveError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
937            crate::operation::retrieve::RetrieveError::BadGatewayException(inner) => Error::BadGatewayException(inner),
938            crate::operation::retrieve::RetrieveError::ConflictException(inner) => Error::ConflictException(inner),
939            crate::operation::retrieve::RetrieveError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
940            crate::operation::retrieve::RetrieveError::InternalServerException(inner) => Error::InternalServerException(inner),
941            crate::operation::retrieve::RetrieveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
942            crate::operation::retrieve::RetrieveError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
943            crate::operation::retrieve::RetrieveError::ThrottlingException(inner) => Error::ThrottlingException(inner),
944            crate::operation::retrieve::RetrieveError::ValidationException(inner) => Error::ValidationException(inner),
945            crate::operation::retrieve::RetrieveError::Unhandled(inner) => Error::Unhandled(inner),
946        }
947    }
948}
949impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>> for Error
950where
951    R: Send + Sync + std::fmt::Debug + 'static,
952{
953    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>) -> Self {
954        match err {
955            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
956            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
957                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
958                source: err.into(),
959            }),
960        }
961    }
962}
963impl From<crate::operation::retrieve_and_generate::RetrieveAndGenerateError> for Error {
964    fn from(err: crate::operation::retrieve_and_generate::RetrieveAndGenerateError) -> Self {
965        match err {
966            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
967            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::BadGatewayException(inner) => Error::BadGatewayException(inner),
968            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ConflictException(inner) => Error::ConflictException(inner),
969            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::DependencyFailedException(inner) => {
970                Error::DependencyFailedException(inner)
971            }
972            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::InternalServerException(inner) => {
973                Error::InternalServerException(inner)
974            }
975            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ResourceNotFoundException(inner) => {
976                Error::ResourceNotFoundException(inner)
977            }
978            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ServiceQuotaExceededException(inner) => {
979                Error::ServiceQuotaExceededException(inner)
980            }
981            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
982            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ValidationException(inner) => Error::ValidationException(inner),
983            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::Unhandled(inner) => Error::Unhandled(inner),
984        }
985    }
986}
987impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>>
988    for Error
989where
990    R: Send + Sync + std::fmt::Debug + 'static,
991{
992    fn from(
993        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>,
994    ) -> 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::retrieve_and_generate_stream::RetrieveAndGenerateStreamError> for Error {
1005    fn from(err: crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError) -> Self {
1006        match err {
1007            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::AccessDeniedException(inner) => {
1008                Error::AccessDeniedException(inner)
1009            }
1010            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::BadGatewayException(inner) => {
1011                Error::BadGatewayException(inner)
1012            }
1013            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ConflictException(inner) => {
1014                Error::ConflictException(inner)
1015            }
1016            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::DependencyFailedException(inner) => {
1017                Error::DependencyFailedException(inner)
1018            }
1019            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::InternalServerException(inner) => {
1020                Error::InternalServerException(inner)
1021            }
1022            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ResourceNotFoundException(inner) => {
1023                Error::ResourceNotFoundException(inner)
1024            }
1025            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ServiceQuotaExceededException(inner) => {
1026                Error::ServiceQuotaExceededException(inner)
1027            }
1028            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ThrottlingException(inner) => {
1029                Error::ThrottlingException(inner)
1030            }
1031            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ValidationException(inner) => {
1032                Error::ValidationException(inner)
1033            }
1034            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::Unhandled(inner) => Error::Unhandled(inner),
1035        }
1036    }
1037}
1038impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>> for Error
1039where
1040    R: Send + Sync + std::fmt::Debug + 'static,
1041{
1042    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_flow_execution::StartFlowExecutionError, R>) -> Self {
1043        match err {
1044            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1045            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1046                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1047                source: err.into(),
1048            }),
1049        }
1050    }
1051}
1052impl From<crate::operation::start_flow_execution::StartFlowExecutionError> for Error {
1053    fn from(err: crate::operation::start_flow_execution::StartFlowExecutionError) -> Self {
1054        match err {
1055            crate::operation::start_flow_execution::StartFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1056            crate::operation::start_flow_execution::StartFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1057            crate::operation::start_flow_execution::StartFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
1058            crate::operation::start_flow_execution::StartFlowExecutionError::DependencyFailedException(inner) => {
1059                Error::DependencyFailedException(inner)
1060            }
1061            crate::operation::start_flow_execution::StartFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
1062            crate::operation::start_flow_execution::StartFlowExecutionError::ResourceNotFoundException(inner) => {
1063                Error::ResourceNotFoundException(inner)
1064            }
1065            crate::operation::start_flow_execution::StartFlowExecutionError::ServiceQuotaExceededException(inner) => {
1066                Error::ServiceQuotaExceededException(inner)
1067            }
1068            crate::operation::start_flow_execution::StartFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1069            crate::operation::start_flow_execution::StartFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
1070            crate::operation::start_flow_execution::StartFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
1071        }
1072    }
1073}
1074impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_flow_execution::StopFlowExecutionError, 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::operation::stop_flow_execution::StopFlowExecutionError, 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::operation::stop_flow_execution::StopFlowExecutionError> for Error {
1089    fn from(err: crate::operation::stop_flow_execution::StopFlowExecutionError) -> Self {
1090        match err {
1091            crate::operation::stop_flow_execution::StopFlowExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1092            crate::operation::stop_flow_execution::StopFlowExecutionError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1093            crate::operation::stop_flow_execution::StopFlowExecutionError::ConflictException(inner) => Error::ConflictException(inner),
1094            crate::operation::stop_flow_execution::StopFlowExecutionError::DependencyFailedException(inner) => {
1095                Error::DependencyFailedException(inner)
1096            }
1097            crate::operation::stop_flow_execution::StopFlowExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
1098            crate::operation::stop_flow_execution::StopFlowExecutionError::ResourceNotFoundException(inner) => {
1099                Error::ResourceNotFoundException(inner)
1100            }
1101            crate::operation::stop_flow_execution::StopFlowExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1102            crate::operation::stop_flow_execution::StopFlowExecutionError::ValidationException(inner) => Error::ValidationException(inner),
1103            crate::operation::stop_flow_execution::StopFlowExecutionError::Unhandled(inner) => Error::Unhandled(inner),
1104        }
1105    }
1106}
1107impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
1108where
1109    R: Send + Sync + std::fmt::Debug + 'static,
1110{
1111    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
1112        match err {
1113            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1114            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1115                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1116                source: err.into(),
1117            }),
1118        }
1119    }
1120}
1121impl From<crate::operation::tag_resource::TagResourceError> for Error {
1122    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
1123        match err {
1124            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1125            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1126            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1127            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1128            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1129            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1130            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1131        }
1132    }
1133}
1134impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, 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::operation::untag_resource::UntagResourceError, 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::operation::untag_resource::UntagResourceError> for Error {
1149    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1150        match err {
1151            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1152            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1153            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1154            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1155            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1156            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1157        }
1158    }
1159}
1160impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>> for Error
1161where
1162    R: Send + Sync + std::fmt::Debug + 'static,
1163{
1164    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>) -> Self {
1165        match err {
1166            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1167            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1168                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1169                source: err.into(),
1170            }),
1171        }
1172    }
1173}
1174impl From<crate::operation::update_session::UpdateSessionError> for Error {
1175    fn from(err: crate::operation::update_session::UpdateSessionError) -> Self {
1176        match err {
1177            crate::operation::update_session::UpdateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1178            crate::operation::update_session::UpdateSessionError::ConflictException(inner) => Error::ConflictException(inner),
1179            crate::operation::update_session::UpdateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
1180            crate::operation::update_session::UpdateSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1181            crate::operation::update_session::UpdateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1182            crate::operation::update_session::UpdateSessionError::ValidationException(inner) => Error::ValidationException(inner),
1183            crate::operation::update_session::UpdateSessionError::Unhandled(inner) => Error::Unhandled(inner),
1184        }
1185    }
1186}
1187impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::AgenticRetrieveStreamResponseOutputError, R>> for Error
1188where
1189    R: Send + Sync + std::fmt::Debug + 'static,
1190{
1191    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::AgenticRetrieveStreamResponseOutputError, R>) -> Self {
1192        match err {
1193            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1194            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1195                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1196                source: err.into(),
1197            }),
1198        }
1199    }
1200}
1201impl From<crate::types::error::AgenticRetrieveStreamResponseOutputError> for Error {
1202    fn from(err: crate::types::error::AgenticRetrieveStreamResponseOutputError) -> Self {
1203        match err {
1204            crate::types::error::AgenticRetrieveStreamResponseOutputError::InternalServerException(inner) => Error::InternalServerException(inner),
1205            crate::types::error::AgenticRetrieveStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
1206            crate::types::error::AgenticRetrieveStreamResponseOutputError::ResourceNotFoundException(inner) => {
1207                Error::ResourceNotFoundException(inner)
1208            }
1209            crate::types::error::AgenticRetrieveStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
1210                Error::ServiceQuotaExceededException(inner)
1211            }
1212            crate::types::error::AgenticRetrieveStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1213            crate::types::error::AgenticRetrieveStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1214            crate::types::error::AgenticRetrieveStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
1215            crate::types::error::AgenticRetrieveStreamResponseOutputError::DependencyFailedException(inner) => {
1216                Error::DependencyFailedException(inner)
1217            }
1218            crate::types::error::AgenticRetrieveStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1219            crate::types::error::AgenticRetrieveStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
1220        }
1221    }
1222}
1223impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>> for Error
1224where
1225    R: Send + Sync + std::fmt::Debug + 'static,
1226{
1227    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>) -> Self {
1228        match err {
1229            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1230            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1231                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1232                source: err.into(),
1233            }),
1234        }
1235    }
1236}
1237impl From<crate::types::error::ResponseStreamError> for Error {
1238    fn from(err: crate::types::error::ResponseStreamError) -> Self {
1239        match err {
1240            crate::types::error::ResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1241            crate::types::error::ResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1242            crate::types::error::ResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1243            crate::types::error::ResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1244            crate::types::error::ResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1245            crate::types::error::ResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1246            crate::types::error::ResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1247            crate::types::error::ResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1248            crate::types::error::ResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1249            crate::types::error::ResponseStreamError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
1250            crate::types::error::ResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1251        }
1252    }
1253}
1254impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>> for Error
1255where
1256    R: Send + Sync + std::fmt::Debug + 'static,
1257{
1258    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>) -> Self {
1259        match err {
1260            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1261            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1262                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1263                source: err.into(),
1264            }),
1265        }
1266    }
1267}
1268impl From<crate::types::error::FlowResponseStreamError> for Error {
1269    fn from(err: crate::types::error::FlowResponseStreamError) -> Self {
1270        match err {
1271            crate::types::error::FlowResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1272            crate::types::error::FlowResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1273            crate::types::error::FlowResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1274            crate::types::error::FlowResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1275            crate::types::error::FlowResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1276            crate::types::error::FlowResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1277            crate::types::error::FlowResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1278            crate::types::error::FlowResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1279            crate::types::error::FlowResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1280            crate::types::error::FlowResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1281        }
1282    }
1283}
1284impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>> for Error
1285where
1286    R: Send + Sync + std::fmt::Debug + 'static,
1287{
1288    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>) -> Self {
1289        match err {
1290            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1291            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1292                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1293                source: err.into(),
1294            }),
1295        }
1296    }
1297}
1298impl From<crate::types::error::InlineAgentResponseStreamError> for Error {
1299    fn from(err: crate::types::error::InlineAgentResponseStreamError) -> Self {
1300        match err {
1301            crate::types::error::InlineAgentResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1302            crate::types::error::InlineAgentResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
1303            crate::types::error::InlineAgentResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1304            crate::types::error::InlineAgentResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
1305            crate::types::error::InlineAgentResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1306            crate::types::error::InlineAgentResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1307            crate::types::error::InlineAgentResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
1308            crate::types::error::InlineAgentResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1309            crate::types::error::InlineAgentResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1310            crate::types::error::InlineAgentResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
1311        }
1312    }
1313}
1314impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>> for Error
1315where
1316    R: Send + Sync + std::fmt::Debug + 'static,
1317{
1318    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>) -> Self {
1319        match err {
1320            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1321            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1322                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1323                source: err.into(),
1324            }),
1325        }
1326    }
1327}
1328impl From<crate::types::error::OptimizedPromptStreamError> for Error {
1329    fn from(err: crate::types::error::OptimizedPromptStreamError) -> Self {
1330        match err {
1331            crate::types::error::OptimizedPromptStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
1332            crate::types::error::OptimizedPromptStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1333            crate::types::error::OptimizedPromptStreamError::ValidationException(inner) => Error::ValidationException(inner),
1334            crate::types::error::OptimizedPromptStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
1335            crate::types::error::OptimizedPromptStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1336            crate::types::error::OptimizedPromptStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1337            crate::types::error::OptimizedPromptStreamError::Unhandled(inner) => Error::Unhandled(inner),
1338        }
1339    }
1340}
1341impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>> for Error
1342where
1343    R: Send + Sync + std::fmt::Debug + 'static,
1344{
1345    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>) -> Self {
1346        match err {
1347            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1348            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1349                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1350                source: err.into(),
1351            }),
1352        }
1353    }
1354}
1355impl From<crate::types::error::RetrieveAndGenerateStreamResponseOutputError> for Error {
1356    fn from(err: crate::types::error::RetrieveAndGenerateStreamResponseOutputError) -> Self {
1357        match err {
1358            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::InternalServerException(inner) => {
1359                Error::InternalServerException(inner)
1360            }
1361            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
1362            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ResourceNotFoundException(inner) => {
1363                Error::ResourceNotFoundException(inner)
1364            }
1365            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
1366                Error::ServiceQuotaExceededException(inner)
1367            }
1368            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1369            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
1370            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
1371            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::DependencyFailedException(inner) => {
1372                Error::DependencyFailedException(inner)
1373            }
1374            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
1375            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
1376        }
1377    }
1378}
1379impl ::std::error::Error for Error {
1380    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1381        match self {
1382            Error::AccessDeniedException(inner) => inner.source(),
1383            Error::BadGatewayException(inner) => inner.source(),
1384            Error::ConflictException(inner) => inner.source(),
1385            Error::DependencyFailedException(inner) => inner.source(),
1386            Error::InternalServerException(inner) => inner.source(),
1387            Error::ModelNotReadyException(inner) => inner.source(),
1388            Error::ResourceNotFoundException(inner) => inner.source(),
1389            Error::ServiceQuotaExceededException(inner) => inner.source(),
1390            Error::ThrottlingException(inner) => inner.source(),
1391            Error::ValidationException(inner) => inner.source(),
1392            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1393        }
1394    }
1395}
1396impl ::aws_types::request_id::RequestId for Error {
1397    fn request_id(&self) -> Option<&str> {
1398        match self {
1399            Self::AccessDeniedException(e) => e.request_id(),
1400            Self::BadGatewayException(e) => e.request_id(),
1401            Self::ConflictException(e) => e.request_id(),
1402            Self::DependencyFailedException(e) => e.request_id(),
1403            Self::InternalServerException(e) => e.request_id(),
1404            Self::ModelNotReadyException(e) => e.request_id(),
1405            Self::ResourceNotFoundException(e) => e.request_id(),
1406            Self::ServiceQuotaExceededException(e) => e.request_id(),
1407            Self::ThrottlingException(e) => e.request_id(),
1408            Self::ValidationException(e) => e.request_id(),
1409            Self::Unhandled(e) => e.meta.request_id(),
1410        }
1411    }
1412}