1#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct CompleteGroupAvatarUploadError {
6 pub kind: CompleteGroupAvatarUploadErrorKind,
8 pub(crate) meta: aws_smithy_types::Error,
10}
11#[non_exhaustive]
13#[derive(std::fmt::Debug)]
14pub enum CompleteGroupAvatarUploadErrorKind {
15 InternalError(crate::error::InternalError),
17 RateLimitError(crate::error::RateLimitError),
19 ForbiddenError(crate::error::ForbiddenError),
21 UnauthorizedError(crate::error::UnauthorizedError),
23 NotFoundError(crate::error::NotFoundError),
25 BadRequestError(crate::error::BadRequestError),
27 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
29}
30impl std::fmt::Display for CompleteGroupAvatarUploadError {
31 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32 match &self.kind {
33 CompleteGroupAvatarUploadErrorKind::InternalError(_inner) => _inner.fmt(f),
34 CompleteGroupAvatarUploadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
35 CompleteGroupAvatarUploadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
36 CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
37 CompleteGroupAvatarUploadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
38 CompleteGroupAvatarUploadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
39 CompleteGroupAvatarUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
40 }
41 }
42}
43impl aws_smithy_types::retry::ProvideErrorKind for CompleteGroupAvatarUploadError {
44 fn code(&self) -> Option<&str> {
45 CompleteGroupAvatarUploadError::code(self)
46 }
47 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
48 match &self.kind {
49 CompleteGroupAvatarUploadErrorKind::InternalError(inner) => {
50 Some(inner.retryable_error_kind())
51 }
52 CompleteGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
53 Some(inner.retryable_error_kind())
54 }
55 _ => None,
56 }
57 }
58}
59impl CompleteGroupAvatarUploadError {
60 pub fn new(kind: CompleteGroupAvatarUploadErrorKind, meta: aws_smithy_types::Error) -> Self {
62 Self { kind, meta }
63 }
64
65 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
67 Self {
68 kind: CompleteGroupAvatarUploadErrorKind::Unhandled(err.into()),
69 meta: Default::default(),
70 }
71 }
72
73 pub fn generic(err: aws_smithy_types::Error) -> Self {
75 Self {
76 meta: err.clone(),
77 kind: CompleteGroupAvatarUploadErrorKind::Unhandled(err.into()),
78 }
79 }
80
81 pub fn message(&self) -> Option<&str> {
83 self.meta.message()
84 }
85
86 pub fn meta(&self) -> &aws_smithy_types::Error {
89 &self.meta
90 }
91
92 pub fn request_id(&self) -> Option<&str> {
94 self.meta.request_id()
95 }
96
97 pub fn code(&self) -> Option<&str> {
99 self.meta.code()
100 }
101 pub fn is_internal_error(&self) -> bool {
103 matches!(
104 &self.kind,
105 CompleteGroupAvatarUploadErrorKind::InternalError(_)
106 )
107 }
108 pub fn is_rate_limit_error(&self) -> bool {
110 matches!(
111 &self.kind,
112 CompleteGroupAvatarUploadErrorKind::RateLimitError(_)
113 )
114 }
115 pub fn is_forbidden_error(&self) -> bool {
117 matches!(
118 &self.kind,
119 CompleteGroupAvatarUploadErrorKind::ForbiddenError(_)
120 )
121 }
122 pub fn is_unauthorized_error(&self) -> bool {
124 matches!(
125 &self.kind,
126 CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_)
127 )
128 }
129 pub fn is_not_found_error(&self) -> bool {
131 matches!(
132 &self.kind,
133 CompleteGroupAvatarUploadErrorKind::NotFoundError(_)
134 )
135 }
136 pub fn is_bad_request_error(&self) -> bool {
138 matches!(
139 &self.kind,
140 CompleteGroupAvatarUploadErrorKind::BadRequestError(_)
141 )
142 }
143}
144impl std::error::Error for CompleteGroupAvatarUploadError {
145 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
146 match &self.kind {
147 CompleteGroupAvatarUploadErrorKind::InternalError(_inner) => Some(_inner),
148 CompleteGroupAvatarUploadErrorKind::RateLimitError(_inner) => Some(_inner),
149 CompleteGroupAvatarUploadErrorKind::ForbiddenError(_inner) => Some(_inner),
150 CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => Some(_inner),
151 CompleteGroupAvatarUploadErrorKind::NotFoundError(_inner) => Some(_inner),
152 CompleteGroupAvatarUploadErrorKind::BadRequestError(_inner) => Some(_inner),
153 CompleteGroupAvatarUploadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
154 }
155 }
156}
157
158#[non_exhaustive]
160#[derive(std::fmt::Debug)]
161pub struct ConsumeGroupInviteError {
162 pub kind: ConsumeGroupInviteErrorKind,
164 pub(crate) meta: aws_smithy_types::Error,
166}
167#[non_exhaustive]
169#[derive(std::fmt::Debug)]
170pub enum ConsumeGroupInviteErrorKind {
171 InternalError(crate::error::InternalError),
173 RateLimitError(crate::error::RateLimitError),
175 ForbiddenError(crate::error::ForbiddenError),
177 UnauthorizedError(crate::error::UnauthorizedError),
179 NotFoundError(crate::error::NotFoundError),
181 BadRequestError(crate::error::BadRequestError),
183 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
185}
186impl std::fmt::Display for ConsumeGroupInviteError {
187 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
188 match &self.kind {
189 ConsumeGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
190 ConsumeGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
191 ConsumeGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
192 ConsumeGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
193 ConsumeGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
194 ConsumeGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
195 ConsumeGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
196 }
197 }
198}
199impl aws_smithy_types::retry::ProvideErrorKind for ConsumeGroupInviteError {
200 fn code(&self) -> Option<&str> {
201 ConsumeGroupInviteError::code(self)
202 }
203 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
204 match &self.kind {
205 ConsumeGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
206 ConsumeGroupInviteErrorKind::UnauthorizedError(inner) => {
207 Some(inner.retryable_error_kind())
208 }
209 _ => None,
210 }
211 }
212}
213impl ConsumeGroupInviteError {
214 pub fn new(kind: ConsumeGroupInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
216 Self { kind, meta }
217 }
218
219 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
221 Self {
222 kind: ConsumeGroupInviteErrorKind::Unhandled(err.into()),
223 meta: Default::default(),
224 }
225 }
226
227 pub fn generic(err: aws_smithy_types::Error) -> Self {
229 Self {
230 meta: err.clone(),
231 kind: ConsumeGroupInviteErrorKind::Unhandled(err.into()),
232 }
233 }
234
235 pub fn message(&self) -> Option<&str> {
237 self.meta.message()
238 }
239
240 pub fn meta(&self) -> &aws_smithy_types::Error {
243 &self.meta
244 }
245
246 pub fn request_id(&self) -> Option<&str> {
248 self.meta.request_id()
249 }
250
251 pub fn code(&self) -> Option<&str> {
253 self.meta.code()
254 }
255 pub fn is_internal_error(&self) -> bool {
257 matches!(&self.kind, ConsumeGroupInviteErrorKind::InternalError(_))
258 }
259 pub fn is_rate_limit_error(&self) -> bool {
261 matches!(&self.kind, ConsumeGroupInviteErrorKind::RateLimitError(_))
262 }
263 pub fn is_forbidden_error(&self) -> bool {
265 matches!(&self.kind, ConsumeGroupInviteErrorKind::ForbiddenError(_))
266 }
267 pub fn is_unauthorized_error(&self) -> bool {
269 matches!(
270 &self.kind,
271 ConsumeGroupInviteErrorKind::UnauthorizedError(_)
272 )
273 }
274 pub fn is_not_found_error(&self) -> bool {
276 matches!(&self.kind, ConsumeGroupInviteErrorKind::NotFoundError(_))
277 }
278 pub fn is_bad_request_error(&self) -> bool {
280 matches!(&self.kind, ConsumeGroupInviteErrorKind::BadRequestError(_))
281 }
282}
283impl std::error::Error for ConsumeGroupInviteError {
284 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
285 match &self.kind {
286 ConsumeGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
287 ConsumeGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
288 ConsumeGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
289 ConsumeGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
290 ConsumeGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
291 ConsumeGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
292 ConsumeGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
293 }
294 }
295}
296
297#[non_exhaustive]
299#[derive(std::fmt::Debug)]
300pub struct CreateGroupError {
301 pub kind: CreateGroupErrorKind,
303 pub(crate) meta: aws_smithy_types::Error,
305}
306#[non_exhaustive]
308#[derive(std::fmt::Debug)]
309pub enum CreateGroupErrorKind {
310 InternalError(crate::error::InternalError),
312 RateLimitError(crate::error::RateLimitError),
314 ForbiddenError(crate::error::ForbiddenError),
316 UnauthorizedError(crate::error::UnauthorizedError),
318 NotFoundError(crate::error::NotFoundError),
320 BadRequestError(crate::error::BadRequestError),
322 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
324}
325impl std::fmt::Display for CreateGroupError {
326 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
327 match &self.kind {
328 CreateGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
329 CreateGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
330 CreateGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
331 CreateGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
332 CreateGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
333 CreateGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
334 CreateGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
335 }
336 }
337}
338impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupError {
339 fn code(&self) -> Option<&str> {
340 CreateGroupError::code(self)
341 }
342 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
343 match &self.kind {
344 CreateGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
345 CreateGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
346 _ => None,
347 }
348 }
349}
350impl CreateGroupError {
351 pub fn new(kind: CreateGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
353 Self { kind, meta }
354 }
355
356 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
358 Self {
359 kind: CreateGroupErrorKind::Unhandled(err.into()),
360 meta: Default::default(),
361 }
362 }
363
364 pub fn generic(err: aws_smithy_types::Error) -> Self {
366 Self {
367 meta: err.clone(),
368 kind: CreateGroupErrorKind::Unhandled(err.into()),
369 }
370 }
371
372 pub fn message(&self) -> Option<&str> {
374 self.meta.message()
375 }
376
377 pub fn meta(&self) -> &aws_smithy_types::Error {
380 &self.meta
381 }
382
383 pub fn request_id(&self) -> Option<&str> {
385 self.meta.request_id()
386 }
387
388 pub fn code(&self) -> Option<&str> {
390 self.meta.code()
391 }
392 pub fn is_internal_error(&self) -> bool {
394 matches!(&self.kind, CreateGroupErrorKind::InternalError(_))
395 }
396 pub fn is_rate_limit_error(&self) -> bool {
398 matches!(&self.kind, CreateGroupErrorKind::RateLimitError(_))
399 }
400 pub fn is_forbidden_error(&self) -> bool {
402 matches!(&self.kind, CreateGroupErrorKind::ForbiddenError(_))
403 }
404 pub fn is_unauthorized_error(&self) -> bool {
406 matches!(&self.kind, CreateGroupErrorKind::UnauthorizedError(_))
407 }
408 pub fn is_not_found_error(&self) -> bool {
410 matches!(&self.kind, CreateGroupErrorKind::NotFoundError(_))
411 }
412 pub fn is_bad_request_error(&self) -> bool {
414 matches!(&self.kind, CreateGroupErrorKind::BadRequestError(_))
415 }
416}
417impl std::error::Error for CreateGroupError {
418 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
419 match &self.kind {
420 CreateGroupErrorKind::InternalError(_inner) => Some(_inner),
421 CreateGroupErrorKind::RateLimitError(_inner) => Some(_inner),
422 CreateGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
423 CreateGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
424 CreateGroupErrorKind::NotFoundError(_inner) => Some(_inner),
425 CreateGroupErrorKind::BadRequestError(_inner) => Some(_inner),
426 CreateGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
427 }
428 }
429}
430
431#[non_exhaustive]
433#[derive(std::fmt::Debug)]
434pub struct CreateGroupInviteError {
435 pub kind: CreateGroupInviteErrorKind,
437 pub(crate) meta: aws_smithy_types::Error,
439}
440#[non_exhaustive]
442#[derive(std::fmt::Debug)]
443pub enum CreateGroupInviteErrorKind {
444 InternalError(crate::error::InternalError),
446 RateLimitError(crate::error::RateLimitError),
448 ForbiddenError(crate::error::ForbiddenError),
450 UnauthorizedError(crate::error::UnauthorizedError),
452 NotFoundError(crate::error::NotFoundError),
454 BadRequestError(crate::error::BadRequestError),
456 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
458}
459impl std::fmt::Display for CreateGroupInviteError {
460 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
461 match &self.kind {
462 CreateGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
463 CreateGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
464 CreateGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
465 CreateGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
466 CreateGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
467 CreateGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
468 CreateGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
469 }
470 }
471}
472impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupInviteError {
473 fn code(&self) -> Option<&str> {
474 CreateGroupInviteError::code(self)
475 }
476 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
477 match &self.kind {
478 CreateGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
479 CreateGroupInviteErrorKind::UnauthorizedError(inner) => {
480 Some(inner.retryable_error_kind())
481 }
482 _ => None,
483 }
484 }
485}
486impl CreateGroupInviteError {
487 pub fn new(kind: CreateGroupInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
489 Self { kind, meta }
490 }
491
492 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
494 Self {
495 kind: CreateGroupInviteErrorKind::Unhandled(err.into()),
496 meta: Default::default(),
497 }
498 }
499
500 pub fn generic(err: aws_smithy_types::Error) -> Self {
502 Self {
503 meta: err.clone(),
504 kind: CreateGroupInviteErrorKind::Unhandled(err.into()),
505 }
506 }
507
508 pub fn message(&self) -> Option<&str> {
510 self.meta.message()
511 }
512
513 pub fn meta(&self) -> &aws_smithy_types::Error {
516 &self.meta
517 }
518
519 pub fn request_id(&self) -> Option<&str> {
521 self.meta.request_id()
522 }
523
524 pub fn code(&self) -> Option<&str> {
526 self.meta.code()
527 }
528 pub fn is_internal_error(&self) -> bool {
530 matches!(&self.kind, CreateGroupInviteErrorKind::InternalError(_))
531 }
532 pub fn is_rate_limit_error(&self) -> bool {
534 matches!(&self.kind, CreateGroupInviteErrorKind::RateLimitError(_))
535 }
536 pub fn is_forbidden_error(&self) -> bool {
538 matches!(&self.kind, CreateGroupInviteErrorKind::ForbiddenError(_))
539 }
540 pub fn is_unauthorized_error(&self) -> bool {
542 matches!(&self.kind, CreateGroupInviteErrorKind::UnauthorizedError(_))
543 }
544 pub fn is_not_found_error(&self) -> bool {
546 matches!(&self.kind, CreateGroupInviteErrorKind::NotFoundError(_))
547 }
548 pub fn is_bad_request_error(&self) -> bool {
550 matches!(&self.kind, CreateGroupInviteErrorKind::BadRequestError(_))
551 }
552}
553impl std::error::Error for CreateGroupInviteError {
554 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
555 match &self.kind {
556 CreateGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
557 CreateGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
558 CreateGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
559 CreateGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
560 CreateGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
561 CreateGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
562 CreateGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
563 }
564 }
565}
566
567#[non_exhaustive]
569#[derive(std::fmt::Debug)]
570pub struct CreateGroupJoinRequestError {
571 pub kind: CreateGroupJoinRequestErrorKind,
573 pub(crate) meta: aws_smithy_types::Error,
575}
576#[non_exhaustive]
578#[derive(std::fmt::Debug)]
579pub enum CreateGroupJoinRequestErrorKind {
580 InternalError(crate::error::InternalError),
582 RateLimitError(crate::error::RateLimitError),
584 ForbiddenError(crate::error::ForbiddenError),
586 UnauthorizedError(crate::error::UnauthorizedError),
588 NotFoundError(crate::error::NotFoundError),
590 BadRequestError(crate::error::BadRequestError),
592 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
594}
595impl std::fmt::Display for CreateGroupJoinRequestError {
596 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
597 match &self.kind {
598 CreateGroupJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
599 CreateGroupJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
600 CreateGroupJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
601 CreateGroupJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
602 CreateGroupJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
603 CreateGroupJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
604 CreateGroupJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
605 }
606 }
607}
608impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupJoinRequestError {
609 fn code(&self) -> Option<&str> {
610 CreateGroupJoinRequestError::code(self)
611 }
612 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
613 match &self.kind {
614 CreateGroupJoinRequestErrorKind::InternalError(inner) => {
615 Some(inner.retryable_error_kind())
616 }
617 CreateGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
618 Some(inner.retryable_error_kind())
619 }
620 _ => None,
621 }
622 }
623}
624impl CreateGroupJoinRequestError {
625 pub fn new(kind: CreateGroupJoinRequestErrorKind, meta: aws_smithy_types::Error) -> Self {
627 Self { kind, meta }
628 }
629
630 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
632 Self {
633 kind: CreateGroupJoinRequestErrorKind::Unhandled(err.into()),
634 meta: Default::default(),
635 }
636 }
637
638 pub fn generic(err: aws_smithy_types::Error) -> Self {
640 Self {
641 meta: err.clone(),
642 kind: CreateGroupJoinRequestErrorKind::Unhandled(err.into()),
643 }
644 }
645
646 pub fn message(&self) -> Option<&str> {
648 self.meta.message()
649 }
650
651 pub fn meta(&self) -> &aws_smithy_types::Error {
654 &self.meta
655 }
656
657 pub fn request_id(&self) -> Option<&str> {
659 self.meta.request_id()
660 }
661
662 pub fn code(&self) -> Option<&str> {
664 self.meta.code()
665 }
666 pub fn is_internal_error(&self) -> bool {
668 matches!(
669 &self.kind,
670 CreateGroupJoinRequestErrorKind::InternalError(_)
671 )
672 }
673 pub fn is_rate_limit_error(&self) -> bool {
675 matches!(
676 &self.kind,
677 CreateGroupJoinRequestErrorKind::RateLimitError(_)
678 )
679 }
680 pub fn is_forbidden_error(&self) -> bool {
682 matches!(
683 &self.kind,
684 CreateGroupJoinRequestErrorKind::ForbiddenError(_)
685 )
686 }
687 pub fn is_unauthorized_error(&self) -> bool {
689 matches!(
690 &self.kind,
691 CreateGroupJoinRequestErrorKind::UnauthorizedError(_)
692 )
693 }
694 pub fn is_not_found_error(&self) -> bool {
696 matches!(
697 &self.kind,
698 CreateGroupJoinRequestErrorKind::NotFoundError(_)
699 )
700 }
701 pub fn is_bad_request_error(&self) -> bool {
703 matches!(
704 &self.kind,
705 CreateGroupJoinRequestErrorKind::BadRequestError(_)
706 )
707 }
708}
709impl std::error::Error for CreateGroupJoinRequestError {
710 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
711 match &self.kind {
712 CreateGroupJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
713 CreateGroupJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
714 CreateGroupJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
715 CreateGroupJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
716 CreateGroupJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
717 CreateGroupJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
718 CreateGroupJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
719 }
720 }
721}
722
723#[non_exhaustive]
725#[derive(std::fmt::Debug)]
726pub struct GetGroupInviteError {
727 pub kind: GetGroupInviteErrorKind,
729 pub(crate) meta: aws_smithy_types::Error,
731}
732#[non_exhaustive]
734#[derive(std::fmt::Debug)]
735pub enum GetGroupInviteErrorKind {
736 InternalError(crate::error::InternalError),
738 RateLimitError(crate::error::RateLimitError),
740 ForbiddenError(crate::error::ForbiddenError),
742 UnauthorizedError(crate::error::UnauthorizedError),
744 NotFoundError(crate::error::NotFoundError),
746 BadRequestError(crate::error::BadRequestError),
748 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
750}
751impl std::fmt::Display for GetGroupInviteError {
752 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
753 match &self.kind {
754 GetGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
755 GetGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
756 GetGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
757 GetGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
758 GetGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
759 GetGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
760 GetGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
761 }
762 }
763}
764impl aws_smithy_types::retry::ProvideErrorKind for GetGroupInviteError {
765 fn code(&self) -> Option<&str> {
766 GetGroupInviteError::code(self)
767 }
768 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
769 match &self.kind {
770 GetGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
771 GetGroupInviteErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
772 _ => None,
773 }
774 }
775}
776impl GetGroupInviteError {
777 pub fn new(kind: GetGroupInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
779 Self { kind, meta }
780 }
781
782 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
784 Self {
785 kind: GetGroupInviteErrorKind::Unhandled(err.into()),
786 meta: Default::default(),
787 }
788 }
789
790 pub fn generic(err: aws_smithy_types::Error) -> Self {
792 Self {
793 meta: err.clone(),
794 kind: GetGroupInviteErrorKind::Unhandled(err.into()),
795 }
796 }
797
798 pub fn message(&self) -> Option<&str> {
800 self.meta.message()
801 }
802
803 pub fn meta(&self) -> &aws_smithy_types::Error {
806 &self.meta
807 }
808
809 pub fn request_id(&self) -> Option<&str> {
811 self.meta.request_id()
812 }
813
814 pub fn code(&self) -> Option<&str> {
816 self.meta.code()
817 }
818 pub fn is_internal_error(&self) -> bool {
820 matches!(&self.kind, GetGroupInviteErrorKind::InternalError(_))
821 }
822 pub fn is_rate_limit_error(&self) -> bool {
824 matches!(&self.kind, GetGroupInviteErrorKind::RateLimitError(_))
825 }
826 pub fn is_forbidden_error(&self) -> bool {
828 matches!(&self.kind, GetGroupInviteErrorKind::ForbiddenError(_))
829 }
830 pub fn is_unauthorized_error(&self) -> bool {
832 matches!(&self.kind, GetGroupInviteErrorKind::UnauthorizedError(_))
833 }
834 pub fn is_not_found_error(&self) -> bool {
836 matches!(&self.kind, GetGroupInviteErrorKind::NotFoundError(_))
837 }
838 pub fn is_bad_request_error(&self) -> bool {
840 matches!(&self.kind, GetGroupInviteErrorKind::BadRequestError(_))
841 }
842}
843impl std::error::Error for GetGroupInviteError {
844 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
845 match &self.kind {
846 GetGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
847 GetGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
848 GetGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
849 GetGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
850 GetGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
851 GetGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
852 GetGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
853 }
854 }
855}
856
857#[non_exhaustive]
859#[derive(std::fmt::Debug)]
860pub struct GetGroupProfileError {
861 pub kind: GetGroupProfileErrorKind,
863 pub(crate) meta: aws_smithy_types::Error,
865}
866#[non_exhaustive]
868#[derive(std::fmt::Debug)]
869pub enum GetGroupProfileErrorKind {
870 InternalError(crate::error::InternalError),
872 RateLimitError(crate::error::RateLimitError),
874 ForbiddenError(crate::error::ForbiddenError),
876 UnauthorizedError(crate::error::UnauthorizedError),
878 NotFoundError(crate::error::NotFoundError),
880 BadRequestError(crate::error::BadRequestError),
882 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
884}
885impl std::fmt::Display for GetGroupProfileError {
886 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
887 match &self.kind {
888 GetGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
889 GetGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
890 GetGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
891 GetGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
892 GetGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
893 GetGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
894 GetGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
895 }
896 }
897}
898impl aws_smithy_types::retry::ProvideErrorKind for GetGroupProfileError {
899 fn code(&self) -> Option<&str> {
900 GetGroupProfileError::code(self)
901 }
902 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
903 match &self.kind {
904 GetGroupProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
905 GetGroupProfileErrorKind::UnauthorizedError(inner) => {
906 Some(inner.retryable_error_kind())
907 }
908 _ => None,
909 }
910 }
911}
912impl GetGroupProfileError {
913 pub fn new(kind: GetGroupProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
915 Self { kind, meta }
916 }
917
918 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
920 Self {
921 kind: GetGroupProfileErrorKind::Unhandled(err.into()),
922 meta: Default::default(),
923 }
924 }
925
926 pub fn generic(err: aws_smithy_types::Error) -> Self {
928 Self {
929 meta: err.clone(),
930 kind: GetGroupProfileErrorKind::Unhandled(err.into()),
931 }
932 }
933
934 pub fn message(&self) -> Option<&str> {
936 self.meta.message()
937 }
938
939 pub fn meta(&self) -> &aws_smithy_types::Error {
942 &self.meta
943 }
944
945 pub fn request_id(&self) -> Option<&str> {
947 self.meta.request_id()
948 }
949
950 pub fn code(&self) -> Option<&str> {
952 self.meta.code()
953 }
954 pub fn is_internal_error(&self) -> bool {
956 matches!(&self.kind, GetGroupProfileErrorKind::InternalError(_))
957 }
958 pub fn is_rate_limit_error(&self) -> bool {
960 matches!(&self.kind, GetGroupProfileErrorKind::RateLimitError(_))
961 }
962 pub fn is_forbidden_error(&self) -> bool {
964 matches!(&self.kind, GetGroupProfileErrorKind::ForbiddenError(_))
965 }
966 pub fn is_unauthorized_error(&self) -> bool {
968 matches!(&self.kind, GetGroupProfileErrorKind::UnauthorizedError(_))
969 }
970 pub fn is_not_found_error(&self) -> bool {
972 matches!(&self.kind, GetGroupProfileErrorKind::NotFoundError(_))
973 }
974 pub fn is_bad_request_error(&self) -> bool {
976 matches!(&self.kind, GetGroupProfileErrorKind::BadRequestError(_))
977 }
978}
979impl std::error::Error for GetGroupProfileError {
980 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
981 match &self.kind {
982 GetGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
983 GetGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
984 GetGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
985 GetGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
986 GetGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
987 GetGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
988 GetGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
989 }
990 }
991}
992
993#[non_exhaustive]
995#[derive(std::fmt::Debug)]
996pub struct GetGroupSummaryError {
997 pub kind: GetGroupSummaryErrorKind,
999 pub(crate) meta: aws_smithy_types::Error,
1001}
1002#[non_exhaustive]
1004#[derive(std::fmt::Debug)]
1005pub enum GetGroupSummaryErrorKind {
1006 InternalError(crate::error::InternalError),
1008 RateLimitError(crate::error::RateLimitError),
1010 ForbiddenError(crate::error::ForbiddenError),
1012 UnauthorizedError(crate::error::UnauthorizedError),
1014 NotFoundError(crate::error::NotFoundError),
1016 BadRequestError(crate::error::BadRequestError),
1018 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1020}
1021impl std::fmt::Display for GetGroupSummaryError {
1022 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1023 match &self.kind {
1024 GetGroupSummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
1025 GetGroupSummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1026 GetGroupSummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1027 GetGroupSummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1028 GetGroupSummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1029 GetGroupSummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1030 GetGroupSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
1031 }
1032 }
1033}
1034impl aws_smithy_types::retry::ProvideErrorKind for GetGroupSummaryError {
1035 fn code(&self) -> Option<&str> {
1036 GetGroupSummaryError::code(self)
1037 }
1038 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1039 match &self.kind {
1040 GetGroupSummaryErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1041 GetGroupSummaryErrorKind::UnauthorizedError(inner) => {
1042 Some(inner.retryable_error_kind())
1043 }
1044 _ => None,
1045 }
1046 }
1047}
1048impl GetGroupSummaryError {
1049 pub fn new(kind: GetGroupSummaryErrorKind, meta: aws_smithy_types::Error) -> Self {
1051 Self { kind, meta }
1052 }
1053
1054 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1056 Self {
1057 kind: GetGroupSummaryErrorKind::Unhandled(err.into()),
1058 meta: Default::default(),
1059 }
1060 }
1061
1062 pub fn generic(err: aws_smithy_types::Error) -> Self {
1064 Self {
1065 meta: err.clone(),
1066 kind: GetGroupSummaryErrorKind::Unhandled(err.into()),
1067 }
1068 }
1069
1070 pub fn message(&self) -> Option<&str> {
1072 self.meta.message()
1073 }
1074
1075 pub fn meta(&self) -> &aws_smithy_types::Error {
1078 &self.meta
1079 }
1080
1081 pub fn request_id(&self) -> Option<&str> {
1083 self.meta.request_id()
1084 }
1085
1086 pub fn code(&self) -> Option<&str> {
1088 self.meta.code()
1089 }
1090 pub fn is_internal_error(&self) -> bool {
1092 matches!(&self.kind, GetGroupSummaryErrorKind::InternalError(_))
1093 }
1094 pub fn is_rate_limit_error(&self) -> bool {
1096 matches!(&self.kind, GetGroupSummaryErrorKind::RateLimitError(_))
1097 }
1098 pub fn is_forbidden_error(&self) -> bool {
1100 matches!(&self.kind, GetGroupSummaryErrorKind::ForbiddenError(_))
1101 }
1102 pub fn is_unauthorized_error(&self) -> bool {
1104 matches!(&self.kind, GetGroupSummaryErrorKind::UnauthorizedError(_))
1105 }
1106 pub fn is_not_found_error(&self) -> bool {
1108 matches!(&self.kind, GetGroupSummaryErrorKind::NotFoundError(_))
1109 }
1110 pub fn is_bad_request_error(&self) -> bool {
1112 matches!(&self.kind, GetGroupSummaryErrorKind::BadRequestError(_))
1113 }
1114}
1115impl std::error::Error for GetGroupSummaryError {
1116 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1117 match &self.kind {
1118 GetGroupSummaryErrorKind::InternalError(_inner) => Some(_inner),
1119 GetGroupSummaryErrorKind::RateLimitError(_inner) => Some(_inner),
1120 GetGroupSummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
1121 GetGroupSummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
1122 GetGroupSummaryErrorKind::NotFoundError(_inner) => Some(_inner),
1123 GetGroupSummaryErrorKind::BadRequestError(_inner) => Some(_inner),
1124 GetGroupSummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1125 }
1126 }
1127}
1128
1129#[non_exhaustive]
1131#[derive(std::fmt::Debug)]
1132pub struct JoinGroupError {
1133 pub kind: JoinGroupErrorKind,
1135 pub(crate) meta: aws_smithy_types::Error,
1137}
1138#[non_exhaustive]
1140#[derive(std::fmt::Debug)]
1141pub enum JoinGroupErrorKind {
1142 InternalError(crate::error::InternalError),
1144 RateLimitError(crate::error::RateLimitError),
1146 ForbiddenError(crate::error::ForbiddenError),
1148 UnauthorizedError(crate::error::UnauthorizedError),
1150 NotFoundError(crate::error::NotFoundError),
1152 BadRequestError(crate::error::BadRequestError),
1154 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1156}
1157impl std::fmt::Display for JoinGroupError {
1158 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1159 match &self.kind {
1160 JoinGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
1161 JoinGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1162 JoinGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1163 JoinGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1164 JoinGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1165 JoinGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1166 JoinGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
1167 }
1168 }
1169}
1170impl aws_smithy_types::retry::ProvideErrorKind for JoinGroupError {
1171 fn code(&self) -> Option<&str> {
1172 JoinGroupError::code(self)
1173 }
1174 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1175 match &self.kind {
1176 JoinGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1177 JoinGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1178 _ => None,
1179 }
1180 }
1181}
1182impl JoinGroupError {
1183 pub fn new(kind: JoinGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
1185 Self { kind, meta }
1186 }
1187
1188 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1190 Self {
1191 kind: JoinGroupErrorKind::Unhandled(err.into()),
1192 meta: Default::default(),
1193 }
1194 }
1195
1196 pub fn generic(err: aws_smithy_types::Error) -> Self {
1198 Self {
1199 meta: err.clone(),
1200 kind: JoinGroupErrorKind::Unhandled(err.into()),
1201 }
1202 }
1203
1204 pub fn message(&self) -> Option<&str> {
1206 self.meta.message()
1207 }
1208
1209 pub fn meta(&self) -> &aws_smithy_types::Error {
1212 &self.meta
1213 }
1214
1215 pub fn request_id(&self) -> Option<&str> {
1217 self.meta.request_id()
1218 }
1219
1220 pub fn code(&self) -> Option<&str> {
1222 self.meta.code()
1223 }
1224 pub fn is_internal_error(&self) -> bool {
1226 matches!(&self.kind, JoinGroupErrorKind::InternalError(_))
1227 }
1228 pub fn is_rate_limit_error(&self) -> bool {
1230 matches!(&self.kind, JoinGroupErrorKind::RateLimitError(_))
1231 }
1232 pub fn is_forbidden_error(&self) -> bool {
1234 matches!(&self.kind, JoinGroupErrorKind::ForbiddenError(_))
1235 }
1236 pub fn is_unauthorized_error(&self) -> bool {
1238 matches!(&self.kind, JoinGroupErrorKind::UnauthorizedError(_))
1239 }
1240 pub fn is_not_found_error(&self) -> bool {
1242 matches!(&self.kind, JoinGroupErrorKind::NotFoundError(_))
1243 }
1244 pub fn is_bad_request_error(&self) -> bool {
1246 matches!(&self.kind, JoinGroupErrorKind::BadRequestError(_))
1247 }
1248}
1249impl std::error::Error for JoinGroupError {
1250 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1251 match &self.kind {
1252 JoinGroupErrorKind::InternalError(_inner) => Some(_inner),
1253 JoinGroupErrorKind::RateLimitError(_inner) => Some(_inner),
1254 JoinGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
1255 JoinGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
1256 JoinGroupErrorKind::NotFoundError(_inner) => Some(_inner),
1257 JoinGroupErrorKind::BadRequestError(_inner) => Some(_inner),
1258 JoinGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1259 }
1260 }
1261}
1262
1263#[non_exhaustive]
1265#[derive(std::fmt::Debug)]
1266pub struct LeaveGroupError {
1267 pub kind: LeaveGroupErrorKind,
1269 pub(crate) meta: aws_smithy_types::Error,
1271}
1272#[non_exhaustive]
1274#[derive(std::fmt::Debug)]
1275pub enum LeaveGroupErrorKind {
1276 InternalError(crate::error::InternalError),
1278 RateLimitError(crate::error::RateLimitError),
1280 ForbiddenError(crate::error::ForbiddenError),
1282 UnauthorizedError(crate::error::UnauthorizedError),
1284 NotFoundError(crate::error::NotFoundError),
1286 BadRequestError(crate::error::BadRequestError),
1288 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1290}
1291impl std::fmt::Display for LeaveGroupError {
1292 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1293 match &self.kind {
1294 LeaveGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
1295 LeaveGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1296 LeaveGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1297 LeaveGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1298 LeaveGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1299 LeaveGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1300 LeaveGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
1301 }
1302 }
1303}
1304impl aws_smithy_types::retry::ProvideErrorKind for LeaveGroupError {
1305 fn code(&self) -> Option<&str> {
1306 LeaveGroupError::code(self)
1307 }
1308 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1309 match &self.kind {
1310 LeaveGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1311 LeaveGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1312 _ => None,
1313 }
1314 }
1315}
1316impl LeaveGroupError {
1317 pub fn new(kind: LeaveGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
1319 Self { kind, meta }
1320 }
1321
1322 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1324 Self {
1325 kind: LeaveGroupErrorKind::Unhandled(err.into()),
1326 meta: Default::default(),
1327 }
1328 }
1329
1330 pub fn generic(err: aws_smithy_types::Error) -> Self {
1332 Self {
1333 meta: err.clone(),
1334 kind: LeaveGroupErrorKind::Unhandled(err.into()),
1335 }
1336 }
1337
1338 pub fn message(&self) -> Option<&str> {
1340 self.meta.message()
1341 }
1342
1343 pub fn meta(&self) -> &aws_smithy_types::Error {
1346 &self.meta
1347 }
1348
1349 pub fn request_id(&self) -> Option<&str> {
1351 self.meta.request_id()
1352 }
1353
1354 pub fn code(&self) -> Option<&str> {
1356 self.meta.code()
1357 }
1358 pub fn is_internal_error(&self) -> bool {
1360 matches!(&self.kind, LeaveGroupErrorKind::InternalError(_))
1361 }
1362 pub fn is_rate_limit_error(&self) -> bool {
1364 matches!(&self.kind, LeaveGroupErrorKind::RateLimitError(_))
1365 }
1366 pub fn is_forbidden_error(&self) -> bool {
1368 matches!(&self.kind, LeaveGroupErrorKind::ForbiddenError(_))
1369 }
1370 pub fn is_unauthorized_error(&self) -> bool {
1372 matches!(&self.kind, LeaveGroupErrorKind::UnauthorizedError(_))
1373 }
1374 pub fn is_not_found_error(&self) -> bool {
1376 matches!(&self.kind, LeaveGroupErrorKind::NotFoundError(_))
1377 }
1378 pub fn is_bad_request_error(&self) -> bool {
1380 matches!(&self.kind, LeaveGroupErrorKind::BadRequestError(_))
1381 }
1382}
1383impl std::error::Error for LeaveGroupError {
1384 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1385 match &self.kind {
1386 LeaveGroupErrorKind::InternalError(_inner) => Some(_inner),
1387 LeaveGroupErrorKind::RateLimitError(_inner) => Some(_inner),
1388 LeaveGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
1389 LeaveGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
1390 LeaveGroupErrorKind::NotFoundError(_inner) => Some(_inner),
1391 LeaveGroupErrorKind::BadRequestError(_inner) => Some(_inner),
1392 LeaveGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1393 }
1394 }
1395}
1396
1397#[non_exhaustive]
1399#[derive(std::fmt::Debug)]
1400pub struct ListSuggestedGroupsError {
1401 pub kind: ListSuggestedGroupsErrorKind,
1403 pub(crate) meta: aws_smithy_types::Error,
1405}
1406#[non_exhaustive]
1408#[derive(std::fmt::Debug)]
1409pub enum ListSuggestedGroupsErrorKind {
1410 InternalError(crate::error::InternalError),
1412 RateLimitError(crate::error::RateLimitError),
1414 ForbiddenError(crate::error::ForbiddenError),
1416 UnauthorizedError(crate::error::UnauthorizedError),
1418 NotFoundError(crate::error::NotFoundError),
1420 BadRequestError(crate::error::BadRequestError),
1422 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1424}
1425impl std::fmt::Display for ListSuggestedGroupsError {
1426 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1427 match &self.kind {
1428 ListSuggestedGroupsErrorKind::InternalError(_inner) => _inner.fmt(f),
1429 ListSuggestedGroupsErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1430 ListSuggestedGroupsErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1431 ListSuggestedGroupsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1432 ListSuggestedGroupsErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1433 ListSuggestedGroupsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1434 ListSuggestedGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
1435 }
1436 }
1437}
1438impl aws_smithy_types::retry::ProvideErrorKind for ListSuggestedGroupsError {
1439 fn code(&self) -> Option<&str> {
1440 ListSuggestedGroupsError::code(self)
1441 }
1442 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1443 match &self.kind {
1444 ListSuggestedGroupsErrorKind::InternalError(inner) => {
1445 Some(inner.retryable_error_kind())
1446 }
1447 ListSuggestedGroupsErrorKind::UnauthorizedError(inner) => {
1448 Some(inner.retryable_error_kind())
1449 }
1450 _ => None,
1451 }
1452 }
1453}
1454impl ListSuggestedGroupsError {
1455 pub fn new(kind: ListSuggestedGroupsErrorKind, meta: aws_smithy_types::Error) -> Self {
1457 Self { kind, meta }
1458 }
1459
1460 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1462 Self {
1463 kind: ListSuggestedGroupsErrorKind::Unhandled(err.into()),
1464 meta: Default::default(),
1465 }
1466 }
1467
1468 pub fn generic(err: aws_smithy_types::Error) -> Self {
1470 Self {
1471 meta: err.clone(),
1472 kind: ListSuggestedGroupsErrorKind::Unhandled(err.into()),
1473 }
1474 }
1475
1476 pub fn message(&self) -> Option<&str> {
1478 self.meta.message()
1479 }
1480
1481 pub fn meta(&self) -> &aws_smithy_types::Error {
1484 &self.meta
1485 }
1486
1487 pub fn request_id(&self) -> Option<&str> {
1489 self.meta.request_id()
1490 }
1491
1492 pub fn code(&self) -> Option<&str> {
1494 self.meta.code()
1495 }
1496 pub fn is_internal_error(&self) -> bool {
1498 matches!(&self.kind, ListSuggestedGroupsErrorKind::InternalError(_))
1499 }
1500 pub fn is_rate_limit_error(&self) -> bool {
1502 matches!(&self.kind, ListSuggestedGroupsErrorKind::RateLimitError(_))
1503 }
1504 pub fn is_forbidden_error(&self) -> bool {
1506 matches!(&self.kind, ListSuggestedGroupsErrorKind::ForbiddenError(_))
1507 }
1508 pub fn is_unauthorized_error(&self) -> bool {
1510 matches!(
1511 &self.kind,
1512 ListSuggestedGroupsErrorKind::UnauthorizedError(_)
1513 )
1514 }
1515 pub fn is_not_found_error(&self) -> bool {
1517 matches!(&self.kind, ListSuggestedGroupsErrorKind::NotFoundError(_))
1518 }
1519 pub fn is_bad_request_error(&self) -> bool {
1521 matches!(&self.kind, ListSuggestedGroupsErrorKind::BadRequestError(_))
1522 }
1523}
1524impl std::error::Error for ListSuggestedGroupsError {
1525 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1526 match &self.kind {
1527 ListSuggestedGroupsErrorKind::InternalError(_inner) => Some(_inner),
1528 ListSuggestedGroupsErrorKind::RateLimitError(_inner) => Some(_inner),
1529 ListSuggestedGroupsErrorKind::ForbiddenError(_inner) => Some(_inner),
1530 ListSuggestedGroupsErrorKind::UnauthorizedError(_inner) => Some(_inner),
1531 ListSuggestedGroupsErrorKind::NotFoundError(_inner) => Some(_inner),
1532 ListSuggestedGroupsErrorKind::BadRequestError(_inner) => Some(_inner),
1533 ListSuggestedGroupsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1534 }
1535 }
1536}
1537
1538#[non_exhaustive]
1540#[derive(std::fmt::Debug)]
1541pub struct PrepareGroupAvatarUploadError {
1542 pub kind: PrepareGroupAvatarUploadErrorKind,
1544 pub(crate) meta: aws_smithy_types::Error,
1546}
1547#[non_exhaustive]
1549#[derive(std::fmt::Debug)]
1550pub enum PrepareGroupAvatarUploadErrorKind {
1551 InternalError(crate::error::InternalError),
1553 RateLimitError(crate::error::RateLimitError),
1555 ForbiddenError(crate::error::ForbiddenError),
1557 UnauthorizedError(crate::error::UnauthorizedError),
1559 NotFoundError(crate::error::NotFoundError),
1561 BadRequestError(crate::error::BadRequestError),
1563 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1565}
1566impl std::fmt::Display for PrepareGroupAvatarUploadError {
1567 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1568 match &self.kind {
1569 PrepareGroupAvatarUploadErrorKind::InternalError(_inner) => _inner.fmt(f),
1570 PrepareGroupAvatarUploadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1571 PrepareGroupAvatarUploadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1572 PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1573 PrepareGroupAvatarUploadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1574 PrepareGroupAvatarUploadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1575 PrepareGroupAvatarUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
1576 }
1577 }
1578}
1579impl aws_smithy_types::retry::ProvideErrorKind for PrepareGroupAvatarUploadError {
1580 fn code(&self) -> Option<&str> {
1581 PrepareGroupAvatarUploadError::code(self)
1582 }
1583 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1584 match &self.kind {
1585 PrepareGroupAvatarUploadErrorKind::InternalError(inner) => {
1586 Some(inner.retryable_error_kind())
1587 }
1588 PrepareGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
1589 Some(inner.retryable_error_kind())
1590 }
1591 _ => None,
1592 }
1593 }
1594}
1595impl PrepareGroupAvatarUploadError {
1596 pub fn new(kind: PrepareGroupAvatarUploadErrorKind, meta: aws_smithy_types::Error) -> Self {
1598 Self { kind, meta }
1599 }
1600
1601 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1603 Self {
1604 kind: PrepareGroupAvatarUploadErrorKind::Unhandled(err.into()),
1605 meta: Default::default(),
1606 }
1607 }
1608
1609 pub fn generic(err: aws_smithy_types::Error) -> Self {
1611 Self {
1612 meta: err.clone(),
1613 kind: PrepareGroupAvatarUploadErrorKind::Unhandled(err.into()),
1614 }
1615 }
1616
1617 pub fn message(&self) -> Option<&str> {
1619 self.meta.message()
1620 }
1621
1622 pub fn meta(&self) -> &aws_smithy_types::Error {
1625 &self.meta
1626 }
1627
1628 pub fn request_id(&self) -> Option<&str> {
1630 self.meta.request_id()
1631 }
1632
1633 pub fn code(&self) -> Option<&str> {
1635 self.meta.code()
1636 }
1637 pub fn is_internal_error(&self) -> bool {
1639 matches!(
1640 &self.kind,
1641 PrepareGroupAvatarUploadErrorKind::InternalError(_)
1642 )
1643 }
1644 pub fn is_rate_limit_error(&self) -> bool {
1646 matches!(
1647 &self.kind,
1648 PrepareGroupAvatarUploadErrorKind::RateLimitError(_)
1649 )
1650 }
1651 pub fn is_forbidden_error(&self) -> bool {
1653 matches!(
1654 &self.kind,
1655 PrepareGroupAvatarUploadErrorKind::ForbiddenError(_)
1656 )
1657 }
1658 pub fn is_unauthorized_error(&self) -> bool {
1660 matches!(
1661 &self.kind,
1662 PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_)
1663 )
1664 }
1665 pub fn is_not_found_error(&self) -> bool {
1667 matches!(
1668 &self.kind,
1669 PrepareGroupAvatarUploadErrorKind::NotFoundError(_)
1670 )
1671 }
1672 pub fn is_bad_request_error(&self) -> bool {
1674 matches!(
1675 &self.kind,
1676 PrepareGroupAvatarUploadErrorKind::BadRequestError(_)
1677 )
1678 }
1679}
1680impl std::error::Error for PrepareGroupAvatarUploadError {
1681 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1682 match &self.kind {
1683 PrepareGroupAvatarUploadErrorKind::InternalError(_inner) => Some(_inner),
1684 PrepareGroupAvatarUploadErrorKind::RateLimitError(_inner) => Some(_inner),
1685 PrepareGroupAvatarUploadErrorKind::ForbiddenError(_inner) => Some(_inner),
1686 PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => Some(_inner),
1687 PrepareGroupAvatarUploadErrorKind::NotFoundError(_inner) => Some(_inner),
1688 PrepareGroupAvatarUploadErrorKind::BadRequestError(_inner) => Some(_inner),
1689 PrepareGroupAvatarUploadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1690 }
1691 }
1692}
1693
1694#[non_exhaustive]
1696#[derive(std::fmt::Debug)]
1697pub struct ResolveGroupJoinRequestError {
1698 pub kind: ResolveGroupJoinRequestErrorKind,
1700 pub(crate) meta: aws_smithy_types::Error,
1702}
1703#[non_exhaustive]
1705#[derive(std::fmt::Debug)]
1706pub enum ResolveGroupJoinRequestErrorKind {
1707 InternalError(crate::error::InternalError),
1709 RateLimitError(crate::error::RateLimitError),
1711 ForbiddenError(crate::error::ForbiddenError),
1713 UnauthorizedError(crate::error::UnauthorizedError),
1715 NotFoundError(crate::error::NotFoundError),
1717 BadRequestError(crate::error::BadRequestError),
1719 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1721}
1722impl std::fmt::Display for ResolveGroupJoinRequestError {
1723 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1724 match &self.kind {
1725 ResolveGroupJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
1726 ResolveGroupJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1727 ResolveGroupJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1728 ResolveGroupJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1729 ResolveGroupJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1730 ResolveGroupJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1731 ResolveGroupJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
1732 }
1733 }
1734}
1735impl aws_smithy_types::retry::ProvideErrorKind for ResolveGroupJoinRequestError {
1736 fn code(&self) -> Option<&str> {
1737 ResolveGroupJoinRequestError::code(self)
1738 }
1739 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1740 match &self.kind {
1741 ResolveGroupJoinRequestErrorKind::InternalError(inner) => {
1742 Some(inner.retryable_error_kind())
1743 }
1744 ResolveGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
1745 Some(inner.retryable_error_kind())
1746 }
1747 _ => None,
1748 }
1749 }
1750}
1751impl ResolveGroupJoinRequestError {
1752 pub fn new(kind: ResolveGroupJoinRequestErrorKind, meta: aws_smithy_types::Error) -> Self {
1754 Self { kind, meta }
1755 }
1756
1757 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1759 Self {
1760 kind: ResolveGroupJoinRequestErrorKind::Unhandled(err.into()),
1761 meta: Default::default(),
1762 }
1763 }
1764
1765 pub fn generic(err: aws_smithy_types::Error) -> Self {
1767 Self {
1768 meta: err.clone(),
1769 kind: ResolveGroupJoinRequestErrorKind::Unhandled(err.into()),
1770 }
1771 }
1772
1773 pub fn message(&self) -> Option<&str> {
1775 self.meta.message()
1776 }
1777
1778 pub fn meta(&self) -> &aws_smithy_types::Error {
1781 &self.meta
1782 }
1783
1784 pub fn request_id(&self) -> Option<&str> {
1786 self.meta.request_id()
1787 }
1788
1789 pub fn code(&self) -> Option<&str> {
1791 self.meta.code()
1792 }
1793 pub fn is_internal_error(&self) -> bool {
1795 matches!(
1796 &self.kind,
1797 ResolveGroupJoinRequestErrorKind::InternalError(_)
1798 )
1799 }
1800 pub fn is_rate_limit_error(&self) -> bool {
1802 matches!(
1803 &self.kind,
1804 ResolveGroupJoinRequestErrorKind::RateLimitError(_)
1805 )
1806 }
1807 pub fn is_forbidden_error(&self) -> bool {
1809 matches!(
1810 &self.kind,
1811 ResolveGroupJoinRequestErrorKind::ForbiddenError(_)
1812 )
1813 }
1814 pub fn is_unauthorized_error(&self) -> bool {
1816 matches!(
1817 &self.kind,
1818 ResolveGroupJoinRequestErrorKind::UnauthorizedError(_)
1819 )
1820 }
1821 pub fn is_not_found_error(&self) -> bool {
1823 matches!(
1824 &self.kind,
1825 ResolveGroupJoinRequestErrorKind::NotFoundError(_)
1826 )
1827 }
1828 pub fn is_bad_request_error(&self) -> bool {
1830 matches!(
1831 &self.kind,
1832 ResolveGroupJoinRequestErrorKind::BadRequestError(_)
1833 )
1834 }
1835}
1836impl std::error::Error for ResolveGroupJoinRequestError {
1837 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1838 match &self.kind {
1839 ResolveGroupJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
1840 ResolveGroupJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
1841 ResolveGroupJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
1842 ResolveGroupJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
1843 ResolveGroupJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
1844 ResolveGroupJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
1845 ResolveGroupJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1846 }
1847 }
1848}
1849
1850#[non_exhaustive]
1852#[derive(std::fmt::Debug)]
1853pub struct SearchGroupsError {
1854 pub kind: SearchGroupsErrorKind,
1856 pub(crate) meta: aws_smithy_types::Error,
1858}
1859#[non_exhaustive]
1861#[derive(std::fmt::Debug)]
1862pub enum SearchGroupsErrorKind {
1863 InternalError(crate::error::InternalError),
1865 RateLimitError(crate::error::RateLimitError),
1867 ForbiddenError(crate::error::ForbiddenError),
1869 UnauthorizedError(crate::error::UnauthorizedError),
1871 NotFoundError(crate::error::NotFoundError),
1873 BadRequestError(crate::error::BadRequestError),
1875 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1877}
1878impl std::fmt::Display for SearchGroupsError {
1879 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1880 match &self.kind {
1881 SearchGroupsErrorKind::InternalError(_inner) => _inner.fmt(f),
1882 SearchGroupsErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1883 SearchGroupsErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1884 SearchGroupsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1885 SearchGroupsErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1886 SearchGroupsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1887 SearchGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
1888 }
1889 }
1890}
1891impl aws_smithy_types::retry::ProvideErrorKind for SearchGroupsError {
1892 fn code(&self) -> Option<&str> {
1893 SearchGroupsError::code(self)
1894 }
1895 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1896 match &self.kind {
1897 SearchGroupsErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1898 SearchGroupsErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1899 _ => None,
1900 }
1901 }
1902}
1903impl SearchGroupsError {
1904 pub fn new(kind: SearchGroupsErrorKind, meta: aws_smithy_types::Error) -> Self {
1906 Self { kind, meta }
1907 }
1908
1909 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1911 Self {
1912 kind: SearchGroupsErrorKind::Unhandled(err.into()),
1913 meta: Default::default(),
1914 }
1915 }
1916
1917 pub fn generic(err: aws_smithy_types::Error) -> Self {
1919 Self {
1920 meta: err.clone(),
1921 kind: SearchGroupsErrorKind::Unhandled(err.into()),
1922 }
1923 }
1924
1925 pub fn message(&self) -> Option<&str> {
1927 self.meta.message()
1928 }
1929
1930 pub fn meta(&self) -> &aws_smithy_types::Error {
1933 &self.meta
1934 }
1935
1936 pub fn request_id(&self) -> Option<&str> {
1938 self.meta.request_id()
1939 }
1940
1941 pub fn code(&self) -> Option<&str> {
1943 self.meta.code()
1944 }
1945 pub fn is_internal_error(&self) -> bool {
1947 matches!(&self.kind, SearchGroupsErrorKind::InternalError(_))
1948 }
1949 pub fn is_rate_limit_error(&self) -> bool {
1951 matches!(&self.kind, SearchGroupsErrorKind::RateLimitError(_))
1952 }
1953 pub fn is_forbidden_error(&self) -> bool {
1955 matches!(&self.kind, SearchGroupsErrorKind::ForbiddenError(_))
1956 }
1957 pub fn is_unauthorized_error(&self) -> bool {
1959 matches!(&self.kind, SearchGroupsErrorKind::UnauthorizedError(_))
1960 }
1961 pub fn is_not_found_error(&self) -> bool {
1963 matches!(&self.kind, SearchGroupsErrorKind::NotFoundError(_))
1964 }
1965 pub fn is_bad_request_error(&self) -> bool {
1967 matches!(&self.kind, SearchGroupsErrorKind::BadRequestError(_))
1968 }
1969}
1970impl std::error::Error for SearchGroupsError {
1971 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1972 match &self.kind {
1973 SearchGroupsErrorKind::InternalError(_inner) => Some(_inner),
1974 SearchGroupsErrorKind::RateLimitError(_inner) => Some(_inner),
1975 SearchGroupsErrorKind::ForbiddenError(_inner) => Some(_inner),
1976 SearchGroupsErrorKind::UnauthorizedError(_inner) => Some(_inner),
1977 SearchGroupsErrorKind::NotFoundError(_inner) => Some(_inner),
1978 SearchGroupsErrorKind::BadRequestError(_inner) => Some(_inner),
1979 SearchGroupsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1980 }
1981 }
1982}
1983
1984#[non_exhaustive]
1986#[derive(std::fmt::Debug)]
1987pub struct TransferGroupOwnershipError {
1988 pub kind: TransferGroupOwnershipErrorKind,
1990 pub(crate) meta: aws_smithy_types::Error,
1992}
1993#[non_exhaustive]
1995#[derive(std::fmt::Debug)]
1996pub enum TransferGroupOwnershipErrorKind {
1997 InternalError(crate::error::InternalError),
1999 RateLimitError(crate::error::RateLimitError),
2001 ForbiddenError(crate::error::ForbiddenError),
2003 UnauthorizedError(crate::error::UnauthorizedError),
2005 NotFoundError(crate::error::NotFoundError),
2007 BadRequestError(crate::error::BadRequestError),
2009 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2011}
2012impl std::fmt::Display for TransferGroupOwnershipError {
2013 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2014 match &self.kind {
2015 TransferGroupOwnershipErrorKind::InternalError(_inner) => _inner.fmt(f),
2016 TransferGroupOwnershipErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2017 TransferGroupOwnershipErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2018 TransferGroupOwnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2019 TransferGroupOwnershipErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2020 TransferGroupOwnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2021 TransferGroupOwnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
2022 }
2023 }
2024}
2025impl aws_smithy_types::retry::ProvideErrorKind for TransferGroupOwnershipError {
2026 fn code(&self) -> Option<&str> {
2027 TransferGroupOwnershipError::code(self)
2028 }
2029 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2030 match &self.kind {
2031 TransferGroupOwnershipErrorKind::InternalError(inner) => {
2032 Some(inner.retryable_error_kind())
2033 }
2034 TransferGroupOwnershipErrorKind::UnauthorizedError(inner) => {
2035 Some(inner.retryable_error_kind())
2036 }
2037 _ => None,
2038 }
2039 }
2040}
2041impl TransferGroupOwnershipError {
2042 pub fn new(kind: TransferGroupOwnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
2044 Self { kind, meta }
2045 }
2046
2047 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2049 Self {
2050 kind: TransferGroupOwnershipErrorKind::Unhandled(err.into()),
2051 meta: Default::default(),
2052 }
2053 }
2054
2055 pub fn generic(err: aws_smithy_types::Error) -> Self {
2057 Self {
2058 meta: err.clone(),
2059 kind: TransferGroupOwnershipErrorKind::Unhandled(err.into()),
2060 }
2061 }
2062
2063 pub fn message(&self) -> Option<&str> {
2065 self.meta.message()
2066 }
2067
2068 pub fn meta(&self) -> &aws_smithy_types::Error {
2071 &self.meta
2072 }
2073
2074 pub fn request_id(&self) -> Option<&str> {
2076 self.meta.request_id()
2077 }
2078
2079 pub fn code(&self) -> Option<&str> {
2081 self.meta.code()
2082 }
2083 pub fn is_internal_error(&self) -> bool {
2085 matches!(
2086 &self.kind,
2087 TransferGroupOwnershipErrorKind::InternalError(_)
2088 )
2089 }
2090 pub fn is_rate_limit_error(&self) -> bool {
2092 matches!(
2093 &self.kind,
2094 TransferGroupOwnershipErrorKind::RateLimitError(_)
2095 )
2096 }
2097 pub fn is_forbidden_error(&self) -> bool {
2099 matches!(
2100 &self.kind,
2101 TransferGroupOwnershipErrorKind::ForbiddenError(_)
2102 )
2103 }
2104 pub fn is_unauthorized_error(&self) -> bool {
2106 matches!(
2107 &self.kind,
2108 TransferGroupOwnershipErrorKind::UnauthorizedError(_)
2109 )
2110 }
2111 pub fn is_not_found_error(&self) -> bool {
2113 matches!(
2114 &self.kind,
2115 TransferGroupOwnershipErrorKind::NotFoundError(_)
2116 )
2117 }
2118 pub fn is_bad_request_error(&self) -> bool {
2120 matches!(
2121 &self.kind,
2122 TransferGroupOwnershipErrorKind::BadRequestError(_)
2123 )
2124 }
2125}
2126impl std::error::Error for TransferGroupOwnershipError {
2127 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2128 match &self.kind {
2129 TransferGroupOwnershipErrorKind::InternalError(_inner) => Some(_inner),
2130 TransferGroupOwnershipErrorKind::RateLimitError(_inner) => Some(_inner),
2131 TransferGroupOwnershipErrorKind::ForbiddenError(_inner) => Some(_inner),
2132 TransferGroupOwnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
2133 TransferGroupOwnershipErrorKind::NotFoundError(_inner) => Some(_inner),
2134 TransferGroupOwnershipErrorKind::BadRequestError(_inner) => Some(_inner),
2135 TransferGroupOwnershipErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2136 }
2137 }
2138}
2139
2140#[non_exhaustive]
2142#[derive(std::fmt::Debug)]
2143pub struct UpdateGroupProfileError {
2144 pub kind: UpdateGroupProfileErrorKind,
2146 pub(crate) meta: aws_smithy_types::Error,
2148}
2149#[non_exhaustive]
2151#[derive(std::fmt::Debug)]
2152pub enum UpdateGroupProfileErrorKind {
2153 InternalError(crate::error::InternalError),
2155 RateLimitError(crate::error::RateLimitError),
2157 ForbiddenError(crate::error::ForbiddenError),
2159 UnauthorizedError(crate::error::UnauthorizedError),
2161 NotFoundError(crate::error::NotFoundError),
2163 BadRequestError(crate::error::BadRequestError),
2165 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2167}
2168impl std::fmt::Display for UpdateGroupProfileError {
2169 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2170 match &self.kind {
2171 UpdateGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
2172 UpdateGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2173 UpdateGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2174 UpdateGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2175 UpdateGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2176 UpdateGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2177 UpdateGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
2178 }
2179 }
2180}
2181impl aws_smithy_types::retry::ProvideErrorKind for UpdateGroupProfileError {
2182 fn code(&self) -> Option<&str> {
2183 UpdateGroupProfileError::code(self)
2184 }
2185 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2186 match &self.kind {
2187 UpdateGroupProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
2188 UpdateGroupProfileErrorKind::UnauthorizedError(inner) => {
2189 Some(inner.retryable_error_kind())
2190 }
2191 _ => None,
2192 }
2193 }
2194}
2195impl UpdateGroupProfileError {
2196 pub fn new(kind: UpdateGroupProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
2198 Self { kind, meta }
2199 }
2200
2201 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2203 Self {
2204 kind: UpdateGroupProfileErrorKind::Unhandled(err.into()),
2205 meta: Default::default(),
2206 }
2207 }
2208
2209 pub fn generic(err: aws_smithy_types::Error) -> Self {
2211 Self {
2212 meta: err.clone(),
2213 kind: UpdateGroupProfileErrorKind::Unhandled(err.into()),
2214 }
2215 }
2216
2217 pub fn message(&self) -> Option<&str> {
2219 self.meta.message()
2220 }
2221
2222 pub fn meta(&self) -> &aws_smithy_types::Error {
2225 &self.meta
2226 }
2227
2228 pub fn request_id(&self) -> Option<&str> {
2230 self.meta.request_id()
2231 }
2232
2233 pub fn code(&self) -> Option<&str> {
2235 self.meta.code()
2236 }
2237 pub fn is_internal_error(&self) -> bool {
2239 matches!(&self.kind, UpdateGroupProfileErrorKind::InternalError(_))
2240 }
2241 pub fn is_rate_limit_error(&self) -> bool {
2243 matches!(&self.kind, UpdateGroupProfileErrorKind::RateLimitError(_))
2244 }
2245 pub fn is_forbidden_error(&self) -> bool {
2247 matches!(&self.kind, UpdateGroupProfileErrorKind::ForbiddenError(_))
2248 }
2249 pub fn is_unauthorized_error(&self) -> bool {
2251 matches!(
2252 &self.kind,
2253 UpdateGroupProfileErrorKind::UnauthorizedError(_)
2254 )
2255 }
2256 pub fn is_not_found_error(&self) -> bool {
2258 matches!(&self.kind, UpdateGroupProfileErrorKind::NotFoundError(_))
2259 }
2260 pub fn is_bad_request_error(&self) -> bool {
2262 matches!(&self.kind, UpdateGroupProfileErrorKind::BadRequestError(_))
2263 }
2264}
2265impl std::error::Error for UpdateGroupProfileError {
2266 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2267 match &self.kind {
2268 UpdateGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
2269 UpdateGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
2270 UpdateGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
2271 UpdateGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
2272 UpdateGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
2273 UpdateGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
2274 UpdateGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2275 }
2276 }
2277}
2278
2279#[non_exhaustive]
2281#[derive(std::fmt::Debug)]
2282pub struct ValidateGroupProfileError {
2283 pub kind: ValidateGroupProfileErrorKind,
2285 pub(crate) meta: aws_smithy_types::Error,
2287}
2288#[non_exhaustive]
2290#[derive(std::fmt::Debug)]
2291pub enum ValidateGroupProfileErrorKind {
2292 InternalError(crate::error::InternalError),
2294 RateLimitError(crate::error::RateLimitError),
2296 ForbiddenError(crate::error::ForbiddenError),
2298 UnauthorizedError(crate::error::UnauthorizedError),
2300 NotFoundError(crate::error::NotFoundError),
2302 BadRequestError(crate::error::BadRequestError),
2304 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2306}
2307impl std::fmt::Display for ValidateGroupProfileError {
2308 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2309 match &self.kind {
2310 ValidateGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
2311 ValidateGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2312 ValidateGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2313 ValidateGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2314 ValidateGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2315 ValidateGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2316 ValidateGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
2317 }
2318 }
2319}
2320impl aws_smithy_types::retry::ProvideErrorKind for ValidateGroupProfileError {
2321 fn code(&self) -> Option<&str> {
2322 ValidateGroupProfileError::code(self)
2323 }
2324 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2325 match &self.kind {
2326 ValidateGroupProfileErrorKind::InternalError(inner) => {
2327 Some(inner.retryable_error_kind())
2328 }
2329 ValidateGroupProfileErrorKind::UnauthorizedError(inner) => {
2330 Some(inner.retryable_error_kind())
2331 }
2332 _ => None,
2333 }
2334 }
2335}
2336impl ValidateGroupProfileError {
2337 pub fn new(kind: ValidateGroupProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
2339 Self { kind, meta }
2340 }
2341
2342 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2344 Self {
2345 kind: ValidateGroupProfileErrorKind::Unhandled(err.into()),
2346 meta: Default::default(),
2347 }
2348 }
2349
2350 pub fn generic(err: aws_smithy_types::Error) -> Self {
2352 Self {
2353 meta: err.clone(),
2354 kind: ValidateGroupProfileErrorKind::Unhandled(err.into()),
2355 }
2356 }
2357
2358 pub fn message(&self) -> Option<&str> {
2360 self.meta.message()
2361 }
2362
2363 pub fn meta(&self) -> &aws_smithy_types::Error {
2366 &self.meta
2367 }
2368
2369 pub fn request_id(&self) -> Option<&str> {
2371 self.meta.request_id()
2372 }
2373
2374 pub fn code(&self) -> Option<&str> {
2376 self.meta.code()
2377 }
2378 pub fn is_internal_error(&self) -> bool {
2380 matches!(&self.kind, ValidateGroupProfileErrorKind::InternalError(_))
2381 }
2382 pub fn is_rate_limit_error(&self) -> bool {
2384 matches!(&self.kind, ValidateGroupProfileErrorKind::RateLimitError(_))
2385 }
2386 pub fn is_forbidden_error(&self) -> bool {
2388 matches!(&self.kind, ValidateGroupProfileErrorKind::ForbiddenError(_))
2389 }
2390 pub fn is_unauthorized_error(&self) -> bool {
2392 matches!(
2393 &self.kind,
2394 ValidateGroupProfileErrorKind::UnauthorizedError(_)
2395 )
2396 }
2397 pub fn is_not_found_error(&self) -> bool {
2399 matches!(&self.kind, ValidateGroupProfileErrorKind::NotFoundError(_))
2400 }
2401 pub fn is_bad_request_error(&self) -> bool {
2403 matches!(
2404 &self.kind,
2405 ValidateGroupProfileErrorKind::BadRequestError(_)
2406 )
2407 }
2408}
2409impl std::error::Error for ValidateGroupProfileError {
2410 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2411 match &self.kind {
2412 ValidateGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
2413 ValidateGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
2414 ValidateGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
2415 ValidateGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
2416 ValidateGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
2417 ValidateGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
2418 ValidateGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2419 }
2420 }
2421}
2422
2423#[non_exhaustive]
2425#[derive(std::clone::Clone, std::cmp::PartialEq)]
2426pub struct BadRequestError {
2427 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2429 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2431 pub metadata: std::option::Option<aws_smithy_types::Document>,
2433}
2434impl BadRequestError {
2435 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2437 self.code.as_deref()
2438 }
2439 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2441 self.metadata.as_ref()
2442 }
2443}
2444impl std::fmt::Debug for BadRequestError {
2445 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2446 let mut formatter = f.debug_struct("BadRequestError");
2447 formatter.field("code", &self.code);
2448 formatter.field("message", &self.message);
2449 formatter.field("metadata", &self.metadata);
2450 formatter.finish()
2451 }
2452}
2453impl BadRequestError {
2454 pub fn message(&self) -> Option<&str> {
2456 self.message.as_deref()
2457 }
2458}
2459impl std::fmt::Display for BadRequestError {
2460 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2461 write!(f, "BadRequestError")?;
2462 if let Some(inner_1) = &self.message {
2463 write!(f, ": {}", inner_1)?;
2464 }
2465 Ok(())
2466 }
2467}
2468impl std::error::Error for BadRequestError {}
2469pub mod bad_request_error {
2471 #[non_exhaustive]
2473 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2474 pub struct Builder {
2475 pub(crate) code: std::option::Option<std::string::String>,
2476 pub(crate) message: std::option::Option<std::string::String>,
2477 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2478 }
2479 impl Builder {
2480 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2482 self.code = Some(input.into());
2483 self
2484 }
2485 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2487 self.code = input;
2488 self
2489 }
2490 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2492 self.message = Some(input.into());
2493 self
2494 }
2495 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2497 self.message = input;
2498 self
2499 }
2500 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2502 self.metadata = Some(input);
2503 self
2504 }
2505 pub fn set_metadata(
2507 mut self,
2508 input: std::option::Option<aws_smithy_types::Document>,
2509 ) -> Self {
2510 self.metadata = input;
2511 self
2512 }
2513 pub fn build(self) -> crate::error::BadRequestError {
2515 crate::error::BadRequestError {
2516 code: self.code,
2517 message: self.message,
2518 metadata: self.metadata,
2519 }
2520 }
2521 }
2522}
2523impl BadRequestError {
2524 pub fn builder() -> crate::error::bad_request_error::Builder {
2526 crate::error::bad_request_error::Builder::default()
2527 }
2528}
2529
2530#[non_exhaustive]
2532#[derive(std::clone::Clone, std::cmp::PartialEq)]
2533pub struct NotFoundError {
2534 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2536 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2538 pub metadata: std::option::Option<aws_smithy_types::Document>,
2540}
2541impl NotFoundError {
2542 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2544 self.code.as_deref()
2545 }
2546 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2548 self.metadata.as_ref()
2549 }
2550}
2551impl std::fmt::Debug for NotFoundError {
2552 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2553 let mut formatter = f.debug_struct("NotFoundError");
2554 formatter.field("code", &self.code);
2555 formatter.field("message", &self.message);
2556 formatter.field("metadata", &self.metadata);
2557 formatter.finish()
2558 }
2559}
2560impl NotFoundError {
2561 pub fn message(&self) -> Option<&str> {
2563 self.message.as_deref()
2564 }
2565}
2566impl std::fmt::Display for NotFoundError {
2567 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2568 write!(f, "NotFoundError")?;
2569 if let Some(inner_2) = &self.message {
2570 write!(f, ": {}", inner_2)?;
2571 }
2572 Ok(())
2573 }
2574}
2575impl std::error::Error for NotFoundError {}
2576pub mod not_found_error {
2578 #[non_exhaustive]
2580 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2581 pub struct Builder {
2582 pub(crate) code: std::option::Option<std::string::String>,
2583 pub(crate) message: std::option::Option<std::string::String>,
2584 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2585 }
2586 impl Builder {
2587 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2589 self.code = Some(input.into());
2590 self
2591 }
2592 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2594 self.code = input;
2595 self
2596 }
2597 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2599 self.message = Some(input.into());
2600 self
2601 }
2602 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2604 self.message = input;
2605 self
2606 }
2607 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2609 self.metadata = Some(input);
2610 self
2611 }
2612 pub fn set_metadata(
2614 mut self,
2615 input: std::option::Option<aws_smithy_types::Document>,
2616 ) -> Self {
2617 self.metadata = input;
2618 self
2619 }
2620 pub fn build(self) -> crate::error::NotFoundError {
2622 crate::error::NotFoundError {
2623 code: self.code,
2624 message: self.message,
2625 metadata: self.metadata,
2626 }
2627 }
2628 }
2629}
2630impl NotFoundError {
2631 pub fn builder() -> crate::error::not_found_error::Builder {
2633 crate::error::not_found_error::Builder::default()
2634 }
2635}
2636
2637#[non_exhaustive]
2639#[derive(std::clone::Clone, std::cmp::PartialEq)]
2640pub struct UnauthorizedError {
2641 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2643 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2645 pub metadata: std::option::Option<aws_smithy_types::Document>,
2647}
2648impl UnauthorizedError {
2649 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2651 self.code.as_deref()
2652 }
2653 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2655 self.metadata.as_ref()
2656 }
2657}
2658impl std::fmt::Debug for UnauthorizedError {
2659 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2660 let mut formatter = f.debug_struct("UnauthorizedError");
2661 formatter.field("code", &self.code);
2662 formatter.field("message", &self.message);
2663 formatter.field("metadata", &self.metadata);
2664 formatter.finish()
2665 }
2666}
2667impl UnauthorizedError {
2668 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
2670 aws_smithy_types::retry::ErrorKind::ClientError
2671 }
2672 pub fn message(&self) -> Option<&str> {
2674 self.message.as_deref()
2675 }
2676}
2677impl std::fmt::Display for UnauthorizedError {
2678 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2679 write!(f, "UnauthorizedError")?;
2680 if let Some(inner_3) = &self.message {
2681 write!(f, ": {}", inner_3)?;
2682 }
2683 Ok(())
2684 }
2685}
2686impl std::error::Error for UnauthorizedError {}
2687pub mod unauthorized_error {
2689 #[non_exhaustive]
2691 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2692 pub struct Builder {
2693 pub(crate) code: std::option::Option<std::string::String>,
2694 pub(crate) message: std::option::Option<std::string::String>,
2695 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2696 }
2697 impl Builder {
2698 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2700 self.code = Some(input.into());
2701 self
2702 }
2703 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2705 self.code = input;
2706 self
2707 }
2708 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2710 self.message = Some(input.into());
2711 self
2712 }
2713 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2715 self.message = input;
2716 self
2717 }
2718 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2720 self.metadata = Some(input);
2721 self
2722 }
2723 pub fn set_metadata(
2725 mut self,
2726 input: std::option::Option<aws_smithy_types::Document>,
2727 ) -> Self {
2728 self.metadata = input;
2729 self
2730 }
2731 pub fn build(self) -> crate::error::UnauthorizedError {
2733 crate::error::UnauthorizedError {
2734 code: self.code,
2735 message: self.message,
2736 metadata: self.metadata,
2737 }
2738 }
2739 }
2740}
2741impl UnauthorizedError {
2742 pub fn builder() -> crate::error::unauthorized_error::Builder {
2744 crate::error::unauthorized_error::Builder::default()
2745 }
2746}
2747
2748#[non_exhaustive]
2750#[derive(std::clone::Clone, std::cmp::PartialEq)]
2751pub struct ForbiddenError {
2752 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2754 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2756 pub metadata: std::option::Option<aws_smithy_types::Document>,
2758}
2759impl ForbiddenError {
2760 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2762 self.code.as_deref()
2763 }
2764 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2766 self.metadata.as_ref()
2767 }
2768}
2769impl std::fmt::Debug for ForbiddenError {
2770 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2771 let mut formatter = f.debug_struct("ForbiddenError");
2772 formatter.field("code", &self.code);
2773 formatter.field("message", &self.message);
2774 formatter.field("metadata", &self.metadata);
2775 formatter.finish()
2776 }
2777}
2778impl ForbiddenError {
2779 pub fn message(&self) -> Option<&str> {
2781 self.message.as_deref()
2782 }
2783}
2784impl std::fmt::Display for ForbiddenError {
2785 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2786 write!(f, "ForbiddenError")?;
2787 if let Some(inner_4) = &self.message {
2788 write!(f, ": {}", inner_4)?;
2789 }
2790 Ok(())
2791 }
2792}
2793impl std::error::Error for ForbiddenError {}
2794pub mod forbidden_error {
2796 #[non_exhaustive]
2798 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2799 pub struct Builder {
2800 pub(crate) code: std::option::Option<std::string::String>,
2801 pub(crate) message: std::option::Option<std::string::String>,
2802 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2803 }
2804 impl Builder {
2805 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2807 self.code = Some(input.into());
2808 self
2809 }
2810 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2812 self.code = input;
2813 self
2814 }
2815 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2817 self.message = Some(input.into());
2818 self
2819 }
2820 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2822 self.message = input;
2823 self
2824 }
2825 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2827 self.metadata = Some(input);
2828 self
2829 }
2830 pub fn set_metadata(
2832 mut self,
2833 input: std::option::Option<aws_smithy_types::Document>,
2834 ) -> Self {
2835 self.metadata = input;
2836 self
2837 }
2838 pub fn build(self) -> crate::error::ForbiddenError {
2840 crate::error::ForbiddenError {
2841 code: self.code,
2842 message: self.message,
2843 metadata: self.metadata,
2844 }
2845 }
2846 }
2847}
2848impl ForbiddenError {
2849 pub fn builder() -> crate::error::forbidden_error::Builder {
2851 crate::error::forbidden_error::Builder::default()
2852 }
2853}
2854
2855#[non_exhaustive]
2857#[derive(std::clone::Clone, std::cmp::PartialEq)]
2858pub struct RateLimitError {
2859 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2861 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2863 pub metadata: std::option::Option<aws_smithy_types::Document>,
2865}
2866impl RateLimitError {
2867 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2869 self.code.as_deref()
2870 }
2871 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2873 self.metadata.as_ref()
2874 }
2875}
2876impl std::fmt::Debug for RateLimitError {
2877 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2878 let mut formatter = f.debug_struct("RateLimitError");
2879 formatter.field("code", &self.code);
2880 formatter.field("message", &self.message);
2881 formatter.field("metadata", &self.metadata);
2882 formatter.finish()
2883 }
2884}
2885impl RateLimitError {
2886 pub fn message(&self) -> Option<&str> {
2888 self.message.as_deref()
2889 }
2890}
2891impl std::fmt::Display for RateLimitError {
2892 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2893 write!(f, "RateLimitError")?;
2894 if let Some(inner_5) = &self.message {
2895 write!(f, ": {}", inner_5)?;
2896 }
2897 Ok(())
2898 }
2899}
2900impl std::error::Error for RateLimitError {}
2901pub mod rate_limit_error {
2903 #[non_exhaustive]
2905 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2906 pub struct Builder {
2907 pub(crate) code: std::option::Option<std::string::String>,
2908 pub(crate) message: std::option::Option<std::string::String>,
2909 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2910 }
2911 impl Builder {
2912 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2914 self.code = Some(input.into());
2915 self
2916 }
2917 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2919 self.code = input;
2920 self
2921 }
2922 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2924 self.message = Some(input.into());
2925 self
2926 }
2927 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2929 self.message = input;
2930 self
2931 }
2932 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2934 self.metadata = Some(input);
2935 self
2936 }
2937 pub fn set_metadata(
2939 mut self,
2940 input: std::option::Option<aws_smithy_types::Document>,
2941 ) -> Self {
2942 self.metadata = input;
2943 self
2944 }
2945 pub fn build(self) -> crate::error::RateLimitError {
2947 crate::error::RateLimitError {
2948 code: self.code,
2949 message: self.message,
2950 metadata: self.metadata,
2951 }
2952 }
2953 }
2954}
2955impl RateLimitError {
2956 pub fn builder() -> crate::error::rate_limit_error::Builder {
2958 crate::error::rate_limit_error::Builder::default()
2959 }
2960}
2961
2962#[non_exhaustive]
2964#[derive(std::clone::Clone, std::cmp::PartialEq)]
2965pub struct InternalError {
2966 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2968 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2970 pub metadata: std::option::Option<aws_smithy_types::Document>,
2972}
2973impl InternalError {
2974 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2976 self.code.as_deref()
2977 }
2978 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2980 self.metadata.as_ref()
2981 }
2982}
2983impl std::fmt::Debug for InternalError {
2984 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2985 let mut formatter = f.debug_struct("InternalError");
2986 formatter.field("code", &self.code);
2987 formatter.field("message", &self.message);
2988 formatter.field("metadata", &self.metadata);
2989 formatter.finish()
2990 }
2991}
2992impl InternalError {
2993 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
2995 aws_smithy_types::retry::ErrorKind::ServerError
2996 }
2997 pub fn message(&self) -> Option<&str> {
2999 self.message.as_deref()
3000 }
3001}
3002impl std::fmt::Display for InternalError {
3003 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3004 write!(f, "InternalError")?;
3005 if let Some(inner_6) = &self.message {
3006 write!(f, ": {}", inner_6)?;
3007 }
3008 Ok(())
3009 }
3010}
3011impl std::error::Error for InternalError {}
3012pub mod internal_error {
3014 #[non_exhaustive]
3016 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
3017 pub struct Builder {
3018 pub(crate) code: std::option::Option<std::string::String>,
3019 pub(crate) message: std::option::Option<std::string::String>,
3020 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
3021 }
3022 impl Builder {
3023 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
3025 self.code = Some(input.into());
3026 self
3027 }
3028 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
3030 self.code = input;
3031 self
3032 }
3033 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
3035 self.message = Some(input.into());
3036 self
3037 }
3038 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
3040 self.message = input;
3041 self
3042 }
3043 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
3045 self.metadata = Some(input);
3046 self
3047 }
3048 pub fn set_metadata(
3050 mut self,
3051 input: std::option::Option<aws_smithy_types::Document>,
3052 ) -> Self {
3053 self.metadata = input;
3054 self
3055 }
3056 pub fn build(self) -> crate::error::InternalError {
3058 crate::error::InternalError {
3059 code: self.code,
3060 message: self.message,
3061 metadata: self.metadata,
3062 }
3063 }
3064 }
3065}
3066impl InternalError {
3067 pub fn builder() -> crate::error::internal_error::Builder {
3069 crate::error::internal_error::Builder::default()
3070 }
3071}