1#[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub enum Error {
6 AccessDeniedException(crate::types::error::AccessDeniedException),
8 ConflictException(crate::types::error::ConflictException),
10 InternalServerException(crate::types::error::InternalServerException),
12 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
14 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
16 ThrottlingException(crate::types::error::ThrottlingException),
18 UnprocessableException(crate::types::error::UnprocessableException),
20 ValidationException(crate::types::error::ValidationException),
22 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
24 variable wildcard pattern and check `.code()`:
25 \
26 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
27 \
28 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
29 Unhandled(crate::error::sealed_unhandled::Unhandled),
30}
31impl ::std::fmt::Display for Error {
32 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
33 match self {
34 Error::AccessDeniedException(inner) => inner.fmt(f),
35 Error::ConflictException(inner) => inner.fmt(f),
36 Error::InternalServerException(inner) => inner.fmt(f),
37 Error::ResourceNotFoundException(inner) => inner.fmt(f),
38 Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
39 Error::ThrottlingException(inner) => inner.fmt(f),
40 Error::UnprocessableException(inner) => inner.fmt(f),
41 Error::ValidationException(inner) => inner.fmt(f),
42 Error::Unhandled(_) => {
43 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
44 write!(f, "unhandled error ({code})")
45 } else {
46 f.write_str("unhandled error")
47 }
48 }
49 }
50 }
51}
52impl From<::aws_smithy_types::error::operation::BuildError> for Error {
53 fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
54 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
55 source: value.into(),
56 meta: ::std::default::Default::default(),
57 })
58 }
59}
60impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
61 fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
62 match self {
63 Self::AccessDeniedException(inner) => inner.meta(),
64 Self::ConflictException(inner) => inner.meta(),
65 Self::InternalServerException(inner) => inner.meta(),
66 Self::ResourceNotFoundException(inner) => inner.meta(),
67 Self::ServiceQuotaExceededException(inner) => inner.meta(),
68 Self::ThrottlingException(inner) => inner.meta(),
69 Self::UnprocessableException(inner) => inner.meta(),
70 Self::ValidationException(inner) => inner.meta(),
71 Self::Unhandled(inner) => &inner.meta,
72 }
73 }
74}
75impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_export_task::CancelExportTaskError, R>> for Error
76where
77 R: Send + Sync + std::fmt::Debug + 'static,
78{
79 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_export_task::CancelExportTaskError, R>) -> Self {
80 match err {
81 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
82 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
83 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
84 source: err.into(),
85 }),
86 }
87 }
88}
89impl From<crate::operation::cancel_export_task::CancelExportTaskError> for Error {
90 fn from(err: crate::operation::cancel_export_task::CancelExportTaskError) -> Self {
91 match err {
92 crate::operation::cancel_export_task::CancelExportTaskError::ConflictException(inner) => Error::ConflictException(inner),
93 crate::operation::cancel_export_task::CancelExportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
94 crate::operation::cancel_export_task::CancelExportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
95 crate::operation::cancel_export_task::CancelExportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
96 crate::operation::cancel_export_task::CancelExportTaskError::ValidationException(inner) => Error::ValidationException(inner),
97 crate::operation::cancel_export_task::CancelExportTaskError::Unhandled(inner) => Error::Unhandled(inner),
98 }
99 }
100}
101impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_import_task::CancelImportTaskError, R>> for Error
102where
103 R: Send + Sync + std::fmt::Debug + 'static,
104{
105 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_import_task::CancelImportTaskError, R>) -> Self {
106 match err {
107 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
108 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
109 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
110 source: err.into(),
111 }),
112 }
113 }
114}
115impl From<crate::operation::cancel_import_task::CancelImportTaskError> for Error {
116 fn from(err: crate::operation::cancel_import_task::CancelImportTaskError) -> Self {
117 match err {
118 crate::operation::cancel_import_task::CancelImportTaskError::ConflictException(inner) => Error::ConflictException(inner),
119 crate::operation::cancel_import_task::CancelImportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
120 crate::operation::cancel_import_task::CancelImportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
121 crate::operation::cancel_import_task::CancelImportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
122 crate::operation::cancel_import_task::CancelImportTaskError::ValidationException(inner) => Error::ValidationException(inner),
123 crate::operation::cancel_import_task::CancelImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
124 }
125 }
126}
127impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_query::CancelQueryError, R>> for Error
128where
129 R: Send + Sync + std::fmt::Debug + 'static,
130{
131 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_query::CancelQueryError, R>) -> Self {
132 match err {
133 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
134 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
135 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
136 source: err.into(),
137 }),
138 }
139 }
140}
141impl From<crate::operation::cancel_query::CancelQueryError> for Error {
142 fn from(err: crate::operation::cancel_query::CancelQueryError) -> Self {
143 match err {
144 crate::operation::cancel_query::CancelQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
145 crate::operation::cancel_query::CancelQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
146 crate::operation::cancel_query::CancelQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
147 crate::operation::cancel_query::CancelQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
148 crate::operation::cancel_query::CancelQueryError::ValidationException(inner) => Error::ValidationException(inner),
149 crate::operation::cancel_query::CancelQueryError::Unhandled(inner) => Error::Unhandled(inner),
150 }
151 }
152}
153impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph::CreateGraphError, R>> for Error
154where
155 R: Send + Sync + std::fmt::Debug + 'static,
156{
157 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph::CreateGraphError, R>) -> Self {
158 match err {
159 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
160 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
161 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
162 source: err.into(),
163 }),
164 }
165 }
166}
167impl From<crate::operation::create_graph::CreateGraphError> for Error {
168 fn from(err: crate::operation::create_graph::CreateGraphError) -> Self {
169 match err {
170 crate::operation::create_graph::CreateGraphError::ConflictException(inner) => Error::ConflictException(inner),
171 crate::operation::create_graph::CreateGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
172 crate::operation::create_graph::CreateGraphError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
173 crate::operation::create_graph::CreateGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
174 crate::operation::create_graph::CreateGraphError::ValidationException(inner) => Error::ValidationException(inner),
175 crate::operation::create_graph::CreateGraphError::Unhandled(inner) => Error::Unhandled(inner),
176 }
177 }
178}
179impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph_snapshot::CreateGraphSnapshotError, R>> for Error
180where
181 R: Send + Sync + std::fmt::Debug + 'static,
182{
183 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph_snapshot::CreateGraphSnapshotError, R>) -> Self {
184 match err {
185 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
186 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
187 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
188 source: err.into(),
189 }),
190 }
191 }
192}
193impl From<crate::operation::create_graph_snapshot::CreateGraphSnapshotError> for Error {
194 fn from(err: crate::operation::create_graph_snapshot::CreateGraphSnapshotError) -> Self {
195 match err {
196 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
197 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::InternalServerException(inner) => {
198 Error::InternalServerException(inner)
199 }
200 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::ResourceNotFoundException(inner) => {
201 Error::ResourceNotFoundException(inner)
202 }
203 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::ServiceQuotaExceededException(inner) => {
204 Error::ServiceQuotaExceededException(inner)
205 }
206 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
207 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
208 crate::operation::create_graph_snapshot::CreateGraphSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
209 }
210 }
211}
212impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError, R>>
213 for Error
214where
215 R: Send + Sync + std::fmt::Debug + 'static,
216{
217 fn from(
218 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError, R>,
219 ) -> Self {
220 match err {
221 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
222 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
223 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
224 source: err.into(),
225 }),
226 }
227 }
228}
229impl From<crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError> for Error {
230 fn from(err: crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError) -> Self {
231 match err {
232 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::ConflictException(inner) => {
233 Error::ConflictException(inner)
234 }
235 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::InternalServerException(inner) => {
236 Error::InternalServerException(inner)
237 }
238 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::ServiceQuotaExceededException(inner) => {
239 Error::ServiceQuotaExceededException(inner)
240 }
241 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::ThrottlingException(inner) => {
242 Error::ThrottlingException(inner)
243 }
244 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::ValidationException(inner) => {
245 Error::ValidationException(inner)
246 }
247 crate::operation::create_graph_using_import_task::CreateGraphUsingImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
248 }
249 }
250}
251impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError, R>>
252 for Error
253where
254 R: Send + Sync + std::fmt::Debug + 'static,
255{
256 fn from(
257 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError, R>,
258 ) -> Self {
259 match err {
260 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
261 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
262 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
263 source: err.into(),
264 }),
265 }
266 }
267}
268impl From<crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError> for Error {
269 fn from(err: crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError) -> Self {
270 match err {
271 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::ConflictException(inner) => {
272 Error::ConflictException(inner)
273 }
274 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::InternalServerException(inner) => {
275 Error::InternalServerException(inner)
276 }
277 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::ResourceNotFoundException(inner) => {
278 Error::ResourceNotFoundException(inner)
279 }
280 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::ServiceQuotaExceededException(inner) => {
281 Error::ServiceQuotaExceededException(inner)
282 }
283 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::ThrottlingException(inner) => {
284 Error::ThrottlingException(inner)
285 }
286 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::ValidationException(inner) => {
287 Error::ValidationException(inner)
288 }
289 crate::operation::create_private_graph_endpoint::CreatePrivateGraphEndpointError::Unhandled(inner) => Error::Unhandled(inner),
290 }
291 }
292}
293impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_graph::DeleteGraphError, R>> for Error
294where
295 R: Send + Sync + std::fmt::Debug + 'static,
296{
297 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_graph::DeleteGraphError, R>) -> Self {
298 match err {
299 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
300 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
301 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
302 source: err.into(),
303 }),
304 }
305 }
306}
307impl From<crate::operation::delete_graph::DeleteGraphError> for Error {
308 fn from(err: crate::operation::delete_graph::DeleteGraphError) -> Self {
309 match err {
310 crate::operation::delete_graph::DeleteGraphError::ConflictException(inner) => Error::ConflictException(inner),
311 crate::operation::delete_graph::DeleteGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
312 crate::operation::delete_graph::DeleteGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
313 crate::operation::delete_graph::DeleteGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
314 crate::operation::delete_graph::DeleteGraphError::ValidationException(inner) => Error::ValidationException(inner),
315 crate::operation::delete_graph::DeleteGraphError::Unhandled(inner) => Error::Unhandled(inner),
316 }
317 }
318}
319impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError, R>> for Error
320where
321 R: Send + Sync + std::fmt::Debug + 'static,
322{
323 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError, R>) -> Self {
324 match err {
325 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
326 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
327 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
328 source: err.into(),
329 }),
330 }
331 }
332}
333impl From<crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError> for Error {
334 fn from(err: crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError) -> Self {
335 match err {
336 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
337 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::InternalServerException(inner) => {
338 Error::InternalServerException(inner)
339 }
340 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::ResourceNotFoundException(inner) => {
341 Error::ResourceNotFoundException(inner)
342 }
343 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
344 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
345 crate::operation::delete_graph_snapshot::DeleteGraphSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
346 }
347 }
348}
349impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError, R>>
350 for Error
351where
352 R: Send + Sync + std::fmt::Debug + 'static,
353{
354 fn from(
355 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError, R>,
356 ) -> Self {
357 match err {
358 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
359 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
360 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
361 source: err.into(),
362 }),
363 }
364 }
365}
366impl From<crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError> for Error {
367 fn from(err: crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError) -> Self {
368 match err {
369 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::ConflictException(inner) => {
370 Error::ConflictException(inner)
371 }
372 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::InternalServerException(inner) => {
373 Error::InternalServerException(inner)
374 }
375 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::ResourceNotFoundException(inner) => {
376 Error::ResourceNotFoundException(inner)
377 }
378 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::ThrottlingException(inner) => {
379 Error::ThrottlingException(inner)
380 }
381 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::ValidationException(inner) => {
382 Error::ValidationException(inner)
383 }
384 crate::operation::delete_private_graph_endpoint::DeletePrivateGraphEndpointError::Unhandled(inner) => Error::Unhandled(inner),
385 }
386 }
387}
388impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::execute_query::ExecuteQueryError, R>> for Error
389where
390 R: Send + Sync + std::fmt::Debug + 'static,
391{
392 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::execute_query::ExecuteQueryError, R>) -> Self {
393 match err {
394 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
395 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
396 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
397 source: err.into(),
398 }),
399 }
400 }
401}
402impl From<crate::operation::execute_query::ExecuteQueryError> for Error {
403 fn from(err: crate::operation::execute_query::ExecuteQueryError) -> Self {
404 match err {
405 crate::operation::execute_query::ExecuteQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
406 crate::operation::execute_query::ExecuteQueryError::ConflictException(inner) => Error::ConflictException(inner),
407 crate::operation::execute_query::ExecuteQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
408 crate::operation::execute_query::ExecuteQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
409 crate::operation::execute_query::ExecuteQueryError::UnprocessableException(inner) => Error::UnprocessableException(inner),
410 crate::operation::execute_query::ExecuteQueryError::ValidationException(inner) => Error::ValidationException(inner),
411 crate::operation::execute_query::ExecuteQueryError::Unhandled(inner) => Error::Unhandled(inner),
412 }
413 }
414}
415impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_export_task::GetExportTaskError, R>> for Error
416where
417 R: Send + Sync + std::fmt::Debug + 'static,
418{
419 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_export_task::GetExportTaskError, R>) -> Self {
420 match err {
421 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
422 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
423 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
424 source: err.into(),
425 }),
426 }
427 }
428}
429impl From<crate::operation::get_export_task::GetExportTaskError> for Error {
430 fn from(err: crate::operation::get_export_task::GetExportTaskError) -> Self {
431 match err {
432 crate::operation::get_export_task::GetExportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
433 crate::operation::get_export_task::GetExportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
434 crate::operation::get_export_task::GetExportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
435 crate::operation::get_export_task::GetExportTaskError::ValidationException(inner) => Error::ValidationException(inner),
436 crate::operation::get_export_task::GetExportTaskError::Unhandled(inner) => Error::Unhandled(inner),
437 }
438 }
439}
440impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_graph::GetGraphError, 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_graph::GetGraphError, 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_graph::GetGraphError> for Error {
455 fn from(err: crate::operation::get_graph::GetGraphError) -> Self {
456 match err {
457 crate::operation::get_graph::GetGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
458 crate::operation::get_graph::GetGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
459 crate::operation::get_graph::GetGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
460 crate::operation::get_graph::GetGraphError::ValidationException(inner) => Error::ValidationException(inner),
461 crate::operation::get_graph::GetGraphError::Unhandled(inner) => Error::Unhandled(inner),
462 }
463 }
464}
465impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_graph_snapshot::GetGraphSnapshotError, R>> for Error
466where
467 R: Send + Sync + std::fmt::Debug + 'static,
468{
469 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_graph_snapshot::GetGraphSnapshotError, R>) -> Self {
470 match err {
471 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
472 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
473 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
474 source: err.into(),
475 }),
476 }
477 }
478}
479impl From<crate::operation::get_graph_snapshot::GetGraphSnapshotError> for Error {
480 fn from(err: crate::operation::get_graph_snapshot::GetGraphSnapshotError) -> Self {
481 match err {
482 crate::operation::get_graph_snapshot::GetGraphSnapshotError::InternalServerException(inner) => Error::InternalServerException(inner),
483 crate::operation::get_graph_snapshot::GetGraphSnapshotError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
484 crate::operation::get_graph_snapshot::GetGraphSnapshotError::ThrottlingException(inner) => Error::ThrottlingException(inner),
485 crate::operation::get_graph_snapshot::GetGraphSnapshotError::ValidationException(inner) => Error::ValidationException(inner),
486 crate::operation::get_graph_snapshot::GetGraphSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
487 }
488 }
489}
490impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_graph_summary::GetGraphSummaryError, R>> for Error
491where
492 R: Send + Sync + std::fmt::Debug + 'static,
493{
494 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_graph_summary::GetGraphSummaryError, R>) -> Self {
495 match err {
496 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
497 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
498 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
499 source: err.into(),
500 }),
501 }
502 }
503}
504impl From<crate::operation::get_graph_summary::GetGraphSummaryError> for Error {
505 fn from(err: crate::operation::get_graph_summary::GetGraphSummaryError) -> Self {
506 match err {
507 crate::operation::get_graph_summary::GetGraphSummaryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
508 crate::operation::get_graph_summary::GetGraphSummaryError::InternalServerException(inner) => Error::InternalServerException(inner),
509 crate::operation::get_graph_summary::GetGraphSummaryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
510 crate::operation::get_graph_summary::GetGraphSummaryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
511 crate::operation::get_graph_summary::GetGraphSummaryError::ValidationException(inner) => Error::ValidationException(inner),
512 crate::operation::get_graph_summary::GetGraphSummaryError::Unhandled(inner) => Error::Unhandled(inner),
513 }
514 }
515}
516impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_import_task::GetImportTaskError, R>> for Error
517where
518 R: Send + Sync + std::fmt::Debug + 'static,
519{
520 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_import_task::GetImportTaskError, R>) -> Self {
521 match err {
522 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
523 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
524 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
525 source: err.into(),
526 }),
527 }
528 }
529}
530impl From<crate::operation::get_import_task::GetImportTaskError> for Error {
531 fn from(err: crate::operation::get_import_task::GetImportTaskError) -> Self {
532 match err {
533 crate::operation::get_import_task::GetImportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
534 crate::operation::get_import_task::GetImportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
535 crate::operation::get_import_task::GetImportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
536 crate::operation::get_import_task::GetImportTaskError::ValidationException(inner) => Error::ValidationException(inner),
537 crate::operation::get_import_task::GetImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
538 }
539 }
540}
541impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError, R>>
542 for Error
543where
544 R: Send + Sync + std::fmt::Debug + 'static,
545{
546 fn from(
547 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError, R>,
548 ) -> Self {
549 match err {
550 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
551 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
552 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
553 source: err.into(),
554 }),
555 }
556 }
557}
558impl From<crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError> for Error {
559 fn from(err: crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError) -> Self {
560 match err {
561 crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError::InternalServerException(inner) => {
562 Error::InternalServerException(inner)
563 }
564 crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError::ResourceNotFoundException(inner) => {
565 Error::ResourceNotFoundException(inner)
566 }
567 crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError::ThrottlingException(inner) => {
568 Error::ThrottlingException(inner)
569 }
570 crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError::ValidationException(inner) => {
571 Error::ValidationException(inner)
572 }
573 crate::operation::get_private_graph_endpoint::GetPrivateGraphEndpointError::Unhandled(inner) => Error::Unhandled(inner),
574 }
575 }
576}
577impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query::GetQueryError, R>> for Error
578where
579 R: Send + Sync + std::fmt::Debug + 'static,
580{
581 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_query::GetQueryError, R>) -> Self {
582 match err {
583 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
584 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
585 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
586 source: err.into(),
587 }),
588 }
589 }
590}
591impl From<crate::operation::get_query::GetQueryError> for Error {
592 fn from(err: crate::operation::get_query::GetQueryError) -> Self {
593 match err {
594 crate::operation::get_query::GetQueryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
595 crate::operation::get_query::GetQueryError::InternalServerException(inner) => Error::InternalServerException(inner),
596 crate::operation::get_query::GetQueryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
597 crate::operation::get_query::GetQueryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
598 crate::operation::get_query::GetQueryError::ValidationException(inner) => Error::ValidationException(inner),
599 crate::operation::get_query::GetQueryError::Unhandled(inner) => Error::Unhandled(inner),
600 }
601 }
602}
603impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_export_tasks::ListExportTasksError, R>> for Error
604where
605 R: Send + Sync + std::fmt::Debug + 'static,
606{
607 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_export_tasks::ListExportTasksError, R>) -> Self {
608 match err {
609 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
610 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
611 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
612 source: err.into(),
613 }),
614 }
615 }
616}
617impl From<crate::operation::list_export_tasks::ListExportTasksError> for Error {
618 fn from(err: crate::operation::list_export_tasks::ListExportTasksError) -> Self {
619 match err {
620 crate::operation::list_export_tasks::ListExportTasksError::InternalServerException(inner) => Error::InternalServerException(inner),
621 crate::operation::list_export_tasks::ListExportTasksError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
622 crate::operation::list_export_tasks::ListExportTasksError::ThrottlingException(inner) => Error::ThrottlingException(inner),
623 crate::operation::list_export_tasks::ListExportTasksError::ValidationException(inner) => Error::ValidationException(inner),
624 crate::operation::list_export_tasks::ListExportTasksError::Unhandled(inner) => Error::Unhandled(inner),
625 }
626 }
627}
628impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_graphs::ListGraphsError, R>> for Error
629where
630 R: Send + Sync + std::fmt::Debug + 'static,
631{
632 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_graphs::ListGraphsError, R>) -> Self {
633 match err {
634 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
635 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
636 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
637 source: err.into(),
638 }),
639 }
640 }
641}
642impl From<crate::operation::list_graphs::ListGraphsError> for Error {
643 fn from(err: crate::operation::list_graphs::ListGraphsError) -> Self {
644 match err {
645 crate::operation::list_graphs::ListGraphsError::InternalServerException(inner) => Error::InternalServerException(inner),
646 crate::operation::list_graphs::ListGraphsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
647 crate::operation::list_graphs::ListGraphsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
648 crate::operation::list_graphs::ListGraphsError::Unhandled(inner) => Error::Unhandled(inner),
649 }
650 }
651}
652impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_graph_snapshots::ListGraphSnapshotsError, R>> for Error
653where
654 R: Send + Sync + std::fmt::Debug + 'static,
655{
656 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_graph_snapshots::ListGraphSnapshotsError, R>) -> Self {
657 match err {
658 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
659 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
660 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
661 source: err.into(),
662 }),
663 }
664 }
665}
666impl From<crate::operation::list_graph_snapshots::ListGraphSnapshotsError> for Error {
667 fn from(err: crate::operation::list_graph_snapshots::ListGraphSnapshotsError) -> Self {
668 match err {
669 crate::operation::list_graph_snapshots::ListGraphSnapshotsError::InternalServerException(inner) => Error::InternalServerException(inner),
670 crate::operation::list_graph_snapshots::ListGraphSnapshotsError::ResourceNotFoundException(inner) => {
671 Error::ResourceNotFoundException(inner)
672 }
673 crate::operation::list_graph_snapshots::ListGraphSnapshotsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
674 crate::operation::list_graph_snapshots::ListGraphSnapshotsError::ValidationException(inner) => Error::ValidationException(inner),
675 crate::operation::list_graph_snapshots::ListGraphSnapshotsError::Unhandled(inner) => Error::Unhandled(inner),
676 }
677 }
678}
679impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_import_tasks::ListImportTasksError, R>> for Error
680where
681 R: Send + Sync + std::fmt::Debug + 'static,
682{
683 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_import_tasks::ListImportTasksError, R>) -> Self {
684 match err {
685 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
686 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
687 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
688 source: err.into(),
689 }),
690 }
691 }
692}
693impl From<crate::operation::list_import_tasks::ListImportTasksError> for Error {
694 fn from(err: crate::operation::list_import_tasks::ListImportTasksError) -> Self {
695 match err {
696 crate::operation::list_import_tasks::ListImportTasksError::InternalServerException(inner) => Error::InternalServerException(inner),
697 crate::operation::list_import_tasks::ListImportTasksError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
698 crate::operation::list_import_tasks::ListImportTasksError::ThrottlingException(inner) => Error::ThrottlingException(inner),
699 crate::operation::list_import_tasks::ListImportTasksError::ValidationException(inner) => Error::ValidationException(inner),
700 crate::operation::list_import_tasks::ListImportTasksError::Unhandled(inner) => Error::Unhandled(inner),
701 }
702 }
703}
704impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError, R>>
705 for Error
706where
707 R: Send + Sync + std::fmt::Debug + 'static,
708{
709 fn from(
710 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError, R>,
711 ) -> Self {
712 match err {
713 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
714 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
715 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
716 source: err.into(),
717 }),
718 }
719 }
720}
721impl From<crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError> for Error {
722 fn from(err: crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError) -> Self {
723 match err {
724 crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError::InternalServerException(inner) => {
725 Error::InternalServerException(inner)
726 }
727 crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError::ResourceNotFoundException(inner) => {
728 Error::ResourceNotFoundException(inner)
729 }
730 crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError::ThrottlingException(inner) => {
731 Error::ThrottlingException(inner)
732 }
733 crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError::ValidationException(inner) => {
734 Error::ValidationException(inner)
735 }
736 crate::operation::list_private_graph_endpoints::ListPrivateGraphEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
737 }
738 }
739}
740impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_queries::ListQueriesError, R>> for Error
741where
742 R: Send + Sync + std::fmt::Debug + 'static,
743{
744 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_queries::ListQueriesError, R>) -> Self {
745 match err {
746 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
747 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
748 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
749 source: err.into(),
750 }),
751 }
752 }
753}
754impl From<crate::operation::list_queries::ListQueriesError> for Error {
755 fn from(err: crate::operation::list_queries::ListQueriesError) -> Self {
756 match err {
757 crate::operation::list_queries::ListQueriesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
758 crate::operation::list_queries::ListQueriesError::InternalServerException(inner) => Error::InternalServerException(inner),
759 crate::operation::list_queries::ListQueriesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
760 crate::operation::list_queries::ListQueriesError::ValidationException(inner) => Error::ValidationException(inner),
761 crate::operation::list_queries::ListQueriesError::Unhandled(inner) => Error::Unhandled(inner),
762 }
763 }
764}
765impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
766where
767 R: Send + Sync + std::fmt::Debug + 'static,
768{
769 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
770 match err {
771 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
772 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
773 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
774 source: err.into(),
775 }),
776 }
777 }
778}
779impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
780 fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
781 match err {
782 crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
783 Error::InternalServerException(inner)
784 }
785 crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
786 Error::ResourceNotFoundException(inner)
787 }
788 crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
789 crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
790 crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
791 }
792 }
793}
794impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reset_graph::ResetGraphError, R>> for Error
795where
796 R: Send + Sync + std::fmt::Debug + 'static,
797{
798 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reset_graph::ResetGraphError, R>) -> Self {
799 match err {
800 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
801 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
802 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
803 source: err.into(),
804 }),
805 }
806 }
807}
808impl From<crate::operation::reset_graph::ResetGraphError> for Error {
809 fn from(err: crate::operation::reset_graph::ResetGraphError) -> Self {
810 match err {
811 crate::operation::reset_graph::ResetGraphError::ConflictException(inner) => Error::ConflictException(inner),
812 crate::operation::reset_graph::ResetGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
813 crate::operation::reset_graph::ResetGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
814 crate::operation::reset_graph::ResetGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
815 crate::operation::reset_graph::ResetGraphError::ValidationException(inner) => Error::ValidationException(inner),
816 crate::operation::reset_graph::ResetGraphError::Unhandled(inner) => Error::Unhandled(inner),
817 }
818 }
819}
820impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError, R>>
821 for Error
822where
823 R: Send + Sync + std::fmt::Debug + 'static,
824{
825 fn from(
826 err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError, R>,
827 ) -> Self {
828 match err {
829 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
830 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
831 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
832 source: err.into(),
833 }),
834 }
835 }
836}
837impl From<crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError> for Error {
838 fn from(err: crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError) -> Self {
839 match err {
840 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::ConflictException(inner) => Error::ConflictException(inner),
841 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::InternalServerException(inner) => {
842 Error::InternalServerException(inner)
843 }
844 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::ResourceNotFoundException(inner) => {
845 Error::ResourceNotFoundException(inner)
846 }
847 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::ServiceQuotaExceededException(inner) => {
848 Error::ServiceQuotaExceededException(inner)
849 }
850 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::ThrottlingException(inner) => {
851 Error::ThrottlingException(inner)
852 }
853 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::ValidationException(inner) => {
854 Error::ValidationException(inner)
855 }
856 crate::operation::restore_graph_from_snapshot::RestoreGraphFromSnapshotError::Unhandled(inner) => Error::Unhandled(inner),
857 }
858 }
859}
860impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_export_task::StartExportTaskError, R>> for Error
861where
862 R: Send + Sync + std::fmt::Debug + 'static,
863{
864 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_export_task::StartExportTaskError, R>) -> Self {
865 match err {
866 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
867 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
868 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
869 source: err.into(),
870 }),
871 }
872 }
873}
874impl From<crate::operation::start_export_task::StartExportTaskError> for Error {
875 fn from(err: crate::operation::start_export_task::StartExportTaskError) -> Self {
876 match err {
877 crate::operation::start_export_task::StartExportTaskError::ConflictException(inner) => Error::ConflictException(inner),
878 crate::operation::start_export_task::StartExportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
879 crate::operation::start_export_task::StartExportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
880 crate::operation::start_export_task::StartExportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
881 crate::operation::start_export_task::StartExportTaskError::ValidationException(inner) => Error::ValidationException(inner),
882 crate::operation::start_export_task::StartExportTaskError::Unhandled(inner) => Error::Unhandled(inner),
883 }
884 }
885}
886impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_graph::StartGraphError, R>> for Error
887where
888 R: Send + Sync + std::fmt::Debug + 'static,
889{
890 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_graph::StartGraphError, R>) -> Self {
891 match err {
892 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
893 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
894 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
895 source: err.into(),
896 }),
897 }
898 }
899}
900impl From<crate::operation::start_graph::StartGraphError> for Error {
901 fn from(err: crate::operation::start_graph::StartGraphError) -> Self {
902 match err {
903 crate::operation::start_graph::StartGraphError::ConflictException(inner) => Error::ConflictException(inner),
904 crate::operation::start_graph::StartGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
905 crate::operation::start_graph::StartGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
906 crate::operation::start_graph::StartGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
907 crate::operation::start_graph::StartGraphError::ValidationException(inner) => Error::ValidationException(inner),
908 crate::operation::start_graph::StartGraphError::Unhandled(inner) => Error::Unhandled(inner),
909 }
910 }
911}
912impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_import_task::StartImportTaskError, R>> for Error
913where
914 R: Send + Sync + std::fmt::Debug + 'static,
915{
916 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_import_task::StartImportTaskError, R>) -> Self {
917 match err {
918 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
919 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
920 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
921 source: err.into(),
922 }),
923 }
924 }
925}
926impl From<crate::operation::start_import_task::StartImportTaskError> for Error {
927 fn from(err: crate::operation::start_import_task::StartImportTaskError) -> Self {
928 match err {
929 crate::operation::start_import_task::StartImportTaskError::ConflictException(inner) => Error::ConflictException(inner),
930 crate::operation::start_import_task::StartImportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
931 crate::operation::start_import_task::StartImportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
932 crate::operation::start_import_task::StartImportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
933 crate::operation::start_import_task::StartImportTaskError::ValidationException(inner) => Error::ValidationException(inner),
934 crate::operation::start_import_task::StartImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
935 }
936 }
937}
938impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_graph::StopGraphError, R>> for Error
939where
940 R: Send + Sync + std::fmt::Debug + 'static,
941{
942 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_graph::StopGraphError, R>) -> Self {
943 match err {
944 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
945 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
946 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
947 source: err.into(),
948 }),
949 }
950 }
951}
952impl From<crate::operation::stop_graph::StopGraphError> for Error {
953 fn from(err: crate::operation::stop_graph::StopGraphError) -> Self {
954 match err {
955 crate::operation::stop_graph::StopGraphError::ConflictException(inner) => Error::ConflictException(inner),
956 crate::operation::stop_graph::StopGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
957 crate::operation::stop_graph::StopGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
958 crate::operation::stop_graph::StopGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
959 crate::operation::stop_graph::StopGraphError::ValidationException(inner) => Error::ValidationException(inner),
960 crate::operation::stop_graph::StopGraphError::Unhandled(inner) => Error::Unhandled(inner),
961 }
962 }
963}
964impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
965where
966 R: Send + Sync + std::fmt::Debug + 'static,
967{
968 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
969 match err {
970 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
971 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
972 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
973 source: err.into(),
974 }),
975 }
976 }
977}
978impl From<crate::operation::tag_resource::TagResourceError> for Error {
979 fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
980 match err {
981 crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
982 crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
983 crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
984 crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
985 crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
986 }
987 }
988}
989impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
990where
991 R: Send + Sync + std::fmt::Debug + 'static,
992{
993 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
994 match err {
995 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
996 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
997 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
998 source: err.into(),
999 }),
1000 }
1001 }
1002}
1003impl From<crate::operation::untag_resource::UntagResourceError> for Error {
1004 fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
1005 match err {
1006 crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
1007 crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1008 crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1009 crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => Error::ValidationException(inner),
1010 crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
1011 }
1012 }
1013}
1014impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_graph::UpdateGraphError, R>> for Error
1015where
1016 R: Send + Sync + std::fmt::Debug + 'static,
1017{
1018 fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_graph::UpdateGraphError, R>) -> Self {
1019 match err {
1020 ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
1021 _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1022 meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
1023 source: err.into(),
1024 }),
1025 }
1026 }
1027}
1028impl From<crate::operation::update_graph::UpdateGraphError> for Error {
1029 fn from(err: crate::operation::update_graph::UpdateGraphError) -> Self {
1030 match err {
1031 crate::operation::update_graph::UpdateGraphError::ConflictException(inner) => Error::ConflictException(inner),
1032 crate::operation::update_graph::UpdateGraphError::InternalServerException(inner) => Error::InternalServerException(inner),
1033 crate::operation::update_graph::UpdateGraphError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
1034 crate::operation::update_graph::UpdateGraphError::ThrottlingException(inner) => Error::ThrottlingException(inner),
1035 crate::operation::update_graph::UpdateGraphError::ValidationException(inner) => Error::ValidationException(inner),
1036 crate::operation::update_graph::UpdateGraphError::Unhandled(inner) => Error::Unhandled(inner),
1037 }
1038 }
1039}
1040impl<O, E> ::std::convert::From<::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>> for Error
1041where
1042 O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
1043 E: ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static,
1044{
1045 fn from(err: ::aws_smithy_runtime_api::client::waiters::error::WaiterError<O, E>) -> Self {
1046 Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
1047 meta: ::std::default::Default::default(),
1048 source: err.into(),
1049 })
1050 }
1051}
1052impl ::std::error::Error for Error {
1053 fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
1054 match self {
1055 Error::AccessDeniedException(inner) => inner.source(),
1056 Error::ConflictException(inner) => inner.source(),
1057 Error::InternalServerException(inner) => inner.source(),
1058 Error::ResourceNotFoundException(inner) => inner.source(),
1059 Error::ServiceQuotaExceededException(inner) => inner.source(),
1060 Error::ThrottlingException(inner) => inner.source(),
1061 Error::UnprocessableException(inner) => inner.source(),
1062 Error::ValidationException(inner) => inner.source(),
1063 Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
1064 }
1065 }
1066}
1067impl ::aws_types::request_id::RequestId for Error {
1068 fn request_id(&self) -> Option<&str> {
1069 match self {
1070 Self::AccessDeniedException(e) => e.request_id(),
1071 Self::ConflictException(e) => e.request_id(),
1072 Self::InternalServerException(e) => e.request_id(),
1073 Self::ResourceNotFoundException(e) => e.request_id(),
1074 Self::ServiceQuotaExceededException(e) => e.request_id(),
1075 Self::ThrottlingException(e) => e.request_id(),
1076 Self::UnprocessableException(e) => e.request_id(),
1077 Self::ValidationException(e) => e.request_id(),
1078 Self::Unhandled(e) => e.meta.request_id(),
1079 }
1080 }
1081}