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