rivet_matchmaker/
error.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Error type for the `FindLobby` operation.
3#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct FindLobbyError {
6	/// Kind of error that occurred.
7	pub kind: FindLobbyErrorKind,
8	/// Additional metadata about the error, including error code, message, and request ID.
9	pub(crate) meta: aws_smithy_types::Error,
10}
11/// Types of errors that can occur for the `FindLobby` operation.
12#[non_exhaustive]
13#[derive(std::fmt::Debug)]
14pub enum FindLobbyErrorKind {
15	/// An error caused by internal server problems.
16	InternalError(crate::error::InternalError),
17	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
18	RateLimitError(crate::error::RateLimitError),
19	/// An error thrown when the requestee requests a resource they do not have access to.
20	ForbiddenError(crate::error::ForbiddenError),
21	/// An error thrown when the requestee is not authenticated.
22	UnauthorizedError(crate::error::UnauthorizedError),
23	/// An error thrown when the requestee requests a non existant resource.
24	NotFoundError(crate::error::NotFoundError),
25	/// An error thrown when the requestee has sent an invalid or malformed request.
26	BadRequestError(crate::error::BadRequestError),
27	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
28	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	/// Creates a new `FindLobbyError`.
57	pub fn new(kind: FindLobbyErrorKind, meta: aws_smithy_types::Error) -> Self {
58		Self { kind, meta }
59	}
60
61	/// Creates the `FindLobbyError::Unhandled` variant from any error type.
62	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	/// Creates the `FindLobbyError::Unhandled` variant from a `aws_smithy_types::Error`.
70	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	/// Returns the error message if one is available.
78	pub fn message(&self) -> Option<&str> {
79		self.meta.message()
80	}
81
82	/// Returns error metadata, which includes the error code, message,
83	/// request ID, and potentially additional information.
84	pub fn meta(&self) -> &aws_smithy_types::Error {
85		&self.meta
86	}
87
88	/// Returns the request ID if it's available.
89	pub fn request_id(&self) -> Option<&str> {
90		self.meta.request_id()
91	}
92
93	/// Returns the error code if it's available.
94	pub fn code(&self) -> Option<&str> {
95		self.meta.code()
96	}
97	/// Returns `true` if the error kind is `FindLobbyErrorKind::InternalError`.
98	pub fn is_internal_error(&self) -> bool {
99		matches!(&self.kind, FindLobbyErrorKind::InternalError(_))
100	}
101	/// Returns `true` if the error kind is `FindLobbyErrorKind::RateLimitError`.
102	pub fn is_rate_limit_error(&self) -> bool {
103		matches!(&self.kind, FindLobbyErrorKind::RateLimitError(_))
104	}
105	/// Returns `true` if the error kind is `FindLobbyErrorKind::ForbiddenError`.
106	pub fn is_forbidden_error(&self) -> bool {
107		matches!(&self.kind, FindLobbyErrorKind::ForbiddenError(_))
108	}
109	/// Returns `true` if the error kind is `FindLobbyErrorKind::UnauthorizedError`.
110	pub fn is_unauthorized_error(&self) -> bool {
111		matches!(&self.kind, FindLobbyErrorKind::UnauthorizedError(_))
112	}
113	/// Returns `true` if the error kind is `FindLobbyErrorKind::NotFoundError`.
114	pub fn is_not_found_error(&self) -> bool {
115		matches!(&self.kind, FindLobbyErrorKind::NotFoundError(_))
116	}
117	/// Returns `true` if the error kind is `FindLobbyErrorKind::BadRequestError`.
118	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/// Error type for the `JoinLobby` operation.
137#[non_exhaustive]
138#[derive(std::fmt::Debug)]
139pub struct JoinLobbyError {
140	/// Kind of error that occurred.
141	pub kind: JoinLobbyErrorKind,
142	/// Additional metadata about the error, including error code, message, and request ID.
143	pub(crate) meta: aws_smithy_types::Error,
144}
145/// Types of errors that can occur for the `JoinLobby` operation.
146#[non_exhaustive]
147#[derive(std::fmt::Debug)]
148pub enum JoinLobbyErrorKind {
149	/// An error caused by internal server problems.
150	InternalError(crate::error::InternalError),
151	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
152	RateLimitError(crate::error::RateLimitError),
153	/// An error thrown when the requestee requests a resource they do not have access to.
154	ForbiddenError(crate::error::ForbiddenError),
155	/// An error thrown when the requestee is not authenticated.
156	UnauthorizedError(crate::error::UnauthorizedError),
157	/// An error thrown when the requestee requests a non existant resource.
158	NotFoundError(crate::error::NotFoundError),
159	/// An error thrown when the requestee has sent an invalid or malformed request.
160	BadRequestError(crate::error::BadRequestError),
161	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
162	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	/// Creates a new `JoinLobbyError`.
191	pub fn new(kind: JoinLobbyErrorKind, meta: aws_smithy_types::Error) -> Self {
192		Self { kind, meta }
193	}
194
195	/// Creates the `JoinLobbyError::Unhandled` variant from any error type.
196	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	/// Creates the `JoinLobbyError::Unhandled` variant from a `aws_smithy_types::Error`.
204	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	/// Returns the error message if one is available.
212	pub fn message(&self) -> Option<&str> {
213		self.meta.message()
214	}
215
216	/// Returns error metadata, which includes the error code, message,
217	/// request ID, and potentially additional information.
218	pub fn meta(&self) -> &aws_smithy_types::Error {
219		&self.meta
220	}
221
222	/// Returns the request ID if it's available.
223	pub fn request_id(&self) -> Option<&str> {
224		self.meta.request_id()
225	}
226
227	/// Returns the error code if it's available.
228	pub fn code(&self) -> Option<&str> {
229		self.meta.code()
230	}
231	/// Returns `true` if the error kind is `JoinLobbyErrorKind::InternalError`.
232	pub fn is_internal_error(&self) -> bool {
233		matches!(&self.kind, JoinLobbyErrorKind::InternalError(_))
234	}
235	/// Returns `true` if the error kind is `JoinLobbyErrorKind::RateLimitError`.
236	pub fn is_rate_limit_error(&self) -> bool {
237		matches!(&self.kind, JoinLobbyErrorKind::RateLimitError(_))
238	}
239	/// Returns `true` if the error kind is `JoinLobbyErrorKind::ForbiddenError`.
240	pub fn is_forbidden_error(&self) -> bool {
241		matches!(&self.kind, JoinLobbyErrorKind::ForbiddenError(_))
242	}
243	/// Returns `true` if the error kind is `JoinLobbyErrorKind::UnauthorizedError`.
244	pub fn is_unauthorized_error(&self) -> bool {
245		matches!(&self.kind, JoinLobbyErrorKind::UnauthorizedError(_))
246	}
247	/// Returns `true` if the error kind is `JoinLobbyErrorKind::NotFoundError`.
248	pub fn is_not_found_error(&self) -> bool {
249		matches!(&self.kind, JoinLobbyErrorKind::NotFoundError(_))
250	}
251	/// Returns `true` if the error kind is `JoinLobbyErrorKind::BadRequestError`.
252	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/// Error type for the `ListLobbies` operation.
271#[non_exhaustive]
272#[derive(std::fmt::Debug)]
273pub struct ListLobbiesError {
274	/// Kind of error that occurred.
275	pub kind: ListLobbiesErrorKind,
276	/// Additional metadata about the error, including error code, message, and request ID.
277	pub(crate) meta: aws_smithy_types::Error,
278}
279/// Types of errors that can occur for the `ListLobbies` operation.
280#[non_exhaustive]
281#[derive(std::fmt::Debug)]
282pub enum ListLobbiesErrorKind {
283	/// An error caused by internal server problems.
284	InternalError(crate::error::InternalError),
285	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
286	RateLimitError(crate::error::RateLimitError),
287	/// An error thrown when the requestee requests a resource they do not have access to.
288	ForbiddenError(crate::error::ForbiddenError),
289	/// An error thrown when the requestee is not authenticated.
290	UnauthorizedError(crate::error::UnauthorizedError),
291	/// An error thrown when the requestee requests a non existant resource.
292	NotFoundError(crate::error::NotFoundError),
293	/// An error thrown when the requestee has sent an invalid or malformed request.
294	BadRequestError(crate::error::BadRequestError),
295	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
296	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	/// Creates a new `ListLobbiesError`.
325	pub fn new(kind: ListLobbiesErrorKind, meta: aws_smithy_types::Error) -> Self {
326		Self { kind, meta }
327	}
328
329	/// Creates the `ListLobbiesError::Unhandled` variant from any error type.
330	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	/// Creates the `ListLobbiesError::Unhandled` variant from a `aws_smithy_types::Error`.
338	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	/// Returns the error message if one is available.
346	pub fn message(&self) -> Option<&str> {
347		self.meta.message()
348	}
349
350	/// Returns error metadata, which includes the error code, message,
351	/// request ID, and potentially additional information.
352	pub fn meta(&self) -> &aws_smithy_types::Error {
353		&self.meta
354	}
355
356	/// Returns the request ID if it's available.
357	pub fn request_id(&self) -> Option<&str> {
358		self.meta.request_id()
359	}
360
361	/// Returns the error code if it's available.
362	pub fn code(&self) -> Option<&str> {
363		self.meta.code()
364	}
365	/// Returns `true` if the error kind is `ListLobbiesErrorKind::InternalError`.
366	pub fn is_internal_error(&self) -> bool {
367		matches!(&self.kind, ListLobbiesErrorKind::InternalError(_))
368	}
369	/// Returns `true` if the error kind is `ListLobbiesErrorKind::RateLimitError`.
370	pub fn is_rate_limit_error(&self) -> bool {
371		matches!(&self.kind, ListLobbiesErrorKind::RateLimitError(_))
372	}
373	/// Returns `true` if the error kind is `ListLobbiesErrorKind::ForbiddenError`.
374	pub fn is_forbidden_error(&self) -> bool {
375		matches!(&self.kind, ListLobbiesErrorKind::ForbiddenError(_))
376	}
377	/// Returns `true` if the error kind is `ListLobbiesErrorKind::UnauthorizedError`.
378	pub fn is_unauthorized_error(&self) -> bool {
379		matches!(&self.kind, ListLobbiesErrorKind::UnauthorizedError(_))
380	}
381	/// Returns `true` if the error kind is `ListLobbiesErrorKind::NotFoundError`.
382	pub fn is_not_found_error(&self) -> bool {
383		matches!(&self.kind, ListLobbiesErrorKind::NotFoundError(_))
384	}
385	/// Returns `true` if the error kind is `ListLobbiesErrorKind::BadRequestError`.
386	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/// Error type for the `ListRegions` operation.
405#[non_exhaustive]
406#[derive(std::fmt::Debug)]
407pub struct ListRegionsError {
408	/// Kind of error that occurred.
409	pub kind: ListRegionsErrorKind,
410	/// Additional metadata about the error, including error code, message, and request ID.
411	pub(crate) meta: aws_smithy_types::Error,
412}
413/// Types of errors that can occur for the `ListRegions` operation.
414#[non_exhaustive]
415#[derive(std::fmt::Debug)]
416pub enum ListRegionsErrorKind {
417	/// An error caused by internal server problems.
418	InternalError(crate::error::InternalError),
419	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
420	RateLimitError(crate::error::RateLimitError),
421	/// An error thrown when the requestee requests a resource they do not have access to.
422	ForbiddenError(crate::error::ForbiddenError),
423	/// An error thrown when the requestee is not authenticated.
424	UnauthorizedError(crate::error::UnauthorizedError),
425	/// An error thrown when the requestee requests a non existant resource.
426	NotFoundError(crate::error::NotFoundError),
427	/// An error thrown when the requestee has sent an invalid or malformed request.
428	BadRequestError(crate::error::BadRequestError),
429	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
430	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	/// Creates a new `ListRegionsError`.
459	pub fn new(kind: ListRegionsErrorKind, meta: aws_smithy_types::Error) -> Self {
460		Self { kind, meta }
461	}
462
463	/// Creates the `ListRegionsError::Unhandled` variant from any error type.
464	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	/// Creates the `ListRegionsError::Unhandled` variant from a `aws_smithy_types::Error`.
472	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	/// Returns the error message if one is available.
480	pub fn message(&self) -> Option<&str> {
481		self.meta.message()
482	}
483
484	/// Returns error metadata, which includes the error code, message,
485	/// request ID, and potentially additional information.
486	pub fn meta(&self) -> &aws_smithy_types::Error {
487		&self.meta
488	}
489
490	/// Returns the request ID if it's available.
491	pub fn request_id(&self) -> Option<&str> {
492		self.meta.request_id()
493	}
494
495	/// Returns the error code if it's available.
496	pub fn code(&self) -> Option<&str> {
497		self.meta.code()
498	}
499	/// Returns `true` if the error kind is `ListRegionsErrorKind::InternalError`.
500	pub fn is_internal_error(&self) -> bool {
501		matches!(&self.kind, ListRegionsErrorKind::InternalError(_))
502	}
503	/// Returns `true` if the error kind is `ListRegionsErrorKind::RateLimitError`.
504	pub fn is_rate_limit_error(&self) -> bool {
505		matches!(&self.kind, ListRegionsErrorKind::RateLimitError(_))
506	}
507	/// Returns `true` if the error kind is `ListRegionsErrorKind::ForbiddenError`.
508	pub fn is_forbidden_error(&self) -> bool {
509		matches!(&self.kind, ListRegionsErrorKind::ForbiddenError(_))
510	}
511	/// Returns `true` if the error kind is `ListRegionsErrorKind::UnauthorizedError`.
512	pub fn is_unauthorized_error(&self) -> bool {
513		matches!(&self.kind, ListRegionsErrorKind::UnauthorizedError(_))
514	}
515	/// Returns `true` if the error kind is `ListRegionsErrorKind::NotFoundError`.
516	pub fn is_not_found_error(&self) -> bool {
517		matches!(&self.kind, ListRegionsErrorKind::NotFoundError(_))
518	}
519	/// Returns `true` if the error kind is `ListRegionsErrorKind::BadRequestError`.
520	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/// Error type for the `LobbyReady` operation.
539#[non_exhaustive]
540#[derive(std::fmt::Debug)]
541pub struct LobbyReadyError {
542	/// Kind of error that occurred.
543	pub kind: LobbyReadyErrorKind,
544	/// Additional metadata about the error, including error code, message, and request ID.
545	pub(crate) meta: aws_smithy_types::Error,
546}
547/// Types of errors that can occur for the `LobbyReady` operation.
548#[non_exhaustive]
549#[derive(std::fmt::Debug)]
550pub enum LobbyReadyErrorKind {
551	/// An error caused by internal server problems.
552	InternalError(crate::error::InternalError),
553	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
554	RateLimitError(crate::error::RateLimitError),
555	/// An error thrown when the requestee requests a resource they do not have access to.
556	ForbiddenError(crate::error::ForbiddenError),
557	/// An error thrown when the requestee is not authenticated.
558	UnauthorizedError(crate::error::UnauthorizedError),
559	/// An error thrown when the requestee requests a non existant resource.
560	NotFoundError(crate::error::NotFoundError),
561	/// An error thrown when the requestee has sent an invalid or malformed request.
562	BadRequestError(crate::error::BadRequestError),
563	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
564	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	/// Creates a new `LobbyReadyError`.
593	pub fn new(kind: LobbyReadyErrorKind, meta: aws_smithy_types::Error) -> Self {
594		Self { kind, meta }
595	}
596
597	/// Creates the `LobbyReadyError::Unhandled` variant from any error type.
598	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	/// Creates the `LobbyReadyError::Unhandled` variant from a `aws_smithy_types::Error`.
606	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	/// Returns the error message if one is available.
614	pub fn message(&self) -> Option<&str> {
615		self.meta.message()
616	}
617
618	/// Returns error metadata, which includes the error code, message,
619	/// request ID, and potentially additional information.
620	pub fn meta(&self) -> &aws_smithy_types::Error {
621		&self.meta
622	}
623
624	/// Returns the request ID if it's available.
625	pub fn request_id(&self) -> Option<&str> {
626		self.meta.request_id()
627	}
628
629	/// Returns the error code if it's available.
630	pub fn code(&self) -> Option<&str> {
631		self.meta.code()
632	}
633	/// Returns `true` if the error kind is `LobbyReadyErrorKind::InternalError`.
634	pub fn is_internal_error(&self) -> bool {
635		matches!(&self.kind, LobbyReadyErrorKind::InternalError(_))
636	}
637	/// Returns `true` if the error kind is `LobbyReadyErrorKind::RateLimitError`.
638	pub fn is_rate_limit_error(&self) -> bool {
639		matches!(&self.kind, LobbyReadyErrorKind::RateLimitError(_))
640	}
641	/// Returns `true` if the error kind is `LobbyReadyErrorKind::ForbiddenError`.
642	pub fn is_forbidden_error(&self) -> bool {
643		matches!(&self.kind, LobbyReadyErrorKind::ForbiddenError(_))
644	}
645	/// Returns `true` if the error kind is `LobbyReadyErrorKind::UnauthorizedError`.
646	pub fn is_unauthorized_error(&self) -> bool {
647		matches!(&self.kind, LobbyReadyErrorKind::UnauthorizedError(_))
648	}
649	/// Returns `true` if the error kind is `LobbyReadyErrorKind::NotFoundError`.
650	pub fn is_not_found_error(&self) -> bool {
651		matches!(&self.kind, LobbyReadyErrorKind::NotFoundError(_))
652	}
653	/// Returns `true` if the error kind is `LobbyReadyErrorKind::BadRequestError`.
654	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/// Error type for the `PlayerConnected` operation.
673#[non_exhaustive]
674#[derive(std::fmt::Debug)]
675pub struct PlayerConnectedError {
676	/// Kind of error that occurred.
677	pub kind: PlayerConnectedErrorKind,
678	/// Additional metadata about the error, including error code, message, and request ID.
679	pub(crate) meta: aws_smithy_types::Error,
680}
681/// Types of errors that can occur for the `PlayerConnected` operation.
682#[non_exhaustive]
683#[derive(std::fmt::Debug)]
684pub enum PlayerConnectedErrorKind {
685	/// An error caused by internal server problems.
686	InternalError(crate::error::InternalError),
687	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
688	RateLimitError(crate::error::RateLimitError),
689	/// An error thrown when the requestee requests a resource they do not have access to.
690	ForbiddenError(crate::error::ForbiddenError),
691	/// An error thrown when the requestee is not authenticated.
692	UnauthorizedError(crate::error::UnauthorizedError),
693	/// An error thrown when the requestee requests a non existant resource.
694	NotFoundError(crate::error::NotFoundError),
695	/// An error thrown when the requestee has sent an invalid or malformed request.
696	BadRequestError(crate::error::BadRequestError),
697	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
698	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	/// Creates a new `PlayerConnectedError`.
729	pub fn new(kind: PlayerConnectedErrorKind, meta: aws_smithy_types::Error) -> Self {
730		Self { kind, meta }
731	}
732
733	/// Creates the `PlayerConnectedError::Unhandled` variant from any error type.
734	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	/// Creates the `PlayerConnectedError::Unhandled` variant from a `aws_smithy_types::Error`.
742	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	/// Returns the error message if one is available.
750	pub fn message(&self) -> Option<&str> {
751		self.meta.message()
752	}
753
754	/// Returns error metadata, which includes the error code, message,
755	/// request ID, and potentially additional information.
756	pub fn meta(&self) -> &aws_smithy_types::Error {
757		&self.meta
758	}
759
760	/// Returns the request ID if it's available.
761	pub fn request_id(&self) -> Option<&str> {
762		self.meta.request_id()
763	}
764
765	/// Returns the error code if it's available.
766	pub fn code(&self) -> Option<&str> {
767		self.meta.code()
768	}
769	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::InternalError`.
770	pub fn is_internal_error(&self) -> bool {
771		matches!(&self.kind, PlayerConnectedErrorKind::InternalError(_))
772	}
773	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::RateLimitError`.
774	pub fn is_rate_limit_error(&self) -> bool {
775		matches!(&self.kind, PlayerConnectedErrorKind::RateLimitError(_))
776	}
777	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::ForbiddenError`.
778	pub fn is_forbidden_error(&self) -> bool {
779		matches!(&self.kind, PlayerConnectedErrorKind::ForbiddenError(_))
780	}
781	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::UnauthorizedError`.
782	pub fn is_unauthorized_error(&self) -> bool {
783		matches!(&self.kind, PlayerConnectedErrorKind::UnauthorizedError(_))
784	}
785	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::NotFoundError`.
786	pub fn is_not_found_error(&self) -> bool {
787		matches!(&self.kind, PlayerConnectedErrorKind::NotFoundError(_))
788	}
789	/// Returns `true` if the error kind is `PlayerConnectedErrorKind::BadRequestError`.
790	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/// Error type for the `PlayerDisconnected` operation.
809#[non_exhaustive]
810#[derive(std::fmt::Debug)]
811pub struct PlayerDisconnectedError {
812	/// Kind of error that occurred.
813	pub kind: PlayerDisconnectedErrorKind,
814	/// Additional metadata about the error, including error code, message, and request ID.
815	pub(crate) meta: aws_smithy_types::Error,
816}
817/// Types of errors that can occur for the `PlayerDisconnected` operation.
818#[non_exhaustive]
819#[derive(std::fmt::Debug)]
820pub enum PlayerDisconnectedErrorKind {
821	/// An error caused by internal server problems.
822	InternalError(crate::error::InternalError),
823	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
824	RateLimitError(crate::error::RateLimitError),
825	/// An error thrown when the requestee requests a resource they do not have access to.
826	ForbiddenError(crate::error::ForbiddenError),
827	/// An error thrown when the requestee is not authenticated.
828	UnauthorizedError(crate::error::UnauthorizedError),
829	/// An error thrown when the requestee requests a non existant resource.
830	NotFoundError(crate::error::NotFoundError),
831	/// An error thrown when the requestee has sent an invalid or malformed request.
832	BadRequestError(crate::error::BadRequestError),
833	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
834	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	/// Creates a new `PlayerDisconnectedError`.
865	pub fn new(kind: PlayerDisconnectedErrorKind, meta: aws_smithy_types::Error) -> Self {
866		Self { kind, meta }
867	}
868
869	/// Creates the `PlayerDisconnectedError::Unhandled` variant from any error type.
870	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	/// Creates the `PlayerDisconnectedError::Unhandled` variant from a `aws_smithy_types::Error`.
878	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	/// Returns the error message if one is available.
886	pub fn message(&self) -> Option<&str> {
887		self.meta.message()
888	}
889
890	/// Returns error metadata, which includes the error code, message,
891	/// request ID, and potentially additional information.
892	pub fn meta(&self) -> &aws_smithy_types::Error {
893		&self.meta
894	}
895
896	/// Returns the request ID if it's available.
897	pub fn request_id(&self) -> Option<&str> {
898		self.meta.request_id()
899	}
900
901	/// Returns the error code if it's available.
902	pub fn code(&self) -> Option<&str> {
903		self.meta.code()
904	}
905	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::InternalError`.
906	pub fn is_internal_error(&self) -> bool {
907		matches!(&self.kind, PlayerDisconnectedErrorKind::InternalError(_))
908	}
909	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::RateLimitError`.
910	pub fn is_rate_limit_error(&self) -> bool {
911		matches!(&self.kind, PlayerDisconnectedErrorKind::RateLimitError(_))
912	}
913	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::ForbiddenError`.
914	pub fn is_forbidden_error(&self) -> bool {
915		matches!(&self.kind, PlayerDisconnectedErrorKind::ForbiddenError(_))
916	}
917	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::UnauthorizedError`.
918	pub fn is_unauthorized_error(&self) -> bool {
919		matches!(
920			&self.kind,
921			PlayerDisconnectedErrorKind::UnauthorizedError(_)
922		)
923	}
924	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::NotFoundError`.
925	pub fn is_not_found_error(&self) -> bool {
926		matches!(&self.kind, PlayerDisconnectedErrorKind::NotFoundError(_))
927	}
928	/// Returns `true` if the error kind is `PlayerDisconnectedErrorKind::BadRequestError`.
929	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/// Error type for the `SetLobbyClosed` operation.
948#[non_exhaustive]
949#[derive(std::fmt::Debug)]
950pub struct SetLobbyClosedError {
951	/// Kind of error that occurred.
952	pub kind: SetLobbyClosedErrorKind,
953	/// Additional metadata about the error, including error code, message, and request ID.
954	pub(crate) meta: aws_smithy_types::Error,
955}
956/// Types of errors that can occur for the `SetLobbyClosed` operation.
957#[non_exhaustive]
958#[derive(std::fmt::Debug)]
959pub enum SetLobbyClosedErrorKind {
960	/// An error caused by internal server problems.
961	InternalError(crate::error::InternalError),
962	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
963	RateLimitError(crate::error::RateLimitError),
964	/// An error thrown when the requestee requests a resource they do not have access to.
965	ForbiddenError(crate::error::ForbiddenError),
966	/// An error thrown when the requestee is not authenticated.
967	UnauthorizedError(crate::error::UnauthorizedError),
968	/// An error thrown when the requestee requests a non existant resource.
969	NotFoundError(crate::error::NotFoundError),
970	/// An error thrown when the requestee has sent an invalid or malformed request.
971	BadRequestError(crate::error::BadRequestError),
972	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
973	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	/// Creates a new `SetLobbyClosedError`.
1002	pub fn new(kind: SetLobbyClosedErrorKind, meta: aws_smithy_types::Error) -> Self {
1003		Self { kind, meta }
1004	}
1005
1006	/// Creates the `SetLobbyClosedError::Unhandled` variant from any error type.
1007	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	/// Creates the `SetLobbyClosedError::Unhandled` variant from a `aws_smithy_types::Error`.
1015	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	/// Returns the error message if one is available.
1023	pub fn message(&self) -> Option<&str> {
1024		self.meta.message()
1025	}
1026
1027	/// Returns error metadata, which includes the error code, message,
1028	/// request ID, and potentially additional information.
1029	pub fn meta(&self) -> &aws_smithy_types::Error {
1030		&self.meta
1031	}
1032
1033	/// Returns the request ID if it's available.
1034	pub fn request_id(&self) -> Option<&str> {
1035		self.meta.request_id()
1036	}
1037
1038	/// Returns the error code if it's available.
1039	pub fn code(&self) -> Option<&str> {
1040		self.meta.code()
1041	}
1042	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::InternalError`.
1043	pub fn is_internal_error(&self) -> bool {
1044		matches!(&self.kind, SetLobbyClosedErrorKind::InternalError(_))
1045	}
1046	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::RateLimitError`.
1047	pub fn is_rate_limit_error(&self) -> bool {
1048		matches!(&self.kind, SetLobbyClosedErrorKind::RateLimitError(_))
1049	}
1050	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::ForbiddenError`.
1051	pub fn is_forbidden_error(&self) -> bool {
1052		matches!(&self.kind, SetLobbyClosedErrorKind::ForbiddenError(_))
1053	}
1054	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::UnauthorizedError`.
1055	pub fn is_unauthorized_error(&self) -> bool {
1056		matches!(&self.kind, SetLobbyClosedErrorKind::UnauthorizedError(_))
1057	}
1058	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::NotFoundError`.
1059	pub fn is_not_found_error(&self) -> bool {
1060		matches!(&self.kind, SetLobbyClosedErrorKind::NotFoundError(_))
1061	}
1062	/// Returns `true` if the error kind is `SetLobbyClosedErrorKind::BadRequestError`.
1063	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/// An error thrown when the requestee has sent an invalid or malformed request.
1082#[non_exhaustive]
1083#[derive(std::clone::Clone, std::cmp::PartialEq)]
1084pub struct BadRequestError {
1085	#[allow(missing_docs)] // documentation missing in model
1086	pub code: std::option::Option<std::string::String>,
1087	#[allow(missing_docs)] // documentation missing in model
1088	pub message: std::option::Option<std::string::String>,
1089	/// Unstructured metadata relating to an error. Must be manually parsed.
1090	pub metadata: std::option::Option<aws_smithy_types::Document>,
1091}
1092impl BadRequestError {
1093	#[allow(missing_docs)] // documentation missing in model
1094	pub fn code(&self) -> std::option::Option<&str> {
1095		self.code.as_deref()
1096	}
1097	/// Unstructured metadata relating to an error. Must be manually parsed.
1098	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	/// Returns the error message.
1113	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 {}
1127/// See [`BadRequestError`](crate::error::BadRequestError)
1128pub mod bad_request_error {
1129	/// A builder for [`BadRequestError`](crate::error::BadRequestError)
1130	#[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)] // documentation missing in model
1139		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)] // documentation missing in model
1144		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)] // documentation missing in model
1149		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)] // documentation missing in model
1154		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1155			self.message = input;
1156			self
1157		}
1158		/// Unstructured metadata relating to an error. Must be manually parsed.
1159		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1160			self.metadata = Some(input);
1161			self
1162		}
1163		/// Unstructured metadata relating to an error. Must be manually parsed.
1164		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		/// Consumes the builder and constructs a [`BadRequestError`](crate::error::BadRequestError)
1172		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	/// Creates a new builder-style object to manufacture [`BadRequestError`](crate::error::BadRequestError)
1183	pub fn builder() -> crate::error::bad_request_error::Builder {
1184		crate::error::bad_request_error::Builder::default()
1185	}
1186}
1187
1188/// An error thrown when the requestee requests a non existant resource.
1189#[non_exhaustive]
1190#[derive(std::clone::Clone, std::cmp::PartialEq)]
1191pub struct NotFoundError {
1192	#[allow(missing_docs)] // documentation missing in model
1193	pub code: std::option::Option<std::string::String>,
1194	#[allow(missing_docs)] // documentation missing in model
1195	pub message: std::option::Option<std::string::String>,
1196	/// Unstructured metadata relating to an error. Must be manually parsed.
1197	pub metadata: std::option::Option<aws_smithy_types::Document>,
1198}
1199impl NotFoundError {
1200	#[allow(missing_docs)] // documentation missing in model
1201	pub fn code(&self) -> std::option::Option<&str> {
1202		self.code.as_deref()
1203	}
1204	/// Unstructured metadata relating to an error. Must be manually parsed.
1205	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	/// Returns the error message.
1220	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 {}
1234/// See [`NotFoundError`](crate::error::NotFoundError)
1235pub mod not_found_error {
1236	/// A builder for [`NotFoundError`](crate::error::NotFoundError)
1237	#[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)] // documentation missing in model
1246		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)] // documentation missing in model
1251		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)] // documentation missing in model
1256		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)] // documentation missing in model
1261		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1262			self.message = input;
1263			self
1264		}
1265		/// Unstructured metadata relating to an error. Must be manually parsed.
1266		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1267			self.metadata = Some(input);
1268			self
1269		}
1270		/// Unstructured metadata relating to an error. Must be manually parsed.
1271		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		/// Consumes the builder and constructs a [`NotFoundError`](crate::error::NotFoundError)
1279		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	/// Creates a new builder-style object to manufacture [`NotFoundError`](crate::error::NotFoundError)
1290	pub fn builder() -> crate::error::not_found_error::Builder {
1291		crate::error::not_found_error::Builder::default()
1292	}
1293}
1294
1295/// An error thrown when the requestee is not authenticated.
1296#[non_exhaustive]
1297#[derive(std::clone::Clone, std::cmp::PartialEq)]
1298pub struct UnauthorizedError {
1299	#[allow(missing_docs)] // documentation missing in model
1300	pub code: std::option::Option<std::string::String>,
1301	#[allow(missing_docs)] // documentation missing in model
1302	pub message: std::option::Option<std::string::String>,
1303	/// Unstructured metadata relating to an error. Must be manually parsed.
1304	pub metadata: std::option::Option<aws_smithy_types::Document>,
1305}
1306impl UnauthorizedError {
1307	#[allow(missing_docs)] // documentation missing in model
1308	pub fn code(&self) -> std::option::Option<&str> {
1309		self.code.as_deref()
1310	}
1311	/// Unstructured metadata relating to an error. Must be manually parsed.
1312	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	/// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
1327	pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1328		aws_smithy_types::retry::ErrorKind::ClientError
1329	}
1330	/// Returns the error message.
1331	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 {}
1345/// See [`UnauthorizedError`](crate::error::UnauthorizedError)
1346pub mod unauthorized_error {
1347	/// A builder for [`UnauthorizedError`](crate::error::UnauthorizedError)
1348	#[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)] // documentation missing in model
1357		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)] // documentation missing in model
1362		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)] // documentation missing in model
1367		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)] // documentation missing in model
1372		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1373			self.message = input;
1374			self
1375		}
1376		/// Unstructured metadata relating to an error. Must be manually parsed.
1377		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1378			self.metadata = Some(input);
1379			self
1380		}
1381		/// Unstructured metadata relating to an error. Must be manually parsed.
1382		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		/// Consumes the builder and constructs a [`UnauthorizedError`](crate::error::UnauthorizedError)
1390		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	/// Creates a new builder-style object to manufacture [`UnauthorizedError`](crate::error::UnauthorizedError)
1401	pub fn builder() -> crate::error::unauthorized_error::Builder {
1402		crate::error::unauthorized_error::Builder::default()
1403	}
1404}
1405
1406/// An error thrown when the requestee requests a resource they do not have access to.
1407#[non_exhaustive]
1408#[derive(std::clone::Clone, std::cmp::PartialEq)]
1409pub struct ForbiddenError {
1410	#[allow(missing_docs)] // documentation missing in model
1411	pub code: std::option::Option<std::string::String>,
1412	#[allow(missing_docs)] // documentation missing in model
1413	pub message: std::option::Option<std::string::String>,
1414	/// Unstructured metadata relating to an error. Must be manually parsed.
1415	pub metadata: std::option::Option<aws_smithy_types::Document>,
1416}
1417impl ForbiddenError {
1418	#[allow(missing_docs)] // documentation missing in model
1419	pub fn code(&self) -> std::option::Option<&str> {
1420		self.code.as_deref()
1421	}
1422	/// Unstructured metadata relating to an error. Must be manually parsed.
1423	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	/// Returns the error message.
1438	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 {}
1452/// See [`ForbiddenError`](crate::error::ForbiddenError)
1453pub mod forbidden_error {
1454	/// A builder for [`ForbiddenError`](crate::error::ForbiddenError)
1455	#[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)] // documentation missing in model
1464		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)] // documentation missing in model
1469		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)] // documentation missing in model
1474		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)] // documentation missing in model
1479		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1480			self.message = input;
1481			self
1482		}
1483		/// Unstructured metadata relating to an error. Must be manually parsed.
1484		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1485			self.metadata = Some(input);
1486			self
1487		}
1488		/// Unstructured metadata relating to an error. Must be manually parsed.
1489		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		/// Consumes the builder and constructs a [`ForbiddenError`](crate::error::ForbiddenError)
1497		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	/// Creates a new builder-style object to manufacture [`ForbiddenError`](crate::error::ForbiddenError)
1508	pub fn builder() -> crate::error::forbidden_error::Builder {
1509		crate::error::forbidden_error::Builder::default()
1510	}
1511}
1512
1513/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
1514#[non_exhaustive]
1515#[derive(std::clone::Clone, std::cmp::PartialEq)]
1516pub struct RateLimitError {
1517	#[allow(missing_docs)] // documentation missing in model
1518	pub code: std::option::Option<std::string::String>,
1519	#[allow(missing_docs)] // documentation missing in model
1520	pub message: std::option::Option<std::string::String>,
1521	/// Unstructured metadata relating to an error. Must be manually parsed.
1522	pub metadata: std::option::Option<aws_smithy_types::Document>,
1523}
1524impl RateLimitError {
1525	#[allow(missing_docs)] // documentation missing in model
1526	pub fn code(&self) -> std::option::Option<&str> {
1527		self.code.as_deref()
1528	}
1529	/// Unstructured metadata relating to an error. Must be manually parsed.
1530	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	/// Returns the error message.
1545	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 {}
1559/// See [`RateLimitError`](crate::error::RateLimitError)
1560pub mod rate_limit_error {
1561	/// A builder for [`RateLimitError`](crate::error::RateLimitError)
1562	#[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)] // documentation missing in model
1571		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)] // documentation missing in model
1576		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)] // documentation missing in model
1581		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)] // documentation missing in model
1586		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1587			self.message = input;
1588			self
1589		}
1590		/// Unstructured metadata relating to an error. Must be manually parsed.
1591		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1592			self.metadata = Some(input);
1593			self
1594		}
1595		/// Unstructured metadata relating to an error. Must be manually parsed.
1596		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		/// Consumes the builder and constructs a [`RateLimitError`](crate::error::RateLimitError)
1604		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	/// Creates a new builder-style object to manufacture [`RateLimitError`](crate::error::RateLimitError)
1615	pub fn builder() -> crate::error::rate_limit_error::Builder {
1616		crate::error::rate_limit_error::Builder::default()
1617	}
1618}
1619
1620/// An error caused by internal server problems.
1621#[non_exhaustive]
1622#[derive(std::clone::Clone, std::cmp::PartialEq)]
1623pub struct InternalError {
1624	#[allow(missing_docs)] // documentation missing in model
1625	pub code: std::option::Option<std::string::String>,
1626	#[allow(missing_docs)] // documentation missing in model
1627	pub message: std::option::Option<std::string::String>,
1628	/// Unstructured metadata relating to an error. Must be manually parsed.
1629	pub metadata: std::option::Option<aws_smithy_types::Document>,
1630}
1631impl InternalError {
1632	#[allow(missing_docs)] // documentation missing in model
1633	pub fn code(&self) -> std::option::Option<&str> {
1634		self.code.as_deref()
1635	}
1636	/// Unstructured metadata relating to an error. Must be manually parsed.
1637	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	/// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
1652	pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1653		aws_smithy_types::retry::ErrorKind::ServerError
1654	}
1655	/// Returns the error message.
1656	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 {}
1670/// See [`InternalError`](crate::error::InternalError)
1671pub mod internal_error {
1672	/// A builder for [`InternalError`](crate::error::InternalError)
1673	#[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)] // documentation missing in model
1682		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)] // documentation missing in model
1687		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)] // documentation missing in model
1692		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)] // documentation missing in model
1697		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1698			self.message = input;
1699			self
1700		}
1701		/// Unstructured metadata relating to an error. Must be manually parsed.
1702		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1703			self.metadata = Some(input);
1704			self
1705		}
1706		/// Unstructured metadata relating to an error. Must be manually parsed.
1707		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		/// Consumes the builder and constructs a [`InternalError`](crate::error::InternalError)
1715		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	/// Creates a new builder-style object to manufacture [`InternalError`](crate::error::InternalError)
1726	pub fn builder() -> crate::error::internal_error::Builder {
1727		crate::error::internal_error::Builder::default()
1728	}
1729}