rivet_chat/
error.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Error type for the `GetDirectThread` operation.
3#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct GetDirectThreadError {
6	/// Kind of error that occurred.
7	pub kind: GetDirectThreadErrorKind,
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 `GetDirectThread` operation.
12#[non_exhaustive]
13#[derive(std::fmt::Debug)]
14pub enum GetDirectThreadErrorKind {
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 GetDirectThreadError {
31	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
32		match &self.kind {
33			GetDirectThreadErrorKind::InternalError(_inner) => _inner.fmt(f),
34			GetDirectThreadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
35			GetDirectThreadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
36			GetDirectThreadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
37			GetDirectThreadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
38			GetDirectThreadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
39			GetDirectThreadErrorKind::Unhandled(_inner) => _inner.fmt(f),
40		}
41	}
42}
43impl aws_smithy_types::retry::ProvideErrorKind for GetDirectThreadError {
44	fn code(&self) -> Option<&str> {
45		GetDirectThreadError::code(self)
46	}
47	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
48		match &self.kind {
49			GetDirectThreadErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
50			GetDirectThreadErrorKind::UnauthorizedError(inner) => {
51				Some(inner.retryable_error_kind())
52			}
53			_ => None,
54		}
55	}
56}
57impl GetDirectThreadError {
58	/// Creates a new `GetDirectThreadError`.
59	pub fn new(kind: GetDirectThreadErrorKind, meta: aws_smithy_types::Error) -> Self {
60		Self { kind, meta }
61	}
62
63	/// Creates the `GetDirectThreadError::Unhandled` variant from any error type.
64	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
65		Self {
66			kind: GetDirectThreadErrorKind::Unhandled(err.into()),
67			meta: Default::default(),
68		}
69	}
70
71	/// Creates the `GetDirectThreadError::Unhandled` variant from a `aws_smithy_types::Error`.
72	pub fn generic(err: aws_smithy_types::Error) -> Self {
73		Self {
74			meta: err.clone(),
75			kind: GetDirectThreadErrorKind::Unhandled(err.into()),
76		}
77	}
78
79	/// Returns the error message if one is available.
80	pub fn message(&self) -> Option<&str> {
81		self.meta.message()
82	}
83
84	/// Returns error metadata, which includes the error code, message,
85	/// request ID, and potentially additional information.
86	pub fn meta(&self) -> &aws_smithy_types::Error {
87		&self.meta
88	}
89
90	/// Returns the request ID if it's available.
91	pub fn request_id(&self) -> Option<&str> {
92		self.meta.request_id()
93	}
94
95	/// Returns the error code if it's available.
96	pub fn code(&self) -> Option<&str> {
97		self.meta.code()
98	}
99	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::InternalError`.
100	pub fn is_internal_error(&self) -> bool {
101		matches!(&self.kind, GetDirectThreadErrorKind::InternalError(_))
102	}
103	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::RateLimitError`.
104	pub fn is_rate_limit_error(&self) -> bool {
105		matches!(&self.kind, GetDirectThreadErrorKind::RateLimitError(_))
106	}
107	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::ForbiddenError`.
108	pub fn is_forbidden_error(&self) -> bool {
109		matches!(&self.kind, GetDirectThreadErrorKind::ForbiddenError(_))
110	}
111	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::UnauthorizedError`.
112	pub fn is_unauthorized_error(&self) -> bool {
113		matches!(&self.kind, GetDirectThreadErrorKind::UnauthorizedError(_))
114	}
115	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::NotFoundError`.
116	pub fn is_not_found_error(&self) -> bool {
117		matches!(&self.kind, GetDirectThreadErrorKind::NotFoundError(_))
118	}
119	/// Returns `true` if the error kind is `GetDirectThreadErrorKind::BadRequestError`.
120	pub fn is_bad_request_error(&self) -> bool {
121		matches!(&self.kind, GetDirectThreadErrorKind::BadRequestError(_))
122	}
123}
124impl std::error::Error for GetDirectThreadError {
125	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
126		match &self.kind {
127			GetDirectThreadErrorKind::InternalError(_inner) => Some(_inner),
128			GetDirectThreadErrorKind::RateLimitError(_inner) => Some(_inner),
129			GetDirectThreadErrorKind::ForbiddenError(_inner) => Some(_inner),
130			GetDirectThreadErrorKind::UnauthorizedError(_inner) => Some(_inner),
131			GetDirectThreadErrorKind::NotFoundError(_inner) => Some(_inner),
132			GetDirectThreadErrorKind::BadRequestError(_inner) => Some(_inner),
133			GetDirectThreadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
134		}
135	}
136}
137
138/// Error type for the `GetThreadHistory` operation.
139#[non_exhaustive]
140#[derive(std::fmt::Debug)]
141pub struct GetThreadHistoryError {
142	/// Kind of error that occurred.
143	pub kind: GetThreadHistoryErrorKind,
144	/// Additional metadata about the error, including error code, message, and request ID.
145	pub(crate) meta: aws_smithy_types::Error,
146}
147/// Types of errors that can occur for the `GetThreadHistory` operation.
148#[non_exhaustive]
149#[derive(std::fmt::Debug)]
150pub enum GetThreadHistoryErrorKind {
151	/// An error caused by internal server problems.
152	InternalError(crate::error::InternalError),
153	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
154	RateLimitError(crate::error::RateLimitError),
155	/// An error thrown when the requestee requests a resource they do not have access to.
156	ForbiddenError(crate::error::ForbiddenError),
157	/// An error thrown when the requestee is not authenticated.
158	UnauthorizedError(crate::error::UnauthorizedError),
159	/// An error thrown when the requestee requests a non existant resource.
160	NotFoundError(crate::error::NotFoundError),
161	/// An error thrown when the requestee has sent an invalid or malformed request.
162	BadRequestError(crate::error::BadRequestError),
163	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
164	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
165}
166impl std::fmt::Display for GetThreadHistoryError {
167	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
168		match &self.kind {
169			GetThreadHistoryErrorKind::InternalError(_inner) => _inner.fmt(f),
170			GetThreadHistoryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
171			GetThreadHistoryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
172			GetThreadHistoryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
173			GetThreadHistoryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
174			GetThreadHistoryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
175			GetThreadHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
176		}
177	}
178}
179impl aws_smithy_types::retry::ProvideErrorKind for GetThreadHistoryError {
180	fn code(&self) -> Option<&str> {
181		GetThreadHistoryError::code(self)
182	}
183	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
184		match &self.kind {
185			GetThreadHistoryErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
186			GetThreadHistoryErrorKind::UnauthorizedError(inner) => {
187				Some(inner.retryable_error_kind())
188			}
189			_ => None,
190		}
191	}
192}
193impl GetThreadHistoryError {
194	/// Creates a new `GetThreadHistoryError`.
195	pub fn new(kind: GetThreadHistoryErrorKind, meta: aws_smithy_types::Error) -> Self {
196		Self { kind, meta }
197	}
198
199	/// Creates the `GetThreadHistoryError::Unhandled` variant from any error type.
200	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
201		Self {
202			kind: GetThreadHistoryErrorKind::Unhandled(err.into()),
203			meta: Default::default(),
204		}
205	}
206
207	/// Creates the `GetThreadHistoryError::Unhandled` variant from a `aws_smithy_types::Error`.
208	pub fn generic(err: aws_smithy_types::Error) -> Self {
209		Self {
210			meta: err.clone(),
211			kind: GetThreadHistoryErrorKind::Unhandled(err.into()),
212		}
213	}
214
215	/// Returns the error message if one is available.
216	pub fn message(&self) -> Option<&str> {
217		self.meta.message()
218	}
219
220	/// Returns error metadata, which includes the error code, message,
221	/// request ID, and potentially additional information.
222	pub fn meta(&self) -> &aws_smithy_types::Error {
223		&self.meta
224	}
225
226	/// Returns the request ID if it's available.
227	pub fn request_id(&self) -> Option<&str> {
228		self.meta.request_id()
229	}
230
231	/// Returns the error code if it's available.
232	pub fn code(&self) -> Option<&str> {
233		self.meta.code()
234	}
235	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::InternalError`.
236	pub fn is_internal_error(&self) -> bool {
237		matches!(&self.kind, GetThreadHistoryErrorKind::InternalError(_))
238	}
239	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::RateLimitError`.
240	pub fn is_rate_limit_error(&self) -> bool {
241		matches!(&self.kind, GetThreadHistoryErrorKind::RateLimitError(_))
242	}
243	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::ForbiddenError`.
244	pub fn is_forbidden_error(&self) -> bool {
245		matches!(&self.kind, GetThreadHistoryErrorKind::ForbiddenError(_))
246	}
247	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::UnauthorizedError`.
248	pub fn is_unauthorized_error(&self) -> bool {
249		matches!(&self.kind, GetThreadHistoryErrorKind::UnauthorizedError(_))
250	}
251	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::NotFoundError`.
252	pub fn is_not_found_error(&self) -> bool {
253		matches!(&self.kind, GetThreadHistoryErrorKind::NotFoundError(_))
254	}
255	/// Returns `true` if the error kind is `GetThreadHistoryErrorKind::BadRequestError`.
256	pub fn is_bad_request_error(&self) -> bool {
257		matches!(&self.kind, GetThreadHistoryErrorKind::BadRequestError(_))
258	}
259}
260impl std::error::Error for GetThreadHistoryError {
261	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
262		match &self.kind {
263			GetThreadHistoryErrorKind::InternalError(_inner) => Some(_inner),
264			GetThreadHistoryErrorKind::RateLimitError(_inner) => Some(_inner),
265			GetThreadHistoryErrorKind::ForbiddenError(_inner) => Some(_inner),
266			GetThreadHistoryErrorKind::UnauthorizedError(_inner) => Some(_inner),
267			GetThreadHistoryErrorKind::NotFoundError(_inner) => Some(_inner),
268			GetThreadHistoryErrorKind::BadRequestError(_inner) => Some(_inner),
269			GetThreadHistoryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
270		}
271	}
272}
273
274/// Error type for the `GetThreadTopic` operation.
275#[non_exhaustive]
276#[derive(std::fmt::Debug)]
277pub struct GetThreadTopicError {
278	/// Kind of error that occurred.
279	pub kind: GetThreadTopicErrorKind,
280	/// Additional metadata about the error, including error code, message, and request ID.
281	pub(crate) meta: aws_smithy_types::Error,
282}
283/// Types of errors that can occur for the `GetThreadTopic` operation.
284#[non_exhaustive]
285#[derive(std::fmt::Debug)]
286pub enum GetThreadTopicErrorKind {
287	/// An error caused by internal server problems.
288	InternalError(crate::error::InternalError),
289	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
290	RateLimitError(crate::error::RateLimitError),
291	/// An error thrown when the requestee requests a resource they do not have access to.
292	ForbiddenError(crate::error::ForbiddenError),
293	/// An error thrown when the requestee is not authenticated.
294	UnauthorizedError(crate::error::UnauthorizedError),
295	/// An error thrown when the requestee requests a non existant resource.
296	NotFoundError(crate::error::NotFoundError),
297	/// An error thrown when the requestee has sent an invalid or malformed request.
298	BadRequestError(crate::error::BadRequestError),
299	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
300	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
301}
302impl std::fmt::Display for GetThreadTopicError {
303	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
304		match &self.kind {
305			GetThreadTopicErrorKind::InternalError(_inner) => _inner.fmt(f),
306			GetThreadTopicErrorKind::RateLimitError(_inner) => _inner.fmt(f),
307			GetThreadTopicErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
308			GetThreadTopicErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
309			GetThreadTopicErrorKind::NotFoundError(_inner) => _inner.fmt(f),
310			GetThreadTopicErrorKind::BadRequestError(_inner) => _inner.fmt(f),
311			GetThreadTopicErrorKind::Unhandled(_inner) => _inner.fmt(f),
312		}
313	}
314}
315impl aws_smithy_types::retry::ProvideErrorKind for GetThreadTopicError {
316	fn code(&self) -> Option<&str> {
317		GetThreadTopicError::code(self)
318	}
319	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
320		match &self.kind {
321			GetThreadTopicErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
322			GetThreadTopicErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
323			_ => None,
324		}
325	}
326}
327impl GetThreadTopicError {
328	/// Creates a new `GetThreadTopicError`.
329	pub fn new(kind: GetThreadTopicErrorKind, meta: aws_smithy_types::Error) -> Self {
330		Self { kind, meta }
331	}
332
333	/// Creates the `GetThreadTopicError::Unhandled` variant from any error type.
334	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
335		Self {
336			kind: GetThreadTopicErrorKind::Unhandled(err.into()),
337			meta: Default::default(),
338		}
339	}
340
341	/// Creates the `GetThreadTopicError::Unhandled` variant from a `aws_smithy_types::Error`.
342	pub fn generic(err: aws_smithy_types::Error) -> Self {
343		Self {
344			meta: err.clone(),
345			kind: GetThreadTopicErrorKind::Unhandled(err.into()),
346		}
347	}
348
349	/// Returns the error message if one is available.
350	pub fn message(&self) -> Option<&str> {
351		self.meta.message()
352	}
353
354	/// Returns error metadata, which includes the error code, message,
355	/// request ID, and potentially additional information.
356	pub fn meta(&self) -> &aws_smithy_types::Error {
357		&self.meta
358	}
359
360	/// Returns the request ID if it's available.
361	pub fn request_id(&self) -> Option<&str> {
362		self.meta.request_id()
363	}
364
365	/// Returns the error code if it's available.
366	pub fn code(&self) -> Option<&str> {
367		self.meta.code()
368	}
369	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::InternalError`.
370	pub fn is_internal_error(&self) -> bool {
371		matches!(&self.kind, GetThreadTopicErrorKind::InternalError(_))
372	}
373	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::RateLimitError`.
374	pub fn is_rate_limit_error(&self) -> bool {
375		matches!(&self.kind, GetThreadTopicErrorKind::RateLimitError(_))
376	}
377	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::ForbiddenError`.
378	pub fn is_forbidden_error(&self) -> bool {
379		matches!(&self.kind, GetThreadTopicErrorKind::ForbiddenError(_))
380	}
381	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::UnauthorizedError`.
382	pub fn is_unauthorized_error(&self) -> bool {
383		matches!(&self.kind, GetThreadTopicErrorKind::UnauthorizedError(_))
384	}
385	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::NotFoundError`.
386	pub fn is_not_found_error(&self) -> bool {
387		matches!(&self.kind, GetThreadTopicErrorKind::NotFoundError(_))
388	}
389	/// Returns `true` if the error kind is `GetThreadTopicErrorKind::BadRequestError`.
390	pub fn is_bad_request_error(&self) -> bool {
391		matches!(&self.kind, GetThreadTopicErrorKind::BadRequestError(_))
392	}
393}
394impl std::error::Error for GetThreadTopicError {
395	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
396		match &self.kind {
397			GetThreadTopicErrorKind::InternalError(_inner) => Some(_inner),
398			GetThreadTopicErrorKind::RateLimitError(_inner) => Some(_inner),
399			GetThreadTopicErrorKind::ForbiddenError(_inner) => Some(_inner),
400			GetThreadTopicErrorKind::UnauthorizedError(_inner) => Some(_inner),
401			GetThreadTopicErrorKind::NotFoundError(_inner) => Some(_inner),
402			GetThreadTopicErrorKind::BadRequestError(_inner) => Some(_inner),
403			GetThreadTopicErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
404		}
405	}
406}
407
408/// Error type for the `SendChatMessage` operation.
409#[non_exhaustive]
410#[derive(std::fmt::Debug)]
411pub struct SendChatMessageError {
412	/// Kind of error that occurred.
413	pub kind: SendChatMessageErrorKind,
414	/// Additional metadata about the error, including error code, message, and request ID.
415	pub(crate) meta: aws_smithy_types::Error,
416}
417/// Types of errors that can occur for the `SendChatMessage` operation.
418#[non_exhaustive]
419#[derive(std::fmt::Debug)]
420pub enum SendChatMessageErrorKind {
421	/// An error caused by internal server problems.
422	InternalError(crate::error::InternalError),
423	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
424	RateLimitError(crate::error::RateLimitError),
425	/// An error thrown when the requestee requests a resource they do not have access to.
426	ForbiddenError(crate::error::ForbiddenError),
427	/// An error thrown when the requestee is not authenticated.
428	UnauthorizedError(crate::error::UnauthorizedError),
429	/// An error thrown when the requestee requests a non existant resource.
430	NotFoundError(crate::error::NotFoundError),
431	/// An error thrown when the requestee has sent an invalid or malformed request.
432	BadRequestError(crate::error::BadRequestError),
433	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
434	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
435}
436impl std::fmt::Display for SendChatMessageError {
437	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
438		match &self.kind {
439			SendChatMessageErrorKind::InternalError(_inner) => _inner.fmt(f),
440			SendChatMessageErrorKind::RateLimitError(_inner) => _inner.fmt(f),
441			SendChatMessageErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
442			SendChatMessageErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
443			SendChatMessageErrorKind::NotFoundError(_inner) => _inner.fmt(f),
444			SendChatMessageErrorKind::BadRequestError(_inner) => _inner.fmt(f),
445			SendChatMessageErrorKind::Unhandled(_inner) => _inner.fmt(f),
446		}
447	}
448}
449impl aws_smithy_types::retry::ProvideErrorKind for SendChatMessageError {
450	fn code(&self) -> Option<&str> {
451		SendChatMessageError::code(self)
452	}
453	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
454		match &self.kind {
455			SendChatMessageErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
456			SendChatMessageErrorKind::UnauthorizedError(inner) => {
457				Some(inner.retryable_error_kind())
458			}
459			_ => None,
460		}
461	}
462}
463impl SendChatMessageError {
464	/// Creates a new `SendChatMessageError`.
465	pub fn new(kind: SendChatMessageErrorKind, meta: aws_smithy_types::Error) -> Self {
466		Self { kind, meta }
467	}
468
469	/// Creates the `SendChatMessageError::Unhandled` variant from any error type.
470	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
471		Self {
472			kind: SendChatMessageErrorKind::Unhandled(err.into()),
473			meta: Default::default(),
474		}
475	}
476
477	/// Creates the `SendChatMessageError::Unhandled` variant from a `aws_smithy_types::Error`.
478	pub fn generic(err: aws_smithy_types::Error) -> Self {
479		Self {
480			meta: err.clone(),
481			kind: SendChatMessageErrorKind::Unhandled(err.into()),
482		}
483	}
484
485	/// Returns the error message if one is available.
486	pub fn message(&self) -> Option<&str> {
487		self.meta.message()
488	}
489
490	/// Returns error metadata, which includes the error code, message,
491	/// request ID, and potentially additional information.
492	pub fn meta(&self) -> &aws_smithy_types::Error {
493		&self.meta
494	}
495
496	/// Returns the request ID if it's available.
497	pub fn request_id(&self) -> Option<&str> {
498		self.meta.request_id()
499	}
500
501	/// Returns the error code if it's available.
502	pub fn code(&self) -> Option<&str> {
503		self.meta.code()
504	}
505	/// Returns `true` if the error kind is `SendChatMessageErrorKind::InternalError`.
506	pub fn is_internal_error(&self) -> bool {
507		matches!(&self.kind, SendChatMessageErrorKind::InternalError(_))
508	}
509	/// Returns `true` if the error kind is `SendChatMessageErrorKind::RateLimitError`.
510	pub fn is_rate_limit_error(&self) -> bool {
511		matches!(&self.kind, SendChatMessageErrorKind::RateLimitError(_))
512	}
513	/// Returns `true` if the error kind is `SendChatMessageErrorKind::ForbiddenError`.
514	pub fn is_forbidden_error(&self) -> bool {
515		matches!(&self.kind, SendChatMessageErrorKind::ForbiddenError(_))
516	}
517	/// Returns `true` if the error kind is `SendChatMessageErrorKind::UnauthorizedError`.
518	pub fn is_unauthorized_error(&self) -> bool {
519		matches!(&self.kind, SendChatMessageErrorKind::UnauthorizedError(_))
520	}
521	/// Returns `true` if the error kind is `SendChatMessageErrorKind::NotFoundError`.
522	pub fn is_not_found_error(&self) -> bool {
523		matches!(&self.kind, SendChatMessageErrorKind::NotFoundError(_))
524	}
525	/// Returns `true` if the error kind is `SendChatMessageErrorKind::BadRequestError`.
526	pub fn is_bad_request_error(&self) -> bool {
527		matches!(&self.kind, SendChatMessageErrorKind::BadRequestError(_))
528	}
529}
530impl std::error::Error for SendChatMessageError {
531	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
532		match &self.kind {
533			SendChatMessageErrorKind::InternalError(_inner) => Some(_inner),
534			SendChatMessageErrorKind::RateLimitError(_inner) => Some(_inner),
535			SendChatMessageErrorKind::ForbiddenError(_inner) => Some(_inner),
536			SendChatMessageErrorKind::UnauthorizedError(_inner) => Some(_inner),
537			SendChatMessageErrorKind::NotFoundError(_inner) => Some(_inner),
538			SendChatMessageErrorKind::BadRequestError(_inner) => Some(_inner),
539			SendChatMessageErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
540		}
541	}
542}
543
544/// Error type for the `SetThreadRead` operation.
545#[non_exhaustive]
546#[derive(std::fmt::Debug)]
547pub struct SetThreadReadError {
548	/// Kind of error that occurred.
549	pub kind: SetThreadReadErrorKind,
550	/// Additional metadata about the error, including error code, message, and request ID.
551	pub(crate) meta: aws_smithy_types::Error,
552}
553/// Types of errors that can occur for the `SetThreadRead` operation.
554#[non_exhaustive]
555#[derive(std::fmt::Debug)]
556pub enum SetThreadReadErrorKind {
557	/// An error caused by internal server problems.
558	InternalError(crate::error::InternalError),
559	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
560	RateLimitError(crate::error::RateLimitError),
561	/// An error thrown when the requestee requests a resource they do not have access to.
562	ForbiddenError(crate::error::ForbiddenError),
563	/// An error thrown when the requestee is not authenticated.
564	UnauthorizedError(crate::error::UnauthorizedError),
565	/// An error thrown when the requestee requests a non existant resource.
566	NotFoundError(crate::error::NotFoundError),
567	/// An error thrown when the requestee has sent an invalid or malformed request.
568	BadRequestError(crate::error::BadRequestError),
569	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
570	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
571}
572impl std::fmt::Display for SetThreadReadError {
573	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
574		match &self.kind {
575			SetThreadReadErrorKind::InternalError(_inner) => _inner.fmt(f),
576			SetThreadReadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
577			SetThreadReadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
578			SetThreadReadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
579			SetThreadReadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
580			SetThreadReadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
581			SetThreadReadErrorKind::Unhandled(_inner) => _inner.fmt(f),
582		}
583	}
584}
585impl aws_smithy_types::retry::ProvideErrorKind for SetThreadReadError {
586	fn code(&self) -> Option<&str> {
587		SetThreadReadError::code(self)
588	}
589	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
590		match &self.kind {
591			SetThreadReadErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
592			SetThreadReadErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
593			_ => None,
594		}
595	}
596}
597impl SetThreadReadError {
598	/// Creates a new `SetThreadReadError`.
599	pub fn new(kind: SetThreadReadErrorKind, meta: aws_smithy_types::Error) -> Self {
600		Self { kind, meta }
601	}
602
603	/// Creates the `SetThreadReadError::Unhandled` variant from any error type.
604	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
605		Self {
606			kind: SetThreadReadErrorKind::Unhandled(err.into()),
607			meta: Default::default(),
608		}
609	}
610
611	/// Creates the `SetThreadReadError::Unhandled` variant from a `aws_smithy_types::Error`.
612	pub fn generic(err: aws_smithy_types::Error) -> Self {
613		Self {
614			meta: err.clone(),
615			kind: SetThreadReadErrorKind::Unhandled(err.into()),
616		}
617	}
618
619	/// Returns the error message if one is available.
620	pub fn message(&self) -> Option<&str> {
621		self.meta.message()
622	}
623
624	/// Returns error metadata, which includes the error code, message,
625	/// request ID, and potentially additional information.
626	pub fn meta(&self) -> &aws_smithy_types::Error {
627		&self.meta
628	}
629
630	/// Returns the request ID if it's available.
631	pub fn request_id(&self) -> Option<&str> {
632		self.meta.request_id()
633	}
634
635	/// Returns the error code if it's available.
636	pub fn code(&self) -> Option<&str> {
637		self.meta.code()
638	}
639	/// Returns `true` if the error kind is `SetThreadReadErrorKind::InternalError`.
640	pub fn is_internal_error(&self) -> bool {
641		matches!(&self.kind, SetThreadReadErrorKind::InternalError(_))
642	}
643	/// Returns `true` if the error kind is `SetThreadReadErrorKind::RateLimitError`.
644	pub fn is_rate_limit_error(&self) -> bool {
645		matches!(&self.kind, SetThreadReadErrorKind::RateLimitError(_))
646	}
647	/// Returns `true` if the error kind is `SetThreadReadErrorKind::ForbiddenError`.
648	pub fn is_forbidden_error(&self) -> bool {
649		matches!(&self.kind, SetThreadReadErrorKind::ForbiddenError(_))
650	}
651	/// Returns `true` if the error kind is `SetThreadReadErrorKind::UnauthorizedError`.
652	pub fn is_unauthorized_error(&self) -> bool {
653		matches!(&self.kind, SetThreadReadErrorKind::UnauthorizedError(_))
654	}
655	/// Returns `true` if the error kind is `SetThreadReadErrorKind::NotFoundError`.
656	pub fn is_not_found_error(&self) -> bool {
657		matches!(&self.kind, SetThreadReadErrorKind::NotFoundError(_))
658	}
659	/// Returns `true` if the error kind is `SetThreadReadErrorKind::BadRequestError`.
660	pub fn is_bad_request_error(&self) -> bool {
661		matches!(&self.kind, SetThreadReadErrorKind::BadRequestError(_))
662	}
663}
664impl std::error::Error for SetThreadReadError {
665	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
666		match &self.kind {
667			SetThreadReadErrorKind::InternalError(_inner) => Some(_inner),
668			SetThreadReadErrorKind::RateLimitError(_inner) => Some(_inner),
669			SetThreadReadErrorKind::ForbiddenError(_inner) => Some(_inner),
670			SetThreadReadErrorKind::UnauthorizedError(_inner) => Some(_inner),
671			SetThreadReadErrorKind::NotFoundError(_inner) => Some(_inner),
672			SetThreadReadErrorKind::BadRequestError(_inner) => Some(_inner),
673			SetThreadReadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
674		}
675	}
676}
677
678/// Error type for the `SetTypingStatus` operation.
679#[non_exhaustive]
680#[derive(std::fmt::Debug)]
681pub struct SetTypingStatusError {
682	/// Kind of error that occurred.
683	pub kind: SetTypingStatusErrorKind,
684	/// Additional metadata about the error, including error code, message, and request ID.
685	pub(crate) meta: aws_smithy_types::Error,
686}
687/// Types of errors that can occur for the `SetTypingStatus` operation.
688#[non_exhaustive]
689#[derive(std::fmt::Debug)]
690pub enum SetTypingStatusErrorKind {
691	/// An error caused by internal server problems.
692	InternalError(crate::error::InternalError),
693	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
694	RateLimitError(crate::error::RateLimitError),
695	/// An error thrown when the requestee requests a resource they do not have access to.
696	ForbiddenError(crate::error::ForbiddenError),
697	/// An error thrown when the requestee is not authenticated.
698	UnauthorizedError(crate::error::UnauthorizedError),
699	/// An error thrown when the requestee requests a non existant resource.
700	NotFoundError(crate::error::NotFoundError),
701	/// An error thrown when the requestee has sent an invalid or malformed request.
702	BadRequestError(crate::error::BadRequestError),
703	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
704	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
705}
706impl std::fmt::Display for SetTypingStatusError {
707	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
708		match &self.kind {
709			SetTypingStatusErrorKind::InternalError(_inner) => _inner.fmt(f),
710			SetTypingStatusErrorKind::RateLimitError(_inner) => _inner.fmt(f),
711			SetTypingStatusErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
712			SetTypingStatusErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
713			SetTypingStatusErrorKind::NotFoundError(_inner) => _inner.fmt(f),
714			SetTypingStatusErrorKind::BadRequestError(_inner) => _inner.fmt(f),
715			SetTypingStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
716		}
717	}
718}
719impl aws_smithy_types::retry::ProvideErrorKind for SetTypingStatusError {
720	fn code(&self) -> Option<&str> {
721		SetTypingStatusError::code(self)
722	}
723	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
724		match &self.kind {
725			SetTypingStatusErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
726			SetTypingStatusErrorKind::UnauthorizedError(inner) => {
727				Some(inner.retryable_error_kind())
728			}
729			_ => None,
730		}
731	}
732}
733impl SetTypingStatusError {
734	/// Creates a new `SetTypingStatusError`.
735	pub fn new(kind: SetTypingStatusErrorKind, meta: aws_smithy_types::Error) -> Self {
736		Self { kind, meta }
737	}
738
739	/// Creates the `SetTypingStatusError::Unhandled` variant from any error type.
740	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
741		Self {
742			kind: SetTypingStatusErrorKind::Unhandled(err.into()),
743			meta: Default::default(),
744		}
745	}
746
747	/// Creates the `SetTypingStatusError::Unhandled` variant from a `aws_smithy_types::Error`.
748	pub fn generic(err: aws_smithy_types::Error) -> Self {
749		Self {
750			meta: err.clone(),
751			kind: SetTypingStatusErrorKind::Unhandled(err.into()),
752		}
753	}
754
755	/// Returns the error message if one is available.
756	pub fn message(&self) -> Option<&str> {
757		self.meta.message()
758	}
759
760	/// Returns error metadata, which includes the error code, message,
761	/// request ID, and potentially additional information.
762	pub fn meta(&self) -> &aws_smithy_types::Error {
763		&self.meta
764	}
765
766	/// Returns the request ID if it's available.
767	pub fn request_id(&self) -> Option<&str> {
768		self.meta.request_id()
769	}
770
771	/// Returns the error code if it's available.
772	pub fn code(&self) -> Option<&str> {
773		self.meta.code()
774	}
775	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::InternalError`.
776	pub fn is_internal_error(&self) -> bool {
777		matches!(&self.kind, SetTypingStatusErrorKind::InternalError(_))
778	}
779	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::RateLimitError`.
780	pub fn is_rate_limit_error(&self) -> bool {
781		matches!(&self.kind, SetTypingStatusErrorKind::RateLimitError(_))
782	}
783	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::ForbiddenError`.
784	pub fn is_forbidden_error(&self) -> bool {
785		matches!(&self.kind, SetTypingStatusErrorKind::ForbiddenError(_))
786	}
787	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::UnauthorizedError`.
788	pub fn is_unauthorized_error(&self) -> bool {
789		matches!(&self.kind, SetTypingStatusErrorKind::UnauthorizedError(_))
790	}
791	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::NotFoundError`.
792	pub fn is_not_found_error(&self) -> bool {
793		matches!(&self.kind, SetTypingStatusErrorKind::NotFoundError(_))
794	}
795	/// Returns `true` if the error kind is `SetTypingStatusErrorKind::BadRequestError`.
796	pub fn is_bad_request_error(&self) -> bool {
797		matches!(&self.kind, SetTypingStatusErrorKind::BadRequestError(_))
798	}
799}
800impl std::error::Error for SetTypingStatusError {
801	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
802		match &self.kind {
803			SetTypingStatusErrorKind::InternalError(_inner) => Some(_inner),
804			SetTypingStatusErrorKind::RateLimitError(_inner) => Some(_inner),
805			SetTypingStatusErrorKind::ForbiddenError(_inner) => Some(_inner),
806			SetTypingStatusErrorKind::UnauthorizedError(_inner) => Some(_inner),
807			SetTypingStatusErrorKind::NotFoundError(_inner) => Some(_inner),
808			SetTypingStatusErrorKind::BadRequestError(_inner) => Some(_inner),
809			SetTypingStatusErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
810		}
811	}
812}
813
814/// Error type for the `WatchThread` operation.
815#[non_exhaustive]
816#[derive(std::fmt::Debug)]
817pub struct WatchThreadError {
818	/// Kind of error that occurred.
819	pub kind: WatchThreadErrorKind,
820	/// Additional metadata about the error, including error code, message, and request ID.
821	pub(crate) meta: aws_smithy_types::Error,
822}
823/// Types of errors that can occur for the `WatchThread` operation.
824#[non_exhaustive]
825#[derive(std::fmt::Debug)]
826pub enum WatchThreadErrorKind {
827	/// An error caused by internal server problems.
828	InternalError(crate::error::InternalError),
829	/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
830	RateLimitError(crate::error::RateLimitError),
831	/// An error thrown when the requestee requests a resource they do not have access to.
832	ForbiddenError(crate::error::ForbiddenError),
833	/// An error thrown when the requestee is not authenticated.
834	UnauthorizedError(crate::error::UnauthorizedError),
835	/// An error thrown when the requestee requests a non existant resource.
836	NotFoundError(crate::error::NotFoundError),
837	/// An error thrown when the requestee has sent an invalid or malformed request.
838	BadRequestError(crate::error::BadRequestError),
839	/// An unexpected error, e.g. invalid JSON returned by the service or an unknown error code
840	Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
841}
842impl std::fmt::Display for WatchThreadError {
843	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
844		match &self.kind {
845			WatchThreadErrorKind::InternalError(_inner) => _inner.fmt(f),
846			WatchThreadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
847			WatchThreadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
848			WatchThreadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
849			WatchThreadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
850			WatchThreadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
851			WatchThreadErrorKind::Unhandled(_inner) => _inner.fmt(f),
852		}
853	}
854}
855impl aws_smithy_types::retry::ProvideErrorKind for WatchThreadError {
856	fn code(&self) -> Option<&str> {
857		WatchThreadError::code(self)
858	}
859	fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
860		match &self.kind {
861			WatchThreadErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
862			WatchThreadErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
863			_ => None,
864		}
865	}
866}
867impl WatchThreadError {
868	/// Creates a new `WatchThreadError`.
869	pub fn new(kind: WatchThreadErrorKind, meta: aws_smithy_types::Error) -> Self {
870		Self { kind, meta }
871	}
872
873	/// Creates the `WatchThreadError::Unhandled` variant from any error type.
874	pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
875		Self {
876			kind: WatchThreadErrorKind::Unhandled(err.into()),
877			meta: Default::default(),
878		}
879	}
880
881	/// Creates the `WatchThreadError::Unhandled` variant from a `aws_smithy_types::Error`.
882	pub fn generic(err: aws_smithy_types::Error) -> Self {
883		Self {
884			meta: err.clone(),
885			kind: WatchThreadErrorKind::Unhandled(err.into()),
886		}
887	}
888
889	/// Returns the error message if one is available.
890	pub fn message(&self) -> Option<&str> {
891		self.meta.message()
892	}
893
894	/// Returns error metadata, which includes the error code, message,
895	/// request ID, and potentially additional information.
896	pub fn meta(&self) -> &aws_smithy_types::Error {
897		&self.meta
898	}
899
900	/// Returns the request ID if it's available.
901	pub fn request_id(&self) -> Option<&str> {
902		self.meta.request_id()
903	}
904
905	/// Returns the error code if it's available.
906	pub fn code(&self) -> Option<&str> {
907		self.meta.code()
908	}
909	/// Returns `true` if the error kind is `WatchThreadErrorKind::InternalError`.
910	pub fn is_internal_error(&self) -> bool {
911		matches!(&self.kind, WatchThreadErrorKind::InternalError(_))
912	}
913	/// Returns `true` if the error kind is `WatchThreadErrorKind::RateLimitError`.
914	pub fn is_rate_limit_error(&self) -> bool {
915		matches!(&self.kind, WatchThreadErrorKind::RateLimitError(_))
916	}
917	/// Returns `true` if the error kind is `WatchThreadErrorKind::ForbiddenError`.
918	pub fn is_forbidden_error(&self) -> bool {
919		matches!(&self.kind, WatchThreadErrorKind::ForbiddenError(_))
920	}
921	/// Returns `true` if the error kind is `WatchThreadErrorKind::UnauthorizedError`.
922	pub fn is_unauthorized_error(&self) -> bool {
923		matches!(&self.kind, WatchThreadErrorKind::UnauthorizedError(_))
924	}
925	/// Returns `true` if the error kind is `WatchThreadErrorKind::NotFoundError`.
926	pub fn is_not_found_error(&self) -> bool {
927		matches!(&self.kind, WatchThreadErrorKind::NotFoundError(_))
928	}
929	/// Returns `true` if the error kind is `WatchThreadErrorKind::BadRequestError`.
930	pub fn is_bad_request_error(&self) -> bool {
931		matches!(&self.kind, WatchThreadErrorKind::BadRequestError(_))
932	}
933}
934impl std::error::Error for WatchThreadError {
935	fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
936		match &self.kind {
937			WatchThreadErrorKind::InternalError(_inner) => Some(_inner),
938			WatchThreadErrorKind::RateLimitError(_inner) => Some(_inner),
939			WatchThreadErrorKind::ForbiddenError(_inner) => Some(_inner),
940			WatchThreadErrorKind::UnauthorizedError(_inner) => Some(_inner),
941			WatchThreadErrorKind::NotFoundError(_inner) => Some(_inner),
942			WatchThreadErrorKind::BadRequestError(_inner) => Some(_inner),
943			WatchThreadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
944		}
945	}
946}
947
948/// An error thrown when the requestee has sent an invalid or malformed request.
949#[non_exhaustive]
950#[derive(std::clone::Clone, std::cmp::PartialEq)]
951pub struct BadRequestError {
952	#[allow(missing_docs)] // documentation missing in model
953	pub code: std::option::Option<std::string::String>,
954	#[allow(missing_docs)] // documentation missing in model
955	pub message: std::option::Option<std::string::String>,
956	/// Unstructured metadata relating to an error. Must be manually parsed.
957	pub metadata: std::option::Option<aws_smithy_types::Document>,
958}
959impl BadRequestError {
960	#[allow(missing_docs)] // documentation missing in model
961	pub fn code(&self) -> std::option::Option<&str> {
962		self.code.as_deref()
963	}
964	/// Unstructured metadata relating to an error. Must be manually parsed.
965	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
966		self.metadata.as_ref()
967	}
968}
969impl std::fmt::Debug for BadRequestError {
970	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
971		let mut formatter = f.debug_struct("BadRequestError");
972		formatter.field("code", &self.code);
973		formatter.field("message", &self.message);
974		formatter.field("metadata", &self.metadata);
975		formatter.finish()
976	}
977}
978impl BadRequestError {
979	/// Returns the error message.
980	pub fn message(&self) -> Option<&str> {
981		self.message.as_deref()
982	}
983}
984impl std::fmt::Display for BadRequestError {
985	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
986		write!(f, "BadRequestError")?;
987		if let Some(inner_1) = &self.message {
988			write!(f, ": {}", inner_1)?;
989		}
990		Ok(())
991	}
992}
993impl std::error::Error for BadRequestError {}
994/// See [`BadRequestError`](crate::error::BadRequestError)
995pub mod bad_request_error {
996	/// A builder for [`BadRequestError`](crate::error::BadRequestError)
997	#[non_exhaustive]
998	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
999	pub struct Builder {
1000		pub(crate) code: std::option::Option<std::string::String>,
1001		pub(crate) message: std::option::Option<std::string::String>,
1002		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1003	}
1004	impl Builder {
1005		#[allow(missing_docs)] // documentation missing in model
1006		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1007			self.code = Some(input.into());
1008			self
1009		}
1010		#[allow(missing_docs)] // documentation missing in model
1011		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1012			self.code = input;
1013			self
1014		}
1015		#[allow(missing_docs)] // documentation missing in model
1016		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1017			self.message = Some(input.into());
1018			self
1019		}
1020		#[allow(missing_docs)] // documentation missing in model
1021		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1022			self.message = input;
1023			self
1024		}
1025		/// Unstructured metadata relating to an error. Must be manually parsed.
1026		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1027			self.metadata = Some(input);
1028			self
1029		}
1030		/// Unstructured metadata relating to an error. Must be manually parsed.
1031		pub fn set_metadata(
1032			mut self,
1033			input: std::option::Option<aws_smithy_types::Document>,
1034		) -> Self {
1035			self.metadata = input;
1036			self
1037		}
1038		/// Consumes the builder and constructs a [`BadRequestError`](crate::error::BadRequestError)
1039		pub fn build(self) -> crate::error::BadRequestError {
1040			crate::error::BadRequestError {
1041				code: self.code,
1042				message: self.message,
1043				metadata: self.metadata,
1044			}
1045		}
1046	}
1047}
1048impl BadRequestError {
1049	/// Creates a new builder-style object to manufacture [`BadRequestError`](crate::error::BadRequestError)
1050	pub fn builder() -> crate::error::bad_request_error::Builder {
1051		crate::error::bad_request_error::Builder::default()
1052	}
1053}
1054
1055/// An error thrown when the requestee requests a non existant resource.
1056#[non_exhaustive]
1057#[derive(std::clone::Clone, std::cmp::PartialEq)]
1058pub struct NotFoundError {
1059	#[allow(missing_docs)] // documentation missing in model
1060	pub code: std::option::Option<std::string::String>,
1061	#[allow(missing_docs)] // documentation missing in model
1062	pub message: std::option::Option<std::string::String>,
1063	/// Unstructured metadata relating to an error. Must be manually parsed.
1064	pub metadata: std::option::Option<aws_smithy_types::Document>,
1065}
1066impl NotFoundError {
1067	#[allow(missing_docs)] // documentation missing in model
1068	pub fn code(&self) -> std::option::Option<&str> {
1069		self.code.as_deref()
1070	}
1071	/// Unstructured metadata relating to an error. Must be manually parsed.
1072	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1073		self.metadata.as_ref()
1074	}
1075}
1076impl std::fmt::Debug for NotFoundError {
1077	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1078		let mut formatter = f.debug_struct("NotFoundError");
1079		formatter.field("code", &self.code);
1080		formatter.field("message", &self.message);
1081		formatter.field("metadata", &self.metadata);
1082		formatter.finish()
1083	}
1084}
1085impl NotFoundError {
1086	/// Returns the error message.
1087	pub fn message(&self) -> Option<&str> {
1088		self.message.as_deref()
1089	}
1090}
1091impl std::fmt::Display for NotFoundError {
1092	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1093		write!(f, "NotFoundError")?;
1094		if let Some(inner_2) = &self.message {
1095			write!(f, ": {}", inner_2)?;
1096		}
1097		Ok(())
1098	}
1099}
1100impl std::error::Error for NotFoundError {}
1101/// See [`NotFoundError`](crate::error::NotFoundError)
1102pub mod not_found_error {
1103	/// A builder for [`NotFoundError`](crate::error::NotFoundError)
1104	#[non_exhaustive]
1105	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1106	pub struct Builder {
1107		pub(crate) code: std::option::Option<std::string::String>,
1108		pub(crate) message: std::option::Option<std::string::String>,
1109		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1110	}
1111	impl Builder {
1112		#[allow(missing_docs)] // documentation missing in model
1113		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1114			self.code = Some(input.into());
1115			self
1116		}
1117		#[allow(missing_docs)] // documentation missing in model
1118		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1119			self.code = input;
1120			self
1121		}
1122		#[allow(missing_docs)] // documentation missing in model
1123		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1124			self.message = Some(input.into());
1125			self
1126		}
1127		#[allow(missing_docs)] // documentation missing in model
1128		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1129			self.message = input;
1130			self
1131		}
1132		/// Unstructured metadata relating to an error. Must be manually parsed.
1133		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1134			self.metadata = Some(input);
1135			self
1136		}
1137		/// Unstructured metadata relating to an error. Must be manually parsed.
1138		pub fn set_metadata(
1139			mut self,
1140			input: std::option::Option<aws_smithy_types::Document>,
1141		) -> Self {
1142			self.metadata = input;
1143			self
1144		}
1145		/// Consumes the builder and constructs a [`NotFoundError`](crate::error::NotFoundError)
1146		pub fn build(self) -> crate::error::NotFoundError {
1147			crate::error::NotFoundError {
1148				code: self.code,
1149				message: self.message,
1150				metadata: self.metadata,
1151			}
1152		}
1153	}
1154}
1155impl NotFoundError {
1156	/// Creates a new builder-style object to manufacture [`NotFoundError`](crate::error::NotFoundError)
1157	pub fn builder() -> crate::error::not_found_error::Builder {
1158		crate::error::not_found_error::Builder::default()
1159	}
1160}
1161
1162/// An error thrown when the requestee is not authenticated.
1163#[non_exhaustive]
1164#[derive(std::clone::Clone, std::cmp::PartialEq)]
1165pub struct UnauthorizedError {
1166	#[allow(missing_docs)] // documentation missing in model
1167	pub code: std::option::Option<std::string::String>,
1168	#[allow(missing_docs)] // documentation missing in model
1169	pub message: std::option::Option<std::string::String>,
1170	/// Unstructured metadata relating to an error. Must be manually parsed.
1171	pub metadata: std::option::Option<aws_smithy_types::Document>,
1172}
1173impl UnauthorizedError {
1174	#[allow(missing_docs)] // documentation missing in model
1175	pub fn code(&self) -> std::option::Option<&str> {
1176		self.code.as_deref()
1177	}
1178	/// Unstructured metadata relating to an error. Must be manually parsed.
1179	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1180		self.metadata.as_ref()
1181	}
1182}
1183impl std::fmt::Debug for UnauthorizedError {
1184	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1185		let mut formatter = f.debug_struct("UnauthorizedError");
1186		formatter.field("code", &self.code);
1187		formatter.field("message", &self.message);
1188		formatter.field("metadata", &self.metadata);
1189		formatter.finish()
1190	}
1191}
1192impl UnauthorizedError {
1193	/// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
1194	pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1195		aws_smithy_types::retry::ErrorKind::ClientError
1196	}
1197	/// Returns the error message.
1198	pub fn message(&self) -> Option<&str> {
1199		self.message.as_deref()
1200	}
1201}
1202impl std::fmt::Display for UnauthorizedError {
1203	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1204		write!(f, "UnauthorizedError")?;
1205		if let Some(inner_3) = &self.message {
1206			write!(f, ": {}", inner_3)?;
1207		}
1208		Ok(())
1209	}
1210}
1211impl std::error::Error for UnauthorizedError {}
1212/// See [`UnauthorizedError`](crate::error::UnauthorizedError)
1213pub mod unauthorized_error {
1214	/// A builder for [`UnauthorizedError`](crate::error::UnauthorizedError)
1215	#[non_exhaustive]
1216	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1217	pub struct Builder {
1218		pub(crate) code: std::option::Option<std::string::String>,
1219		pub(crate) message: std::option::Option<std::string::String>,
1220		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1221	}
1222	impl Builder {
1223		#[allow(missing_docs)] // documentation missing in model
1224		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1225			self.code = Some(input.into());
1226			self
1227		}
1228		#[allow(missing_docs)] // documentation missing in model
1229		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1230			self.code = input;
1231			self
1232		}
1233		#[allow(missing_docs)] // documentation missing in model
1234		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1235			self.message = Some(input.into());
1236			self
1237		}
1238		#[allow(missing_docs)] // documentation missing in model
1239		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1240			self.message = input;
1241			self
1242		}
1243		/// Unstructured metadata relating to an error. Must be manually parsed.
1244		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1245			self.metadata = Some(input);
1246			self
1247		}
1248		/// Unstructured metadata relating to an error. Must be manually parsed.
1249		pub fn set_metadata(
1250			mut self,
1251			input: std::option::Option<aws_smithy_types::Document>,
1252		) -> Self {
1253			self.metadata = input;
1254			self
1255		}
1256		/// Consumes the builder and constructs a [`UnauthorizedError`](crate::error::UnauthorizedError)
1257		pub fn build(self) -> crate::error::UnauthorizedError {
1258			crate::error::UnauthorizedError {
1259				code: self.code,
1260				message: self.message,
1261				metadata: self.metadata,
1262			}
1263		}
1264	}
1265}
1266impl UnauthorizedError {
1267	/// Creates a new builder-style object to manufacture [`UnauthorizedError`](crate::error::UnauthorizedError)
1268	pub fn builder() -> crate::error::unauthorized_error::Builder {
1269		crate::error::unauthorized_error::Builder::default()
1270	}
1271}
1272
1273/// An error thrown when the requestee requests a resource they do not have access to.
1274#[non_exhaustive]
1275#[derive(std::clone::Clone, std::cmp::PartialEq)]
1276pub struct ForbiddenError {
1277	#[allow(missing_docs)] // documentation missing in model
1278	pub code: std::option::Option<std::string::String>,
1279	#[allow(missing_docs)] // documentation missing in model
1280	pub message: std::option::Option<std::string::String>,
1281	/// Unstructured metadata relating to an error. Must be manually parsed.
1282	pub metadata: std::option::Option<aws_smithy_types::Document>,
1283}
1284impl ForbiddenError {
1285	#[allow(missing_docs)] // documentation missing in model
1286	pub fn code(&self) -> std::option::Option<&str> {
1287		self.code.as_deref()
1288	}
1289	/// Unstructured metadata relating to an error. Must be manually parsed.
1290	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1291		self.metadata.as_ref()
1292	}
1293}
1294impl std::fmt::Debug for ForbiddenError {
1295	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1296		let mut formatter = f.debug_struct("ForbiddenError");
1297		formatter.field("code", &self.code);
1298		formatter.field("message", &self.message);
1299		formatter.field("metadata", &self.metadata);
1300		formatter.finish()
1301	}
1302}
1303impl ForbiddenError {
1304	/// Returns the error message.
1305	pub fn message(&self) -> Option<&str> {
1306		self.message.as_deref()
1307	}
1308}
1309impl std::fmt::Display for ForbiddenError {
1310	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1311		write!(f, "ForbiddenError")?;
1312		if let Some(inner_4) = &self.message {
1313			write!(f, ": {}", inner_4)?;
1314		}
1315		Ok(())
1316	}
1317}
1318impl std::error::Error for ForbiddenError {}
1319/// See [`ForbiddenError`](crate::error::ForbiddenError)
1320pub mod forbidden_error {
1321	/// A builder for [`ForbiddenError`](crate::error::ForbiddenError)
1322	#[non_exhaustive]
1323	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1324	pub struct Builder {
1325		pub(crate) code: std::option::Option<std::string::String>,
1326		pub(crate) message: std::option::Option<std::string::String>,
1327		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1328	}
1329	impl Builder {
1330		#[allow(missing_docs)] // documentation missing in model
1331		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1332			self.code = Some(input.into());
1333			self
1334		}
1335		#[allow(missing_docs)] // documentation missing in model
1336		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1337			self.code = input;
1338			self
1339		}
1340		#[allow(missing_docs)] // documentation missing in model
1341		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1342			self.message = Some(input.into());
1343			self
1344		}
1345		#[allow(missing_docs)] // documentation missing in model
1346		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1347			self.message = input;
1348			self
1349		}
1350		/// Unstructured metadata relating to an error. Must be manually parsed.
1351		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1352			self.metadata = Some(input);
1353			self
1354		}
1355		/// Unstructured metadata relating to an error. Must be manually parsed.
1356		pub fn set_metadata(
1357			mut self,
1358			input: std::option::Option<aws_smithy_types::Document>,
1359		) -> Self {
1360			self.metadata = input;
1361			self
1362		}
1363		/// Consumes the builder and constructs a [`ForbiddenError`](crate::error::ForbiddenError)
1364		pub fn build(self) -> crate::error::ForbiddenError {
1365			crate::error::ForbiddenError {
1366				code: self.code,
1367				message: self.message,
1368				metadata: self.metadata,
1369			}
1370		}
1371	}
1372}
1373impl ForbiddenError {
1374	/// Creates a new builder-style object to manufacture [`ForbiddenError`](crate::error::ForbiddenError)
1375	pub fn builder() -> crate::error::forbidden_error::Builder {
1376		crate::error::forbidden_error::Builder::default()
1377	}
1378}
1379
1380/// An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
1381#[non_exhaustive]
1382#[derive(std::clone::Clone, std::cmp::PartialEq)]
1383pub struct RateLimitError {
1384	#[allow(missing_docs)] // documentation missing in model
1385	pub code: std::option::Option<std::string::String>,
1386	#[allow(missing_docs)] // documentation missing in model
1387	pub message: std::option::Option<std::string::String>,
1388	/// Unstructured metadata relating to an error. Must be manually parsed.
1389	pub metadata: std::option::Option<aws_smithy_types::Document>,
1390}
1391impl RateLimitError {
1392	#[allow(missing_docs)] // documentation missing in model
1393	pub fn code(&self) -> std::option::Option<&str> {
1394		self.code.as_deref()
1395	}
1396	/// Unstructured metadata relating to an error. Must be manually parsed.
1397	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1398		self.metadata.as_ref()
1399	}
1400}
1401impl std::fmt::Debug for RateLimitError {
1402	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1403		let mut formatter = f.debug_struct("RateLimitError");
1404		formatter.field("code", &self.code);
1405		formatter.field("message", &self.message);
1406		formatter.field("metadata", &self.metadata);
1407		formatter.finish()
1408	}
1409}
1410impl RateLimitError {
1411	/// Returns the error message.
1412	pub fn message(&self) -> Option<&str> {
1413		self.message.as_deref()
1414	}
1415}
1416impl std::fmt::Display for RateLimitError {
1417	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1418		write!(f, "RateLimitError")?;
1419		if let Some(inner_5) = &self.message {
1420			write!(f, ": {}", inner_5)?;
1421		}
1422		Ok(())
1423	}
1424}
1425impl std::error::Error for RateLimitError {}
1426/// See [`RateLimitError`](crate::error::RateLimitError)
1427pub mod rate_limit_error {
1428	/// A builder for [`RateLimitError`](crate::error::RateLimitError)
1429	#[non_exhaustive]
1430	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1431	pub struct Builder {
1432		pub(crate) code: std::option::Option<std::string::String>,
1433		pub(crate) message: std::option::Option<std::string::String>,
1434		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1435	}
1436	impl Builder {
1437		#[allow(missing_docs)] // documentation missing in model
1438		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1439			self.code = Some(input.into());
1440			self
1441		}
1442		#[allow(missing_docs)] // documentation missing in model
1443		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1444			self.code = input;
1445			self
1446		}
1447		#[allow(missing_docs)] // documentation missing in model
1448		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1449			self.message = Some(input.into());
1450			self
1451		}
1452		#[allow(missing_docs)] // documentation missing in model
1453		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1454			self.message = input;
1455			self
1456		}
1457		/// Unstructured metadata relating to an error. Must be manually parsed.
1458		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1459			self.metadata = Some(input);
1460			self
1461		}
1462		/// Unstructured metadata relating to an error. Must be manually parsed.
1463		pub fn set_metadata(
1464			mut self,
1465			input: std::option::Option<aws_smithy_types::Document>,
1466		) -> Self {
1467			self.metadata = input;
1468			self
1469		}
1470		/// Consumes the builder and constructs a [`RateLimitError`](crate::error::RateLimitError)
1471		pub fn build(self) -> crate::error::RateLimitError {
1472			crate::error::RateLimitError {
1473				code: self.code,
1474				message: self.message,
1475				metadata: self.metadata,
1476			}
1477		}
1478	}
1479}
1480impl RateLimitError {
1481	/// Creates a new builder-style object to manufacture [`RateLimitError`](crate::error::RateLimitError)
1482	pub fn builder() -> crate::error::rate_limit_error::Builder {
1483		crate::error::rate_limit_error::Builder::default()
1484	}
1485}
1486
1487/// An error caused by internal server problems.
1488#[non_exhaustive]
1489#[derive(std::clone::Clone, std::cmp::PartialEq)]
1490pub struct InternalError {
1491	#[allow(missing_docs)] // documentation missing in model
1492	pub code: std::option::Option<std::string::String>,
1493	#[allow(missing_docs)] // documentation missing in model
1494	pub message: std::option::Option<std::string::String>,
1495	/// Unstructured metadata relating to an error. Must be manually parsed.
1496	pub metadata: std::option::Option<aws_smithy_types::Document>,
1497}
1498impl InternalError {
1499	#[allow(missing_docs)] // documentation missing in model
1500	pub fn code(&self) -> std::option::Option<&str> {
1501		self.code.as_deref()
1502	}
1503	/// Unstructured metadata relating to an error. Must be manually parsed.
1504	pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
1505		self.metadata.as_ref()
1506	}
1507}
1508impl std::fmt::Debug for InternalError {
1509	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1510		let mut formatter = f.debug_struct("InternalError");
1511		formatter.field("code", &self.code);
1512		formatter.field("message", &self.message);
1513		formatter.field("metadata", &self.metadata);
1514		formatter.finish()
1515	}
1516}
1517impl InternalError {
1518	/// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
1519	pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
1520		aws_smithy_types::retry::ErrorKind::ServerError
1521	}
1522	/// Returns the error message.
1523	pub fn message(&self) -> Option<&str> {
1524		self.message.as_deref()
1525	}
1526}
1527impl std::fmt::Display for InternalError {
1528	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1529		write!(f, "InternalError")?;
1530		if let Some(inner_6) = &self.message {
1531			write!(f, ": {}", inner_6)?;
1532		}
1533		Ok(())
1534	}
1535}
1536impl std::error::Error for InternalError {}
1537/// See [`InternalError`](crate::error::InternalError)
1538pub mod internal_error {
1539	/// A builder for [`InternalError`](crate::error::InternalError)
1540	#[non_exhaustive]
1541	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
1542	pub struct Builder {
1543		pub(crate) code: std::option::Option<std::string::String>,
1544		pub(crate) message: std::option::Option<std::string::String>,
1545		pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
1546	}
1547	impl Builder {
1548		#[allow(missing_docs)] // documentation missing in model
1549		pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
1550			self.code = Some(input.into());
1551			self
1552		}
1553		#[allow(missing_docs)] // documentation missing in model
1554		pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
1555			self.code = input;
1556			self
1557		}
1558		#[allow(missing_docs)] // documentation missing in model
1559		pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
1560			self.message = Some(input.into());
1561			self
1562		}
1563		#[allow(missing_docs)] // documentation missing in model
1564		pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1565			self.message = input;
1566			self
1567		}
1568		/// Unstructured metadata relating to an error. Must be manually parsed.
1569		pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
1570			self.metadata = Some(input);
1571			self
1572		}
1573		/// Unstructured metadata relating to an error. Must be manually parsed.
1574		pub fn set_metadata(
1575			mut self,
1576			input: std::option::Option<aws_smithy_types::Document>,
1577		) -> Self {
1578			self.metadata = input;
1579			self
1580		}
1581		/// Consumes the builder and constructs a [`InternalError`](crate::error::InternalError)
1582		pub fn build(self) -> crate::error::InternalError {
1583			crate::error::InternalError {
1584				code: self.code,
1585				message: self.message,
1586				metadata: self.metadata,
1587			}
1588		}
1589	}
1590}
1591impl InternalError {
1592	/// Creates a new builder-style object to manufacture [`InternalError`](crate::error::InternalError)
1593	pub fn builder() -> crate::error::internal_error::Builder {
1594		crate::error::internal_error::Builder::default()
1595	}
1596}