1#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct FindLobbyError {
6 pub kind: FindLobbyErrorKind,
8 pub(crate) meta: aws_smithy_types::Error,
10}
11#[non_exhaustive]
13#[derive(std::fmt::Debug)]
14pub enum FindLobbyErrorKind {
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 FindLobbyError {
31 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32 match &self.kind {
33 FindLobbyErrorKind::InternalError(_inner) => _inner.fmt(f),
34 FindLobbyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
35 FindLobbyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
36 FindLobbyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
37 FindLobbyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
38 FindLobbyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
39 FindLobbyErrorKind::Unhandled(_inner) => _inner.fmt(f),
40 }
41 }
42}
43impl aws_smithy_types::retry::ProvideErrorKind for FindLobbyError {
44 fn code(&self) -> Option<&str> {
45 FindLobbyError::code(self)
46 }
47 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
48 match &self.kind {
49 FindLobbyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
50 FindLobbyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
51 _ => None,
52 }
53 }
54}
55impl FindLobbyError {
56 pub fn new(kind: FindLobbyErrorKind, 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: FindLobbyErrorKind::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: FindLobbyErrorKind::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, FindLobbyErrorKind::InternalError(_))
100 }
101 pub fn is_rate_limit_error(&self) -> bool {
103 matches!(&self.kind, FindLobbyErrorKind::RateLimitError(_))
104 }
105 pub fn is_forbidden_error(&self) -> bool {
107 matches!(&self.kind, FindLobbyErrorKind::ForbiddenError(_))
108 }
109 pub fn is_unauthorized_error(&self) -> bool {
111 matches!(&self.kind, FindLobbyErrorKind::UnauthorizedError(_))
112 }
113 pub fn is_not_found_error(&self) -> bool {
115 matches!(&self.kind, FindLobbyErrorKind::NotFoundError(_))
116 }
117 pub fn is_bad_request_error(&self) -> bool {
119 matches!(&self.kind, FindLobbyErrorKind::BadRequestError(_))
120 }
121}
122impl std::error::Error for FindLobbyError {
123 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
124 match &self.kind {
125 FindLobbyErrorKind::InternalError(_inner) => Some(_inner),
126 FindLobbyErrorKind::RateLimitError(_inner) => Some(_inner),
127 FindLobbyErrorKind::ForbiddenError(_inner) => Some(_inner),
128 FindLobbyErrorKind::UnauthorizedError(_inner) => Some(_inner),
129 FindLobbyErrorKind::NotFoundError(_inner) => Some(_inner),
130 FindLobbyErrorKind::BadRequestError(_inner) => Some(_inner),
131 FindLobbyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
132 }
133 }
134}
135
136#[non_exhaustive]
138#[derive(std::fmt::Debug)]
139pub struct JoinLobbyError {
140 pub kind: JoinLobbyErrorKind,
142 pub(crate) meta: aws_smithy_types::Error,
144}
145#[non_exhaustive]
147#[derive(std::fmt::Debug)]
148pub enum JoinLobbyErrorKind {
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 JoinLobbyError {
165 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
166 match &self.kind {
167 JoinLobbyErrorKind::InternalError(_inner) => _inner.fmt(f),
168 JoinLobbyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
169 JoinLobbyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
170 JoinLobbyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
171 JoinLobbyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
172 JoinLobbyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
173 JoinLobbyErrorKind::Unhandled(_inner) => _inner.fmt(f),
174 }
175 }
176}
177impl aws_smithy_types::retry::ProvideErrorKind for JoinLobbyError {
178 fn code(&self) -> Option<&str> {
179 JoinLobbyError::code(self)
180 }
181 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
182 match &self.kind {
183 JoinLobbyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
184 JoinLobbyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
185 _ => None,
186 }
187 }
188}
189impl JoinLobbyError {
190 pub fn new(kind: JoinLobbyErrorKind, meta: aws_smithy_types::Error) -> Self {
192 Self { kind, meta }
193 }
194
195 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
197 Self {
198 kind: JoinLobbyErrorKind::Unhandled(err.into()),
199 meta: Default::default(),
200 }
201 }
202
203 pub fn generic(err: aws_smithy_types::Error) -> Self {
205 Self {
206 meta: err.clone(),
207 kind: JoinLobbyErrorKind::Unhandled(err.into()),
208 }
209 }
210
211 pub fn message(&self) -> Option<&str> {
213 self.meta.message()
214 }
215
216 pub fn meta(&self) -> &aws_smithy_types::Error {
219 &self.meta
220 }
221
222 pub fn request_id(&self) -> Option<&str> {
224 self.meta.request_id()
225 }
226
227 pub fn code(&self) -> Option<&str> {
229 self.meta.code()
230 }
231 pub fn is_internal_error(&self) -> bool {
233 matches!(&self.kind, JoinLobbyErrorKind::InternalError(_))
234 }
235 pub fn is_rate_limit_error(&self) -> bool {
237 matches!(&self.kind, JoinLobbyErrorKind::RateLimitError(_))
238 }
239 pub fn is_forbidden_error(&self) -> bool {
241 matches!(&self.kind, JoinLobbyErrorKind::ForbiddenError(_))
242 }
243 pub fn is_unauthorized_error(&self) -> bool {
245 matches!(&self.kind, JoinLobbyErrorKind::UnauthorizedError(_))
246 }
247 pub fn is_not_found_error(&self) -> bool {
249 matches!(&self.kind, JoinLobbyErrorKind::NotFoundError(_))
250 }
251 pub fn is_bad_request_error(&self) -> bool {
253 matches!(&self.kind, JoinLobbyErrorKind::BadRequestError(_))
254 }
255}
256impl std::error::Error for JoinLobbyError {
257 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
258 match &self.kind {
259 JoinLobbyErrorKind::InternalError(_inner) => Some(_inner),
260 JoinLobbyErrorKind::RateLimitError(_inner) => Some(_inner),
261 JoinLobbyErrorKind::ForbiddenError(_inner) => Some(_inner),
262 JoinLobbyErrorKind::UnauthorizedError(_inner) => Some(_inner),
263 JoinLobbyErrorKind::NotFoundError(_inner) => Some(_inner),
264 JoinLobbyErrorKind::BadRequestError(_inner) => Some(_inner),
265 JoinLobbyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
266 }
267 }
268}
269
270#[non_exhaustive]
272#[derive(std::fmt::Debug)]
273pub struct ListLobbiesError {
274 pub kind: ListLobbiesErrorKind,
276 pub(crate) meta: aws_smithy_types::Error,
278}
279#[non_exhaustive]
281#[derive(std::fmt::Debug)]
282pub enum ListLobbiesErrorKind {
283 InternalError(crate::error::InternalError),
285 RateLimitError(crate::error::RateLimitError),
287 ForbiddenError(crate::error::ForbiddenError),
289 UnauthorizedError(crate::error::UnauthorizedError),
291 NotFoundError(crate::error::NotFoundError),
293 BadRequestError(crate::error::BadRequestError),
295 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
297}
298impl std::fmt::Display for ListLobbiesError {
299 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
300 match &self.kind {
301 ListLobbiesErrorKind::InternalError(_inner) => _inner.fmt(f),
302 ListLobbiesErrorKind::RateLimitError(_inner) => _inner.fmt(f),
303 ListLobbiesErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
304 ListLobbiesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
305 ListLobbiesErrorKind::NotFoundError(_inner) => _inner.fmt(f),
306 ListLobbiesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
307 ListLobbiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
308 }
309 }
310}
311impl aws_smithy_types::retry::ProvideErrorKind for ListLobbiesError {
312 fn code(&self) -> Option<&str> {
313 ListLobbiesError::code(self)
314 }
315 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
316 match &self.kind {
317 ListLobbiesErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
318 ListLobbiesErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
319 _ => None,
320 }
321 }
322}
323impl ListLobbiesError {
324 pub fn new(kind: ListLobbiesErrorKind, meta: aws_smithy_types::Error) -> Self {
326 Self { kind, meta }
327 }
328
329 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
331 Self {
332 kind: ListLobbiesErrorKind::Unhandled(err.into()),
333 meta: Default::default(),
334 }
335 }
336
337 pub fn generic(err: aws_smithy_types::Error) -> Self {
339 Self {
340 meta: err.clone(),
341 kind: ListLobbiesErrorKind::Unhandled(err.into()),
342 }
343 }
344
345 pub fn message(&self) -> Option<&str> {
347 self.meta.message()
348 }
349
350 pub fn meta(&self) -> &aws_smithy_types::Error {
353 &self.meta
354 }
355
356 pub fn request_id(&self) -> Option<&str> {
358 self.meta.request_id()
359 }
360
361 pub fn code(&self) -> Option<&str> {
363 self.meta.code()
364 }
365 pub fn is_internal_error(&self) -> bool {
367 matches!(&self.kind, ListLobbiesErrorKind::InternalError(_))
368 }
369 pub fn is_rate_limit_error(&self) -> bool {
371 matches!(&self.kind, ListLobbiesErrorKind::RateLimitError(_))
372 }
373 pub fn is_forbidden_error(&self) -> bool {
375 matches!(&self.kind, ListLobbiesErrorKind::ForbiddenError(_))
376 }
377 pub fn is_unauthorized_error(&self) -> bool {
379 matches!(&self.kind, ListLobbiesErrorKind::UnauthorizedError(_))
380 }
381 pub fn is_not_found_error(&self) -> bool {
383 matches!(&self.kind, ListLobbiesErrorKind::NotFoundError(_))
384 }
385 pub fn is_bad_request_error(&self) -> bool {
387 matches!(&self.kind, ListLobbiesErrorKind::BadRequestError(_))
388 }
389}
390impl std::error::Error for ListLobbiesError {
391 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
392 match &self.kind {
393 ListLobbiesErrorKind::InternalError(_inner) => Some(_inner),
394 ListLobbiesErrorKind::RateLimitError(_inner) => Some(_inner),
395 ListLobbiesErrorKind::ForbiddenError(_inner) => Some(_inner),
396 ListLobbiesErrorKind::UnauthorizedError(_inner) => Some(_inner),
397 ListLobbiesErrorKind::NotFoundError(_inner) => Some(_inner),
398 ListLobbiesErrorKind::BadRequestError(_inner) => Some(_inner),
399 ListLobbiesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
400 }
401 }
402}
403
404#[non_exhaustive]
406#[derive(std::fmt::Debug)]
407pub struct ListRegionsError {
408 pub kind: ListRegionsErrorKind,
410 pub(crate) meta: aws_smithy_types::Error,
412}
413#[non_exhaustive]
415#[derive(std::fmt::Debug)]
416pub enum ListRegionsErrorKind {
417 InternalError(crate::error::InternalError),
419 RateLimitError(crate::error::RateLimitError),
421 ForbiddenError(crate::error::ForbiddenError),
423 UnauthorizedError(crate::error::UnauthorizedError),
425 NotFoundError(crate::error::NotFoundError),
427 BadRequestError(crate::error::BadRequestError),
429 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
431}
432impl std::fmt::Display for ListRegionsError {
433 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
434 match &self.kind {
435 ListRegionsErrorKind::InternalError(_inner) => _inner.fmt(f),
436 ListRegionsErrorKind::RateLimitError(_inner) => _inner.fmt(f),
437 ListRegionsErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
438 ListRegionsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
439 ListRegionsErrorKind::NotFoundError(_inner) => _inner.fmt(f),
440 ListRegionsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
441 ListRegionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
442 }
443 }
444}
445impl aws_smithy_types::retry::ProvideErrorKind for ListRegionsError {
446 fn code(&self) -> Option<&str> {
447 ListRegionsError::code(self)
448 }
449 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
450 match &self.kind {
451 ListRegionsErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
452 ListRegionsErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
453 _ => None,
454 }
455 }
456}
457impl ListRegionsError {
458 pub fn new(kind: ListRegionsErrorKind, meta: aws_smithy_types::Error) -> Self {
460 Self { kind, meta }
461 }
462
463 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
465 Self {
466 kind: ListRegionsErrorKind::Unhandled(err.into()),
467 meta: Default::default(),
468 }
469 }
470
471 pub fn generic(err: aws_smithy_types::Error) -> Self {
473 Self {
474 meta: err.clone(),
475 kind: ListRegionsErrorKind::Unhandled(err.into()),
476 }
477 }
478
479 pub fn message(&self) -> Option<&str> {
481 self.meta.message()
482 }
483
484 pub fn meta(&self) -> &aws_smithy_types::Error {
487 &self.meta
488 }
489
490 pub fn request_id(&self) -> Option<&str> {
492 self.meta.request_id()
493 }
494
495 pub fn code(&self) -> Option<&str> {
497 self.meta.code()
498 }
499 pub fn is_internal_error(&self) -> bool {
501 matches!(&self.kind, ListRegionsErrorKind::InternalError(_))
502 }
503 pub fn is_rate_limit_error(&self) -> bool {
505 matches!(&self.kind, ListRegionsErrorKind::RateLimitError(_))
506 }
507 pub fn is_forbidden_error(&self) -> bool {
509 matches!(&self.kind, ListRegionsErrorKind::ForbiddenError(_))
510 }
511 pub fn is_unauthorized_error(&self) -> bool {
513 matches!(&self.kind, ListRegionsErrorKind::UnauthorizedError(_))
514 }
515 pub fn is_not_found_error(&self) -> bool {
517 matches!(&self.kind, ListRegionsErrorKind::NotFoundError(_))
518 }
519 pub fn is_bad_request_error(&self) -> bool {
521 matches!(&self.kind, ListRegionsErrorKind::BadRequestError(_))
522 }
523}
524impl std::error::Error for ListRegionsError {
525 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
526 match &self.kind {
527 ListRegionsErrorKind::InternalError(_inner) => Some(_inner),
528 ListRegionsErrorKind::RateLimitError(_inner) => Some(_inner),
529 ListRegionsErrorKind::ForbiddenError(_inner) => Some(_inner),
530 ListRegionsErrorKind::UnauthorizedError(_inner) => Some(_inner),
531 ListRegionsErrorKind::NotFoundError(_inner) => Some(_inner),
532 ListRegionsErrorKind::BadRequestError(_inner) => Some(_inner),
533 ListRegionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
534 }
535 }
536}
537
538#[non_exhaustive]
540#[derive(std::fmt::Debug)]
541pub struct LobbyReadyError {
542 pub kind: LobbyReadyErrorKind,
544 pub(crate) meta: aws_smithy_types::Error,
546}
547#[non_exhaustive]
549#[derive(std::fmt::Debug)]
550pub enum LobbyReadyErrorKind {
551 InternalError(crate::error::InternalError),
553 RateLimitError(crate::error::RateLimitError),
555 ForbiddenError(crate::error::ForbiddenError),
557 UnauthorizedError(crate::error::UnauthorizedError),
559 NotFoundError(crate::error::NotFoundError),
561 BadRequestError(crate::error::BadRequestError),
563 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
565}
566impl std::fmt::Display for LobbyReadyError {
567 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
568 match &self.kind {
569 LobbyReadyErrorKind::InternalError(_inner) => _inner.fmt(f),
570 LobbyReadyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
571 LobbyReadyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
572 LobbyReadyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
573 LobbyReadyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
574 LobbyReadyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
575 LobbyReadyErrorKind::Unhandled(_inner) => _inner.fmt(f),
576 }
577 }
578}
579impl aws_smithy_types::retry::ProvideErrorKind for LobbyReadyError {
580 fn code(&self) -> Option<&str> {
581 LobbyReadyError::code(self)
582 }
583 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
584 match &self.kind {
585 LobbyReadyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
586 LobbyReadyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
587 _ => None,
588 }
589 }
590}
591impl LobbyReadyError {
592 pub fn new(kind: LobbyReadyErrorKind, meta: aws_smithy_types::Error) -> Self {
594 Self { kind, meta }
595 }
596
597 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
599 Self {
600 kind: LobbyReadyErrorKind::Unhandled(err.into()),
601 meta: Default::default(),
602 }
603 }
604
605 pub fn generic(err: aws_smithy_types::Error) -> Self {
607 Self {
608 meta: err.clone(),
609 kind: LobbyReadyErrorKind::Unhandled(err.into()),
610 }
611 }
612
613 pub fn message(&self) -> Option<&str> {
615 self.meta.message()
616 }
617
618 pub fn meta(&self) -> &aws_smithy_types::Error {
621 &self.meta
622 }
623
624 pub fn request_id(&self) -> Option<&str> {
626 self.meta.request_id()
627 }
628
629 pub fn code(&self) -> Option<&str> {
631 self.meta.code()
632 }
633 pub fn is_internal_error(&self) -> bool {
635 matches!(&self.kind, LobbyReadyErrorKind::InternalError(_))
636 }
637 pub fn is_rate_limit_error(&self) -> bool {
639 matches!(&self.kind, LobbyReadyErrorKind::RateLimitError(_))
640 }
641 pub fn is_forbidden_error(&self) -> bool {
643 matches!(&self.kind, LobbyReadyErrorKind::ForbiddenError(_))
644 }
645 pub fn is_unauthorized_error(&self) -> bool {
647 matches!(&self.kind, LobbyReadyErrorKind::UnauthorizedError(_))
648 }
649 pub fn is_not_found_error(&self) -> bool {
651 matches!(&self.kind, LobbyReadyErrorKind::NotFoundError(_))
652 }
653 pub fn is_bad_request_error(&self) -> bool {
655 matches!(&self.kind, LobbyReadyErrorKind::BadRequestError(_))
656 }
657}
658impl std::error::Error for LobbyReadyError {
659 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
660 match &self.kind {
661 LobbyReadyErrorKind::InternalError(_inner) => Some(_inner),
662 LobbyReadyErrorKind::RateLimitError(_inner) => Some(_inner),
663 LobbyReadyErrorKind::ForbiddenError(_inner) => Some(_inner),
664 LobbyReadyErrorKind::UnauthorizedError(_inner) => Some(_inner),
665 LobbyReadyErrorKind::NotFoundError(_inner) => Some(_inner),
666 LobbyReadyErrorKind::BadRequestError(_inner) => Some(_inner),
667 LobbyReadyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
668 }
669 }
670}
671
672#[non_exhaustive]
674#[derive(std::fmt::Debug)]
675pub struct PlayerConnectedError {
676 pub kind: PlayerConnectedErrorKind,
678 pub(crate) meta: aws_smithy_types::Error,
680}
681#[non_exhaustive]
683#[derive(std::fmt::Debug)]
684pub enum PlayerConnectedErrorKind {
685 InternalError(crate::error::InternalError),
687 RateLimitError(crate::error::RateLimitError),
689 ForbiddenError(crate::error::ForbiddenError),
691 UnauthorizedError(crate::error::UnauthorizedError),
693 NotFoundError(crate::error::NotFoundError),
695 BadRequestError(crate::error::BadRequestError),
697 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
699}
700impl std::fmt::Display for PlayerConnectedError {
701 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
702 match &self.kind {
703 PlayerConnectedErrorKind::InternalError(_inner) => _inner.fmt(f),
704 PlayerConnectedErrorKind::RateLimitError(_inner) => _inner.fmt(f),
705 PlayerConnectedErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
706 PlayerConnectedErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
707 PlayerConnectedErrorKind::NotFoundError(_inner) => _inner.fmt(f),
708 PlayerConnectedErrorKind::BadRequestError(_inner) => _inner.fmt(f),
709 PlayerConnectedErrorKind::Unhandled(_inner) => _inner.fmt(f),
710 }
711 }
712}
713impl aws_smithy_types::retry::ProvideErrorKind for PlayerConnectedError {
714 fn code(&self) -> Option<&str> {
715 PlayerConnectedError::code(self)
716 }
717 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
718 match &self.kind {
719 PlayerConnectedErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
720 PlayerConnectedErrorKind::UnauthorizedError(inner) => {
721 Some(inner.retryable_error_kind())
722 }
723 _ => None,
724 }
725 }
726}
727impl PlayerConnectedError {
728 pub fn new(kind: PlayerConnectedErrorKind, meta: aws_smithy_types::Error) -> Self {
730 Self { kind, meta }
731 }
732
733 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
735 Self {
736 kind: PlayerConnectedErrorKind::Unhandled(err.into()),
737 meta: Default::default(),
738 }
739 }
740
741 pub fn generic(err: aws_smithy_types::Error) -> Self {
743 Self {
744 meta: err.clone(),
745 kind: PlayerConnectedErrorKind::Unhandled(err.into()),
746 }
747 }
748
749 pub fn message(&self) -> Option<&str> {
751 self.meta.message()
752 }
753
754 pub fn meta(&self) -> &aws_smithy_types::Error {
757 &self.meta
758 }
759
760 pub fn request_id(&self) -> Option<&str> {
762 self.meta.request_id()
763 }
764
765 pub fn code(&self) -> Option<&str> {
767 self.meta.code()
768 }
769 pub fn is_internal_error(&self) -> bool {
771 matches!(&self.kind, PlayerConnectedErrorKind::InternalError(_))
772 }
773 pub fn is_rate_limit_error(&self) -> bool {
775 matches!(&self.kind, PlayerConnectedErrorKind::RateLimitError(_))
776 }
777 pub fn is_forbidden_error(&self) -> bool {
779 matches!(&self.kind, PlayerConnectedErrorKind::ForbiddenError(_))
780 }
781 pub fn is_unauthorized_error(&self) -> bool {
783 matches!(&self.kind, PlayerConnectedErrorKind::UnauthorizedError(_))
784 }
785 pub fn is_not_found_error(&self) -> bool {
787 matches!(&self.kind, PlayerConnectedErrorKind::NotFoundError(_))
788 }
789 pub fn is_bad_request_error(&self) -> bool {
791 matches!(&self.kind, PlayerConnectedErrorKind::BadRequestError(_))
792 }
793}
794impl std::error::Error for PlayerConnectedError {
795 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
796 match &self.kind {
797 PlayerConnectedErrorKind::InternalError(_inner) => Some(_inner),
798 PlayerConnectedErrorKind::RateLimitError(_inner) => Some(_inner),
799 PlayerConnectedErrorKind::ForbiddenError(_inner) => Some(_inner),
800 PlayerConnectedErrorKind::UnauthorizedError(_inner) => Some(_inner),
801 PlayerConnectedErrorKind::NotFoundError(_inner) => Some(_inner),
802 PlayerConnectedErrorKind::BadRequestError(_inner) => Some(_inner),
803 PlayerConnectedErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
804 }
805 }
806}
807
808#[non_exhaustive]
810#[derive(std::fmt::Debug)]
811pub struct PlayerDisconnectedError {
812 pub kind: PlayerDisconnectedErrorKind,
814 pub(crate) meta: aws_smithy_types::Error,
816}
817#[non_exhaustive]
819#[derive(std::fmt::Debug)]
820pub enum PlayerDisconnectedErrorKind {
821 InternalError(crate::error::InternalError),
823 RateLimitError(crate::error::RateLimitError),
825 ForbiddenError(crate::error::ForbiddenError),
827 UnauthorizedError(crate::error::UnauthorizedError),
829 NotFoundError(crate::error::NotFoundError),
831 BadRequestError(crate::error::BadRequestError),
833 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
835}
836impl std::fmt::Display for PlayerDisconnectedError {
837 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
838 match &self.kind {
839 PlayerDisconnectedErrorKind::InternalError(_inner) => _inner.fmt(f),
840 PlayerDisconnectedErrorKind::RateLimitError(_inner) => _inner.fmt(f),
841 PlayerDisconnectedErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
842 PlayerDisconnectedErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
843 PlayerDisconnectedErrorKind::NotFoundError(_inner) => _inner.fmt(f),
844 PlayerDisconnectedErrorKind::BadRequestError(_inner) => _inner.fmt(f),
845 PlayerDisconnectedErrorKind::Unhandled(_inner) => _inner.fmt(f),
846 }
847 }
848}
849impl aws_smithy_types::retry::ProvideErrorKind for PlayerDisconnectedError {
850 fn code(&self) -> Option<&str> {
851 PlayerDisconnectedError::code(self)
852 }
853 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
854 match &self.kind {
855 PlayerDisconnectedErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
856 PlayerDisconnectedErrorKind::UnauthorizedError(inner) => {
857 Some(inner.retryable_error_kind())
858 }
859 _ => None,
860 }
861 }
862}
863impl PlayerDisconnectedError {
864 pub fn new(kind: PlayerDisconnectedErrorKind, meta: aws_smithy_types::Error) -> Self {
866 Self { kind, meta }
867 }
868
869 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
871 Self {
872 kind: PlayerDisconnectedErrorKind::Unhandled(err.into()),
873 meta: Default::default(),
874 }
875 }
876
877 pub fn generic(err: aws_smithy_types::Error) -> Self {
879 Self {
880 meta: err.clone(),
881 kind: PlayerDisconnectedErrorKind::Unhandled(err.into()),
882 }
883 }
884
885 pub fn message(&self) -> Option<&str> {
887 self.meta.message()
888 }
889
890 pub fn meta(&self) -> &aws_smithy_types::Error {
893 &self.meta
894 }
895
896 pub fn request_id(&self) -> Option<&str> {
898 self.meta.request_id()
899 }
900
901 pub fn code(&self) -> Option<&str> {
903 self.meta.code()
904 }
905 pub fn is_internal_error(&self) -> bool {
907 matches!(&self.kind, PlayerDisconnectedErrorKind::InternalError(_))
908 }
909 pub fn is_rate_limit_error(&self) -> bool {
911 matches!(&self.kind, PlayerDisconnectedErrorKind::RateLimitError(_))
912 }
913 pub fn is_forbidden_error(&self) -> bool {
915 matches!(&self.kind, PlayerDisconnectedErrorKind::ForbiddenError(_))
916 }
917 pub fn is_unauthorized_error(&self) -> bool {
919 matches!(
920 &self.kind,
921 PlayerDisconnectedErrorKind::UnauthorizedError(_)
922 )
923 }
924 pub fn is_not_found_error(&self) -> bool {
926 matches!(&self.kind, PlayerDisconnectedErrorKind::NotFoundError(_))
927 }
928 pub fn is_bad_request_error(&self) -> bool {
930 matches!(&self.kind, PlayerDisconnectedErrorKind::BadRequestError(_))
931 }
932}
933impl std::error::Error for PlayerDisconnectedError {
934 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
935 match &self.kind {
936 PlayerDisconnectedErrorKind::InternalError(_inner) => Some(_inner),
937 PlayerDisconnectedErrorKind::RateLimitError(_inner) => Some(_inner),
938 PlayerDisconnectedErrorKind::ForbiddenError(_inner) => Some(_inner),
939 PlayerDisconnectedErrorKind::UnauthorizedError(_inner) => Some(_inner),
940 PlayerDisconnectedErrorKind::NotFoundError(_inner) => Some(_inner),
941 PlayerDisconnectedErrorKind::BadRequestError(_inner) => Some(_inner),
942 PlayerDisconnectedErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
943 }
944 }
945}
946
947#[non_exhaustive]
949#[derive(std::fmt::Debug)]
950pub struct SetLobbyClosedError {
951 pub kind: SetLobbyClosedErrorKind,
953 pub(crate) meta: aws_smithy_types::Error,
955}
956#[non_exhaustive]
958#[derive(std::fmt::Debug)]
959pub enum SetLobbyClosedErrorKind {
960 InternalError(crate::error::InternalError),
962 RateLimitError(crate::error::RateLimitError),
964 ForbiddenError(crate::error::ForbiddenError),
966 UnauthorizedError(crate::error::UnauthorizedError),
968 NotFoundError(crate::error::NotFoundError),
970 BadRequestError(crate::error::BadRequestError),
972 Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
974}
975impl std::fmt::Display for SetLobbyClosedError {
976 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
977 match &self.kind {
978 SetLobbyClosedErrorKind::InternalError(_inner) => _inner.fmt(f),
979 SetLobbyClosedErrorKind::RateLimitError(_inner) => _inner.fmt(f),
980 SetLobbyClosedErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
981 SetLobbyClosedErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
982 SetLobbyClosedErrorKind::NotFoundError(_inner) => _inner.fmt(f),
983 SetLobbyClosedErrorKind::BadRequestError(_inner) => _inner.fmt(f),
984 SetLobbyClosedErrorKind::Unhandled(_inner) => _inner.fmt(f),
985 }
986 }
987}
988impl aws_smithy_types::retry::ProvideErrorKind for SetLobbyClosedError {
989 fn code(&self) -> Option<&str> {
990 SetLobbyClosedError::code(self)
991 }
992 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
993 match &self.kind {
994 SetLobbyClosedErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
995 SetLobbyClosedErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
996 _ => None,
997 }
998 }
999}
1000impl SetLobbyClosedError {
1001 pub fn new(kind: SetLobbyClosedErrorKind, meta: aws_smithy_types::Error) -> Self {
1003 Self { kind, meta }
1004 }
1005
1006 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1008 Self {
1009 kind: SetLobbyClosedErrorKind::Unhandled(err.into()),
1010 meta: Default::default(),
1011 }
1012 }
1013
1014 pub fn generic(err: aws_smithy_types::Error) -> Self {
1016 Self {
1017 meta: err.clone(),
1018 kind: SetLobbyClosedErrorKind::Unhandled(err.into()),
1019 }
1020 }
1021
1022 pub fn message(&self) -> Option<&str> {
1024 self.meta.message()
1025 }
1026
1027 pub fn meta(&self) -> &aws_smithy_types::Error {
1030 &self.meta
1031 }
1032
1033 pub fn request_id(&self) -> Option<&str> {
1035 self.meta.request_id()
1036 }
1037
1038 pub fn code(&self) -> Option<&str> {
1040 self.meta.code()
1041 }
1042 pub fn is_internal_error(&self) -> bool {
1044 matches!(&self.kind, SetLobbyClosedErrorKind::InternalError(_))
1045 }
1046 pub fn is_rate_limit_error(&self) -> bool {
1048 matches!(&self.kind, SetLobbyClosedErrorKind::RateLimitError(_))
1049 }
1050 pub fn is_forbidden_error(&self) -> bool {
1052 matches!(&self.kind, SetLobbyClosedErrorKind::ForbiddenError(_))
1053 }
1054 pub fn is_unauthorized_error(&self) -> bool {
1056 matches!(&self.kind, SetLobbyClosedErrorKind::UnauthorizedError(_))
1057 }
1058 pub fn is_not_found_error(&self) -> bool {
1060 matches!(&self.kind, SetLobbyClosedErrorKind::NotFoundError(_))
1061 }
1062 pub fn is_bad_request_error(&self) -> bool {
1064 matches!(&self.kind, SetLobbyClosedErrorKind::BadRequestError(_))
1065 }
1066}
1067impl std::error::Error for SetLobbyClosedError {
1068 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1069 match &self.kind {
1070 SetLobbyClosedErrorKind::InternalError(_inner) => Some(_inner),
1071 SetLobbyClosedErrorKind::RateLimitError(_inner) => Some(_inner),
1072 SetLobbyClosedErrorKind::ForbiddenError(_inner) => Some(_inner),
1073 SetLobbyClosedErrorKind::UnauthorizedError(_inner) => Some(_inner),
1074 SetLobbyClosedErrorKind::NotFoundError(_inner) => Some(_inner),
1075 SetLobbyClosedErrorKind::BadRequestError(_inner) => Some(_inner),
1076 SetLobbyClosedErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
1077 }
1078 }
1079}
1080
1081#[non_exhaustive]
1083#[derive(std::clone::Clone, std::cmp::PartialEq)]
1084pub struct BadRequestError {
1085 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1087 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1089 pub metadata: std::option::Option<aws_smithy_types::Document>,
1091}
1092impl BadRequestError {
1093 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1095 self.code.as_deref()
1096 }
1097 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1099 self.metadata.as_ref()
1100 }
1101}
1102impl std::fmt::Debug for BadRequestError {
1103 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1104 let mut formatter = f.debug_struct("BadRequestError");
1105 formatter.field("code", &self.code);
1106 formatter.field("message", &self.message);
1107 formatter.field("metadata", &self.metadata);
1108 formatter.finish()
1109 }
1110}
1111impl BadRequestError {
1112 pub fn message(&self) -> Option<&str> {
1114 self.message.as_deref()
1115 }
1116}
1117impl std::fmt::Display for BadRequestError {
1118 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1119 write!(f, "BadRequestError")?;
1120 if let Some(inner_1) = &self.message {
1121 write!(f, ": {}", inner_1)?;
1122 }
1123 Ok(())
1124 }
1125}
1126impl std::error::Error for BadRequestError {}
1127pub mod bad_request_error {
1129 #[non_exhaustive]
1131 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1132 pub struct Builder {
1133 pub(crate) code: std::option::Option<std::string::String>,
1134 pub(crate) message: std::option::Option<std::string::String>,
1135 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1136 }
1137 impl Builder {
1138 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1140 self.code = Some(input.into());
1141 self
1142 }
1143 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1145 self.code = input;
1146 self
1147 }
1148 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1150 self.message = Some(input.into());
1151 self
1152 }
1153 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1155 self.message = input;
1156 self
1157 }
1158 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1160 self.metadata = Some(input);
1161 self
1162 }
1163 pub fn set_metadata(
1165 mut self,
1166 input: std::option::Option<aws_smithy_types::Document>,
1167 ) -> Self {
1168 self.metadata = input;
1169 self
1170 }
1171 pub fn build(self) -> crate::error::BadRequestError {
1173 crate::error::BadRequestError {
1174 code: self.code,
1175 message: self.message,
1176 metadata: self.metadata,
1177 }
1178 }
1179 }
1180}
1181impl BadRequestError {
1182 pub fn builder() -> crate::error::bad_request_error::Builder {
1184 crate::error::bad_request_error::Builder::default()
1185 }
1186}
1187
1188#[non_exhaustive]
1190#[derive(std::clone::Clone, std::cmp::PartialEq)]
1191pub struct NotFoundError {
1192 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1194 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1196 pub metadata: std::option::Option<aws_smithy_types::Document>,
1198}
1199impl NotFoundError {
1200 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1202 self.code.as_deref()
1203 }
1204 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1206 self.metadata.as_ref()
1207 }
1208}
1209impl std::fmt::Debug for NotFoundError {
1210 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1211 let mut formatter = f.debug_struct("NotFoundError");
1212 formatter.field("code", &self.code);
1213 formatter.field("message", &self.message);
1214 formatter.field("metadata", &self.metadata);
1215 formatter.finish()
1216 }
1217}
1218impl NotFoundError {
1219 pub fn message(&self) -> Option<&str> {
1221 self.message.as_deref()
1222 }
1223}
1224impl std::fmt::Display for NotFoundError {
1225 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1226 write!(f, "NotFoundError")?;
1227 if let Some(inner_2) = &self.message {
1228 write!(f, ": {}", inner_2)?;
1229 }
1230 Ok(())
1231 }
1232}
1233impl std::error::Error for NotFoundError {}
1234pub mod not_found_error {
1236 #[non_exhaustive]
1238 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1239 pub struct Builder {
1240 pub(crate) code: std::option::Option<std::string::String>,
1241 pub(crate) message: std::option::Option<std::string::String>,
1242 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1243 }
1244 impl Builder {
1245 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1247 self.code = Some(input.into());
1248 self
1249 }
1250 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1252 self.code = input;
1253 self
1254 }
1255 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1257 self.message = Some(input.into());
1258 self
1259 }
1260 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1262 self.message = input;
1263 self
1264 }
1265 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1267 self.metadata = Some(input);
1268 self
1269 }
1270 pub fn set_metadata(
1272 mut self,
1273 input: std::option::Option<aws_smithy_types::Document>,
1274 ) -> Self {
1275 self.metadata = input;
1276 self
1277 }
1278 pub fn build(self) -> crate::error::NotFoundError {
1280 crate::error::NotFoundError {
1281 code: self.code,
1282 message: self.message,
1283 metadata: self.metadata,
1284 }
1285 }
1286 }
1287}
1288impl NotFoundError {
1289 pub fn builder() -> crate::error::not_found_error::Builder {
1291 crate::error::not_found_error::Builder::default()
1292 }
1293}
1294
1295#[non_exhaustive]
1297#[derive(std::clone::Clone, std::cmp::PartialEq)]
1298pub struct UnauthorizedError {
1299 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1301 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1303 pub metadata: std::option::Option<aws_smithy_types::Document>,
1305}
1306impl UnauthorizedError {
1307 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1309 self.code.as_deref()
1310 }
1311 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1313 self.metadata.as_ref()
1314 }
1315}
1316impl std::fmt::Debug for UnauthorizedError {
1317 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1318 let mut formatter = f.debug_struct("UnauthorizedError");
1319 formatter.field("code", &self.code);
1320 formatter.field("message", &self.message);
1321 formatter.field("metadata", &self.metadata);
1322 formatter.finish()
1323 }
1324}
1325impl UnauthorizedError {
1326 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1328 aws_smithy_types::retry::ErrorKind::ClientError
1329 }
1330 pub fn message(&self) -> Option<&str> {
1332 self.message.as_deref()
1333 }
1334}
1335impl std::fmt::Display for UnauthorizedError {
1336 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1337 write!(f, "UnauthorizedError")?;
1338 if let Some(inner_3) = &self.message {
1339 write!(f, ": {}", inner_3)?;
1340 }
1341 Ok(())
1342 }
1343}
1344impl std::error::Error for UnauthorizedError {}
1345pub mod unauthorized_error {
1347 #[non_exhaustive]
1349 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1350 pub struct Builder {
1351 pub(crate) code: std::option::Option<std::string::String>,
1352 pub(crate) message: std::option::Option<std::string::String>,
1353 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1354 }
1355 impl Builder {
1356 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1358 self.code = Some(input.into());
1359 self
1360 }
1361 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1363 self.code = input;
1364 self
1365 }
1366 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1368 self.message = Some(input.into());
1369 self
1370 }
1371 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1373 self.message = input;
1374 self
1375 }
1376 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1378 self.metadata = Some(input);
1379 self
1380 }
1381 pub fn set_metadata(
1383 mut self,
1384 input: std::option::Option<aws_smithy_types::Document>,
1385 ) -> Self {
1386 self.metadata = input;
1387 self
1388 }
1389 pub fn build(self) -> crate::error::UnauthorizedError {
1391 crate::error::UnauthorizedError {
1392 code: self.code,
1393 message: self.message,
1394 metadata: self.metadata,
1395 }
1396 }
1397 }
1398}
1399impl UnauthorizedError {
1400 pub fn builder() -> crate::error::unauthorized_error::Builder {
1402 crate::error::unauthorized_error::Builder::default()
1403 }
1404}
1405
1406#[non_exhaustive]
1408#[derive(std::clone::Clone, std::cmp::PartialEq)]
1409pub struct ForbiddenError {
1410 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1412 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1414 pub metadata: std::option::Option<aws_smithy_types::Document>,
1416}
1417impl ForbiddenError {
1418 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1420 self.code.as_deref()
1421 }
1422 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1424 self.metadata.as_ref()
1425 }
1426}
1427impl std::fmt::Debug for ForbiddenError {
1428 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1429 let mut formatter = f.debug_struct("ForbiddenError");
1430 formatter.field("code", &self.code);
1431 formatter.field("message", &self.message);
1432 formatter.field("metadata", &self.metadata);
1433 formatter.finish()
1434 }
1435}
1436impl ForbiddenError {
1437 pub fn message(&self) -> Option<&str> {
1439 self.message.as_deref()
1440 }
1441}
1442impl std::fmt::Display for ForbiddenError {
1443 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1444 write!(f, "ForbiddenError")?;
1445 if let Some(inner_4) = &self.message {
1446 write!(f, ": {}", inner_4)?;
1447 }
1448 Ok(())
1449 }
1450}
1451impl std::error::Error for ForbiddenError {}
1452pub mod forbidden_error {
1454 #[non_exhaustive]
1456 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1457 pub struct Builder {
1458 pub(crate) code: std::option::Option<std::string::String>,
1459 pub(crate) message: std::option::Option<std::string::String>,
1460 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1461 }
1462 impl Builder {
1463 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1465 self.code = Some(input.into());
1466 self
1467 }
1468 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1470 self.code = input;
1471 self
1472 }
1473 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1475 self.message = Some(input.into());
1476 self
1477 }
1478 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1480 self.message = input;
1481 self
1482 }
1483 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1485 self.metadata = Some(input);
1486 self
1487 }
1488 pub fn set_metadata(
1490 mut self,
1491 input: std::option::Option<aws_smithy_types::Document>,
1492 ) -> Self {
1493 self.metadata = input;
1494 self
1495 }
1496 pub fn build(self) -> crate::error::ForbiddenError {
1498 crate::error::ForbiddenError {
1499 code: self.code,
1500 message: self.message,
1501 metadata: self.metadata,
1502 }
1503 }
1504 }
1505}
1506impl ForbiddenError {
1507 pub fn builder() -> crate::error::forbidden_error::Builder {
1509 crate::error::forbidden_error::Builder::default()
1510 }
1511}
1512
1513#[non_exhaustive]
1515#[derive(std::clone::Clone, std::cmp::PartialEq)]
1516pub struct RateLimitError {
1517 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1519 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1521 pub metadata: std::option::Option<aws_smithy_types::Document>,
1523}
1524impl RateLimitError {
1525 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1527 self.code.as_deref()
1528 }
1529 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1531 self.metadata.as_ref()
1532 }
1533}
1534impl std::fmt::Debug for RateLimitError {
1535 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1536 let mut formatter = f.debug_struct("RateLimitError");
1537 formatter.field("code", &self.code);
1538 formatter.field("message", &self.message);
1539 formatter.field("metadata", &self.metadata);
1540 formatter.finish()
1541 }
1542}
1543impl RateLimitError {
1544 pub fn message(&self) -> Option<&str> {
1546 self.message.as_deref()
1547 }
1548}
1549impl std::fmt::Display for RateLimitError {
1550 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1551 write!(f, "RateLimitError")?;
1552 if let Some(inner_5) = &self.message {
1553 write!(f, ": {}", inner_5)?;
1554 }
1555 Ok(())
1556 }
1557}
1558impl std::error::Error for RateLimitError {}
1559pub mod rate_limit_error {
1561 #[non_exhaustive]
1563 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1564 pub struct Builder {
1565 pub(crate) code: std::option::Option<std::string::String>,
1566 pub(crate) message: std::option::Option<std::string::String>,
1567 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1568 }
1569 impl Builder {
1570 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1572 self.code = Some(input.into());
1573 self
1574 }
1575 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1577 self.code = input;
1578 self
1579 }
1580 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1582 self.message = Some(input.into());
1583 self
1584 }
1585 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1587 self.message = input;
1588 self
1589 }
1590 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1592 self.metadata = Some(input);
1593 self
1594 }
1595 pub fn set_metadata(
1597 mut self,
1598 input: std::option::Option<aws_smithy_types::Document>,
1599 ) -> Self {
1600 self.metadata = input;
1601 self
1602 }
1603 pub fn build(self) -> crate::error::RateLimitError {
1605 crate::error::RateLimitError {
1606 code: self.code,
1607 message: self.message,
1608 metadata: self.metadata,
1609 }
1610 }
1611 }
1612}
1613impl RateLimitError {
1614 pub fn builder() -> crate::error::rate_limit_error::Builder {
1616 crate::error::rate_limit_error::Builder::default()
1617 }
1618}
1619
1620#[non_exhaustive]
1622#[derive(std::clone::Clone, std::cmp::PartialEq)]
1623pub struct InternalError {
1624 #[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
1626 #[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
1628 pub metadata: std::option::Option<aws_smithy_types::Document>,
1630}
1631impl InternalError {
1632 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
1634 self.code.as_deref()
1635 }
1636 pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1638 self.metadata.as_ref()
1639 }
1640}
1641impl std::fmt::Debug for InternalError {
1642 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1643 let mut formatter = f.debug_struct("InternalError");
1644 formatter.field("code", &self.code);
1645 formatter.field("message", &self.message);
1646 formatter.field("metadata", &self.metadata);
1647 formatter.finish()
1648 }
1649}
1650impl InternalError {
1651 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1653 aws_smithy_types::retry::ErrorKind::ServerError
1654 }
1655 pub fn message(&self) -> Option<&str> {
1657 self.message.as_deref()
1658 }
1659}
1660impl std::fmt::Display for InternalError {
1661 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1662 write!(f, "InternalError")?;
1663 if let Some(inner_6) = &self.message {
1664 write!(f, ": {}", inner_6)?;
1665 }
1666 Ok(())
1667 }
1668}
1669impl std::error::Error for InternalError {}
1670pub mod internal_error {
1672 #[non_exhaustive]
1674 #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1675 pub struct Builder {
1676 pub(crate) code: std::option::Option<std::string::String>,
1677 pub(crate) message: std::option::Option<std::string::String>,
1678 pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1679 }
1680 impl Builder {
1681 #[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1683 self.code = Some(input.into());
1684 self
1685 }
1686 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1688 self.code = input;
1689 self
1690 }
1691 #[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1693 self.message = Some(input.into());
1694 self
1695 }
1696 #[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1698 self.message = input;
1699 self
1700 }
1701 pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1703 self.metadata = Some(input);
1704 self
1705 }
1706 pub fn set_metadata(
1708 mut self,
1709 input: std::option::Option<aws_smithy_types::Document>,
1710 ) -> Self {
1711 self.metadata = input;
1712 self
1713 }
1714 pub fn build(self) -> crate::error::InternalError {
1716 crate::error::InternalError {
1717 code: self.code,
1718 message: self.message,
1719 metadata: self.metadata,
1720 }
1721 }
1722 }
1723}
1724impl InternalError {
1725 pub fn builder() -> crate::error::internal_error::Builder {
1727 crate::error::internal_error::Builder::default()
1728 }
1729}