1#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct CreatePartyError {
6 pub kind: CreatePartyErrorKind,
8 pub(crate) meta: aws_smithy_types::Error,
10}
11#[non_exhaustive]
13#[derive(std::fmt::Debug)]
14pub enum CreatePartyErrorKind {
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 CreatePartyError {
31 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32 match &self.kind {
33 CreatePartyErrorKind::InternalError(_inner) => _inner.fmt(f),
34 CreatePartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
35 CreatePartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
36 CreatePartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
37 CreatePartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
38 CreatePartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
39 CreatePartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
40 }
41 }
42}
43impl aws_smithy_types::retry::ProvideErrorKind for CreatePartyError {
44 fn code(&self) -> Option<&str> {
45 CreatePartyError::code(self)
46 }
47 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
48 match &self.kind {
49 CreatePartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
50 CreatePartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
51 _ => None,
52 }
53 }
54}
55impl CreatePartyError {
56 pub fn new(kind: CreatePartyErrorKind, meta: aws_smithy_types::Error) -> Self {
58 Self { kind, meta }
59 }
60
61 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
63 Self {
64 kind: CreatePartyErrorKind::Unhandled(err.into()),
65 meta: Default::default(),
66 }
67 }
68
69 pub fn generic(err: aws_smithy_types::Error) -> Self {
71 Self {
72 meta: err.clone(),
73 kind: CreatePartyErrorKind::Unhandled(err.into()),
74 }
75 }
76
77 pub fn message(&self) -> Option<&str> {
79 self.meta.message()
80 }
81
82 pub fn meta(&self) -> &aws_smithy_types::Error {
85 &self.meta
86 }
87
88 pub fn request_id(&self) -> Option<&str> {
90 self.meta.request_id()
91 }
92
93 pub fn code(&self) -> Option<&str> {
95 self.meta.code()
96 }
97 pub fn is_internal_error(&self) -> bool {
99 matches!(&self.kind, CreatePartyErrorKind::InternalError(_))
100 }
101 pub fn is_rate_limit_error(&self) -> bool {
103 matches!(&self.kind, CreatePartyErrorKind::RateLimitError(_))
104 }
105 pub fn is_forbidden_error(&self) -> bool {
107 matches!(&self.kind, CreatePartyErrorKind::ForbiddenError(_))
108 }
109 pub fn is_unauthorized_error(&self) -> bool {
111 matches!(&self.kind, CreatePartyErrorKind::UnauthorizedError(_))
112 }
113 pub fn is_not_found_error(&self) -> bool {
115 matches!(&self.kind, CreatePartyErrorKind::NotFoundError(_))
116 }
117 pub fn is_bad_request_error(&self) -> bool {
119 matches!(&self.kind, CreatePartyErrorKind::BadRequestError(_))
120 }
121}
122impl std::error::Error for CreatePartyError {
123 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
124 match &self.kind {
125 CreatePartyErrorKind::InternalError(_inner) => Some(_inner),
126 CreatePartyErrorKind::RateLimitError(_inner) => Some(_inner),
127 CreatePartyErrorKind::ForbiddenError(_inner) => Some(_inner),
128 CreatePartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
129 CreatePartyErrorKind::NotFoundError(_inner) => Some(_inner),
130 CreatePartyErrorKind::BadRequestError(_inner) => Some(_inner),
131 CreatePartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
132 }
133 }
134}
135
136#[non_exhaustive]
138#[derive(std::fmt::Debug)]
139pub struct CreatePartyInviteError {
140 pub kind: CreatePartyInviteErrorKind,
142 pub(crate) meta: aws_smithy_types::Error,
144}
145#[non_exhaustive]
147#[derive(std::fmt::Debug)]
148pub enum CreatePartyInviteErrorKind {
149 InternalError(crate::error::InternalError),
151 RateLimitError(crate::error::RateLimitError),
153 ForbiddenError(crate::error::ForbiddenError),
155 UnauthorizedError(crate::error::UnauthorizedError),
157 NotFoundError(crate::error::NotFoundError),
159 BadRequestError(crate::error::BadRequestError),
161 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
163}
164impl std::fmt::Display for CreatePartyInviteError {
165 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
166 match &self.kind {
167 CreatePartyInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
168 CreatePartyInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
169 CreatePartyInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
170 CreatePartyInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
171 CreatePartyInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
172 CreatePartyInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
173 CreatePartyInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
174 }
175 }
176}
177impl aws_smithy_types::retry::ProvideErrorKind for CreatePartyInviteError {
178 fn code(&self) -> Option<&str> {
179 CreatePartyInviteError::code(self)
180 }
181 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
182 match &self.kind {
183 CreatePartyInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
184 CreatePartyInviteErrorKind::UnauthorizedError(inner) => {
185 Some(inner.retryable_error_kind())
186 }
187 _ => None,
188 }
189 }
190}
191impl CreatePartyInviteError {
192 pub fn new(kind: CreatePartyInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
194 Self { kind, meta }
195 }
196
197 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
199 Self {
200 kind: CreatePartyInviteErrorKind::Unhandled(err.into()),
201 meta: Default::default(),
202 }
203 }
204
205 pub fn generic(err: aws_smithy_types::Error) -> Self {
207 Self {
208 meta: err.clone(),
209 kind: CreatePartyInviteErrorKind::Unhandled(err.into()),
210 }
211 }
212
213 pub fn message(&self) -> Option<&str> {
215 self.meta.message()
216 }
217
218 pub fn meta(&self) -> &aws_smithy_types::Error {
221 &self.meta
222 }
223
224 pub fn request_id(&self) -> Option<&str> {
226 self.meta.request_id()
227 }
228
229 pub fn code(&self) -> Option<&str> {
231 self.meta.code()
232 }
233 pub fn is_internal_error(&self) -> bool {
235 matches!(&self.kind, CreatePartyInviteErrorKind::InternalError(_))
236 }
237 pub fn is_rate_limit_error(&self) -> bool {
239 matches!(&self.kind, CreatePartyInviteErrorKind::RateLimitError(_))
240 }
241 pub fn is_forbidden_error(&self) -> bool {
243 matches!(&self.kind, CreatePartyInviteErrorKind::ForbiddenError(_))
244 }
245 pub fn is_unauthorized_error(&self) -> bool {
247 matches!(&self.kind, CreatePartyInviteErrorKind::UnauthorizedError(_))
248 }
249 pub fn is_not_found_error(&self) -> bool {
251 matches!(&self.kind, CreatePartyInviteErrorKind::NotFoundError(_))
252 }
253 pub fn is_bad_request_error(&self) -> bool {
255 matches!(&self.kind, CreatePartyInviteErrorKind::BadRequestError(_))
256 }
257}
258impl std::error::Error for CreatePartyInviteError {
259 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
260 match &self.kind {
261 CreatePartyInviteErrorKind::InternalError(_inner) => Some(_inner),
262 CreatePartyInviteErrorKind::RateLimitError(_inner) => Some(_inner),
263 CreatePartyInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
264 CreatePartyInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
265 CreatePartyInviteErrorKind::NotFoundError(_inner) => Some(_inner),
266 CreatePartyInviteErrorKind::BadRequestError(_inner) => Some(_inner),
267 CreatePartyInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
268 }
269 }
270}
271
272#[non_exhaustive]
274#[derive(std::fmt::Debug)]
275pub struct GetPartyFromInviteError {
276 pub kind: GetPartyFromInviteErrorKind,
278 pub(crate) meta: aws_smithy_types::Error,
280}
281#[non_exhaustive]
283#[derive(std::fmt::Debug)]
284pub enum GetPartyFromInviteErrorKind {
285 InternalError(crate::error::InternalError),
287 RateLimitError(crate::error::RateLimitError),
289 ForbiddenError(crate::error::ForbiddenError),
291 UnauthorizedError(crate::error::UnauthorizedError),
293 NotFoundError(crate::error::NotFoundError),
295 BadRequestError(crate::error::BadRequestError),
297 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
299}
300impl std::fmt::Display for GetPartyFromInviteError {
301 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
302 match &self.kind {
303 GetPartyFromInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
304 GetPartyFromInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
305 GetPartyFromInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
306 GetPartyFromInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
307 GetPartyFromInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
308 GetPartyFromInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
309 GetPartyFromInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
310 }
311 }
312}
313impl aws_smithy_types::retry::ProvideErrorKind for GetPartyFromInviteError {
314 fn code(&self) -> Option<&str> {
315 GetPartyFromInviteError::code(self)
316 }
317 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
318 match &self.kind {
319 GetPartyFromInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
320 GetPartyFromInviteErrorKind::UnauthorizedError(inner) => {
321 Some(inner.retryable_error_kind())
322 }
323 _ => None,
324 }
325 }
326}
327impl GetPartyFromInviteError {
328 pub fn new(kind: GetPartyFromInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
330 Self { kind, meta }
331 }
332
333 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
335 Self {
336 kind: GetPartyFromInviteErrorKind::Unhandled(err.into()),
337 meta: Default::default(),
338 }
339 }
340
341 pub fn generic(err: aws_smithy_types::Error) -> Self {
343 Self {
344 meta: err.clone(),
345 kind: GetPartyFromInviteErrorKind::Unhandled(err.into()),
346 }
347 }
348
349 pub fn message(&self) -> Option<&str> {
351 self.meta.message()
352 }
353
354 pub fn meta(&self) -> &aws_smithy_types::Error {
357 &self.meta
358 }
359
360 pub fn request_id(&self) -> Option<&str> {
362 self.meta.request_id()
363 }
364
365 pub fn code(&self) -> Option<&str> {
367 self.meta.code()
368 }
369 pub fn is_internal_error(&self) -> bool {
371 matches!(&self.kind, GetPartyFromInviteErrorKind::InternalError(_))
372 }
373 pub fn is_rate_limit_error(&self) -> bool {
375 matches!(&self.kind, GetPartyFromInviteErrorKind::RateLimitError(_))
376 }
377 pub fn is_forbidden_error(&self) -> bool {
379 matches!(&self.kind, GetPartyFromInviteErrorKind::ForbiddenError(_))
380 }
381 pub fn is_unauthorized_error(&self) -> bool {
383 matches!(
384 &self.kind,
385 GetPartyFromInviteErrorKind::UnauthorizedError(_)
386 )
387 }
388 pub fn is_not_found_error(&self) -> bool {
390 matches!(&self.kind, GetPartyFromInviteErrorKind::NotFoundError(_))
391 }
392 pub fn is_bad_request_error(&self) -> bool {
394 matches!(&self.kind, GetPartyFromInviteErrorKind::BadRequestError(_))
395 }
396}
397impl std::error::Error for GetPartyFromInviteError {
398 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
399 match &self.kind {
400 GetPartyFromInviteErrorKind::InternalError(_inner) => Some(_inner),
401 GetPartyFromInviteErrorKind::RateLimitError(_inner) => Some(_inner),
402 GetPartyFromInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
403 GetPartyFromInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
404 GetPartyFromInviteErrorKind::NotFoundError(_inner) => Some(_inner),
405 GetPartyFromInviteErrorKind::BadRequestError(_inner) => Some(_inner),
406 GetPartyFromInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
407 }
408 }
409}
410
411#[non_exhaustive]
413#[derive(std::fmt::Debug)]
414pub struct GetPartyProfileError {
415 pub kind: GetPartyProfileErrorKind,
417 pub(crate) meta: aws_smithy_types::Error,
419}
420#[non_exhaustive]
422#[derive(std::fmt::Debug)]
423pub enum GetPartyProfileErrorKind {
424 InternalError(crate::error::InternalError),
426 RateLimitError(crate::error::RateLimitError),
428 ForbiddenError(crate::error::ForbiddenError),
430 UnauthorizedError(crate::error::UnauthorizedError),
432 NotFoundError(crate::error::NotFoundError),
434 BadRequestError(crate::error::BadRequestError),
436 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
438}
439impl std::fmt::Display for GetPartyProfileError {
440 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
441 match &self.kind {
442 GetPartyProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
443 GetPartyProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
444 GetPartyProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
445 GetPartyProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
446 GetPartyProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
447 GetPartyProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
448 GetPartyProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
449 }
450 }
451}
452impl aws_smithy_types::retry::ProvideErrorKind for GetPartyProfileError {
453 fn code(&self) -> Option<&str> {
454 GetPartyProfileError::code(self)
455 }
456 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
457 match &self.kind {
458 GetPartyProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
459 GetPartyProfileErrorKind::UnauthorizedError(inner) => {
460 Some(inner.retryable_error_kind())
461 }
462 _ => None,
463 }
464 }
465}
466impl GetPartyProfileError {
467 pub fn new(kind: GetPartyProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
469 Self { kind, meta }
470 }
471
472 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
474 Self {
475 kind: GetPartyProfileErrorKind::Unhandled(err.into()),
476 meta: Default::default(),
477 }
478 }
479
480 pub fn generic(err: aws_smithy_types::Error) -> Self {
482 Self {
483 meta: err.clone(),
484 kind: GetPartyProfileErrorKind::Unhandled(err.into()),
485 }
486 }
487
488 pub fn message(&self) -> Option<&str> {
490 self.meta.message()
491 }
492
493 pub fn meta(&self) -> &aws_smithy_types::Error {
496 &self.meta
497 }
498
499 pub fn request_id(&self) -> Option<&str> {
501 self.meta.request_id()
502 }
503
504 pub fn code(&self) -> Option<&str> {
506 self.meta.code()
507 }
508 pub fn is_internal_error(&self) -> bool {
510 matches!(&self.kind, GetPartyProfileErrorKind::InternalError(_))
511 }
512 pub fn is_rate_limit_error(&self) -> bool {
514 matches!(&self.kind, GetPartyProfileErrorKind::RateLimitError(_))
515 }
516 pub fn is_forbidden_error(&self) -> bool {
518 matches!(&self.kind, GetPartyProfileErrorKind::ForbiddenError(_))
519 }
520 pub fn is_unauthorized_error(&self) -> bool {
522 matches!(&self.kind, GetPartyProfileErrorKind::UnauthorizedError(_))
523 }
524 pub fn is_not_found_error(&self) -> bool {
526 matches!(&self.kind, GetPartyProfileErrorKind::NotFoundError(_))
527 }
528 pub fn is_bad_request_error(&self) -> bool {
530 matches!(&self.kind, GetPartyProfileErrorKind::BadRequestError(_))
531 }
532}
533impl std::error::Error for GetPartyProfileError {
534 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
535 match &self.kind {
536 GetPartyProfileErrorKind::InternalError(_inner) => Some(_inner),
537 GetPartyProfileErrorKind::RateLimitError(_inner) => Some(_inner),
538 GetPartyProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
539 GetPartyProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
540 GetPartyProfileErrorKind::NotFoundError(_inner) => Some(_inner),
541 GetPartyProfileErrorKind::BadRequestError(_inner) => Some(_inner),
542 GetPartyProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
543 }
544 }
545}
546
547#[non_exhaustive]
549#[derive(std::fmt::Debug)]
550pub struct GetPartySelfProfileError {
551 pub kind: GetPartySelfProfileErrorKind,
553 pub(crate) meta: aws_smithy_types::Error,
555}
556#[non_exhaustive]
558#[derive(std::fmt::Debug)]
559pub enum GetPartySelfProfileErrorKind {
560 InternalError(crate::error::InternalError),
562 RateLimitError(crate::error::RateLimitError),
564 ForbiddenError(crate::error::ForbiddenError),
566 UnauthorizedError(crate::error::UnauthorizedError),
568 NotFoundError(crate::error::NotFoundError),
570 BadRequestError(crate::error::BadRequestError),
572 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
574}
575impl std::fmt::Display for GetPartySelfProfileError {
576 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
577 match &self.kind {
578 GetPartySelfProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
579 GetPartySelfProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
580 GetPartySelfProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
581 GetPartySelfProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
582 GetPartySelfProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
583 GetPartySelfProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
584 GetPartySelfProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
585 }
586 }
587}
588impl aws_smithy_types::retry::ProvideErrorKind for GetPartySelfProfileError {
589 fn code(&self) -> Option<&str> {
590 GetPartySelfProfileError::code(self)
591 }
592 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
593 match &self.kind {
594 GetPartySelfProfileErrorKind::InternalError(inner) => {
595 Some(inner.retryable_error_kind())
596 }
597 GetPartySelfProfileErrorKind::UnauthorizedError(inner) => {
598 Some(inner.retryable_error_kind())
599 }
600 _ => None,
601 }
602 }
603}
604impl GetPartySelfProfileError {
605 pub fn new(kind: GetPartySelfProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
607 Self { kind, meta }
608 }
609
610 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
612 Self {
613 kind: GetPartySelfProfileErrorKind::Unhandled(err.into()),
614 meta: Default::default(),
615 }
616 }
617
618 pub fn generic(err: aws_smithy_types::Error) -> Self {
620 Self {
621 meta: err.clone(),
622 kind: GetPartySelfProfileErrorKind::Unhandled(err.into()),
623 }
624 }
625
626 pub fn message(&self) -> Option<&str> {
628 self.meta.message()
629 }
630
631 pub fn meta(&self) -> &aws_smithy_types::Error {
634 &self.meta
635 }
636
637 pub fn request_id(&self) -> Option<&str> {
639 self.meta.request_id()
640 }
641
642 pub fn code(&self) -> Option<&str> {
644 self.meta.code()
645 }
646 pub fn is_internal_error(&self) -> bool {
648 matches!(&self.kind, GetPartySelfProfileErrorKind::InternalError(_))
649 }
650 pub fn is_rate_limit_error(&self) -> bool {
652 matches!(&self.kind, GetPartySelfProfileErrorKind::RateLimitError(_))
653 }
654 pub fn is_forbidden_error(&self) -> bool {
656 matches!(&self.kind, GetPartySelfProfileErrorKind::ForbiddenError(_))
657 }
658 pub fn is_unauthorized_error(&self) -> bool {
660 matches!(
661 &self.kind,
662 GetPartySelfProfileErrorKind::UnauthorizedError(_)
663 )
664 }
665 pub fn is_not_found_error(&self) -> bool {
667 matches!(&self.kind, GetPartySelfProfileErrorKind::NotFoundError(_))
668 }
669 pub fn is_bad_request_error(&self) -> bool {
671 matches!(&self.kind, GetPartySelfProfileErrorKind::BadRequestError(_))
672 }
673}
674impl std::error::Error for GetPartySelfProfileError {
675 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
676 match &self.kind {
677 GetPartySelfProfileErrorKind::InternalError(_inner) => Some(_inner),
678 GetPartySelfProfileErrorKind::RateLimitError(_inner) => Some(_inner),
679 GetPartySelfProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
680 GetPartySelfProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
681 GetPartySelfProfileErrorKind::NotFoundError(_inner) => Some(_inner),
682 GetPartySelfProfileErrorKind::BadRequestError(_inner) => Some(_inner),
683 GetPartySelfProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
684 }
685 }
686}
687
688#[non_exhaustive]
690#[derive(std::fmt::Debug)]
691pub struct GetPartySelfSummaryError {
692 pub kind: GetPartySelfSummaryErrorKind,
694 pub(crate) meta: aws_smithy_types::Error,
696}
697#[non_exhaustive]
699#[derive(std::fmt::Debug)]
700pub enum GetPartySelfSummaryErrorKind {
701 InternalError(crate::error::InternalError),
703 RateLimitError(crate::error::RateLimitError),
705 ForbiddenError(crate::error::ForbiddenError),
707 UnauthorizedError(crate::error::UnauthorizedError),
709 NotFoundError(crate::error::NotFoundError),
711 BadRequestError(crate::error::BadRequestError),
713 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
715}
716impl std::fmt::Display for GetPartySelfSummaryError {
717 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
718 match &self.kind {
719 GetPartySelfSummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
720 GetPartySelfSummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
721 GetPartySelfSummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
722 GetPartySelfSummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
723 GetPartySelfSummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
724 GetPartySelfSummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
725 GetPartySelfSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
726 }
727 }
728}
729impl aws_smithy_types::retry::ProvideErrorKind for GetPartySelfSummaryError {
730 fn code(&self) -> Option<&str> {
731 GetPartySelfSummaryError::code(self)
732 }
733 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
734 match &self.kind {
735 GetPartySelfSummaryErrorKind::InternalError(inner) => {
736 Some(inner.retryable_error_kind())
737 }
738 GetPartySelfSummaryErrorKind::UnauthorizedError(inner) => {
739 Some(inner.retryable_error_kind())
740 }
741 _ => None,
742 }
743 }
744}
745impl GetPartySelfSummaryError {
746 pub fn new(kind: GetPartySelfSummaryErrorKind, meta: aws_smithy_types::Error) -> Self {
748 Self { kind, meta }
749 }
750
751 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
753 Self {
754 kind: GetPartySelfSummaryErrorKind::Unhandled(err.into()),
755 meta: Default::default(),
756 }
757 }
758
759 pub fn generic(err: aws_smithy_types::Error) -> Self {
761 Self {
762 meta: err.clone(),
763 kind: GetPartySelfSummaryErrorKind::Unhandled(err.into()),
764 }
765 }
766
767 pub fn message(&self) -> Option<&str> {
769 self.meta.message()
770 }
771
772 pub fn meta(&self) -> &aws_smithy_types::Error {
775 &self.meta
776 }
777
778 pub fn request_id(&self) -> Option<&str> {
780 self.meta.request_id()
781 }
782
783 pub fn code(&self) -> Option<&str> {
785 self.meta.code()
786 }
787 pub fn is_internal_error(&self) -> bool {
789 matches!(&self.kind, GetPartySelfSummaryErrorKind::InternalError(_))
790 }
791 pub fn is_rate_limit_error(&self) -> bool {
793 matches!(&self.kind, GetPartySelfSummaryErrorKind::RateLimitError(_))
794 }
795 pub fn is_forbidden_error(&self) -> bool {
797 matches!(&self.kind, GetPartySelfSummaryErrorKind::ForbiddenError(_))
798 }
799 pub fn is_unauthorized_error(&self) -> bool {
801 matches!(
802 &self.kind,
803 GetPartySelfSummaryErrorKind::UnauthorizedError(_)
804 )
805 }
806 pub fn is_not_found_error(&self) -> bool {
808 matches!(&self.kind, GetPartySelfSummaryErrorKind::NotFoundError(_))
809 }
810 pub fn is_bad_request_error(&self) -> bool {
812 matches!(&self.kind, GetPartySelfSummaryErrorKind::BadRequestError(_))
813 }
814}
815impl std::error::Error for GetPartySelfSummaryError {
816 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
817 match &self.kind {
818 GetPartySelfSummaryErrorKind::InternalError(_inner) => Some(_inner),
819 GetPartySelfSummaryErrorKind::RateLimitError(_inner) => Some(_inner),
820 GetPartySelfSummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
821 GetPartySelfSummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
822 GetPartySelfSummaryErrorKind::NotFoundError(_inner) => Some(_inner),
823 GetPartySelfSummaryErrorKind::BadRequestError(_inner) => Some(_inner),
824 GetPartySelfSummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
825 }
826 }
827}
828
829#[non_exhaustive]
831#[derive(std::fmt::Debug)]
832pub struct GetPartySummaryError {
833 pub kind: GetPartySummaryErrorKind,
835 pub(crate) meta: aws_smithy_types::Error,
837}
838#[non_exhaustive]
840#[derive(std::fmt::Debug)]
841pub enum GetPartySummaryErrorKind {
842 InternalError(crate::error::InternalError),
844 RateLimitError(crate::error::RateLimitError),
846 ForbiddenError(crate::error::ForbiddenError),
848 UnauthorizedError(crate::error::UnauthorizedError),
850 NotFoundError(crate::error::NotFoundError),
852 BadRequestError(crate::error::BadRequestError),
854 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
856}
857impl std::fmt::Display for GetPartySummaryError {
858 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
859 match &self.kind {
860 GetPartySummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
861 GetPartySummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
862 GetPartySummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
863 GetPartySummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
864 GetPartySummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
865 GetPartySummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
866 GetPartySummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
867 }
868 }
869}
870impl aws_smithy_types::retry::ProvideErrorKind for GetPartySummaryError {
871 fn code(&self) -> Option<&str> {
872 GetPartySummaryError::code(self)
873 }
874 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
875 match &self.kind {
876 GetPartySummaryErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
877 GetPartySummaryErrorKind::UnauthorizedError(inner) => {
878 Some(inner.retryable_error_kind())
879 }
880 _ => None,
881 }
882 }
883}
884impl GetPartySummaryError {
885 pub fn new(kind: GetPartySummaryErrorKind, meta: aws_smithy_types::Error) -> Self {
887 Self { kind, meta }
888 }
889
890 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
892 Self {
893 kind: GetPartySummaryErrorKind::Unhandled(err.into()),
894 meta: Default::default(),
895 }
896 }
897
898 pub fn generic(err: aws_smithy_types::Error) -> Self {
900 Self {
901 meta: err.clone(),
902 kind: GetPartySummaryErrorKind::Unhandled(err.into()),
903 }
904 }
905
906 pub fn message(&self) -> Option<&str> {
908 self.meta.message()
909 }
910
911 pub fn meta(&self) -> &aws_smithy_types::Error {
914 &self.meta
915 }
916
917 pub fn request_id(&self) -> Option<&str> {
919 self.meta.request_id()
920 }
921
922 pub fn code(&self) -> Option<&str> {
924 self.meta.code()
925 }
926 pub fn is_internal_error(&self) -> bool {
928 matches!(&self.kind, GetPartySummaryErrorKind::InternalError(_))
929 }
930 pub fn is_rate_limit_error(&self) -> bool {
932 matches!(&self.kind, GetPartySummaryErrorKind::RateLimitError(_))
933 }
934 pub fn is_forbidden_error(&self) -> bool {
936 matches!(&self.kind, GetPartySummaryErrorKind::ForbiddenError(_))
937 }
938 pub fn is_unauthorized_error(&self) -> bool {
940 matches!(&self.kind, GetPartySummaryErrorKind::UnauthorizedError(_))
941 }
942 pub fn is_not_found_error(&self) -> bool {
944 matches!(&self.kind, GetPartySummaryErrorKind::NotFoundError(_))
945 }
946 pub fn is_bad_request_error(&self) -> bool {
948 matches!(&self.kind, GetPartySummaryErrorKind::BadRequestError(_))
949 }
950}
951impl std::error::Error for GetPartySummaryError {
952 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
953 match &self.kind {
954 GetPartySummaryErrorKind::InternalError(_inner) => Some(_inner),
955 GetPartySummaryErrorKind::RateLimitError(_inner) => Some(_inner),
956 GetPartySummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
957 GetPartySummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
958 GetPartySummaryErrorKind::NotFoundError(_inner) => Some(_inner),
959 GetPartySummaryErrorKind::BadRequestError(_inner) => Some(_inner),
960 GetPartySummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
961 }
962 }
963}
964
965#[non_exhaustive]
967#[derive(std::fmt::Debug)]
968pub struct JoinPartyError {
969 pub kind: JoinPartyErrorKind,
971 pub(crate) meta: aws_smithy_types::Error,
973}
974#[non_exhaustive]
976#[derive(std::fmt::Debug)]
977pub enum JoinPartyErrorKind {
978 InternalError(crate::error::InternalError),
980 RateLimitError(crate::error::RateLimitError),
982 ForbiddenError(crate::error::ForbiddenError),
984 UnauthorizedError(crate::error::UnauthorizedError),
986 NotFoundError(crate::error::NotFoundError),
988 BadRequestError(crate::error::BadRequestError),
990 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
992}
993impl std::fmt::Display for JoinPartyError {
994 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
995 match &self.kind {
996 JoinPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
997 JoinPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
998 JoinPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
999 JoinPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1000 JoinPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1001 JoinPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1002 JoinPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
1003 }
1004 }
1005}
1006impl aws_smithy_types::retry::ProvideErrorKind for JoinPartyError {
1007 fn code(&self) -> Option<&str> {
1008 JoinPartyError::code(self)
1009 }
1010 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1011 match &self.kind {
1012 JoinPartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1013 JoinPartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1014 _ => None,
1015 }
1016 }
1017}
1018impl JoinPartyError {
1019 pub fn new(kind: JoinPartyErrorKind, meta: aws_smithy_types::Error) -> Self {
1021 Self { kind, meta }
1022 }
1023
1024 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1026 Self {
1027 kind: JoinPartyErrorKind::Unhandled(err.into()),
1028 meta: Default::default(),
1029 }
1030 }
1031
1032 pub fn generic(err: aws_smithy_types::Error) -> Self {
1034 Self {
1035 meta: err.clone(),
1036 kind: JoinPartyErrorKind::Unhandled(err.into()),
1037 }
1038 }
1039
1040 pub fn message(&self) -> Option<&str> {
1042 self.meta.message()
1043 }
1044
1045 pub fn meta(&self) -> &aws_smithy_types::Error {
1048 &self.meta
1049 }
1050
1051 pub fn request_id(&self) -> Option<&str> {
1053 self.meta.request_id()
1054 }
1055
1056 pub fn code(&self) -> Option<&str> {
1058 self.meta.code()
1059 }
1060 pub fn is_internal_error(&self) -> bool {
1062 matches!(&self.kind, JoinPartyErrorKind::InternalError(_))
1063 }
1064 pub fn is_rate_limit_error(&self) -> bool {
1066 matches!(&self.kind, JoinPartyErrorKind::RateLimitError(_))
1067 }
1068 pub fn is_forbidden_error(&self) -> bool {
1070 matches!(&self.kind, JoinPartyErrorKind::ForbiddenError(_))
1071 }
1072 pub fn is_unauthorized_error(&self) -> bool {
1074 matches!(&self.kind, JoinPartyErrorKind::UnauthorizedError(_))
1075 }
1076 pub fn is_not_found_error(&self) -> bool {
1078 matches!(&self.kind, JoinPartyErrorKind::NotFoundError(_))
1079 }
1080 pub fn is_bad_request_error(&self) -> bool {
1082 matches!(&self.kind, JoinPartyErrorKind::BadRequestError(_))
1083 }
1084}
1085impl std::error::Error for JoinPartyError {
1086 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1087 match &self.kind {
1088 JoinPartyErrorKind::InternalError(_inner) => Some(_inner),
1089 JoinPartyErrorKind::RateLimitError(_inner) => Some(_inner),
1090 JoinPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
1091 JoinPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
1092 JoinPartyErrorKind::NotFoundError(_inner) => Some(_inner),
1093 JoinPartyErrorKind::BadRequestError(_inner) => Some(_inner),
1094 JoinPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1095 }
1096 }
1097}
1098
1099#[non_exhaustive]
1101#[derive(std::fmt::Debug)]
1102pub struct KickMemberError {
1103 pub kind: KickMemberErrorKind,
1105 pub(crate) meta: aws_smithy_types::Error,
1107}
1108#[non_exhaustive]
1110#[derive(std::fmt::Debug)]
1111pub enum KickMemberErrorKind {
1112 InternalError(crate::error::InternalError),
1114 RateLimitError(crate::error::RateLimitError),
1116 ForbiddenError(crate::error::ForbiddenError),
1118 UnauthorizedError(crate::error::UnauthorizedError),
1120 NotFoundError(crate::error::NotFoundError),
1122 BadRequestError(crate::error::BadRequestError),
1124 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1126}
1127impl std::fmt::Display for KickMemberError {
1128 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1129 match &self.kind {
1130 KickMemberErrorKind::InternalError(_inner) => _inner.fmt(f),
1131 KickMemberErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1132 KickMemberErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1133 KickMemberErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1134 KickMemberErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1135 KickMemberErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1136 KickMemberErrorKind::Unhandled(_inner) => _inner.fmt(f),
1137 }
1138 }
1139}
1140impl aws_smithy_types::retry::ProvideErrorKind for KickMemberError {
1141 fn code(&self) -> Option<&str> {
1142 KickMemberError::code(self)
1143 }
1144 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1145 match &self.kind {
1146 KickMemberErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1147 KickMemberErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1148 _ => None,
1149 }
1150 }
1151}
1152impl KickMemberError {
1153 pub fn new(kind: KickMemberErrorKind, meta: aws_smithy_types::Error) -> Self {
1155 Self { kind, meta }
1156 }
1157
1158 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1160 Self {
1161 kind: KickMemberErrorKind::Unhandled(err.into()),
1162 meta: Default::default(),
1163 }
1164 }
1165
1166 pub fn generic(err: aws_smithy_types::Error) -> Self {
1168 Self {
1169 meta: err.clone(),
1170 kind: KickMemberErrorKind::Unhandled(err.into()),
1171 }
1172 }
1173
1174 pub fn message(&self) -> Option<&str> {
1176 self.meta.message()
1177 }
1178
1179 pub fn meta(&self) -> &aws_smithy_types::Error {
1182 &self.meta
1183 }
1184
1185 pub fn request_id(&self) -> Option<&str> {
1187 self.meta.request_id()
1188 }
1189
1190 pub fn code(&self) -> Option<&str> {
1192 self.meta.code()
1193 }
1194 pub fn is_internal_error(&self) -> bool {
1196 matches!(&self.kind, KickMemberErrorKind::InternalError(_))
1197 }
1198 pub fn is_rate_limit_error(&self) -> bool {
1200 matches!(&self.kind, KickMemberErrorKind::RateLimitError(_))
1201 }
1202 pub fn is_forbidden_error(&self) -> bool {
1204 matches!(&self.kind, KickMemberErrorKind::ForbiddenError(_))
1205 }
1206 pub fn is_unauthorized_error(&self) -> bool {
1208 matches!(&self.kind, KickMemberErrorKind::UnauthorizedError(_))
1209 }
1210 pub fn is_not_found_error(&self) -> bool {
1212 matches!(&self.kind, KickMemberErrorKind::NotFoundError(_))
1213 }
1214 pub fn is_bad_request_error(&self) -> bool {
1216 matches!(&self.kind, KickMemberErrorKind::BadRequestError(_))
1217 }
1218}
1219impl std::error::Error for KickMemberError {
1220 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1221 match &self.kind {
1222 KickMemberErrorKind::InternalError(_inner) => Some(_inner),
1223 KickMemberErrorKind::RateLimitError(_inner) => Some(_inner),
1224 KickMemberErrorKind::ForbiddenError(_inner) => Some(_inner),
1225 KickMemberErrorKind::UnauthorizedError(_inner) => Some(_inner),
1226 KickMemberErrorKind::NotFoundError(_inner) => Some(_inner),
1227 KickMemberErrorKind::BadRequestError(_inner) => Some(_inner),
1228 KickMemberErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1229 }
1230 }
1231}
1232
1233#[non_exhaustive]
1235#[derive(std::fmt::Debug)]
1236pub struct LeavePartyError {
1237 pub kind: LeavePartyErrorKind,
1239 pub(crate) meta: aws_smithy_types::Error,
1241}
1242#[non_exhaustive]
1244#[derive(std::fmt::Debug)]
1245pub enum LeavePartyErrorKind {
1246 InternalError(crate::error::InternalError),
1248 RateLimitError(crate::error::RateLimitError),
1250 ForbiddenError(crate::error::ForbiddenError),
1252 UnauthorizedError(crate::error::UnauthorizedError),
1254 NotFoundError(crate::error::NotFoundError),
1256 BadRequestError(crate::error::BadRequestError),
1258 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1260}
1261impl std::fmt::Display for LeavePartyError {
1262 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1263 match &self.kind {
1264 LeavePartyErrorKind::InternalError(_inner) => _inner.fmt(f),
1265 LeavePartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1266 LeavePartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1267 LeavePartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1268 LeavePartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1269 LeavePartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1270 LeavePartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
1271 }
1272 }
1273}
1274impl aws_smithy_types::retry::ProvideErrorKind for LeavePartyError {
1275 fn code(&self) -> Option<&str> {
1276 LeavePartyError::code(self)
1277 }
1278 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1279 match &self.kind {
1280 LeavePartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1281 LeavePartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
1282 _ => None,
1283 }
1284 }
1285}
1286impl LeavePartyError {
1287 pub fn new(kind: LeavePartyErrorKind, meta: aws_smithy_types::Error) -> Self {
1289 Self { kind, meta }
1290 }
1291
1292 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1294 Self {
1295 kind: LeavePartyErrorKind::Unhandled(err.into()),
1296 meta: Default::default(),
1297 }
1298 }
1299
1300 pub fn generic(err: aws_smithy_types::Error) -> Self {
1302 Self {
1303 meta: err.clone(),
1304 kind: LeavePartyErrorKind::Unhandled(err.into()),
1305 }
1306 }
1307
1308 pub fn message(&self) -> Option<&str> {
1310 self.meta.message()
1311 }
1312
1313 pub fn meta(&self) -> &aws_smithy_types::Error {
1316 &self.meta
1317 }
1318
1319 pub fn request_id(&self) -> Option<&str> {
1321 self.meta.request_id()
1322 }
1323
1324 pub fn code(&self) -> Option<&str> {
1326 self.meta.code()
1327 }
1328 pub fn is_internal_error(&self) -> bool {
1330 matches!(&self.kind, LeavePartyErrorKind::InternalError(_))
1331 }
1332 pub fn is_rate_limit_error(&self) -> bool {
1334 matches!(&self.kind, LeavePartyErrorKind::RateLimitError(_))
1335 }
1336 pub fn is_forbidden_error(&self) -> bool {
1338 matches!(&self.kind, LeavePartyErrorKind::ForbiddenError(_))
1339 }
1340 pub fn is_unauthorized_error(&self) -> bool {
1342 matches!(&self.kind, LeavePartyErrorKind::UnauthorizedError(_))
1343 }
1344 pub fn is_not_found_error(&self) -> bool {
1346 matches!(&self.kind, LeavePartyErrorKind::NotFoundError(_))
1347 }
1348 pub fn is_bad_request_error(&self) -> bool {
1350 matches!(&self.kind, LeavePartyErrorKind::BadRequestError(_))
1351 }
1352}
1353impl std::error::Error for LeavePartyError {
1354 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1355 match &self.kind {
1356 LeavePartyErrorKind::InternalError(_inner) => Some(_inner),
1357 LeavePartyErrorKind::RateLimitError(_inner) => Some(_inner),
1358 LeavePartyErrorKind::ForbiddenError(_inner) => Some(_inner),
1359 LeavePartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
1360 LeavePartyErrorKind::NotFoundError(_inner) => Some(_inner),
1361 LeavePartyErrorKind::BadRequestError(_inner) => Some(_inner),
1362 LeavePartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1363 }
1364 }
1365}
1366
1367#[non_exhaustive]
1369#[derive(std::fmt::Debug)]
1370pub struct RevokePartyInviteError {
1371 pub kind: RevokePartyInviteErrorKind,
1373 pub(crate) meta: aws_smithy_types::Error,
1375}
1376#[non_exhaustive]
1378#[derive(std::fmt::Debug)]
1379pub enum RevokePartyInviteErrorKind {
1380 InternalError(crate::error::InternalError),
1382 RateLimitError(crate::error::RateLimitError),
1384 ForbiddenError(crate::error::ForbiddenError),
1386 UnauthorizedError(crate::error::UnauthorizedError),
1388 NotFoundError(crate::error::NotFoundError),
1390 BadRequestError(crate::error::BadRequestError),
1392 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1394}
1395impl std::fmt::Display for RevokePartyInviteError {
1396 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1397 match &self.kind {
1398 RevokePartyInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
1399 RevokePartyInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1400 RevokePartyInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1401 RevokePartyInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1402 RevokePartyInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1403 RevokePartyInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1404 RevokePartyInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
1405 }
1406 }
1407}
1408impl aws_smithy_types::retry::ProvideErrorKind for RevokePartyInviteError {
1409 fn code(&self) -> Option<&str> {
1410 RevokePartyInviteError::code(self)
1411 }
1412 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1413 match &self.kind {
1414 RevokePartyInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1415 RevokePartyInviteErrorKind::UnauthorizedError(inner) => {
1416 Some(inner.retryable_error_kind())
1417 }
1418 _ => None,
1419 }
1420 }
1421}
1422impl RevokePartyInviteError {
1423 pub fn new(kind: RevokePartyInviteErrorKind, meta: aws_smithy_types::Error) -> Self {
1425 Self { kind, meta }
1426 }
1427
1428 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1430 Self {
1431 kind: RevokePartyInviteErrorKind::Unhandled(err.into()),
1432 meta: Default::default(),
1433 }
1434 }
1435
1436 pub fn generic(err: aws_smithy_types::Error) -> Self {
1438 Self {
1439 meta: err.clone(),
1440 kind: RevokePartyInviteErrorKind::Unhandled(err.into()),
1441 }
1442 }
1443
1444 pub fn message(&self) -> Option<&str> {
1446 self.meta.message()
1447 }
1448
1449 pub fn meta(&self) -> &aws_smithy_types::Error {
1452 &self.meta
1453 }
1454
1455 pub fn request_id(&self) -> Option<&str> {
1457 self.meta.request_id()
1458 }
1459
1460 pub fn code(&self) -> Option<&str> {
1462 self.meta.code()
1463 }
1464 pub fn is_internal_error(&self) -> bool {
1466 matches!(&self.kind, RevokePartyInviteErrorKind::InternalError(_))
1467 }
1468 pub fn is_rate_limit_error(&self) -> bool {
1470 matches!(&self.kind, RevokePartyInviteErrorKind::RateLimitError(_))
1471 }
1472 pub fn is_forbidden_error(&self) -> bool {
1474 matches!(&self.kind, RevokePartyInviteErrorKind::ForbiddenError(_))
1475 }
1476 pub fn is_unauthorized_error(&self) -> bool {
1478 matches!(&self.kind, RevokePartyInviteErrorKind::UnauthorizedError(_))
1479 }
1480 pub fn is_not_found_error(&self) -> bool {
1482 matches!(&self.kind, RevokePartyInviteErrorKind::NotFoundError(_))
1483 }
1484 pub fn is_bad_request_error(&self) -> bool {
1486 matches!(&self.kind, RevokePartyInviteErrorKind::BadRequestError(_))
1487 }
1488}
1489impl std::error::Error for RevokePartyInviteError {
1490 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1491 match &self.kind {
1492 RevokePartyInviteErrorKind::InternalError(_inner) => Some(_inner),
1493 RevokePartyInviteErrorKind::RateLimitError(_inner) => Some(_inner),
1494 RevokePartyInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
1495 RevokePartyInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
1496 RevokePartyInviteErrorKind::NotFoundError(_inner) => Some(_inner),
1497 RevokePartyInviteErrorKind::BadRequestError(_inner) => Some(_inner),
1498 RevokePartyInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1499 }
1500 }
1501}
1502
1503#[non_exhaustive]
1505#[derive(std::fmt::Debug)]
1506pub struct SendJoinRequestError {
1507 pub kind: SendJoinRequestErrorKind,
1509 pub(crate) meta: aws_smithy_types::Error,
1511}
1512#[non_exhaustive]
1514#[derive(std::fmt::Debug)]
1515pub enum SendJoinRequestErrorKind {
1516 InternalError(crate::error::InternalError),
1518 RateLimitError(crate::error::RateLimitError),
1520 ForbiddenError(crate::error::ForbiddenError),
1522 UnauthorizedError(crate::error::UnauthorizedError),
1524 NotFoundError(crate::error::NotFoundError),
1526 BadRequestError(crate::error::BadRequestError),
1528 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1530}
1531impl std::fmt::Display for SendJoinRequestError {
1532 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1533 match &self.kind {
1534 SendJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
1535 SendJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1536 SendJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1537 SendJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1538 SendJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1539 SendJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1540 SendJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
1541 }
1542 }
1543}
1544impl aws_smithy_types::retry::ProvideErrorKind for SendJoinRequestError {
1545 fn code(&self) -> Option<&str> {
1546 SendJoinRequestError::code(self)
1547 }
1548 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1549 match &self.kind {
1550 SendJoinRequestErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1551 SendJoinRequestErrorKind::UnauthorizedError(inner) => {
1552 Some(inner.retryable_error_kind())
1553 }
1554 _ => None,
1555 }
1556 }
1557}
1558impl SendJoinRequestError {
1559 pub fn new(kind: SendJoinRequestErrorKind, meta: aws_smithy_types::Error) -> Self {
1561 Self { kind, meta }
1562 }
1563
1564 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1566 Self {
1567 kind: SendJoinRequestErrorKind::Unhandled(err.into()),
1568 meta: Default::default(),
1569 }
1570 }
1571
1572 pub fn generic(err: aws_smithy_types::Error) -> Self {
1574 Self {
1575 meta: err.clone(),
1576 kind: SendJoinRequestErrorKind::Unhandled(err.into()),
1577 }
1578 }
1579
1580 pub fn message(&self) -> Option<&str> {
1582 self.meta.message()
1583 }
1584
1585 pub fn meta(&self) -> &aws_smithy_types::Error {
1588 &self.meta
1589 }
1590
1591 pub fn request_id(&self) -> Option<&str> {
1593 self.meta.request_id()
1594 }
1595
1596 pub fn code(&self) -> Option<&str> {
1598 self.meta.code()
1599 }
1600 pub fn is_internal_error(&self) -> bool {
1602 matches!(&self.kind, SendJoinRequestErrorKind::InternalError(_))
1603 }
1604 pub fn is_rate_limit_error(&self) -> bool {
1606 matches!(&self.kind, SendJoinRequestErrorKind::RateLimitError(_))
1607 }
1608 pub fn is_forbidden_error(&self) -> bool {
1610 matches!(&self.kind, SendJoinRequestErrorKind::ForbiddenError(_))
1611 }
1612 pub fn is_unauthorized_error(&self) -> bool {
1614 matches!(&self.kind, SendJoinRequestErrorKind::UnauthorizedError(_))
1615 }
1616 pub fn is_not_found_error(&self) -> bool {
1618 matches!(&self.kind, SendJoinRequestErrorKind::NotFoundError(_))
1619 }
1620 pub fn is_bad_request_error(&self) -> bool {
1622 matches!(&self.kind, SendJoinRequestErrorKind::BadRequestError(_))
1623 }
1624}
1625impl std::error::Error for SendJoinRequestError {
1626 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1627 match &self.kind {
1628 SendJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
1629 SendJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
1630 SendJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
1631 SendJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
1632 SendJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
1633 SendJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
1634 SendJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1635 }
1636 }
1637}
1638
1639#[non_exhaustive]
1641#[derive(std::fmt::Debug)]
1642pub struct SetPartyPublicityError {
1643 pub kind: SetPartyPublicityErrorKind,
1645 pub(crate) meta: aws_smithy_types::Error,
1647}
1648#[non_exhaustive]
1650#[derive(std::fmt::Debug)]
1651pub enum SetPartyPublicityErrorKind {
1652 InternalError(crate::error::InternalError),
1654 RateLimitError(crate::error::RateLimitError),
1656 ForbiddenError(crate::error::ForbiddenError),
1658 UnauthorizedError(crate::error::UnauthorizedError),
1660 NotFoundError(crate::error::NotFoundError),
1662 BadRequestError(crate::error::BadRequestError),
1664 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1666}
1667impl std::fmt::Display for SetPartyPublicityError {
1668 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1669 match &self.kind {
1670 SetPartyPublicityErrorKind::InternalError(_inner) => _inner.fmt(f),
1671 SetPartyPublicityErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1672 SetPartyPublicityErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1673 SetPartyPublicityErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1674 SetPartyPublicityErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1675 SetPartyPublicityErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1676 SetPartyPublicityErrorKind::Unhandled(_inner) => _inner.fmt(f),
1677 }
1678 }
1679}
1680impl aws_smithy_types::retry::ProvideErrorKind for SetPartyPublicityError {
1681 fn code(&self) -> Option<&str> {
1682 SetPartyPublicityError::code(self)
1683 }
1684 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1685 match &self.kind {
1686 SetPartyPublicityErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
1687 SetPartyPublicityErrorKind::UnauthorizedError(inner) => {
1688 Some(inner.retryable_error_kind())
1689 }
1690 _ => None,
1691 }
1692 }
1693}
1694impl SetPartyPublicityError {
1695 pub fn new(kind: SetPartyPublicityErrorKind, meta: aws_smithy_types::Error) -> Self {
1697 Self { kind, meta }
1698 }
1699
1700 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1702 Self {
1703 kind: SetPartyPublicityErrorKind::Unhandled(err.into()),
1704 meta: Default::default(),
1705 }
1706 }
1707
1708 pub fn generic(err: aws_smithy_types::Error) -> Self {
1710 Self {
1711 meta: err.clone(),
1712 kind: SetPartyPublicityErrorKind::Unhandled(err.into()),
1713 }
1714 }
1715
1716 pub fn message(&self) -> Option<&str> {
1718 self.meta.message()
1719 }
1720
1721 pub fn meta(&self) -> &aws_smithy_types::Error {
1724 &self.meta
1725 }
1726
1727 pub fn request_id(&self) -> Option<&str> {
1729 self.meta.request_id()
1730 }
1731
1732 pub fn code(&self) -> Option<&str> {
1734 self.meta.code()
1735 }
1736 pub fn is_internal_error(&self) -> bool {
1738 matches!(&self.kind, SetPartyPublicityErrorKind::InternalError(_))
1739 }
1740 pub fn is_rate_limit_error(&self) -> bool {
1742 matches!(&self.kind, SetPartyPublicityErrorKind::RateLimitError(_))
1743 }
1744 pub fn is_forbidden_error(&self) -> bool {
1746 matches!(&self.kind, SetPartyPublicityErrorKind::ForbiddenError(_))
1747 }
1748 pub fn is_unauthorized_error(&self) -> bool {
1750 matches!(&self.kind, SetPartyPublicityErrorKind::UnauthorizedError(_))
1751 }
1752 pub fn is_not_found_error(&self) -> bool {
1754 matches!(&self.kind, SetPartyPublicityErrorKind::NotFoundError(_))
1755 }
1756 pub fn is_bad_request_error(&self) -> bool {
1758 matches!(&self.kind, SetPartyPublicityErrorKind::BadRequestError(_))
1759 }
1760}
1761impl std::error::Error for SetPartyPublicityError {
1762 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1763 match &self.kind {
1764 SetPartyPublicityErrorKind::InternalError(_inner) => Some(_inner),
1765 SetPartyPublicityErrorKind::RateLimitError(_inner) => Some(_inner),
1766 SetPartyPublicityErrorKind::ForbiddenError(_inner) => Some(_inner),
1767 SetPartyPublicityErrorKind::UnauthorizedError(_inner) => Some(_inner),
1768 SetPartyPublicityErrorKind::NotFoundError(_inner) => Some(_inner),
1769 SetPartyPublicityErrorKind::BadRequestError(_inner) => Some(_inner),
1770 SetPartyPublicityErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1771 }
1772 }
1773}
1774
1775#[non_exhaustive]
1777#[derive(std::fmt::Debug)]
1778pub struct TransferPartyOwnershipError {
1779 pub kind: TransferPartyOwnershipErrorKind,
1781 pub(crate) meta: aws_smithy_types::Error,
1783}
1784#[non_exhaustive]
1786#[derive(std::fmt::Debug)]
1787pub enum TransferPartyOwnershipErrorKind {
1788 InternalError(crate::error::InternalError),
1790 RateLimitError(crate::error::RateLimitError),
1792 ForbiddenError(crate::error::ForbiddenError),
1794 UnauthorizedError(crate::error::UnauthorizedError),
1796 NotFoundError(crate::error::NotFoundError),
1798 BadRequestError(crate::error::BadRequestError),
1800 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1802}
1803impl std::fmt::Display for TransferPartyOwnershipError {
1804 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1805 match &self.kind {
1806 TransferPartyOwnershipErrorKind::InternalError(_inner) => _inner.fmt(f),
1807 TransferPartyOwnershipErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1808 TransferPartyOwnershipErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1809 TransferPartyOwnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1810 TransferPartyOwnershipErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1811 TransferPartyOwnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1812 TransferPartyOwnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
1813 }
1814 }
1815}
1816impl aws_smithy_types::retry::ProvideErrorKind for TransferPartyOwnershipError {
1817 fn code(&self) -> Option<&str> {
1818 TransferPartyOwnershipError::code(self)
1819 }
1820 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1821 match &self.kind {
1822 TransferPartyOwnershipErrorKind::InternalError(inner) => {
1823 Some(inner.retryable_error_kind())
1824 }
1825 TransferPartyOwnershipErrorKind::UnauthorizedError(inner) => {
1826 Some(inner.retryable_error_kind())
1827 }
1828 _ => None,
1829 }
1830 }
1831}
1832impl TransferPartyOwnershipError {
1833 pub fn new(kind: TransferPartyOwnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
1835 Self { kind, meta }
1836 }
1837
1838 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1840 Self {
1841 kind: TransferPartyOwnershipErrorKind::Unhandled(err.into()),
1842 meta: Default::default(),
1843 }
1844 }
1845
1846 pub fn generic(err: aws_smithy_types::Error) -> Self {
1848 Self {
1849 meta: err.clone(),
1850 kind: TransferPartyOwnershipErrorKind::Unhandled(err.into()),
1851 }
1852 }
1853
1854 pub fn message(&self) -> Option<&str> {
1856 self.meta.message()
1857 }
1858
1859 pub fn meta(&self) -> &aws_smithy_types::Error {
1862 &self.meta
1863 }
1864
1865 pub fn request_id(&self) -> Option<&str> {
1867 self.meta.request_id()
1868 }
1869
1870 pub fn code(&self) -> Option<&str> {
1872 self.meta.code()
1873 }
1874 pub fn is_internal_error(&self) -> bool {
1876 matches!(
1877 &self.kind,
1878 TransferPartyOwnershipErrorKind::InternalError(_)
1879 )
1880 }
1881 pub fn is_rate_limit_error(&self) -> bool {
1883 matches!(
1884 &self.kind,
1885 TransferPartyOwnershipErrorKind::RateLimitError(_)
1886 )
1887 }
1888 pub fn is_forbidden_error(&self) -> bool {
1890 matches!(
1891 &self.kind,
1892 TransferPartyOwnershipErrorKind::ForbiddenError(_)
1893 )
1894 }
1895 pub fn is_unauthorized_error(&self) -> bool {
1897 matches!(
1898 &self.kind,
1899 TransferPartyOwnershipErrorKind::UnauthorizedError(_)
1900 )
1901 }
1902 pub fn is_not_found_error(&self) -> bool {
1904 matches!(
1905 &self.kind,
1906 TransferPartyOwnershipErrorKind::NotFoundError(_)
1907 )
1908 }
1909 pub fn is_bad_request_error(&self) -> bool {
1911 matches!(
1912 &self.kind,
1913 TransferPartyOwnershipErrorKind::BadRequestError(_)
1914 )
1915 }
1916}
1917impl std::error::Error for TransferPartyOwnershipError {
1918 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1919 match &self.kind {
1920 TransferPartyOwnershipErrorKind::InternalError(_inner) => Some(_inner),
1921 TransferPartyOwnershipErrorKind::RateLimitError(_inner) => Some(_inner),
1922 TransferPartyOwnershipErrorKind::ForbiddenError(_inner) => Some(_inner),
1923 TransferPartyOwnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
1924 TransferPartyOwnershipErrorKind::NotFoundError(_inner) => Some(_inner),
1925 TransferPartyOwnershipErrorKind::BadRequestError(_inner) => Some(_inner),
1926 TransferPartyOwnershipErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1927 }
1928 }
1929}
1930
1931#[non_exhaustive]
1933#[derive(std::fmt::Debug)]
1934pub struct FindMatchmakerLobbyForPartyError {
1935 pub kind: FindMatchmakerLobbyForPartyErrorKind,
1937 pub(crate) meta: aws_smithy_types::Error,
1939}
1940#[non_exhaustive]
1942#[derive(std::fmt::Debug)]
1943pub enum FindMatchmakerLobbyForPartyErrorKind {
1944 InternalError(crate::error::InternalError),
1946 RateLimitError(crate::error::RateLimitError),
1948 ForbiddenError(crate::error::ForbiddenError),
1950 UnauthorizedError(crate::error::UnauthorizedError),
1952 NotFoundError(crate::error::NotFoundError),
1954 BadRequestError(crate::error::BadRequestError),
1956 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
1958}
1959impl std::fmt::Display for FindMatchmakerLobbyForPartyError {
1960 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1961 match &self.kind {
1962 FindMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
1963 FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
1964 FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
1965 FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1966 FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
1967 FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1968 FindMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
1969 }
1970 }
1971}
1972impl aws_smithy_types::retry::ProvideErrorKind for FindMatchmakerLobbyForPartyError {
1973 fn code(&self) -> Option<&str> {
1974 FindMatchmakerLobbyForPartyError::code(self)
1975 }
1976 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1977 match &self.kind {
1978 FindMatchmakerLobbyForPartyErrorKind::InternalError(inner) => {
1979 Some(inner.retryable_error_kind())
1980 }
1981 FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(inner) => {
1982 Some(inner.retryable_error_kind())
1983 }
1984 _ => None,
1985 }
1986 }
1987}
1988impl FindMatchmakerLobbyForPartyError {
1989 pub fn new(kind: FindMatchmakerLobbyForPartyErrorKind, meta: aws_smithy_types::Error) -> Self {
1991 Self { kind, meta }
1992 }
1993
1994 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1996 Self {
1997 kind: FindMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
1998 meta: Default::default(),
1999 }
2000 }
2001
2002 pub fn generic(err: aws_smithy_types::Error) -> Self {
2004 Self {
2005 meta: err.clone(),
2006 kind: FindMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
2007 }
2008 }
2009
2010 pub fn message(&self) -> Option<&str> {
2012 self.meta.message()
2013 }
2014
2015 pub fn meta(&self) -> &aws_smithy_types::Error {
2018 &self.meta
2019 }
2020
2021 pub fn request_id(&self) -> Option<&str> {
2023 self.meta.request_id()
2024 }
2025
2026 pub fn code(&self) -> Option<&str> {
2028 self.meta.code()
2029 }
2030 pub fn is_internal_error(&self) -> bool {
2032 matches!(
2033 &self.kind,
2034 FindMatchmakerLobbyForPartyErrorKind::InternalError(_)
2035 )
2036 }
2037 pub fn is_rate_limit_error(&self) -> bool {
2039 matches!(
2040 &self.kind,
2041 FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_)
2042 )
2043 }
2044 pub fn is_forbidden_error(&self) -> bool {
2046 matches!(
2047 &self.kind,
2048 FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_)
2049 )
2050 }
2051 pub fn is_unauthorized_error(&self) -> bool {
2053 matches!(
2054 &self.kind,
2055 FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_)
2056 )
2057 }
2058 pub fn is_not_found_error(&self) -> bool {
2060 matches!(
2061 &self.kind,
2062 FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_)
2063 )
2064 }
2065 pub fn is_bad_request_error(&self) -> bool {
2067 matches!(
2068 &self.kind,
2069 FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_)
2070 )
2071 }
2072}
2073impl std::error::Error for FindMatchmakerLobbyForPartyError {
2074 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2075 match &self.kind {
2076 FindMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => Some(_inner),
2077 FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => Some(_inner),
2078 FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
2079 FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
2080 FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => Some(_inner),
2081 FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => Some(_inner),
2082 FindMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2083 }
2084 }
2085}
2086
2087#[non_exhaustive]
2089#[derive(std::fmt::Debug)]
2090pub struct JoinMatchmakerLobbyForPartyError {
2091 pub kind: JoinMatchmakerLobbyForPartyErrorKind,
2093 pub(crate) meta: aws_smithy_types::Error,
2095}
2096#[non_exhaustive]
2098#[derive(std::fmt::Debug)]
2099pub enum JoinMatchmakerLobbyForPartyErrorKind {
2100 InternalError(crate::error::InternalError),
2102 RateLimitError(crate::error::RateLimitError),
2104 ForbiddenError(crate::error::ForbiddenError),
2106 UnauthorizedError(crate::error::UnauthorizedError),
2108 NotFoundError(crate::error::NotFoundError),
2110 BadRequestError(crate::error::BadRequestError),
2112 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2114}
2115impl std::fmt::Display for JoinMatchmakerLobbyForPartyError {
2116 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2117 match &self.kind {
2118 JoinMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
2119 JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2120 JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2121 JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2122 JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2123 JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2124 JoinMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
2125 }
2126 }
2127}
2128impl aws_smithy_types::retry::ProvideErrorKind for JoinMatchmakerLobbyForPartyError {
2129 fn code(&self) -> Option<&str> {
2130 JoinMatchmakerLobbyForPartyError::code(self)
2131 }
2132 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2133 match &self.kind {
2134 JoinMatchmakerLobbyForPartyErrorKind::InternalError(inner) => {
2135 Some(inner.retryable_error_kind())
2136 }
2137 JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(inner) => {
2138 Some(inner.retryable_error_kind())
2139 }
2140 _ => None,
2141 }
2142 }
2143}
2144impl JoinMatchmakerLobbyForPartyError {
2145 pub fn new(kind: JoinMatchmakerLobbyForPartyErrorKind, meta: aws_smithy_types::Error) -> Self {
2147 Self { kind, meta }
2148 }
2149
2150 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2152 Self {
2153 kind: JoinMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
2154 meta: Default::default(),
2155 }
2156 }
2157
2158 pub fn generic(err: aws_smithy_types::Error) -> Self {
2160 Self {
2161 meta: err.clone(),
2162 kind: JoinMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
2163 }
2164 }
2165
2166 pub fn message(&self) -> Option<&str> {
2168 self.meta.message()
2169 }
2170
2171 pub fn meta(&self) -> &aws_smithy_types::Error {
2174 &self.meta
2175 }
2176
2177 pub fn request_id(&self) -> Option<&str> {
2179 self.meta.request_id()
2180 }
2181
2182 pub fn code(&self) -> Option<&str> {
2184 self.meta.code()
2185 }
2186 pub fn is_internal_error(&self) -> bool {
2188 matches!(
2189 &self.kind,
2190 JoinMatchmakerLobbyForPartyErrorKind::InternalError(_)
2191 )
2192 }
2193 pub fn is_rate_limit_error(&self) -> bool {
2195 matches!(
2196 &self.kind,
2197 JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_)
2198 )
2199 }
2200 pub fn is_forbidden_error(&self) -> bool {
2202 matches!(
2203 &self.kind,
2204 JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_)
2205 )
2206 }
2207 pub fn is_unauthorized_error(&self) -> bool {
2209 matches!(
2210 &self.kind,
2211 JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_)
2212 )
2213 }
2214 pub fn is_not_found_error(&self) -> bool {
2216 matches!(
2217 &self.kind,
2218 JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_)
2219 )
2220 }
2221 pub fn is_bad_request_error(&self) -> bool {
2223 matches!(
2224 &self.kind,
2225 JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_)
2226 )
2227 }
2228}
2229impl std::error::Error for JoinMatchmakerLobbyForPartyError {
2230 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2231 match &self.kind {
2232 JoinMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => Some(_inner),
2233 JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => Some(_inner),
2234 JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
2235 JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
2236 JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => Some(_inner),
2237 JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => Some(_inner),
2238 JoinMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2239 }
2240 }
2241}
2242
2243#[non_exhaustive]
2245#[derive(std::fmt::Debug)]
2246pub struct RequestMatchmakerPlayerError {
2247 pub kind: RequestMatchmakerPlayerErrorKind,
2249 pub(crate) meta: aws_smithy_types::Error,
2251}
2252#[non_exhaustive]
2254#[derive(std::fmt::Debug)]
2255pub enum RequestMatchmakerPlayerErrorKind {
2256 InternalError(crate::error::InternalError),
2258 RateLimitError(crate::error::RateLimitError),
2260 ForbiddenError(crate::error::ForbiddenError),
2262 UnauthorizedError(crate::error::UnauthorizedError),
2264 NotFoundError(crate::error::NotFoundError),
2266 BadRequestError(crate::error::BadRequestError),
2268 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2270}
2271impl std::fmt::Display for RequestMatchmakerPlayerError {
2272 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2273 match &self.kind {
2274 RequestMatchmakerPlayerErrorKind::InternalError(_inner) => _inner.fmt(f),
2275 RequestMatchmakerPlayerErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2276 RequestMatchmakerPlayerErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2277 RequestMatchmakerPlayerErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2278 RequestMatchmakerPlayerErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2279 RequestMatchmakerPlayerErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2280 RequestMatchmakerPlayerErrorKind::Unhandled(_inner) => _inner.fmt(f),
2281 }
2282 }
2283}
2284impl aws_smithy_types::retry::ProvideErrorKind for RequestMatchmakerPlayerError {
2285 fn code(&self) -> Option<&str> {
2286 RequestMatchmakerPlayerError::code(self)
2287 }
2288 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2289 match &self.kind {
2290 RequestMatchmakerPlayerErrorKind::InternalError(inner) => {
2291 Some(inner.retryable_error_kind())
2292 }
2293 RequestMatchmakerPlayerErrorKind::UnauthorizedError(inner) => {
2294 Some(inner.retryable_error_kind())
2295 }
2296 _ => None,
2297 }
2298 }
2299}
2300impl RequestMatchmakerPlayerError {
2301 pub fn new(kind: RequestMatchmakerPlayerErrorKind, meta: aws_smithy_types::Error) -> Self {
2303 Self { kind, meta }
2304 }
2305
2306 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2308 Self {
2309 kind: RequestMatchmakerPlayerErrorKind::Unhandled(err.into()),
2310 meta: Default::default(),
2311 }
2312 }
2313
2314 pub fn generic(err: aws_smithy_types::Error) -> Self {
2316 Self {
2317 meta: err.clone(),
2318 kind: RequestMatchmakerPlayerErrorKind::Unhandled(err.into()),
2319 }
2320 }
2321
2322 pub fn message(&self) -> Option<&str> {
2324 self.meta.message()
2325 }
2326
2327 pub fn meta(&self) -> &aws_smithy_types::Error {
2330 &self.meta
2331 }
2332
2333 pub fn request_id(&self) -> Option<&str> {
2335 self.meta.request_id()
2336 }
2337
2338 pub fn code(&self) -> Option<&str> {
2340 self.meta.code()
2341 }
2342 pub fn is_internal_error(&self) -> bool {
2344 matches!(
2345 &self.kind,
2346 RequestMatchmakerPlayerErrorKind::InternalError(_)
2347 )
2348 }
2349 pub fn is_rate_limit_error(&self) -> bool {
2351 matches!(
2352 &self.kind,
2353 RequestMatchmakerPlayerErrorKind::RateLimitError(_)
2354 )
2355 }
2356 pub fn is_forbidden_error(&self) -> bool {
2358 matches!(
2359 &self.kind,
2360 RequestMatchmakerPlayerErrorKind::ForbiddenError(_)
2361 )
2362 }
2363 pub fn is_unauthorized_error(&self) -> bool {
2365 matches!(
2366 &self.kind,
2367 RequestMatchmakerPlayerErrorKind::UnauthorizedError(_)
2368 )
2369 }
2370 pub fn is_not_found_error(&self) -> bool {
2372 matches!(
2373 &self.kind,
2374 RequestMatchmakerPlayerErrorKind::NotFoundError(_)
2375 )
2376 }
2377 pub fn is_bad_request_error(&self) -> bool {
2379 matches!(
2380 &self.kind,
2381 RequestMatchmakerPlayerErrorKind::BadRequestError(_)
2382 )
2383 }
2384}
2385impl std::error::Error for RequestMatchmakerPlayerError {
2386 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2387 match &self.kind {
2388 RequestMatchmakerPlayerErrorKind::InternalError(_inner) => Some(_inner),
2389 RequestMatchmakerPlayerErrorKind::RateLimitError(_inner) => Some(_inner),
2390 RequestMatchmakerPlayerErrorKind::ForbiddenError(_inner) => Some(_inner),
2391 RequestMatchmakerPlayerErrorKind::UnauthorizedError(_inner) => Some(_inner),
2392 RequestMatchmakerPlayerErrorKind::NotFoundError(_inner) => Some(_inner),
2393 RequestMatchmakerPlayerErrorKind::BadRequestError(_inner) => Some(_inner),
2394 RequestMatchmakerPlayerErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2395 }
2396 }
2397}
2398
2399#[non_exhaustive]
2401#[derive(std::fmt::Debug)]
2402pub struct SetPartyToIdleError {
2403 pub kind: SetPartyToIdleErrorKind,
2405 pub(crate) meta: aws_smithy_types::Error,
2407}
2408#[non_exhaustive]
2410#[derive(std::fmt::Debug)]
2411pub enum SetPartyToIdleErrorKind {
2412 InternalError(crate::error::InternalError),
2414 RateLimitError(crate::error::RateLimitError),
2416 ForbiddenError(crate::error::ForbiddenError),
2418 UnauthorizedError(crate::error::UnauthorizedError),
2420 NotFoundError(crate::error::NotFoundError),
2422 BadRequestError(crate::error::BadRequestError),
2424 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
2426}
2427impl std::fmt::Display for SetPartyToIdleError {
2428 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2429 match &self.kind {
2430 SetPartyToIdleErrorKind::InternalError(_inner) => _inner.fmt(f),
2431 SetPartyToIdleErrorKind::RateLimitError(_inner) => _inner.fmt(f),
2432 SetPartyToIdleErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
2433 SetPartyToIdleErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2434 SetPartyToIdleErrorKind::NotFoundError(_inner) => _inner.fmt(f),
2435 SetPartyToIdleErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2436 SetPartyToIdleErrorKind::Unhandled(_inner) => _inner.fmt(f),
2437 }
2438 }
2439}
2440impl aws_smithy_types::retry::ProvideErrorKind for SetPartyToIdleError {
2441 fn code(&self) -> Option<&str> {
2442 SetPartyToIdleError::code(self)
2443 }
2444 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2445 match &self.kind {
2446 SetPartyToIdleErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
2447 SetPartyToIdleErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
2448 _ => None,
2449 }
2450 }
2451}
2452impl SetPartyToIdleError {
2453 pub fn new(kind: SetPartyToIdleErrorKind, meta: aws_smithy_types::Error) -> Self {
2455 Self { kind, meta }
2456 }
2457
2458 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2460 Self {
2461 kind: SetPartyToIdleErrorKind::Unhandled(err.into()),
2462 meta: Default::default(),
2463 }
2464 }
2465
2466 pub fn generic(err: aws_smithy_types::Error) -> Self {
2468 Self {
2469 meta: err.clone(),
2470 kind: SetPartyToIdleErrorKind::Unhandled(err.into()),
2471 }
2472 }
2473
2474 pub fn message(&self) -> Option<&str> {
2476 self.meta.message()
2477 }
2478
2479 pub fn meta(&self) -> &aws_smithy_types::Error {
2482 &self.meta
2483 }
2484
2485 pub fn request_id(&self) -> Option<&str> {
2487 self.meta.request_id()
2488 }
2489
2490 pub fn code(&self) -> Option<&str> {
2492 self.meta.code()
2493 }
2494 pub fn is_internal_error(&self) -> bool {
2496 matches!(&self.kind, SetPartyToIdleErrorKind::InternalError(_))
2497 }
2498 pub fn is_rate_limit_error(&self) -> bool {
2500 matches!(&self.kind, SetPartyToIdleErrorKind::RateLimitError(_))
2501 }
2502 pub fn is_forbidden_error(&self) -> bool {
2504 matches!(&self.kind, SetPartyToIdleErrorKind::ForbiddenError(_))
2505 }
2506 pub fn is_unauthorized_error(&self) -> bool {
2508 matches!(&self.kind, SetPartyToIdleErrorKind::UnauthorizedError(_))
2509 }
2510 pub fn is_not_found_error(&self) -> bool {
2512 matches!(&self.kind, SetPartyToIdleErrorKind::NotFoundError(_))
2513 }
2514 pub fn is_bad_request_error(&self) -> bool {
2516 matches!(&self.kind, SetPartyToIdleErrorKind::BadRequestError(_))
2517 }
2518}
2519impl std::error::Error for SetPartyToIdleError {
2520 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2521 match &self.kind {
2522 SetPartyToIdleErrorKind::InternalError(_inner) => Some(_inner),
2523 SetPartyToIdleErrorKind::RateLimitError(_inner) => Some(_inner),
2524 SetPartyToIdleErrorKind::ForbiddenError(_inner) => Some(_inner),
2525 SetPartyToIdleErrorKind::UnauthorizedError(_inner) => Some(_inner),
2526 SetPartyToIdleErrorKind::NotFoundError(_inner) => Some(_inner),
2527 SetPartyToIdleErrorKind::BadRequestError(_inner) => Some(_inner),
2528 SetPartyToIdleErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
2529 }
2530 }
2531}
2532
2533#[non_exhaustive]
2535#[derive(std::clone::Clone, std::cmp::PartialEq)]
2536pub struct BadRequestError {
2537 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2539 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2541 pub metadata: std::option::Option<aws_smithy_types::Document>,
2543}
2544impl BadRequestError {
2545 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2547 self.code.as_deref()
2548 }
2549 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2551 self.metadata.as_ref()
2552 }
2553}
2554impl std::fmt::Debug for BadRequestError {
2555 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2556 let mut formatter = f.debug_struct("BadRequestError");
2557 formatter.field("code", &self.code);
2558 formatter.field("message", &self.message);
2559 formatter.field("metadata", &self.metadata);
2560 formatter.finish()
2561 }
2562}
2563impl BadRequestError {
2564 pub fn message(&self) -> Option<&str> {
2566 self.message.as_deref()
2567 }
2568}
2569impl std::fmt::Display for BadRequestError {
2570 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2571 write!(f, "BadRequestError")?;
2572 if let Some(inner_1) = &self.message {
2573 write!(f, ": {}", inner_1)?;
2574 }
2575 Ok(())
2576 }
2577}
2578impl std::error::Error for BadRequestError {}
2579pub mod bad_request_error {
2581 #[non_exhaustive]
2583 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2584 pub struct Builder {
2585 pub(crate) code: std::option::Option<std::string::String>,
2586 pub(crate) message: std::option::Option<std::string::String>,
2587 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2588 }
2589 impl Builder {
2590 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2592 self.code = Some(input.into());
2593 self
2594 }
2595 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2597 self.code = input;
2598 self
2599 }
2600 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2602 self.message = Some(input.into());
2603 self
2604 }
2605 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2607 self.message = input;
2608 self
2609 }
2610 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2612 self.metadata = Some(input);
2613 self
2614 }
2615 pub fn set_metadata(
2617 mut self,
2618 input: std::option::Option<aws_smithy_types::Document>,
2619 ) -> Self {
2620 self.metadata = input;
2621 self
2622 }
2623 pub fn build(self) -> crate::error::BadRequestError {
2625 crate::error::BadRequestError {
2626 code: self.code,
2627 message: self.message,
2628 metadata: self.metadata,
2629 }
2630 }
2631 }
2632}
2633impl BadRequestError {
2634 pub fn builder() -> crate::error::bad_request_error::Builder {
2636 crate::error::bad_request_error::Builder::default()
2637 }
2638}
2639
2640#[non_exhaustive]
2642#[derive(std::clone::Clone, std::cmp::PartialEq)]
2643pub struct NotFoundError {
2644 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2646 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2648 pub metadata: std::option::Option<aws_smithy_types::Document>,
2650}
2651impl NotFoundError {
2652 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2654 self.code.as_deref()
2655 }
2656 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2658 self.metadata.as_ref()
2659 }
2660}
2661impl std::fmt::Debug for NotFoundError {
2662 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2663 let mut formatter = f.debug_struct("NotFoundError");
2664 formatter.field("code", &self.code);
2665 formatter.field("message", &self.message);
2666 formatter.field("metadata", &self.metadata);
2667 formatter.finish()
2668 }
2669}
2670impl NotFoundError {
2671 pub fn message(&self) -> Option<&str> {
2673 self.message.as_deref()
2674 }
2675}
2676impl std::fmt::Display for NotFoundError {
2677 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2678 write!(f, "NotFoundError")?;
2679 if let Some(inner_2) = &self.message {
2680 write!(f, ": {}", inner_2)?;
2681 }
2682 Ok(())
2683 }
2684}
2685impl std::error::Error for NotFoundError {}
2686pub mod not_found_error {
2688 #[non_exhaustive]
2690 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2691 pub struct Builder {
2692 pub(crate) code: std::option::Option<std::string::String>,
2693 pub(crate) message: std::option::Option<std::string::String>,
2694 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2695 }
2696 impl Builder {
2697 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2699 self.code = Some(input.into());
2700 self
2701 }
2702 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2704 self.code = input;
2705 self
2706 }
2707 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2709 self.message = Some(input.into());
2710 self
2711 }
2712 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2714 self.message = input;
2715 self
2716 }
2717 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2719 self.metadata = Some(input);
2720 self
2721 }
2722 pub fn set_metadata(
2724 mut self,
2725 input: std::option::Option<aws_smithy_types::Document>,
2726 ) -> Self {
2727 self.metadata = input;
2728 self
2729 }
2730 pub fn build(self) -> crate::error::NotFoundError {
2732 crate::error::NotFoundError {
2733 code: self.code,
2734 message: self.message,
2735 metadata: self.metadata,
2736 }
2737 }
2738 }
2739}
2740impl NotFoundError {
2741 pub fn builder() -> crate::error::not_found_error::Builder {
2743 crate::error::not_found_error::Builder::default()
2744 }
2745}
2746
2747#[non_exhaustive]
2749#[derive(std::clone::Clone, std::cmp::PartialEq)]
2750pub struct UnauthorizedError {
2751 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2753 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2755 pub metadata: std::option::Option<aws_smithy_types::Document>,
2757}
2758impl UnauthorizedError {
2759 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2761 self.code.as_deref()
2762 }
2763 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2765 self.metadata.as_ref()
2766 }
2767}
2768impl std::fmt::Debug for UnauthorizedError {
2769 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2770 let mut formatter = f.debug_struct("UnauthorizedError");
2771 formatter.field("code", &self.code);
2772 formatter.field("message", &self.message);
2773 formatter.field("metadata", &self.metadata);
2774 formatter.finish()
2775 }
2776}
2777impl UnauthorizedError {
2778 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
2780 aws_smithy_types::retry::ErrorKind::ClientError
2781 }
2782 pub fn message(&self) -> Option<&str> {
2784 self.message.as_deref()
2785 }
2786}
2787impl std::fmt::Display for UnauthorizedError {
2788 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2789 write!(f, "UnauthorizedError")?;
2790 if let Some(inner_3) = &self.message {
2791 write!(f, ": {}", inner_3)?;
2792 }
2793 Ok(())
2794 }
2795}
2796impl std::error::Error for UnauthorizedError {}
2797pub mod unauthorized_error {
2799 #[non_exhaustive]
2801 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2802 pub struct Builder {
2803 pub(crate) code: std::option::Option<std::string::String>,
2804 pub(crate) message: std::option::Option<std::string::String>,
2805 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2806 }
2807 impl Builder {
2808 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2810 self.code = Some(input.into());
2811 self
2812 }
2813 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2815 self.code = input;
2816 self
2817 }
2818 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2820 self.message = Some(input.into());
2821 self
2822 }
2823 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2825 self.message = input;
2826 self
2827 }
2828 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2830 self.metadata = Some(input);
2831 self
2832 }
2833 pub fn set_metadata(
2835 mut self,
2836 input: std::option::Option<aws_smithy_types::Document>,
2837 ) -> Self {
2838 self.metadata = input;
2839 self
2840 }
2841 pub fn build(self) -> crate::error::UnauthorizedError {
2843 crate::error::UnauthorizedError {
2844 code: self.code,
2845 message: self.message,
2846 metadata: self.metadata,
2847 }
2848 }
2849 }
2850}
2851impl UnauthorizedError {
2852 pub fn builder() -> crate::error::unauthorized_error::Builder {
2854 crate::error::unauthorized_error::Builder::default()
2855 }
2856}
2857
2858#[non_exhaustive]
2860#[derive(std::clone::Clone, std::cmp::PartialEq)]
2861pub struct ForbiddenError {
2862 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2864 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2866 pub metadata: std::option::Option<aws_smithy_types::Document>,
2868}
2869impl ForbiddenError {
2870 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2872 self.code.as_deref()
2873 }
2874 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2876 self.metadata.as_ref()
2877 }
2878}
2879impl std::fmt::Debug for ForbiddenError {
2880 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2881 let mut formatter = f.debug_struct("ForbiddenError");
2882 formatter.field("code", &self.code);
2883 formatter.field("message", &self.message);
2884 formatter.field("metadata", &self.metadata);
2885 formatter.finish()
2886 }
2887}
2888impl ForbiddenError {
2889 pub fn message(&self) -> Option<&str> {
2891 self.message.as_deref()
2892 }
2893}
2894impl std::fmt::Display for ForbiddenError {
2895 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2896 write!(f, "ForbiddenError")?;
2897 if let Some(inner_4) = &self.message {
2898 write!(f, ": {}", inner_4)?;
2899 }
2900 Ok(())
2901 }
2902}
2903impl std::error::Error for ForbiddenError {}
2904pub mod forbidden_error {
2906 #[non_exhaustive]
2908 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
2909 pub struct Builder {
2910 pub(crate) code: std::option::Option<std::string::String>,
2911 pub(crate) message: std::option::Option<std::string::String>,
2912 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
2913 }
2914 impl Builder {
2915 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
2917 self.code = Some(input.into());
2918 self
2919 }
2920 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
2922 self.code = input;
2923 self
2924 }
2925 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
2927 self.message = Some(input.into());
2928 self
2929 }
2930 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
2932 self.message = input;
2933 self
2934 }
2935 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
2937 self.metadata = Some(input);
2938 self
2939 }
2940 pub fn set_metadata(
2942 mut self,
2943 input: std::option::Option<aws_smithy_types::Document>,
2944 ) -> Self {
2945 self.metadata = input;
2946 self
2947 }
2948 pub fn build(self) -> crate::error::ForbiddenError {
2950 crate::error::ForbiddenError {
2951 code: self.code,
2952 message: self.message,
2953 metadata: self.metadata,
2954 }
2955 }
2956 }
2957}
2958impl ForbiddenError {
2959 pub fn builder() -> crate::error::forbidden_error::Builder {
2961 crate::error::forbidden_error::Builder::default()
2962 }
2963}
2964
2965#[non_exhaustive]
2967#[derive(std::clone::Clone, std::cmp::PartialEq)]
2968pub struct RateLimitError {
2969 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
2971 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
2973 pub metadata: std::option::Option<aws_smithy_types::Document>,
2975}
2976impl RateLimitError {
2977 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
2979 self.code.as_deref()
2980 }
2981 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
2983 self.metadata.as_ref()
2984 }
2985}
2986impl std::fmt::Debug for RateLimitError {
2987 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2988 let mut formatter = f.debug_struct("RateLimitError");
2989 formatter.field("code", &self.code);
2990 formatter.field("message", &self.message);
2991 formatter.field("metadata", &self.metadata);
2992 formatter.finish()
2993 }
2994}
2995impl RateLimitError {
2996 pub fn message(&self) -> Option<&str> {
2998 self.message.as_deref()
2999 }
3000}
3001impl std::fmt::Display for RateLimitError {
3002 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3003 write!(f, "RateLimitError")?;
3004 if let Some(inner_5) = &self.message {
3005 write!(f, ": {}", inner_5)?;
3006 }
3007 Ok(())
3008 }
3009}
3010impl std::error::Error for RateLimitError {}
3011pub mod rate_limit_error {
3013 #[non_exhaustive]
3015 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
3016 pub struct Builder {
3017 pub(crate) code: std::option::Option<std::string::String>,
3018 pub(crate) message: std::option::Option<std::string::String>,
3019 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
3020 }
3021 impl Builder {
3022 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
3024 self.code = Some(input.into());
3025 self
3026 }
3027 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
3029 self.code = input;
3030 self
3031 }
3032 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
3034 self.message = Some(input.into());
3035 self
3036 }
3037 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
3039 self.message = input;
3040 self
3041 }
3042 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
3044 self.metadata = Some(input);
3045 self
3046 }
3047 pub fn set_metadata(
3049 mut self,
3050 input: std::option::Option<aws_smithy_types::Document>,
3051 ) -> Self {
3052 self.metadata = input;
3053 self
3054 }
3055 pub fn build(self) -> crate::error::RateLimitError {
3057 crate::error::RateLimitError {
3058 code: self.code,
3059 message: self.message,
3060 metadata: self.metadata,
3061 }
3062 }
3063 }
3064}
3065impl RateLimitError {
3066 pub fn builder() -> crate::error::rate_limit_error::Builder {
3068 crate::error::rate_limit_error::Builder::default()
3069 }
3070}
3071
3072#[non_exhaustive]
3074#[derive(std::clone::Clone, std::cmp::PartialEq)]
3075pub struct InternalError {
3076 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
3078 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
3080 pub metadata: std::option::Option<aws_smithy_types::Document>,
3082}
3083impl InternalError {
3084 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
3086 self.code.as_deref()
3087 }
3088 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
3090 self.metadata.as_ref()
3091 }
3092}
3093impl std::fmt::Debug for InternalError {
3094 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3095 let mut formatter = f.debug_struct("InternalError");
3096 formatter.field("code", &self.code);
3097 formatter.field("message", &self.message);
3098 formatter.field("metadata", &self.metadata);
3099 formatter.finish()
3100 }
3101}
3102impl InternalError {
3103 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
3105 aws_smithy_types::retry::ErrorKind::ServerError
3106 }
3107 pub fn message(&self) -> Option<&str> {
3109 self.message.as_deref()
3110 }
3111}
3112impl std::fmt::Display for InternalError {
3113 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3114 write!(f, "InternalError")?;
3115 if let Some(inner_6) = &self.message {
3116 write!(f, ": {}", inner_6)?;
3117 }
3118 Ok(())
3119 }
3120}
3121impl std::error::Error for InternalError {}
3122pub mod internal_error {
3124 #[non_exhaustive]
3126 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
3127 pub struct Builder {
3128 pub(crate) code: std::option::Option<std::string::String>,
3129 pub(crate) message: std::option::Option<std::string::String>,
3130 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
3131 }
3132 impl Builder {
3133 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
3135 self.code = Some(input.into());
3136 self
3137 }
3138 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
3140 self.code = input;
3141 self
3142 }
3143 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
3145 self.message = Some(input.into());
3146 self
3147 }
3148 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
3150 self.message = input;
3151 self
3152 }
3153 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
3155 self.metadata = Some(input);
3156 self
3157 }
3158 pub fn set_metadata(
3160 mut self,
3161 input: std::option::Option<aws_smithy_types::Document>,
3162 ) -> Self {
3163 self.metadata = input;
3164 self
3165 }
3166 pub fn build(self) -> crate::error::InternalError {
3168 crate::error::InternalError {
3169 code: self.code,
3170 message: self.message,
3171 metadata: self.metadata,
3172 }
3173 }
3174 }
3175}
3176impl InternalError {
3177 pub fn builder() -> crate::error::internal_error::Builder {
3179 crate::error::internal_error::Builder::default()
3180 }
3181}