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::create_invocation::CreateInvocationError, R>> for Error
84where
85    R: Send + Sync + std::fmt::Debug + 'static,
86{
87    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_invocation::CreateInvocationError, R>) -> Self {
88        match err {
89            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
90            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
91                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
92                source: err.into(),
93            }),
94        }
95    }
96}
97impl From<crate::operation::create_invocation::CreateInvocationError> for Error {
98    fn from(err: crate::operation::create_invocation::CreateInvocationError) -> Self {
99        match err {
100            crate::operation::create_invocation::CreateInvocationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
101            crate::operation::create_invocation::CreateInvocationError::ValidationException(inner) => Error::ValidationException(inner),
102            crate::operation::create_invocation::CreateInvocationError::InternalServerException(inner) => Error::InternalServerException(inner),
103            crate::operation::create_invocation::CreateInvocationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
104            crate::operation::create_invocation::CreateInvocationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
105            crate::operation::create_invocation::CreateInvocationError::ConflictException(inner) => Error::ConflictException(inner),
106            crate::operation::create_invocation::CreateInvocationError::ServiceQuotaExceededException(inner) => {
107                Error::ServiceQuotaExceededException(inner)
108            }
109            crate::operation::create_invocation::CreateInvocationError::Unhandled(inner) => Error::Unhandled(inner),
110        }
111    }
112}
113impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>> for Error
114where
115    R: Send + Sync + std::fmt::Debug + 'static,
116{
117    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_session::CreateSessionError, R>) -> Self {
118        match err {
119            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
120            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
121                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
122                source: err.into(),
123            }),
124        }
125    }
126}
127impl From<crate::operation::create_session::CreateSessionError> for Error {
128    fn from(err: crate::operation::create_session::CreateSessionError) -> Self {
129        match err {
130            crate::operation::create_session::CreateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
131            crate::operation::create_session::CreateSessionError::ValidationException(inner) => Error::ValidationException(inner),
132            crate::operation::create_session::CreateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
133            crate::operation::create_session::CreateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
134            crate::operation::create_session::CreateSessionError::ConflictException(inner) => Error::ConflictException(inner),
135            crate::operation::create_session::CreateSessionError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
136            crate::operation::create_session::CreateSessionError::Unhandled(inner) => Error::Unhandled(inner),
137        }
138    }
139}
140impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>> for Error
141where
142    R: Send + Sync + std::fmt::Debug + 'static,
143{
144    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_agent_memory::DeleteAgentMemoryError, R>) -> Self {
145        match err {
146            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
147            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
148                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
149                source: err.into(),
150            }),
151        }
152    }
153}
154impl From<crate::operation::delete_agent_memory::DeleteAgentMemoryError> for Error {
155    fn from(err: crate::operation::delete_agent_memory::DeleteAgentMemoryError) -> Self {
156        match err {
157            crate::operation::delete_agent_memory::DeleteAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
158            crate::operation::delete_agent_memory::DeleteAgentMemoryError::DependencyFailedException(inner) => {
159                Error::DependencyFailedException(inner)
160            }
161            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
162            crate::operation::delete_agent_memory::DeleteAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
163            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ResourceNotFoundException(inner) => {
164                Error::ResourceNotFoundException(inner)
165            }
166            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
167            crate::operation::delete_agent_memory::DeleteAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
168            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
169            crate::operation::delete_agent_memory::DeleteAgentMemoryError::ServiceQuotaExceededException(inner) => {
170                Error::ServiceQuotaExceededException(inner)
171            }
172            crate::operation::delete_agent_memory::DeleteAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
173        }
174    }
175}
176impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>> for Error
177where
178    R: Send + Sync + std::fmt::Debug + 'static,
179{
180    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_session::DeleteSessionError, R>) -> Self {
181        match err {
182            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
183            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
184                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
185                source: err.into(),
186            }),
187        }
188    }
189}
190impl From<crate::operation::delete_session::DeleteSessionError> for Error {
191    fn from(err: crate::operation::delete_session::DeleteSessionError) -> Self {
192        match err {
193            crate::operation::delete_session::DeleteSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
194            crate::operation::delete_session::DeleteSessionError::ValidationException(inner) => Error::ValidationException(inner),
195            crate::operation::delete_session::DeleteSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
196            crate::operation::delete_session::DeleteSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
197            crate::operation::delete_session::DeleteSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
198            crate::operation::delete_session::DeleteSessionError::ConflictException(inner) => Error::ConflictException(inner),
199            crate::operation::delete_session::DeleteSessionError::Unhandled(inner) => Error::Unhandled(inner),
200        }
201    }
202}
203impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>> for Error
204where
205    R: Send + Sync + std::fmt::Debug + 'static,
206{
207    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::end_session::EndSessionError, R>) -> Self {
208        match err {
209            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
210            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
211                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
212                source: err.into(),
213            }),
214        }
215    }
216}
217impl From<crate::operation::end_session::EndSessionError> for Error {
218    fn from(err: crate::operation::end_session::EndSessionError) -> Self {
219        match err {
220            crate::operation::end_session::EndSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
221            crate::operation::end_session::EndSessionError::ValidationException(inner) => Error::ValidationException(inner),
222            crate::operation::end_session::EndSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
223            crate::operation::end_session::EndSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
224            crate::operation::end_session::EndSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
225            crate::operation::end_session::EndSessionError::ConflictException(inner) => Error::ConflictException(inner),
226            crate::operation::end_session::EndSessionError::Unhandled(inner) => Error::Unhandled(inner),
227        }
228    }
229}
230impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>> for Error
231where
232    R: Send + Sync + std::fmt::Debug + 'static,
233{
234    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::generate_query::GenerateQueryError, R>) -> Self {
235        match err {
236            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
237            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
238                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
239                source: err.into(),
240            }),
241        }
242    }
243}
244impl From<crate::operation::generate_query::GenerateQueryError> for Error {
245    fn from(err: crate::operation::generate_query::GenerateQueryError) -> Self {
246        match err {
247            crate::operation::generate_query::GenerateQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
248            crate::operation::generate_query::GenerateQueryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
249            crate::operation::generate_query::GenerateQueryError::ValidationException(inner) => Error::ValidationException(inner),
250            crate::operation::generate_query::GenerateQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
251            crate::operation::generate_query::GenerateQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
252            crate::operation::generate_query::GenerateQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
253            crate::operation::generate_query::GenerateQueryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
254            crate::operation::generate_query::GenerateQueryError::ConflictException(inner) => Error::ConflictException(inner),
255            crate::operation::generate_query::GenerateQueryError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
256            crate::operation::generate_query::GenerateQueryError::Unhandled(inner) => Error::Unhandled(inner),
257        }
258    }
259}
260impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>> for Error
261where
262    R: Send + Sync + std::fmt::Debug + 'static,
263{
264    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_agent_memory::GetAgentMemoryError, R>) -> Self {
265        match err {
266            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
267            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
268                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
269                source: err.into(),
270            }),
271        }
272    }
273}
274impl From<crate::operation::get_agent_memory::GetAgentMemoryError> for Error {
275    fn from(err: crate::operation::get_agent_memory::GetAgentMemoryError) -> Self {
276        match err {
277            crate::operation::get_agent_memory::GetAgentMemoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
278            crate::operation::get_agent_memory::GetAgentMemoryError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
279            crate::operation::get_agent_memory::GetAgentMemoryError::ValidationException(inner) => Error::ValidationException(inner),
280            crate::operation::get_agent_memory::GetAgentMemoryError::InternalServerException(inner) => Error::InternalServerException(inner),
281            crate::operation::get_agent_memory::GetAgentMemoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
282            crate::operation::get_agent_memory::GetAgentMemoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
283            crate::operation::get_agent_memory::GetAgentMemoryError::BadGatewayException(inner) => Error::BadGatewayException(inner),
284            crate::operation::get_agent_memory::GetAgentMemoryError::ConflictException(inner) => Error::ConflictException(inner),
285            crate::operation::get_agent_memory::GetAgentMemoryError::ServiceQuotaExceededException(inner) => {
286                Error::ServiceQuotaExceededException(inner)
287            }
288            crate::operation::get_agent_memory::GetAgentMemoryError::Unhandled(inner) => Error::Unhandled(inner),
289        }
290    }
291}
292impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>> for Error
293where
294    R: Send + Sync + std::fmt::Debug + 'static,
295{
296    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_invocation_step::GetInvocationStepError, R>) -> Self {
297        match err {
298            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
299            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
300                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
301                source: err.into(),
302            }),
303        }
304    }
305}
306impl From<crate::operation::get_invocation_step::GetInvocationStepError> for Error {
307    fn from(err: crate::operation::get_invocation_step::GetInvocationStepError) -> Self {
308        match err {
309            crate::operation::get_invocation_step::GetInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
310            crate::operation::get_invocation_step::GetInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
311            crate::operation::get_invocation_step::GetInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
312            crate::operation::get_invocation_step::GetInvocationStepError::ResourceNotFoundException(inner) => {
313                Error::ResourceNotFoundException(inner)
314            }
315            crate::operation::get_invocation_step::GetInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
316            crate::operation::get_invocation_step::GetInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
317        }
318    }
319}
320impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>> for Error
321where
322    R: Send + Sync + std::fmt::Debug + 'static,
323{
324    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_session::GetSessionError, R>) -> Self {
325        match err {
326            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
327            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
328                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
329                source: err.into(),
330            }),
331        }
332    }
333}
334impl From<crate::operation::get_session::GetSessionError> for Error {
335    fn from(err: crate::operation::get_session::GetSessionError) -> Self {
336        match err {
337            crate::operation::get_session::GetSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
338            crate::operation::get_session::GetSessionError::ValidationException(inner) => Error::ValidationException(inner),
339            crate::operation::get_session::GetSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
340            crate::operation::get_session::GetSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
341            crate::operation::get_session::GetSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
342            crate::operation::get_session::GetSessionError::Unhandled(inner) => Error::Unhandled(inner),
343        }
344    }
345}
346impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>> for Error
347where
348    R: Send + Sync + std::fmt::Debug + 'static,
349{
350    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_agent::InvokeAgentError, R>) -> Self {
351        match err {
352            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
353            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
354                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
355                source: err.into(),
356            }),
357        }
358    }
359}
360impl From<crate::operation::invoke_agent::InvokeAgentError> for Error {
361    fn from(err: crate::operation::invoke_agent::InvokeAgentError) -> Self {
362        match err {
363            crate::operation::invoke_agent::InvokeAgentError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
364            crate::operation::invoke_agent::InvokeAgentError::ValidationException(inner) => Error::ValidationException(inner),
365            crate::operation::invoke_agent::InvokeAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
366            crate::operation::invoke_agent::InvokeAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
367            crate::operation::invoke_agent::InvokeAgentError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
368            crate::operation::invoke_agent::InvokeAgentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
369            crate::operation::invoke_agent::InvokeAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
370            crate::operation::invoke_agent::InvokeAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
371            crate::operation::invoke_agent::InvokeAgentError::ConflictException(inner) => Error::ConflictException(inner),
372            crate::operation::invoke_agent::InvokeAgentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
373            crate::operation::invoke_agent::InvokeAgentError::Unhandled(inner) => Error::Unhandled(inner),
374        }
375    }
376}
377impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>> for Error
378where
379    R: Send + Sync + std::fmt::Debug + 'static,
380{
381    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_flow::InvokeFlowError, R>) -> Self {
382        match err {
383            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
384            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
385                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
386                source: err.into(),
387            }),
388        }
389    }
390}
391impl From<crate::operation::invoke_flow::InvokeFlowError> for Error {
392    fn from(err: crate::operation::invoke_flow::InvokeFlowError) -> Self {
393        match err {
394            crate::operation::invoke_flow::InvokeFlowError::ValidationException(inner) => Error::ValidationException(inner),
395            crate::operation::invoke_flow::InvokeFlowError::InternalServerException(inner) => Error::InternalServerException(inner),
396            crate::operation::invoke_flow::InvokeFlowError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
397            crate::operation::invoke_flow::InvokeFlowError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
398            crate::operation::invoke_flow::InvokeFlowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
399            crate::operation::invoke_flow::InvokeFlowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
400            crate::operation::invoke_flow::InvokeFlowError::BadGatewayException(inner) => Error::BadGatewayException(inner),
401            crate::operation::invoke_flow::InvokeFlowError::ConflictException(inner) => Error::ConflictException(inner),
402            crate::operation::invoke_flow::InvokeFlowError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
403            crate::operation::invoke_flow::InvokeFlowError::Unhandled(inner) => Error::Unhandled(inner),
404        }
405    }
406}
407impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>> for Error
408where
409    R: Send + Sync + std::fmt::Debug + 'static,
410{
411    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::invoke_inline_agent::InvokeInlineAgentError, R>) -> Self {
412        match err {
413            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
414            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
415                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
416                source: err.into(),
417            }),
418        }
419    }
420}
421impl From<crate::operation::invoke_inline_agent::InvokeInlineAgentError> for Error {
422    fn from(err: crate::operation::invoke_inline_agent::InvokeInlineAgentError) -> Self {
423        match err {
424            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ValidationException(inner) => Error::ValidationException(inner),
425            crate::operation::invoke_inline_agent::InvokeInlineAgentError::InternalServerException(inner) => Error::InternalServerException(inner),
426            crate::operation::invoke_inline_agent::InvokeInlineAgentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
427            crate::operation::invoke_inline_agent::InvokeInlineAgentError::DependencyFailedException(inner) => {
428                Error::DependencyFailedException(inner)
429            }
430            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ResourceNotFoundException(inner) => {
431                Error::ResourceNotFoundException(inner)
432            }
433            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
434            crate::operation::invoke_inline_agent::InvokeInlineAgentError::BadGatewayException(inner) => Error::BadGatewayException(inner),
435            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ConflictException(inner) => Error::ConflictException(inner),
436            crate::operation::invoke_inline_agent::InvokeInlineAgentError::ServiceQuotaExceededException(inner) => {
437                Error::ServiceQuotaExceededException(inner)
438            }
439            crate::operation::invoke_inline_agent::InvokeInlineAgentError::Unhandled(inner) => Error::Unhandled(inner),
440        }
441    }
442}
443impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>> for Error
444where
445    R: Send + Sync + std::fmt::Debug + 'static,
446{
447    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocations::ListInvocationsError, R>) -> Self {
448        match err {
449            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
450            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
451                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
452                source: err.into(),
453            }),
454        }
455    }
456}
457impl From<crate::operation::list_invocations::ListInvocationsError> for Error {
458    fn from(err: crate::operation::list_invocations::ListInvocationsError) -> Self {
459        match err {
460            crate::operation::list_invocations::ListInvocationsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
461            crate::operation::list_invocations::ListInvocationsError::ValidationException(inner) => Error::ValidationException(inner),
462            crate::operation::list_invocations::ListInvocationsError::InternalServerException(inner) => Error::InternalServerException(inner),
463            crate::operation::list_invocations::ListInvocationsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
464            crate::operation::list_invocations::ListInvocationsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
465            crate::operation::list_invocations::ListInvocationsError::Unhandled(inner) => Error::Unhandled(inner),
466        }
467    }
468}
469impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>> for Error
470where
471    R: Send + Sync + std::fmt::Debug + 'static,
472{
473    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_invocation_steps::ListInvocationStepsError, R>) -> 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::list_invocation_steps::ListInvocationStepsError> for Error {
484    fn from(err: crate::operation::list_invocation_steps::ListInvocationStepsError) -> Self {
485        match err {
486            crate::operation::list_invocation_steps::ListInvocationStepsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
487            crate::operation::list_invocation_steps::ListInvocationStepsError::ValidationException(inner) => Error::ValidationException(inner),
488            crate::operation::list_invocation_steps::ListInvocationStepsError::InternalServerException(inner) => {
489                Error::InternalServerException(inner)
490            }
491            crate::operation::list_invocation_steps::ListInvocationStepsError::ResourceNotFoundException(inner) => {
492                Error::ResourceNotFoundException(inner)
493            }
494            crate::operation::list_invocation_steps::ListInvocationStepsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
495            crate::operation::list_invocation_steps::ListInvocationStepsError::Unhandled(inner) => Error::Unhandled(inner),
496        }
497    }
498}
499impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>> for Error
500where
501    R: Send + Sync + std::fmt::Debug + 'static,
502{
503    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_sessions::ListSessionsError, R>) -> Self {
504        match err {
505            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
506            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
507                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
508                source: err.into(),
509            }),
510        }
511    }
512}
513impl From<crate::operation::list_sessions::ListSessionsError> for Error {
514    fn from(err: crate::operation::list_sessions::ListSessionsError) -> Self {
515        match err {
516            crate::operation::list_sessions::ListSessionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
517            crate::operation::list_sessions::ListSessionsError::ValidationException(inner) => Error::ValidationException(inner),
518            crate::operation::list_sessions::ListSessionsError::InternalServerException(inner) => Error::InternalServerException(inner),
519            crate::operation::list_sessions::ListSessionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
520            crate::operation::list_sessions::ListSessionsError::Unhandled(inner) => Error::Unhandled(inner),
521        }
522    }
523}
524impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
525where
526    R: Send + Sync + std::fmt::Debug + 'static,
527{
528    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
529        match err {
530            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
531            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
532                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
533                source: err.into(),
534            }),
535        }
536    }
537}
538impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
539    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
540        match err {
541            crate::operation::list_tags_for_resource::ListTagsForResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
542            crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
543            crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
544                Error::InternalServerException(inner)
545            }
546            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
547                Error::ResourceNotFoundException(inner)
548            }
549            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
550            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
551        }
552    }
553}
554impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>> for Error
555where
556    R: Send + Sync + std::fmt::Debug + 'static,
557{
558    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::optimize_prompt::OptimizePromptError, R>) -> Self {
559        match err {
560            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
561            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
562                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
563                source: err.into(),
564            }),
565        }
566    }
567}
568impl From<crate::operation::optimize_prompt::OptimizePromptError> for Error {
569    fn from(err: crate::operation::optimize_prompt::OptimizePromptError) -> Self {
570        match err {
571            crate::operation::optimize_prompt::OptimizePromptError::ValidationException(inner) => Error::ValidationException(inner),
572            crate::operation::optimize_prompt::OptimizePromptError::InternalServerException(inner) => Error::InternalServerException(inner),
573            crate::operation::optimize_prompt::OptimizePromptError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
574            crate::operation::optimize_prompt::OptimizePromptError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
575            crate::operation::optimize_prompt::OptimizePromptError::ThrottlingException(inner) => Error::ThrottlingException(inner),
576            crate::operation::optimize_prompt::OptimizePromptError::BadGatewayException(inner) => Error::BadGatewayException(inner),
577            crate::operation::optimize_prompt::OptimizePromptError::Unhandled(inner) => Error::Unhandled(inner),
578        }
579    }
580}
581impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>> for Error
582where
583    R: Send + Sync + std::fmt::Debug + 'static,
584{
585    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_invocation_step::PutInvocationStepError, R>) -> Self {
586        match err {
587            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
588            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
589                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
590                source: err.into(),
591            }),
592        }
593    }
594}
595impl From<crate::operation::put_invocation_step::PutInvocationStepError> for Error {
596    fn from(err: crate::operation::put_invocation_step::PutInvocationStepError) -> Self {
597        match err {
598            crate::operation::put_invocation_step::PutInvocationStepError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
599            crate::operation::put_invocation_step::PutInvocationStepError::ValidationException(inner) => Error::ValidationException(inner),
600            crate::operation::put_invocation_step::PutInvocationStepError::InternalServerException(inner) => Error::InternalServerException(inner),
601            crate::operation::put_invocation_step::PutInvocationStepError::ResourceNotFoundException(inner) => {
602                Error::ResourceNotFoundException(inner)
603            }
604            crate::operation::put_invocation_step::PutInvocationStepError::ThrottlingException(inner) => Error::ThrottlingException(inner),
605            crate::operation::put_invocation_step::PutInvocationStepError::ConflictException(inner) => Error::ConflictException(inner),
606            crate::operation::put_invocation_step::PutInvocationStepError::ServiceQuotaExceededException(inner) => {
607                Error::ServiceQuotaExceededException(inner)
608            }
609            crate::operation::put_invocation_step::PutInvocationStepError::Unhandled(inner) => Error::Unhandled(inner),
610        }
611    }
612}
613impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>> for Error
614where
615    R: Send + Sync + std::fmt::Debug + 'static,
616{
617    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::rerank::RerankError, R>) -> Self {
618        match err {
619            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
620            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
621                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
622                source: err.into(),
623            }),
624        }
625    }
626}
627impl From<crate::operation::rerank::RerankError> for Error {
628    fn from(err: crate::operation::rerank::RerankError) -> Self {
629        match err {
630            crate::operation::rerank::RerankError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
631            crate::operation::rerank::RerankError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
632            crate::operation::rerank::RerankError::ValidationException(inner) => Error::ValidationException(inner),
633            crate::operation::rerank::RerankError::InternalServerException(inner) => Error::InternalServerException(inner),
634            crate::operation::rerank::RerankError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
635            crate::operation::rerank::RerankError::ThrottlingException(inner) => Error::ThrottlingException(inner),
636            crate::operation::rerank::RerankError::BadGatewayException(inner) => Error::BadGatewayException(inner),
637            crate::operation::rerank::RerankError::ConflictException(inner) => Error::ConflictException(inner),
638            crate::operation::rerank::RerankError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
639            crate::operation::rerank::RerankError::Unhandled(inner) => Error::Unhandled(inner),
640        }
641    }
642}
643impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>> for Error
644where
645    R: Send + Sync + std::fmt::Debug + 'static,
646{
647    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve::RetrieveError, R>) -> Self {
648        match err {
649            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
650            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
651                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
652                source: err.into(),
653            }),
654        }
655    }
656}
657impl From<crate::operation::retrieve::RetrieveError> for Error {
658    fn from(err: crate::operation::retrieve::RetrieveError) -> Self {
659        match err {
660            crate::operation::retrieve::RetrieveError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
661            crate::operation::retrieve::RetrieveError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
662            crate::operation::retrieve::RetrieveError::ValidationException(inner) => Error::ValidationException(inner),
663            crate::operation::retrieve::RetrieveError::InternalServerException(inner) => Error::InternalServerException(inner),
664            crate::operation::retrieve::RetrieveError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
665            crate::operation::retrieve::RetrieveError::ThrottlingException(inner) => Error::ThrottlingException(inner),
666            crate::operation::retrieve::RetrieveError::BadGatewayException(inner) => Error::BadGatewayException(inner),
667            crate::operation::retrieve::RetrieveError::ConflictException(inner) => Error::ConflictException(inner),
668            crate::operation::retrieve::RetrieveError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
669            crate::operation::retrieve::RetrieveError::Unhandled(inner) => Error::Unhandled(inner),
670        }
671    }
672}
673impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>> for Error
674where
675    R: Send + Sync + std::fmt::Debug + 'static,
676{
677    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate::RetrieveAndGenerateError, R>) -> Self {
678        match err {
679            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
680            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
681                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
682                source: err.into(),
683            }),
684        }
685    }
686}
687impl From<crate::operation::retrieve_and_generate::RetrieveAndGenerateError> for Error {
688    fn from(err: crate::operation::retrieve_and_generate::RetrieveAndGenerateError) -> Self {
689        match err {
690            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
691            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::DependencyFailedException(inner) => {
692                Error::DependencyFailedException(inner)
693            }
694            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ValidationException(inner) => Error::ValidationException(inner),
695            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::InternalServerException(inner) => {
696                Error::InternalServerException(inner)
697            }
698            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ResourceNotFoundException(inner) => {
699                Error::ResourceNotFoundException(inner)
700            }
701            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
702            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::BadGatewayException(inner) => Error::BadGatewayException(inner),
703            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ConflictException(inner) => Error::ConflictException(inner),
704            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::ServiceQuotaExceededException(inner) => {
705                Error::ServiceQuotaExceededException(inner)
706            }
707            crate::operation::retrieve_and_generate::RetrieveAndGenerateError::Unhandled(inner) => Error::Unhandled(inner),
708        }
709    }
710}
711impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>>
712    for Error
713where
714    R: Send + Sync + std::fmt::Debug + 'static,
715{
716    fn from(
717        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError, R>,
718    ) -> Self {
719        match err {
720            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
721            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
722                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
723                source: err.into(),
724            }),
725        }
726    }
727}
728impl From<crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError> for Error {
729    fn from(err: crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError) -> Self {
730        match err {
731            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ValidationException(inner) => {
732                Error::ValidationException(inner)
733            }
734            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::InternalServerException(inner) => {
735                Error::InternalServerException(inner)
736            }
737            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::AccessDeniedException(inner) => {
738                Error::AccessDeniedException(inner)
739            }
740            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::DependencyFailedException(inner) => {
741                Error::DependencyFailedException(inner)
742            }
743            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ResourceNotFoundException(inner) => {
744                Error::ResourceNotFoundException(inner)
745            }
746            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ThrottlingException(inner) => {
747                Error::ThrottlingException(inner)
748            }
749            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::BadGatewayException(inner) => {
750                Error::BadGatewayException(inner)
751            }
752            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ConflictException(inner) => {
753                Error::ConflictException(inner)
754            }
755            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::ServiceQuotaExceededException(inner) => {
756                Error::ServiceQuotaExceededException(inner)
757            }
758            crate::operation::retrieve_and_generate_stream::RetrieveAndGenerateStreamError::Unhandled(inner) => Error::Unhandled(inner),
759        }
760    }
761}
762impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
763where
764    R: Send + Sync + std::fmt::Debug + 'static,
765{
766    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
767        match err {
768            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
769            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
770                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
771                source: err.into(),
772            }),
773        }
774    }
775}
776impl From<crate::operation::tag_resource::TagResourceError> for Error {
777    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
778        match err {
779            crate::operation::tag_resource::TagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
780            crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
781            crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
782            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
783            crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
784            crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
785            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
786        }
787    }
788}
789impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
790where
791    R: Send + Sync + std::fmt::Debug + 'static,
792{
793    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
794        match err {
795            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
796            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
797                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
798                source: err.into(),
799            }),
800        }
801    }
802}
803impl From<crate::operation::untag_resource::UntagResourceError> for Error {
804    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
805        match err {
806            crate::operation::untag_resource::UntagResourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
807            crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
808            crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
809            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
810            crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
811            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
812        }
813    }
814}
815impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>> for Error
816where
817    R: Send + Sync + std::fmt::Debug + 'static,
818{
819    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_session::UpdateSessionError, R>) -> Self {
820        match err {
821            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
822            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
823                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
824                source: err.into(),
825            }),
826        }
827    }
828}
829impl From<crate::operation::update_session::UpdateSessionError> for Error {
830    fn from(err: crate::operation::update_session::UpdateSessionError) -> Self {
831        match err {
832            crate::operation::update_session::UpdateSessionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
833            crate::operation::update_session::UpdateSessionError::ValidationException(inner) => Error::ValidationException(inner),
834            crate::operation::update_session::UpdateSessionError::InternalServerException(inner) => Error::InternalServerException(inner),
835            crate::operation::update_session::UpdateSessionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
836            crate::operation::update_session::UpdateSessionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
837            crate::operation::update_session::UpdateSessionError::ConflictException(inner) => Error::ConflictException(inner),
838            crate::operation::update_session::UpdateSessionError::Unhandled(inner) => Error::Unhandled(inner),
839        }
840    }
841}
842impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>> for Error
843where
844    R: Send + Sync + std::fmt::Debug + 'static,
845{
846    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::ResponseStreamError, R>) -> Self {
847        match err {
848            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
849            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
850                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
851                source: err.into(),
852            }),
853        }
854    }
855}
856impl From<crate::types::error::ResponseStreamError> for Error {
857    fn from(err: crate::types::error::ResponseStreamError) -> Self {
858        match err {
859            crate::types::error::ResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
860            crate::types::error::ResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
861            crate::types::error::ResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
862            crate::types::error::ResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
863            crate::types::error::ResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
864            crate::types::error::ResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
865            crate::types::error::ResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
866            crate::types::error::ResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
867            crate::types::error::ResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
868            crate::types::error::ResponseStreamError::ModelNotReadyException(inner) => Error::ModelNotReadyException(inner),
869            crate::types::error::ResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
870        }
871    }
872}
873impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>> for Error
874where
875    R: Send + Sync + std::fmt::Debug + 'static,
876{
877    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::FlowResponseStreamError, R>) -> Self {
878        match err {
879            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
880            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
881                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
882                source: err.into(),
883            }),
884        }
885    }
886}
887impl From<crate::types::error::FlowResponseStreamError> for Error {
888    fn from(err: crate::types::error::FlowResponseStreamError) -> Self {
889        match err {
890            crate::types::error::FlowResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
891            crate::types::error::FlowResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
892            crate::types::error::FlowResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
893            crate::types::error::FlowResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
894            crate::types::error::FlowResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
895            crate::types::error::FlowResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
896            crate::types::error::FlowResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
897            crate::types::error::FlowResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
898            crate::types::error::FlowResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
899            crate::types::error::FlowResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
900        }
901    }
902}
903impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>> for Error
904where
905    R: Send + Sync + std::fmt::Debug + 'static,
906{
907    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::InlineAgentResponseStreamError, R>) -> Self {
908        match err {
909            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
910            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
911                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
912                source: err.into(),
913            }),
914        }
915    }
916}
917impl From<crate::types::error::InlineAgentResponseStreamError> for Error {
918    fn from(err: crate::types::error::InlineAgentResponseStreamError) -> Self {
919        match err {
920            crate::types::error::InlineAgentResponseStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
921            crate::types::error::InlineAgentResponseStreamError::ValidationException(inner) => Error::ValidationException(inner),
922            crate::types::error::InlineAgentResponseStreamError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
923            crate::types::error::InlineAgentResponseStreamError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
924            crate::types::error::InlineAgentResponseStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
925            crate::types::error::InlineAgentResponseStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
926            crate::types::error::InlineAgentResponseStreamError::ConflictException(inner) => Error::ConflictException(inner),
927            crate::types::error::InlineAgentResponseStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
928            crate::types::error::InlineAgentResponseStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
929            crate::types::error::InlineAgentResponseStreamError::Unhandled(inner) => Error::Unhandled(inner),
930        }
931    }
932}
933impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>> for Error
934where
935    R: Send + Sync + std::fmt::Debug + 'static,
936{
937    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::OptimizedPromptStreamError, R>) -> Self {
938        match err {
939            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
940            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
941                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
942                source: err.into(),
943            }),
944        }
945    }
946}
947impl From<crate::types::error::OptimizedPromptStreamError> for Error {
948    fn from(err: crate::types::error::OptimizedPromptStreamError) -> Self {
949        match err {
950            crate::types::error::OptimizedPromptStreamError::InternalServerException(inner) => Error::InternalServerException(inner),
951            crate::types::error::OptimizedPromptStreamError::ThrottlingException(inner) => Error::ThrottlingException(inner),
952            crate::types::error::OptimizedPromptStreamError::ValidationException(inner) => Error::ValidationException(inner),
953            crate::types::error::OptimizedPromptStreamError::DependencyFailedException(inner) => Error::DependencyFailedException(inner),
954            crate::types::error::OptimizedPromptStreamError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
955            crate::types::error::OptimizedPromptStreamError::BadGatewayException(inner) => Error::BadGatewayException(inner),
956            crate::types::error::OptimizedPromptStreamError::Unhandled(inner) => Error::Unhandled(inner),
957        }
958    }
959}
960impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>> for Error
961where
962    R: Send + Sync + std::fmt::Debug + 'static,
963{
964    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::RetrieveAndGenerateStreamResponseOutputError, R>) -> Self {
965        match err {
966            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
967            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
968                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
969                source: err.into(),
970            }),
971        }
972    }
973}
974impl From<crate::types::error::RetrieveAndGenerateStreamResponseOutputError> for Error {
975    fn from(err: crate::types::error::RetrieveAndGenerateStreamResponseOutputError) -> Self {
976        match err {
977            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::InternalServerException(inner) => {
978                Error::InternalServerException(inner)
979            }
980            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ValidationException(inner) => Error::ValidationException(inner),
981            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ResourceNotFoundException(inner) => {
982                Error::ResourceNotFoundException(inner)
983            }
984            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ServiceQuotaExceededException(inner) => {
985                Error::ServiceQuotaExceededException(inner)
986            }
987            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ThrottlingException(inner) => Error::ThrottlingException(inner),
988            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
989            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::ConflictException(inner) => Error::ConflictException(inner),
990            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::DependencyFailedException(inner) => {
991                Error::DependencyFailedException(inner)
992            }
993            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::BadGatewayException(inner) => Error::BadGatewayException(inner),
994            crate::types::error::RetrieveAndGenerateStreamResponseOutputError::Unhandled(inner) => Error::Unhandled(inner),
995        }
996    }
997}
998impl ::std::error::Error for Error {
999    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1000        match self {
1001            Error::AccessDeniedException(inner) => inner.source(),
1002            Error::BadGatewayException(inner) => inner.source(),
1003            Error::ConflictException(inner) => inner.source(),
1004            Error::DependencyFailedException(inner) => inner.source(),
1005            Error::InternalServerException(inner) => inner.source(),
1006            Error::ModelNotReadyException(inner) => inner.source(),
1007            Error::ResourceNotFoundException(inner) => inner.source(),
1008            Error::ServiceQuotaExceededException(inner) => inner.source(),
1009            Error::ThrottlingException(inner) => inner.source(),
1010            Error::ValidationException(inner) => inner.source(),
1011            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1012        }
1013    }
1014}
1015impl ::aws_types::request_id::RequestId for Error {
1016    fn request_id(&self) -> Option<&str> {
1017        match self {
1018            Self::AccessDeniedException(e) => e.request_id(),
1019            Self::BadGatewayException(e) => e.request_id(),
1020            Self::ConflictException(e) => e.request_id(),
1021            Self::DependencyFailedException(e) => e.request_id(),
1022            Self::InternalServerException(e) => e.request_id(),
1023            Self::ModelNotReadyException(e) => e.request_id(),
1024            Self::ResourceNotFoundException(e) => e.request_id(),
1025            Self::ServiceQuotaExceededException(e) => e.request_id(),
1026            Self::ThrottlingException(e) => e.request_id(),
1027            Self::ValidationException(e) => e.request_id(),
1028            Self::Unhandled(e) => e.meta.request_id(),
1029        }
1030    }
1031}