1#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct UpdateShareConfigError {
6 pub kind: UpdateShareConfigErrorKind,
8 pub(crate) meta: aws_smithy_types::Error,
10}
11impl aws_smithy_http::result::CreateUnhandledError for UpdateShareConfigError {
12 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
13 Self {
14 kind: UpdateShareConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
15 meta: Default::default(),
16 }
17 }
18}
19#[non_exhaustive]
21#[derive(std::fmt::Debug)]
22pub enum UpdateShareConfigErrorKind {
23 InternalFailureError(crate::error::InternalFailureError),
25 ThrottlingError(crate::error::ThrottlingError),
27 ValidationError(crate::error::ValidationError),
29 AccessDeniedError(crate::error::AccessDeniedError),
31 UnauthorizedError(crate::error::UnauthorizedError),
33 ResourceConflictError(crate::error::ResourceConflictError),
35 BadRequestError(crate::error::BadRequestError),
37 ResourceNotFoundError(crate::error::ResourceNotFoundError),
39 RequestTooLargeError(crate::error::RequestTooLargeError),
41 Unhandled(crate::error::Unhandled),
50}
51impl std::fmt::Display for UpdateShareConfigError {
52 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
53 match &self.kind {
54 UpdateShareConfigErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
55 UpdateShareConfigErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
56 UpdateShareConfigErrorKind::ValidationError(_inner) => _inner.fmt(f),
57 UpdateShareConfigErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
58 UpdateShareConfigErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
59 UpdateShareConfigErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
60 UpdateShareConfigErrorKind::BadRequestError(_inner) => _inner.fmt(f),
61 UpdateShareConfigErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
62 UpdateShareConfigErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
63 UpdateShareConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
64 }
65 }
66}
67impl aws_smithy_types::retry::ProvideErrorKind for UpdateShareConfigError {
68 fn code(&self) -> Option<&str> {
69 UpdateShareConfigError::code(self)
70 }
71 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
72 match &self.kind {
73 UpdateShareConfigErrorKind::ThrottlingError(inner) => {
74 Some(inner.retryable_error_kind())
75 }
76 UpdateShareConfigErrorKind::ResourceConflictError(inner) => {
77 Some(inner.retryable_error_kind())
78 }
79 _ => None,
80 }
81 }
82}
83impl UpdateShareConfigError {
84 pub fn new(kind: UpdateShareConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
86 Self { kind, meta }
87 }
88
89 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
91 Self {
92 kind: UpdateShareConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
93 meta: Default::default(),
94 }
95 }
96
97 pub fn generic(err: aws_smithy_types::Error) -> Self {
99 Self {
100 meta: err.clone(),
101 kind: UpdateShareConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
102 }
103 }
104
105 pub fn message(&self) -> Option<&str> {
107 self.meta.message()
108 }
109
110 pub fn meta(&self) -> &aws_smithy_types::Error {
113 &self.meta
114 }
115
116 pub fn request_id(&self) -> Option<&str> {
118 self.meta.request_id()
119 }
120
121 pub fn code(&self) -> Option<&str> {
123 self.meta.code()
124 }
125 pub fn is_internal_failure_error(&self) -> bool {
127 matches!(
128 &self.kind,
129 UpdateShareConfigErrorKind::InternalFailureError(_)
130 )
131 }
132 pub fn is_throttling_error(&self) -> bool {
134 matches!(&self.kind, UpdateShareConfigErrorKind::ThrottlingError(_))
135 }
136 pub fn is_validation_error(&self) -> bool {
138 matches!(&self.kind, UpdateShareConfigErrorKind::ValidationError(_))
139 }
140 pub fn is_access_denied_error(&self) -> bool {
142 matches!(&self.kind, UpdateShareConfigErrorKind::AccessDeniedError(_))
143 }
144 pub fn is_unauthorized_error(&self) -> bool {
146 matches!(&self.kind, UpdateShareConfigErrorKind::UnauthorizedError(_))
147 }
148 pub fn is_resource_conflict_error(&self) -> bool {
150 matches!(
151 &self.kind,
152 UpdateShareConfigErrorKind::ResourceConflictError(_)
153 )
154 }
155 pub fn is_bad_request_error(&self) -> bool {
157 matches!(&self.kind, UpdateShareConfigErrorKind::BadRequestError(_))
158 }
159 pub fn is_resource_not_found_error(&self) -> bool {
161 matches!(
162 &self.kind,
163 UpdateShareConfigErrorKind::ResourceNotFoundError(_)
164 )
165 }
166 pub fn is_request_too_large_error(&self) -> bool {
168 matches!(
169 &self.kind,
170 UpdateShareConfigErrorKind::RequestTooLargeError(_)
171 )
172 }
173}
174impl std::error::Error for UpdateShareConfigError {
175 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
176 match &self.kind {
177 UpdateShareConfigErrorKind::InternalFailureError(_inner) => Some(_inner),
178 UpdateShareConfigErrorKind::ThrottlingError(_inner) => Some(_inner),
179 UpdateShareConfigErrorKind::ValidationError(_inner) => Some(_inner),
180 UpdateShareConfigErrorKind::AccessDeniedError(_inner) => Some(_inner),
181 UpdateShareConfigErrorKind::UnauthorizedError(_inner) => Some(_inner),
182 UpdateShareConfigErrorKind::ResourceConflictError(_inner) => Some(_inner),
183 UpdateShareConfigErrorKind::BadRequestError(_inner) => Some(_inner),
184 UpdateShareConfigErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
185 UpdateShareConfigErrorKind::RequestTooLargeError(_inner) => Some(_inner),
186 UpdateShareConfigErrorKind::Unhandled(_inner) => Some(_inner),
187 }
188 }
189}
190
191#[non_exhaustive]
193#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
194pub struct RequestTooLargeError {
195 #[doc(hidden)]
197 pub message: std::option::Option<std::string::String>,
198 #[allow(missing_docs)] #[doc(hidden)]
200 pub code: std::option::Option<crate::model::RequestTooLargeCode>,
201}
202impl RequestTooLargeError {
203 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::RequestTooLargeCode> {
205 self.code.as_ref()
206 }
207}
208impl RequestTooLargeError {
209 pub fn message(&self) -> std::option::Option<&str> {
211 self.message.as_deref()
212 }
213}
214impl std::fmt::Display for RequestTooLargeError {
215 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
216 write!(f, "RequestTooLargeError [RequestTooLargeException]")?;
217 if let Some(inner_1) = &self.message {
218 {
219 write!(f, ": {}", inner_1)?;
220 }
221 }
222 Ok(())
223 }
224}
225impl std::error::Error for RequestTooLargeError {}
226pub mod request_too_large_error {
228
229 #[non_exhaustive]
231 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
232 pub struct Builder {
233 pub(crate) message: std::option::Option<std::string::String>,
234 pub(crate) code: std::option::Option<crate::model::RequestTooLargeCode>,
235 }
236 impl Builder {
237 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
239 self.message = Some(input.into());
240 self
241 }
242 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
244 self.message = input;
245 self
246 }
247 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::RequestTooLargeCode) -> Self {
249 self.code = Some(input);
250 self
251 }
252 #[allow(missing_docs)] pub fn set_code(
254 mut self,
255 input: std::option::Option<crate::model::RequestTooLargeCode>,
256 ) -> Self {
257 self.code = input;
258 self
259 }
260 pub fn build(self) -> crate::error::RequestTooLargeError {
262 crate::error::RequestTooLargeError {
263 message: self.message,
264 code: self.code,
265 }
266 }
267 }
268}
269impl RequestTooLargeError {
270 pub fn builder() -> crate::error::request_too_large_error::Builder {
272 crate::error::request_too_large_error::Builder::default()
273 }
274}
275
276#[non_exhaustive]
278#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
279pub struct ResourceNotFoundError {
280 #[doc(hidden)]
282 pub message: std::option::Option<std::string::String>,
283 #[allow(missing_docs)] #[doc(hidden)]
285 pub code: std::option::Option<crate::model::NotFoundCode>,
286 #[allow(missing_docs)] #[doc(hidden)]
288 pub data: std::option::Option<crate::model::NotFoundData>,
289}
290impl ResourceNotFoundError {
291 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::NotFoundCode> {
293 self.code.as_ref()
294 }
295 #[allow(missing_docs)] pub fn data(&self) -> std::option::Option<&crate::model::NotFoundData> {
297 self.data.as_ref()
298 }
299}
300impl ResourceNotFoundError {
301 pub fn message(&self) -> std::option::Option<&str> {
303 self.message.as_deref()
304 }
305}
306impl std::fmt::Display for ResourceNotFoundError {
307 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
308 write!(f, "ResourceNotFoundError [ResourceNotFoundException]")?;
309 if let Some(inner_2) = &self.message {
310 {
311 write!(f, ": {}", inner_2)?;
312 }
313 }
314 Ok(())
315 }
316}
317impl std::error::Error for ResourceNotFoundError {}
318pub mod resource_not_found_error {
320
321 #[non_exhaustive]
323 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
324 pub struct Builder {
325 pub(crate) message: std::option::Option<std::string::String>,
326 pub(crate) code: std::option::Option<crate::model::NotFoundCode>,
327 pub(crate) data: std::option::Option<crate::model::NotFoundData>,
328 }
329 impl Builder {
330 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
332 self.message = Some(input.into());
333 self
334 }
335 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
337 self.message = input;
338 self
339 }
340 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::NotFoundCode) -> Self {
342 self.code = Some(input);
343 self
344 }
345 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::NotFoundCode>) -> Self {
347 self.code = input;
348 self
349 }
350 #[allow(missing_docs)] pub fn data(mut self, input: crate::model::NotFoundData) -> Self {
352 self.data = Some(input);
353 self
354 }
355 #[allow(missing_docs)] pub fn set_data(mut self, input: std::option::Option<crate::model::NotFoundData>) -> Self {
357 self.data = input;
358 self
359 }
360 pub fn build(self) -> crate::error::ResourceNotFoundError {
362 crate::error::ResourceNotFoundError {
363 message: self.message,
364 code: self.code,
365 data: self.data,
366 }
367 }
368 }
369}
370impl ResourceNotFoundError {
371 pub fn builder() -> crate::error::resource_not_found_error::Builder {
373 crate::error::resource_not_found_error::Builder::default()
374 }
375}
376
377#[non_exhaustive]
379#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
380pub struct BadRequestError {
381 #[doc(hidden)]
383 pub message: std::option::Option<std::string::String>,
384 #[allow(missing_docs)] #[doc(hidden)]
386 pub code: std::option::Option<crate::model::BadRequestCode>,
387 #[allow(missing_docs)] #[doc(hidden)]
389 pub field_list: std::option::Option<std::vec::Vec<crate::model::FieldListItem>>,
390}
391impl BadRequestError {
392 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::BadRequestCode> {
394 self.code.as_ref()
395 }
396 #[allow(missing_docs)] pub fn field_list(&self) -> std::option::Option<&[crate::model::FieldListItem]> {
398 self.field_list.as_deref()
399 }
400}
401impl BadRequestError {
402 pub fn message(&self) -> std::option::Option<&str> {
404 self.message.as_deref()
405 }
406}
407impl std::fmt::Display for BadRequestError {
408 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
409 write!(f, "BadRequestError [BadRequestException]")?;
410 if let Some(inner_3) = &self.message {
411 {
412 write!(f, ": {}", inner_3)?;
413 }
414 }
415 Ok(())
416 }
417}
418impl std::error::Error for BadRequestError {}
419pub mod bad_request_error {
421
422 #[non_exhaustive]
424 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
425 pub struct Builder {
426 pub(crate) message: std::option::Option<std::string::String>,
427 pub(crate) code: std::option::Option<crate::model::BadRequestCode>,
428 pub(crate) field_list: std::option::Option<std::vec::Vec<crate::model::FieldListItem>>,
429 }
430 impl Builder {
431 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
433 self.message = Some(input.into());
434 self
435 }
436 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
438 self.message = input;
439 self
440 }
441 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::BadRequestCode) -> Self {
443 self.code = Some(input);
444 self
445 }
446 #[allow(missing_docs)] pub fn set_code(
448 mut self,
449 input: std::option::Option<crate::model::BadRequestCode>,
450 ) -> Self {
451 self.code = input;
452 self
453 }
454 pub fn field_list(mut self, input: crate::model::FieldListItem) -> Self {
459 let mut v = self.field_list.unwrap_or_default();
460 v.push(input);
461 self.field_list = Some(v);
462 self
463 }
464 #[allow(missing_docs)] pub fn set_field_list(
466 mut self,
467 input: std::option::Option<std::vec::Vec<crate::model::FieldListItem>>,
468 ) -> Self {
469 self.field_list = input;
470 self
471 }
472 pub fn build(self) -> crate::error::BadRequestError {
474 crate::error::BadRequestError {
475 message: self.message,
476 code: self.code,
477 field_list: self.field_list,
478 }
479 }
480 }
481}
482impl BadRequestError {
483 pub fn builder() -> crate::error::bad_request_error::Builder {
485 crate::error::bad_request_error::Builder::default()
486 }
487}
488
489#[non_exhaustive]
491#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
492pub struct ResourceConflictError {
493 #[doc(hidden)]
495 pub message: std::option::Option<std::string::String>,
496 #[allow(missing_docs)] #[doc(hidden)]
498 pub code: std::option::Option<crate::model::ConflictCode>,
499 #[allow(missing_docs)] #[doc(hidden)]
501 pub data: std::option::Option<crate::model::ConflictData>,
502}
503impl ResourceConflictError {
504 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ConflictCode> {
506 self.code.as_ref()
507 }
508 #[allow(missing_docs)] pub fn data(&self) -> std::option::Option<&crate::model::ConflictData> {
510 self.data.as_ref()
511 }
512}
513impl ResourceConflictError {
514 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
516 aws_smithy_types::retry::ErrorKind::ClientError
517 }
518 pub fn message(&self) -> std::option::Option<&str> {
520 self.message.as_deref()
521 }
522}
523impl std::fmt::Display for ResourceConflictError {
524 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
525 write!(f, "ResourceConflictError [ResourceConflictException]")?;
526 if let Some(inner_4) = &self.message {
527 {
528 write!(f, ": {}", inner_4)?;
529 }
530 }
531 Ok(())
532 }
533}
534impl std::error::Error for ResourceConflictError {}
535pub mod resource_conflict_error {
537
538 #[non_exhaustive]
540 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
541 pub struct Builder {
542 pub(crate) message: std::option::Option<std::string::String>,
543 pub(crate) code: std::option::Option<crate::model::ConflictCode>,
544 pub(crate) data: std::option::Option<crate::model::ConflictData>,
545 }
546 impl Builder {
547 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
549 self.message = Some(input.into());
550 self
551 }
552 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
554 self.message = input;
555 self
556 }
557 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::ConflictCode) -> Self {
559 self.code = Some(input);
560 self
561 }
562 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ConflictCode>) -> Self {
564 self.code = input;
565 self
566 }
567 #[allow(missing_docs)] pub fn data(mut self, input: crate::model::ConflictData) -> Self {
569 self.data = Some(input);
570 self
571 }
572 #[allow(missing_docs)] pub fn set_data(mut self, input: std::option::Option<crate::model::ConflictData>) -> Self {
574 self.data = input;
575 self
576 }
577 pub fn build(self) -> crate::error::ResourceConflictError {
579 crate::error::ResourceConflictError {
580 message: self.message,
581 code: self.code,
582 data: self.data,
583 }
584 }
585 }
586}
587impl ResourceConflictError {
588 pub fn builder() -> crate::error::resource_conflict_error::Builder {
590 crate::error::resource_conflict_error::Builder::default()
591 }
592}
593
594#[non_exhaustive]
596#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
597pub struct UnauthorizedError {
598 #[doc(hidden)]
600 pub message: std::option::Option<std::string::String>,
601 #[allow(missing_docs)] #[doc(hidden)]
603 pub code: std::option::Option<crate::model::UnauthorizedCode>,
604}
605impl UnauthorizedError {
606 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::UnauthorizedCode> {
608 self.code.as_ref()
609 }
610}
611impl UnauthorizedError {
612 pub fn message(&self) -> std::option::Option<&str> {
614 self.message.as_deref()
615 }
616}
617impl std::fmt::Display for UnauthorizedError {
618 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
619 write!(f, "UnauthorizedError [UnauthorizedException]")?;
620 if let Some(inner_5) = &self.message {
621 {
622 write!(f, ": {}", inner_5)?;
623 }
624 }
625 Ok(())
626 }
627}
628impl std::error::Error for UnauthorizedError {}
629pub mod unauthorized_error {
631
632 #[non_exhaustive]
634 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
635 pub struct Builder {
636 pub(crate) message: std::option::Option<std::string::String>,
637 pub(crate) code: std::option::Option<crate::model::UnauthorizedCode>,
638 }
639 impl Builder {
640 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
642 self.message = Some(input.into());
643 self
644 }
645 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
647 self.message = input;
648 self
649 }
650 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::UnauthorizedCode) -> Self {
652 self.code = Some(input);
653 self
654 }
655 #[allow(missing_docs)] pub fn set_code(
657 mut self,
658 input: std::option::Option<crate::model::UnauthorizedCode>,
659 ) -> Self {
660 self.code = input;
661 self
662 }
663 pub fn build(self) -> crate::error::UnauthorizedError {
665 crate::error::UnauthorizedError {
666 message: self.message,
667 code: self.code,
668 }
669 }
670 }
671}
672impl UnauthorizedError {
673 pub fn builder() -> crate::error::unauthorized_error::Builder {
675 crate::error::unauthorized_error::Builder::default()
676 }
677}
678
679#[non_exhaustive]
681#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
682pub struct AccessDeniedError {
683 #[doc(hidden)]
685 pub message: std::option::Option<std::string::String>,
686 #[allow(missing_docs)] #[doc(hidden)]
688 pub code: std::option::Option<crate::model::AccessDeniedCode>,
689}
690impl AccessDeniedError {
691 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::AccessDeniedCode> {
693 self.code.as_ref()
694 }
695}
696impl AccessDeniedError {
697 pub fn message(&self) -> std::option::Option<&str> {
699 self.message.as_deref()
700 }
701}
702impl std::fmt::Display for AccessDeniedError {
703 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
704 write!(f, "AccessDeniedError [AccessDeniedException]")?;
705 if let Some(inner_6) = &self.message {
706 {
707 write!(f, ": {}", inner_6)?;
708 }
709 }
710 Ok(())
711 }
712}
713impl std::error::Error for AccessDeniedError {}
714pub mod access_denied_error {
716
717 #[non_exhaustive]
719 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
720 pub struct Builder {
721 pub(crate) message: std::option::Option<std::string::String>,
722 pub(crate) code: std::option::Option<crate::model::AccessDeniedCode>,
723 }
724 impl Builder {
725 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
727 self.message = Some(input.into());
728 self
729 }
730 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
732 self.message = input;
733 self
734 }
735 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::AccessDeniedCode) -> Self {
737 self.code = Some(input);
738 self
739 }
740 #[allow(missing_docs)] pub fn set_code(
742 mut self,
743 input: std::option::Option<crate::model::AccessDeniedCode>,
744 ) -> Self {
745 self.code = input;
746 self
747 }
748 pub fn build(self) -> crate::error::AccessDeniedError {
750 crate::error::AccessDeniedError {
751 message: self.message,
752 code: self.code,
753 }
754 }
755 }
756}
757impl AccessDeniedError {
758 pub fn builder() -> crate::error::access_denied_error::Builder {
760 crate::error::access_denied_error::Builder::default()
761 }
762}
763
764#[non_exhaustive]
766#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
767pub struct ValidationError {
768 #[doc(hidden)]
770 pub message: std::option::Option<std::string::String>,
771 #[doc(hidden)]
773 pub field_list: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
774}
775impl ValidationError {
776 pub fn field_list(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
778 self.field_list.as_deref()
779 }
780}
781impl ValidationError {
782 pub fn message(&self) -> std::option::Option<&str> {
784 self.message.as_deref()
785 }
786}
787impl std::fmt::Display for ValidationError {
788 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
789 write!(f, "ValidationError [ValidationException]")?;
790 if let Some(inner_7) = &self.message {
791 {
792 write!(f, ": {}", inner_7)?;
793 }
794 }
795 Ok(())
796 }
797}
798impl std::error::Error for ValidationError {}
799pub mod validation_error {
801
802 #[non_exhaustive]
804 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
805 pub struct Builder {
806 pub(crate) message: std::option::Option<std::string::String>,
807 pub(crate) field_list:
808 std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
809 }
810 impl Builder {
811 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
813 self.message = Some(input.into());
814 self
815 }
816 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
818 self.message = input;
819 self
820 }
821 pub fn field_list(mut self, input: crate::model::ValidationExceptionField) -> Self {
827 let mut v = self.field_list.unwrap_or_default();
828 v.push(input);
829 self.field_list = Some(v);
830 self
831 }
832 pub fn set_field_list(
834 mut self,
835 input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
836 ) -> Self {
837 self.field_list = input;
838 self
839 }
840 pub fn build(self) -> crate::error::ValidationError {
842 crate::error::ValidationError {
843 message: self.message,
844 field_list: self.field_list,
845 }
846 }
847 }
848}
849impl ValidationError {
850 pub fn builder() -> crate::error::validation_error::Builder {
852 crate::error::validation_error::Builder::default()
853 }
854}
855
856#[non_exhaustive]
858#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
859pub struct ThrottlingError {
860 #[doc(hidden)]
862 pub message: std::option::Option<std::string::String>,
863 #[allow(missing_docs)] #[doc(hidden)]
865 pub code: std::option::Option<crate::model::ThrottleCode>,
866}
867impl ThrottlingError {
868 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ThrottleCode> {
870 self.code.as_ref()
871 }
872}
873impl ThrottlingError {
874 pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
876 aws_smithy_types::retry::ErrorKind::ThrottlingError
877 }
878 pub fn message(&self) -> std::option::Option<&str> {
880 self.message.as_deref()
881 }
882}
883impl std::fmt::Display for ThrottlingError {
884 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
885 write!(f, "ThrottlingError [ThrottlingException]")?;
886 if let Some(inner_8) = &self.message {
887 {
888 write!(f, ": {}", inner_8)?;
889 }
890 }
891 Ok(())
892 }
893}
894impl std::error::Error for ThrottlingError {}
895pub mod throttling_error {
897
898 #[non_exhaustive]
900 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
901 pub struct Builder {
902 pub(crate) message: std::option::Option<std::string::String>,
903 pub(crate) code: std::option::Option<crate::model::ThrottleCode>,
904 }
905 impl Builder {
906 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
908 self.message = Some(input.into());
909 self
910 }
911 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
913 self.message = input;
914 self
915 }
916 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::ThrottleCode) -> Self {
918 self.code = Some(input);
919 self
920 }
921 #[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<crate::model::ThrottleCode>) -> Self {
923 self.code = input;
924 self
925 }
926 pub fn build(self) -> crate::error::ThrottlingError {
928 crate::error::ThrottlingError {
929 message: self.message,
930 code: self.code,
931 }
932 }
933 }
934}
935impl ThrottlingError {
936 pub fn builder() -> crate::error::throttling_error::Builder {
938 crate::error::throttling_error::Builder::default()
939 }
940}
941
942#[non_exhaustive]
944#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
945pub struct InternalFailureError {
946 #[doc(hidden)]
948 pub message: std::option::Option<std::string::String>,
949 #[allow(missing_docs)] #[doc(hidden)]
951 pub code: std::option::Option<crate::model::InternalFailureCode>,
952 #[allow(missing_docs)] #[doc(hidden)]
954 pub data: std::option::Option<crate::model::InternalFailureData>,
955}
956impl InternalFailureError {
957 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::InternalFailureCode> {
959 self.code.as_ref()
960 }
961 #[allow(missing_docs)] pub fn data(&self) -> std::option::Option<&crate::model::InternalFailureData> {
963 self.data.as_ref()
964 }
965}
966impl InternalFailureError {
967 pub fn message(&self) -> std::option::Option<&str> {
969 self.message.as_deref()
970 }
971}
972impl std::fmt::Display for InternalFailureError {
973 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
974 write!(f, "InternalFailureError [InternalFailureException]")?;
975 if let Some(inner_9) = &self.message {
976 {
977 write!(f, ": {}", inner_9)?;
978 }
979 }
980 Ok(())
981 }
982}
983impl std::error::Error for InternalFailureError {}
984pub mod internal_failure_error {
986
987 #[non_exhaustive]
989 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
990 pub struct Builder {
991 pub(crate) message: std::option::Option<std::string::String>,
992 pub(crate) code: std::option::Option<crate::model::InternalFailureCode>,
993 pub(crate) data: std::option::Option<crate::model::InternalFailureData>,
994 }
995 impl Builder {
996 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
998 self.message = Some(input.into());
999 self
1000 }
1001 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
1003 self.message = input;
1004 self
1005 }
1006 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::InternalFailureCode) -> Self {
1008 self.code = Some(input);
1009 self
1010 }
1011 #[allow(missing_docs)] pub fn set_code(
1013 mut self,
1014 input: std::option::Option<crate::model::InternalFailureCode>,
1015 ) -> Self {
1016 self.code = input;
1017 self
1018 }
1019 #[allow(missing_docs)] pub fn data(mut self, input: crate::model::InternalFailureData) -> Self {
1021 self.data = Some(input);
1022 self
1023 }
1024 #[allow(missing_docs)] pub fn set_data(
1026 mut self,
1027 input: std::option::Option<crate::model::InternalFailureData>,
1028 ) -> Self {
1029 self.data = input;
1030 self
1031 }
1032 pub fn build(self) -> crate::error::InternalFailureError {
1034 crate::error::InternalFailureError {
1035 message: self.message,
1036 code: self.code,
1037 data: self.data,
1038 }
1039 }
1040 }
1041}
1042impl InternalFailureError {
1043 pub fn builder() -> crate::error::internal_failure_error::Builder {
1045 crate::error::internal_failure_error::Builder::default()
1046 }
1047}
1048
1049#[non_exhaustive]
1051#[derive(std::fmt::Debug)]
1052pub struct ListPublicSharedGuideSamplesError {
1053 pub kind: ListPublicSharedGuideSamplesErrorKind,
1055 pub(crate) meta: aws_smithy_types::Error,
1057}
1058impl aws_smithy_http::result::CreateUnhandledError for ListPublicSharedGuideSamplesError {
1059 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1060 Self {
1061 kind: ListPublicSharedGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(
1062 source,
1063 )),
1064 meta: Default::default(),
1065 }
1066 }
1067}
1068#[non_exhaustive]
1070#[derive(std::fmt::Debug)]
1071pub enum ListPublicSharedGuideSamplesErrorKind {
1072 InternalFailureError(crate::error::InternalFailureError),
1074 ThrottlingError(crate::error::ThrottlingError),
1076 ValidationError(crate::error::ValidationError),
1078 AccessDeniedError(crate::error::AccessDeniedError),
1080 UnauthorizedError(crate::error::UnauthorizedError),
1082 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1084 Unhandled(crate::error::Unhandled),
1093}
1094impl std::fmt::Display for ListPublicSharedGuideSamplesError {
1095 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1096 match &self.kind {
1097 ListPublicSharedGuideSamplesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
1098 ListPublicSharedGuideSamplesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1099 ListPublicSharedGuideSamplesErrorKind::ValidationError(_inner) => _inner.fmt(f),
1100 ListPublicSharedGuideSamplesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
1101 ListPublicSharedGuideSamplesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1102 ListPublicSharedGuideSamplesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
1103 ListPublicSharedGuideSamplesErrorKind::Unhandled(_inner) => _inner.fmt(f),
1104 }
1105 }
1106}
1107impl aws_smithy_types::retry::ProvideErrorKind for ListPublicSharedGuideSamplesError {
1108 fn code(&self) -> Option<&str> {
1109 ListPublicSharedGuideSamplesError::code(self)
1110 }
1111 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1112 match &self.kind {
1113 ListPublicSharedGuideSamplesErrorKind::ThrottlingError(inner) => {
1114 Some(inner.retryable_error_kind())
1115 }
1116 _ => None,
1117 }
1118 }
1119}
1120impl ListPublicSharedGuideSamplesError {
1121 pub fn new(kind: ListPublicSharedGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
1123 Self { kind, meta }
1124 }
1125
1126 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1128 Self {
1129 kind: ListPublicSharedGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(
1130 err.into(),
1131 )),
1132 meta: Default::default(),
1133 }
1134 }
1135
1136 pub fn generic(err: aws_smithy_types::Error) -> Self {
1138 Self {
1139 meta: err.clone(),
1140 kind: ListPublicSharedGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(
1141 err.into(),
1142 )),
1143 }
1144 }
1145
1146 pub fn message(&self) -> Option<&str> {
1148 self.meta.message()
1149 }
1150
1151 pub fn meta(&self) -> &aws_smithy_types::Error {
1154 &self.meta
1155 }
1156
1157 pub fn request_id(&self) -> Option<&str> {
1159 self.meta.request_id()
1160 }
1161
1162 pub fn code(&self) -> Option<&str> {
1164 self.meta.code()
1165 }
1166 pub fn is_internal_failure_error(&self) -> bool {
1168 matches!(
1169 &self.kind,
1170 ListPublicSharedGuideSamplesErrorKind::InternalFailureError(_)
1171 )
1172 }
1173 pub fn is_throttling_error(&self) -> bool {
1175 matches!(
1176 &self.kind,
1177 ListPublicSharedGuideSamplesErrorKind::ThrottlingError(_)
1178 )
1179 }
1180 pub fn is_validation_error(&self) -> bool {
1182 matches!(
1183 &self.kind,
1184 ListPublicSharedGuideSamplesErrorKind::ValidationError(_)
1185 )
1186 }
1187 pub fn is_access_denied_error(&self) -> bool {
1189 matches!(
1190 &self.kind,
1191 ListPublicSharedGuideSamplesErrorKind::AccessDeniedError(_)
1192 )
1193 }
1194 pub fn is_unauthorized_error(&self) -> bool {
1196 matches!(
1197 &self.kind,
1198 ListPublicSharedGuideSamplesErrorKind::UnauthorizedError(_)
1199 )
1200 }
1201 pub fn is_resource_not_found_error(&self) -> bool {
1203 matches!(
1204 &self.kind,
1205 ListPublicSharedGuideSamplesErrorKind::ResourceNotFoundError(_)
1206 )
1207 }
1208}
1209impl std::error::Error for ListPublicSharedGuideSamplesError {
1210 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1211 match &self.kind {
1212 ListPublicSharedGuideSamplesErrorKind::InternalFailureError(_inner) => Some(_inner),
1213 ListPublicSharedGuideSamplesErrorKind::ThrottlingError(_inner) => Some(_inner),
1214 ListPublicSharedGuideSamplesErrorKind::ValidationError(_inner) => Some(_inner),
1215 ListPublicSharedGuideSamplesErrorKind::AccessDeniedError(_inner) => Some(_inner),
1216 ListPublicSharedGuideSamplesErrorKind::UnauthorizedError(_inner) => Some(_inner),
1217 ListPublicSharedGuideSamplesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
1218 ListPublicSharedGuideSamplesErrorKind::Unhandled(_inner) => Some(_inner),
1219 }
1220 }
1221}
1222
1223#[non_exhaustive]
1225#[derive(std::fmt::Debug)]
1226pub struct ListPublicSharedGuideAttachmentsError {
1227 pub kind: ListPublicSharedGuideAttachmentsErrorKind,
1229 pub(crate) meta: aws_smithy_types::Error,
1231}
1232impl aws_smithy_http::result::CreateUnhandledError for ListPublicSharedGuideAttachmentsError {
1233 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1234 Self {
1235 kind: ListPublicSharedGuideAttachmentsErrorKind::Unhandled(
1236 crate::error::Unhandled::new(source),
1237 ),
1238 meta: Default::default(),
1239 }
1240 }
1241}
1242#[non_exhaustive]
1244#[derive(std::fmt::Debug)]
1245pub enum ListPublicSharedGuideAttachmentsErrorKind {
1246 InternalFailureError(crate::error::InternalFailureError),
1248 ThrottlingError(crate::error::ThrottlingError),
1250 ValidationError(crate::error::ValidationError),
1252 AccessDeniedError(crate::error::AccessDeniedError),
1254 UnauthorizedError(crate::error::UnauthorizedError),
1256 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1258 Unhandled(crate::error::Unhandled),
1267}
1268impl std::fmt::Display for ListPublicSharedGuideAttachmentsError {
1269 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1270 match &self.kind {
1271 ListPublicSharedGuideAttachmentsErrorKind::InternalFailureError(_inner) => {
1272 _inner.fmt(f)
1273 }
1274 ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1275 ListPublicSharedGuideAttachmentsErrorKind::ValidationError(_inner) => _inner.fmt(f),
1276 ListPublicSharedGuideAttachmentsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
1277 ListPublicSharedGuideAttachmentsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1278 ListPublicSharedGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => {
1279 _inner.fmt(f)
1280 }
1281 ListPublicSharedGuideAttachmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
1282 }
1283 }
1284}
1285impl aws_smithy_types::retry::ProvideErrorKind for ListPublicSharedGuideAttachmentsError {
1286 fn code(&self) -> Option<&str> {
1287 ListPublicSharedGuideAttachmentsError::code(self)
1288 }
1289 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1290 match &self.kind {
1291 ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError(inner) => {
1292 Some(inner.retryable_error_kind())
1293 }
1294 _ => None,
1295 }
1296 }
1297}
1298impl ListPublicSharedGuideAttachmentsError {
1299 pub fn new(
1301 kind: ListPublicSharedGuideAttachmentsErrorKind,
1302 meta: aws_smithy_types::Error,
1303 ) -> Self {
1304 Self { kind, meta }
1305 }
1306
1307 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1309 Self {
1310 kind: ListPublicSharedGuideAttachmentsErrorKind::Unhandled(
1311 crate::error::Unhandled::new(err.into()),
1312 ),
1313 meta: Default::default(),
1314 }
1315 }
1316
1317 pub fn generic(err: aws_smithy_types::Error) -> Self {
1319 Self {
1320 meta: err.clone(),
1321 kind: ListPublicSharedGuideAttachmentsErrorKind::Unhandled(
1322 crate::error::Unhandled::new(err.into()),
1323 ),
1324 }
1325 }
1326
1327 pub fn message(&self) -> Option<&str> {
1329 self.meta.message()
1330 }
1331
1332 pub fn meta(&self) -> &aws_smithy_types::Error {
1335 &self.meta
1336 }
1337
1338 pub fn request_id(&self) -> Option<&str> {
1340 self.meta.request_id()
1341 }
1342
1343 pub fn code(&self) -> Option<&str> {
1345 self.meta.code()
1346 }
1347 pub fn is_internal_failure_error(&self) -> bool {
1349 matches!(
1350 &self.kind,
1351 ListPublicSharedGuideAttachmentsErrorKind::InternalFailureError(_)
1352 )
1353 }
1354 pub fn is_throttling_error(&self) -> bool {
1356 matches!(
1357 &self.kind,
1358 ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError(_)
1359 )
1360 }
1361 pub fn is_validation_error(&self) -> bool {
1363 matches!(
1364 &self.kind,
1365 ListPublicSharedGuideAttachmentsErrorKind::ValidationError(_)
1366 )
1367 }
1368 pub fn is_access_denied_error(&self) -> bool {
1370 matches!(
1371 &self.kind,
1372 ListPublicSharedGuideAttachmentsErrorKind::AccessDeniedError(_)
1373 )
1374 }
1375 pub fn is_unauthorized_error(&self) -> bool {
1377 matches!(
1378 &self.kind,
1379 ListPublicSharedGuideAttachmentsErrorKind::UnauthorizedError(_)
1380 )
1381 }
1382 pub fn is_resource_not_found_error(&self) -> bool {
1384 matches!(
1385 &self.kind,
1386 ListPublicSharedGuideAttachmentsErrorKind::ResourceNotFoundError(_)
1387 )
1388 }
1389}
1390impl std::error::Error for ListPublicSharedGuideAttachmentsError {
1391 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1392 match &self.kind {
1393 ListPublicSharedGuideAttachmentsErrorKind::InternalFailureError(_inner) => Some(_inner),
1394 ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError(_inner) => Some(_inner),
1395 ListPublicSharedGuideAttachmentsErrorKind::ValidationError(_inner) => Some(_inner),
1396 ListPublicSharedGuideAttachmentsErrorKind::AccessDeniedError(_inner) => Some(_inner),
1397 ListPublicSharedGuideAttachmentsErrorKind::UnauthorizedError(_inner) => Some(_inner),
1398 ListPublicSharedGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => {
1399 Some(_inner)
1400 }
1401 ListPublicSharedGuideAttachmentsErrorKind::Unhandled(_inner) => Some(_inner),
1402 }
1403 }
1404}
1405
1406#[non_exhaustive]
1408#[derive(std::fmt::Debug)]
1409pub struct GetPublicSharedGuideError {
1410 pub kind: GetPublicSharedGuideErrorKind,
1412 pub(crate) meta: aws_smithy_types::Error,
1414}
1415impl aws_smithy_http::result::CreateUnhandledError for GetPublicSharedGuideError {
1416 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1417 Self {
1418 kind: GetPublicSharedGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
1419 meta: Default::default(),
1420 }
1421 }
1422}
1423#[non_exhaustive]
1425#[derive(std::fmt::Debug)]
1426pub enum GetPublicSharedGuideErrorKind {
1427 InternalFailureError(crate::error::InternalFailureError),
1429 ThrottlingError(crate::error::ThrottlingError),
1431 ValidationError(crate::error::ValidationError),
1433 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1435 RequestTooLargeError(crate::error::RequestTooLargeError),
1437 Unhandled(crate::error::Unhandled),
1446}
1447impl std::fmt::Display for GetPublicSharedGuideError {
1448 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1449 match &self.kind {
1450 GetPublicSharedGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
1451 GetPublicSharedGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1452 GetPublicSharedGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
1453 GetPublicSharedGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
1454 GetPublicSharedGuideErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
1455 GetPublicSharedGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
1456 }
1457 }
1458}
1459impl aws_smithy_types::retry::ProvideErrorKind for GetPublicSharedGuideError {
1460 fn code(&self) -> Option<&str> {
1461 GetPublicSharedGuideError::code(self)
1462 }
1463 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1464 match &self.kind {
1465 GetPublicSharedGuideErrorKind::ThrottlingError(inner) => {
1466 Some(inner.retryable_error_kind())
1467 }
1468 _ => None,
1469 }
1470 }
1471}
1472impl GetPublicSharedGuideError {
1473 pub fn new(kind: GetPublicSharedGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
1475 Self { kind, meta }
1476 }
1477
1478 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1480 Self {
1481 kind: GetPublicSharedGuideErrorKind::Unhandled(crate::error::Unhandled::new(
1482 err.into(),
1483 )),
1484 meta: Default::default(),
1485 }
1486 }
1487
1488 pub fn generic(err: aws_smithy_types::Error) -> Self {
1490 Self {
1491 meta: err.clone(),
1492 kind: GetPublicSharedGuideErrorKind::Unhandled(crate::error::Unhandled::new(
1493 err.into(),
1494 )),
1495 }
1496 }
1497
1498 pub fn message(&self) -> Option<&str> {
1500 self.meta.message()
1501 }
1502
1503 pub fn meta(&self) -> &aws_smithy_types::Error {
1506 &self.meta
1507 }
1508
1509 pub fn request_id(&self) -> Option<&str> {
1511 self.meta.request_id()
1512 }
1513
1514 pub fn code(&self) -> Option<&str> {
1516 self.meta.code()
1517 }
1518 pub fn is_internal_failure_error(&self) -> bool {
1520 matches!(
1521 &self.kind,
1522 GetPublicSharedGuideErrorKind::InternalFailureError(_)
1523 )
1524 }
1525 pub fn is_throttling_error(&self) -> bool {
1527 matches!(
1528 &self.kind,
1529 GetPublicSharedGuideErrorKind::ThrottlingError(_)
1530 )
1531 }
1532 pub fn is_validation_error(&self) -> bool {
1534 matches!(
1535 &self.kind,
1536 GetPublicSharedGuideErrorKind::ValidationError(_)
1537 )
1538 }
1539 pub fn is_resource_not_found_error(&self) -> bool {
1541 matches!(
1542 &self.kind,
1543 GetPublicSharedGuideErrorKind::ResourceNotFoundError(_)
1544 )
1545 }
1546 pub fn is_request_too_large_error(&self) -> bool {
1548 matches!(
1549 &self.kind,
1550 GetPublicSharedGuideErrorKind::RequestTooLargeError(_)
1551 )
1552 }
1553}
1554impl std::error::Error for GetPublicSharedGuideError {
1555 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1556 match &self.kind {
1557 GetPublicSharedGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
1558 GetPublicSharedGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
1559 GetPublicSharedGuideErrorKind::ValidationError(_inner) => Some(_inner),
1560 GetPublicSharedGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
1561 GetPublicSharedGuideErrorKind::RequestTooLargeError(_inner) => Some(_inner),
1562 GetPublicSharedGuideErrorKind::Unhandled(_inner) => Some(_inner),
1563 }
1564 }
1565}
1566
1567#[non_exhaustive]
1569#[derive(std::fmt::Debug)]
1570pub struct ListPublicGuidesError {
1571 pub kind: ListPublicGuidesErrorKind,
1573 pub(crate) meta: aws_smithy_types::Error,
1575}
1576impl aws_smithy_http::result::CreateUnhandledError for ListPublicGuidesError {
1577 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1578 Self {
1579 kind: ListPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
1580 meta: Default::default(),
1581 }
1582 }
1583}
1584#[non_exhaustive]
1586#[derive(std::fmt::Debug)]
1587pub enum ListPublicGuidesErrorKind {
1588 InternalFailureError(crate::error::InternalFailureError),
1590 ThrottlingError(crate::error::ThrottlingError),
1592 ValidationError(crate::error::ValidationError),
1594 BadRequestError(crate::error::BadRequestError),
1596 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1598 RequestTooLargeError(crate::error::RequestTooLargeError),
1600 Unhandled(crate::error::Unhandled),
1609}
1610impl std::fmt::Display for ListPublicGuidesError {
1611 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1612 match &self.kind {
1613 ListPublicGuidesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
1614 ListPublicGuidesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1615 ListPublicGuidesErrorKind::ValidationError(_inner) => _inner.fmt(f),
1616 ListPublicGuidesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
1617 ListPublicGuidesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
1618 ListPublicGuidesErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
1619 ListPublicGuidesErrorKind::Unhandled(_inner) => _inner.fmt(f),
1620 }
1621 }
1622}
1623impl aws_smithy_types::retry::ProvideErrorKind for ListPublicGuidesError {
1624 fn code(&self) -> Option<&str> {
1625 ListPublicGuidesError::code(self)
1626 }
1627 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1628 match &self.kind {
1629 ListPublicGuidesErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
1630 _ => None,
1631 }
1632 }
1633}
1634impl ListPublicGuidesError {
1635 pub fn new(kind: ListPublicGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
1637 Self { kind, meta }
1638 }
1639
1640 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1642 Self {
1643 kind: ListPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
1644 meta: Default::default(),
1645 }
1646 }
1647
1648 pub fn generic(err: aws_smithy_types::Error) -> Self {
1650 Self {
1651 meta: err.clone(),
1652 kind: ListPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
1653 }
1654 }
1655
1656 pub fn message(&self) -> Option<&str> {
1658 self.meta.message()
1659 }
1660
1661 pub fn meta(&self) -> &aws_smithy_types::Error {
1664 &self.meta
1665 }
1666
1667 pub fn request_id(&self) -> Option<&str> {
1669 self.meta.request_id()
1670 }
1671
1672 pub fn code(&self) -> Option<&str> {
1674 self.meta.code()
1675 }
1676 pub fn is_internal_failure_error(&self) -> bool {
1678 matches!(
1679 &self.kind,
1680 ListPublicGuidesErrorKind::InternalFailureError(_)
1681 )
1682 }
1683 pub fn is_throttling_error(&self) -> bool {
1685 matches!(&self.kind, ListPublicGuidesErrorKind::ThrottlingError(_))
1686 }
1687 pub fn is_validation_error(&self) -> bool {
1689 matches!(&self.kind, ListPublicGuidesErrorKind::ValidationError(_))
1690 }
1691 pub fn is_bad_request_error(&self) -> bool {
1693 matches!(&self.kind, ListPublicGuidesErrorKind::BadRequestError(_))
1694 }
1695 pub fn is_resource_not_found_error(&self) -> bool {
1697 matches!(
1698 &self.kind,
1699 ListPublicGuidesErrorKind::ResourceNotFoundError(_)
1700 )
1701 }
1702 pub fn is_request_too_large_error(&self) -> bool {
1704 matches!(
1705 &self.kind,
1706 ListPublicGuidesErrorKind::RequestTooLargeError(_)
1707 )
1708 }
1709}
1710impl std::error::Error for ListPublicGuidesError {
1711 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1712 match &self.kind {
1713 ListPublicGuidesErrorKind::InternalFailureError(_inner) => Some(_inner),
1714 ListPublicGuidesErrorKind::ThrottlingError(_inner) => Some(_inner),
1715 ListPublicGuidesErrorKind::ValidationError(_inner) => Some(_inner),
1716 ListPublicGuidesErrorKind::BadRequestError(_inner) => Some(_inner),
1717 ListPublicGuidesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
1718 ListPublicGuidesErrorKind::RequestTooLargeError(_inner) => Some(_inner),
1719 ListPublicGuidesErrorKind::Unhandled(_inner) => Some(_inner),
1720 }
1721 }
1722}
1723
1724#[non_exhaustive]
1726#[derive(std::fmt::Debug)]
1727pub struct GetPublicGuideError {
1728 pub kind: GetPublicGuideErrorKind,
1730 pub(crate) meta: aws_smithy_types::Error,
1732}
1733impl aws_smithy_http::result::CreateUnhandledError for GetPublicGuideError {
1734 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1735 Self {
1736 kind: GetPublicGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
1737 meta: Default::default(),
1738 }
1739 }
1740}
1741#[non_exhaustive]
1743#[derive(std::fmt::Debug)]
1744pub enum GetPublicGuideErrorKind {
1745 InternalFailureError(crate::error::InternalFailureError),
1747 ThrottlingError(crate::error::ThrottlingError),
1749 ValidationError(crate::error::ValidationError),
1751 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1753 RequestTooLargeError(crate::error::RequestTooLargeError),
1755 Unhandled(crate::error::Unhandled),
1764}
1765impl std::fmt::Display for GetPublicGuideError {
1766 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1767 match &self.kind {
1768 GetPublicGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
1769 GetPublicGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1770 GetPublicGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
1771 GetPublicGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
1772 GetPublicGuideErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
1773 GetPublicGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
1774 }
1775 }
1776}
1777impl aws_smithy_types::retry::ProvideErrorKind for GetPublicGuideError {
1778 fn code(&self) -> Option<&str> {
1779 GetPublicGuideError::code(self)
1780 }
1781 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1782 match &self.kind {
1783 GetPublicGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
1784 _ => None,
1785 }
1786 }
1787}
1788impl GetPublicGuideError {
1789 pub fn new(kind: GetPublicGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
1791 Self { kind, meta }
1792 }
1793
1794 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1796 Self {
1797 kind: GetPublicGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
1798 meta: Default::default(),
1799 }
1800 }
1801
1802 pub fn generic(err: aws_smithy_types::Error) -> Self {
1804 Self {
1805 meta: err.clone(),
1806 kind: GetPublicGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
1807 }
1808 }
1809
1810 pub fn message(&self) -> Option<&str> {
1812 self.meta.message()
1813 }
1814
1815 pub fn meta(&self) -> &aws_smithy_types::Error {
1818 &self.meta
1819 }
1820
1821 pub fn request_id(&self) -> Option<&str> {
1823 self.meta.request_id()
1824 }
1825
1826 pub fn code(&self) -> Option<&str> {
1828 self.meta.code()
1829 }
1830 pub fn is_internal_failure_error(&self) -> bool {
1832 matches!(&self.kind, GetPublicGuideErrorKind::InternalFailureError(_))
1833 }
1834 pub fn is_throttling_error(&self) -> bool {
1836 matches!(&self.kind, GetPublicGuideErrorKind::ThrottlingError(_))
1837 }
1838 pub fn is_validation_error(&self) -> bool {
1840 matches!(&self.kind, GetPublicGuideErrorKind::ValidationError(_))
1841 }
1842 pub fn is_resource_not_found_error(&self) -> bool {
1844 matches!(
1845 &self.kind,
1846 GetPublicGuideErrorKind::ResourceNotFoundError(_)
1847 )
1848 }
1849 pub fn is_request_too_large_error(&self) -> bool {
1851 matches!(&self.kind, GetPublicGuideErrorKind::RequestTooLargeError(_))
1852 }
1853}
1854impl std::error::Error for GetPublicGuideError {
1855 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
1856 match &self.kind {
1857 GetPublicGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
1858 GetPublicGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
1859 GetPublicGuideErrorKind::ValidationError(_inner) => Some(_inner),
1860 GetPublicGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
1861 GetPublicGuideErrorKind::RequestTooLargeError(_inner) => Some(_inner),
1862 GetPublicGuideErrorKind::Unhandled(_inner) => Some(_inner),
1863 }
1864 }
1865}
1866
1867#[non_exhaustive]
1869#[derive(std::fmt::Debug)]
1870pub struct ListPublicGuideSamplesError {
1871 pub kind: ListPublicGuideSamplesErrorKind,
1873 pub(crate) meta: aws_smithy_types::Error,
1875}
1876impl aws_smithy_http::result::CreateUnhandledError for ListPublicGuideSamplesError {
1877 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
1878 Self {
1879 kind: ListPublicGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
1880 meta: Default::default(),
1881 }
1882 }
1883}
1884#[non_exhaustive]
1886#[derive(std::fmt::Debug)]
1887pub enum ListPublicGuideSamplesErrorKind {
1888 InternalFailureError(crate::error::InternalFailureError),
1890 ThrottlingError(crate::error::ThrottlingError),
1892 ValidationError(crate::error::ValidationError),
1894 AccessDeniedError(crate::error::AccessDeniedError),
1896 UnauthorizedError(crate::error::UnauthorizedError),
1898 ResourceNotFoundError(crate::error::ResourceNotFoundError),
1900 Unhandled(crate::error::Unhandled),
1909}
1910impl std::fmt::Display for ListPublicGuideSamplesError {
1911 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1912 match &self.kind {
1913 ListPublicGuideSamplesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
1914 ListPublicGuideSamplesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
1915 ListPublicGuideSamplesErrorKind::ValidationError(_inner) => _inner.fmt(f),
1916 ListPublicGuideSamplesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
1917 ListPublicGuideSamplesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
1918 ListPublicGuideSamplesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
1919 ListPublicGuideSamplesErrorKind::Unhandled(_inner) => _inner.fmt(f),
1920 }
1921 }
1922}
1923impl aws_smithy_types::retry::ProvideErrorKind for ListPublicGuideSamplesError {
1924 fn code(&self) -> Option<&str> {
1925 ListPublicGuideSamplesError::code(self)
1926 }
1927 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
1928 match &self.kind {
1929 ListPublicGuideSamplesErrorKind::ThrottlingError(inner) => {
1930 Some(inner.retryable_error_kind())
1931 }
1932 _ => None,
1933 }
1934 }
1935}
1936impl ListPublicGuideSamplesError {
1937 pub fn new(kind: ListPublicGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
1939 Self { kind, meta }
1940 }
1941
1942 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
1944 Self {
1945 kind: ListPublicGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(
1946 err.into(),
1947 )),
1948 meta: Default::default(),
1949 }
1950 }
1951
1952 pub fn generic(err: aws_smithy_types::Error) -> Self {
1954 Self {
1955 meta: err.clone(),
1956 kind: ListPublicGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(
1957 err.into(),
1958 )),
1959 }
1960 }
1961
1962 pub fn message(&self) -> Option<&str> {
1964 self.meta.message()
1965 }
1966
1967 pub fn meta(&self) -> &aws_smithy_types::Error {
1970 &self.meta
1971 }
1972
1973 pub fn request_id(&self) -> Option<&str> {
1975 self.meta.request_id()
1976 }
1977
1978 pub fn code(&self) -> Option<&str> {
1980 self.meta.code()
1981 }
1982 pub fn is_internal_failure_error(&self) -> bool {
1984 matches!(
1985 &self.kind,
1986 ListPublicGuideSamplesErrorKind::InternalFailureError(_)
1987 )
1988 }
1989 pub fn is_throttling_error(&self) -> bool {
1991 matches!(
1992 &self.kind,
1993 ListPublicGuideSamplesErrorKind::ThrottlingError(_)
1994 )
1995 }
1996 pub fn is_validation_error(&self) -> bool {
1998 matches!(
1999 &self.kind,
2000 ListPublicGuideSamplesErrorKind::ValidationError(_)
2001 )
2002 }
2003 pub fn is_access_denied_error(&self) -> bool {
2005 matches!(
2006 &self.kind,
2007 ListPublicGuideSamplesErrorKind::AccessDeniedError(_)
2008 )
2009 }
2010 pub fn is_unauthorized_error(&self) -> bool {
2012 matches!(
2013 &self.kind,
2014 ListPublicGuideSamplesErrorKind::UnauthorizedError(_)
2015 )
2016 }
2017 pub fn is_resource_not_found_error(&self) -> bool {
2019 matches!(
2020 &self.kind,
2021 ListPublicGuideSamplesErrorKind::ResourceNotFoundError(_)
2022 )
2023 }
2024}
2025impl std::error::Error for ListPublicGuideSamplesError {
2026 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2027 match &self.kind {
2028 ListPublicGuideSamplesErrorKind::InternalFailureError(_inner) => Some(_inner),
2029 ListPublicGuideSamplesErrorKind::ThrottlingError(_inner) => Some(_inner),
2030 ListPublicGuideSamplesErrorKind::ValidationError(_inner) => Some(_inner),
2031 ListPublicGuideSamplesErrorKind::AccessDeniedError(_inner) => Some(_inner),
2032 ListPublicGuideSamplesErrorKind::UnauthorizedError(_inner) => Some(_inner),
2033 ListPublicGuideSamplesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2034 ListPublicGuideSamplesErrorKind::Unhandled(_inner) => Some(_inner),
2035 }
2036 }
2037}
2038
2039#[non_exhaustive]
2041#[derive(std::fmt::Debug)]
2042pub struct ListPublicGuideAttachmentsError {
2043 pub kind: ListPublicGuideAttachmentsErrorKind,
2045 pub(crate) meta: aws_smithy_types::Error,
2047}
2048impl aws_smithy_http::result::CreateUnhandledError for ListPublicGuideAttachmentsError {
2049 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2050 Self {
2051 kind: ListPublicGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(
2052 source,
2053 )),
2054 meta: Default::default(),
2055 }
2056 }
2057}
2058#[non_exhaustive]
2060#[derive(std::fmt::Debug)]
2061pub enum ListPublicGuideAttachmentsErrorKind {
2062 InternalFailureError(crate::error::InternalFailureError),
2064 ThrottlingError(crate::error::ThrottlingError),
2066 ValidationError(crate::error::ValidationError),
2068 AccessDeniedError(crate::error::AccessDeniedError),
2070 UnauthorizedError(crate::error::UnauthorizedError),
2072 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2074 Unhandled(crate::error::Unhandled),
2083}
2084impl std::fmt::Display for ListPublicGuideAttachmentsError {
2085 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2086 match &self.kind {
2087 ListPublicGuideAttachmentsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2088 ListPublicGuideAttachmentsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2089 ListPublicGuideAttachmentsErrorKind::ValidationError(_inner) => _inner.fmt(f),
2090 ListPublicGuideAttachmentsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2091 ListPublicGuideAttachmentsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2092 ListPublicGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2093 ListPublicGuideAttachmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
2094 }
2095 }
2096}
2097impl aws_smithy_types::retry::ProvideErrorKind for ListPublicGuideAttachmentsError {
2098 fn code(&self) -> Option<&str> {
2099 ListPublicGuideAttachmentsError::code(self)
2100 }
2101 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2102 match &self.kind {
2103 ListPublicGuideAttachmentsErrorKind::ThrottlingError(inner) => {
2104 Some(inner.retryable_error_kind())
2105 }
2106 _ => None,
2107 }
2108 }
2109}
2110impl ListPublicGuideAttachmentsError {
2111 pub fn new(kind: ListPublicGuideAttachmentsErrorKind, meta: aws_smithy_types::Error) -> Self {
2113 Self { kind, meta }
2114 }
2115
2116 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2118 Self {
2119 kind: ListPublicGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(
2120 err.into(),
2121 )),
2122 meta: Default::default(),
2123 }
2124 }
2125
2126 pub fn generic(err: aws_smithy_types::Error) -> Self {
2128 Self {
2129 meta: err.clone(),
2130 kind: ListPublicGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(
2131 err.into(),
2132 )),
2133 }
2134 }
2135
2136 pub fn message(&self) -> Option<&str> {
2138 self.meta.message()
2139 }
2140
2141 pub fn meta(&self) -> &aws_smithy_types::Error {
2144 &self.meta
2145 }
2146
2147 pub fn request_id(&self) -> Option<&str> {
2149 self.meta.request_id()
2150 }
2151
2152 pub fn code(&self) -> Option<&str> {
2154 self.meta.code()
2155 }
2156 pub fn is_internal_failure_error(&self) -> bool {
2158 matches!(
2159 &self.kind,
2160 ListPublicGuideAttachmentsErrorKind::InternalFailureError(_)
2161 )
2162 }
2163 pub fn is_throttling_error(&self) -> bool {
2165 matches!(
2166 &self.kind,
2167 ListPublicGuideAttachmentsErrorKind::ThrottlingError(_)
2168 )
2169 }
2170 pub fn is_validation_error(&self) -> bool {
2172 matches!(
2173 &self.kind,
2174 ListPublicGuideAttachmentsErrorKind::ValidationError(_)
2175 )
2176 }
2177 pub fn is_access_denied_error(&self) -> bool {
2179 matches!(
2180 &self.kind,
2181 ListPublicGuideAttachmentsErrorKind::AccessDeniedError(_)
2182 )
2183 }
2184 pub fn is_unauthorized_error(&self) -> bool {
2186 matches!(
2187 &self.kind,
2188 ListPublicGuideAttachmentsErrorKind::UnauthorizedError(_)
2189 )
2190 }
2191 pub fn is_resource_not_found_error(&self) -> bool {
2193 matches!(
2194 &self.kind,
2195 ListPublicGuideAttachmentsErrorKind::ResourceNotFoundError(_)
2196 )
2197 }
2198}
2199impl std::error::Error for ListPublicGuideAttachmentsError {
2200 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2201 match &self.kind {
2202 ListPublicGuideAttachmentsErrorKind::InternalFailureError(_inner) => Some(_inner),
2203 ListPublicGuideAttachmentsErrorKind::ThrottlingError(_inner) => Some(_inner),
2204 ListPublicGuideAttachmentsErrorKind::ValidationError(_inner) => Some(_inner),
2205 ListPublicGuideAttachmentsErrorKind::AccessDeniedError(_inner) => Some(_inner),
2206 ListPublicGuideAttachmentsErrorKind::UnauthorizedError(_inner) => Some(_inner),
2207 ListPublicGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2208 ListPublicGuideAttachmentsErrorKind::Unhandled(_inner) => Some(_inner),
2209 }
2210 }
2211}
2212
2213#[non_exhaustive]
2215#[derive(std::fmt::Debug)]
2216pub struct GetPublicAccountConfigError {
2217 pub kind: GetPublicAccountConfigErrorKind,
2219 pub(crate) meta: aws_smithy_types::Error,
2221}
2222impl aws_smithy_http::result::CreateUnhandledError for GetPublicAccountConfigError {
2223 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2224 Self {
2225 kind: GetPublicAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
2226 meta: Default::default(),
2227 }
2228 }
2229}
2230#[non_exhaustive]
2232#[derive(std::fmt::Debug)]
2233pub enum GetPublicAccountConfigErrorKind {
2234 InternalFailureError(crate::error::InternalFailureError),
2236 ThrottlingError(crate::error::ThrottlingError),
2238 ValidationError(crate::error::ValidationError),
2240 AccessDeniedError(crate::error::AccessDeniedError),
2242 UnauthorizedError(crate::error::UnauthorizedError),
2244 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2246 RequestTooLargeError(crate::error::RequestTooLargeError),
2248 Unhandled(crate::error::Unhandled),
2257}
2258impl std::fmt::Display for GetPublicAccountConfigError {
2259 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2260 match &self.kind {
2261 GetPublicAccountConfigErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2262 GetPublicAccountConfigErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2263 GetPublicAccountConfigErrorKind::ValidationError(_inner) => _inner.fmt(f),
2264 GetPublicAccountConfigErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2265 GetPublicAccountConfigErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2266 GetPublicAccountConfigErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2267 GetPublicAccountConfigErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
2268 GetPublicAccountConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
2269 }
2270 }
2271}
2272impl aws_smithy_types::retry::ProvideErrorKind for GetPublicAccountConfigError {
2273 fn code(&self) -> Option<&str> {
2274 GetPublicAccountConfigError::code(self)
2275 }
2276 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2277 match &self.kind {
2278 GetPublicAccountConfigErrorKind::ThrottlingError(inner) => {
2279 Some(inner.retryable_error_kind())
2280 }
2281 _ => None,
2282 }
2283 }
2284}
2285impl GetPublicAccountConfigError {
2286 pub fn new(kind: GetPublicAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
2288 Self { kind, meta }
2289 }
2290
2291 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2293 Self {
2294 kind: GetPublicAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(
2295 err.into(),
2296 )),
2297 meta: Default::default(),
2298 }
2299 }
2300
2301 pub fn generic(err: aws_smithy_types::Error) -> Self {
2303 Self {
2304 meta: err.clone(),
2305 kind: GetPublicAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(
2306 err.into(),
2307 )),
2308 }
2309 }
2310
2311 pub fn message(&self) -> Option<&str> {
2313 self.meta.message()
2314 }
2315
2316 pub fn meta(&self) -> &aws_smithy_types::Error {
2319 &self.meta
2320 }
2321
2322 pub fn request_id(&self) -> Option<&str> {
2324 self.meta.request_id()
2325 }
2326
2327 pub fn code(&self) -> Option<&str> {
2329 self.meta.code()
2330 }
2331 pub fn is_internal_failure_error(&self) -> bool {
2333 matches!(
2334 &self.kind,
2335 GetPublicAccountConfigErrorKind::InternalFailureError(_)
2336 )
2337 }
2338 pub fn is_throttling_error(&self) -> bool {
2340 matches!(
2341 &self.kind,
2342 GetPublicAccountConfigErrorKind::ThrottlingError(_)
2343 )
2344 }
2345 pub fn is_validation_error(&self) -> bool {
2347 matches!(
2348 &self.kind,
2349 GetPublicAccountConfigErrorKind::ValidationError(_)
2350 )
2351 }
2352 pub fn is_access_denied_error(&self) -> bool {
2354 matches!(
2355 &self.kind,
2356 GetPublicAccountConfigErrorKind::AccessDeniedError(_)
2357 )
2358 }
2359 pub fn is_unauthorized_error(&self) -> bool {
2361 matches!(
2362 &self.kind,
2363 GetPublicAccountConfigErrorKind::UnauthorizedError(_)
2364 )
2365 }
2366 pub fn is_resource_not_found_error(&self) -> bool {
2368 matches!(
2369 &self.kind,
2370 GetPublicAccountConfigErrorKind::ResourceNotFoundError(_)
2371 )
2372 }
2373 pub fn is_request_too_large_error(&self) -> bool {
2375 matches!(
2376 &self.kind,
2377 GetPublicAccountConfigErrorKind::RequestTooLargeError(_)
2378 )
2379 }
2380}
2381impl std::error::Error for GetPublicAccountConfigError {
2382 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2383 match &self.kind {
2384 GetPublicAccountConfigErrorKind::InternalFailureError(_inner) => Some(_inner),
2385 GetPublicAccountConfigErrorKind::ThrottlingError(_inner) => Some(_inner),
2386 GetPublicAccountConfigErrorKind::ValidationError(_inner) => Some(_inner),
2387 GetPublicAccountConfigErrorKind::AccessDeniedError(_inner) => Some(_inner),
2388 GetPublicAccountConfigErrorKind::UnauthorizedError(_inner) => Some(_inner),
2389 GetPublicAccountConfigErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2390 GetPublicAccountConfigErrorKind::RequestTooLargeError(_inner) => Some(_inner),
2391 GetPublicAccountConfigErrorKind::Unhandled(_inner) => Some(_inner),
2392 }
2393 }
2394}
2395
2396#[non_exhaustive]
2398#[derive(std::fmt::Debug)]
2399pub struct GetGuidesNetworkError {
2400 pub kind: GetGuidesNetworkErrorKind,
2402 pub(crate) meta: aws_smithy_types::Error,
2404}
2405impl aws_smithy_http::result::CreateUnhandledError for GetGuidesNetworkError {
2406 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2407 Self {
2408 kind: GetGuidesNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
2409 meta: Default::default(),
2410 }
2411 }
2412}
2413#[non_exhaustive]
2415#[derive(std::fmt::Debug)]
2416pub enum GetGuidesNetworkErrorKind {
2417 InternalFailureError(crate::error::InternalFailureError),
2419 ThrottlingError(crate::error::ThrottlingError),
2421 ValidationError(crate::error::ValidationError),
2423 AccessDeniedError(crate::error::AccessDeniedError),
2425 UnauthorizedError(crate::error::UnauthorizedError),
2427 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2429 Unhandled(crate::error::Unhandled),
2438}
2439impl std::fmt::Display for GetGuidesNetworkError {
2440 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2441 match &self.kind {
2442 GetGuidesNetworkErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2443 GetGuidesNetworkErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2444 GetGuidesNetworkErrorKind::ValidationError(_inner) => _inner.fmt(f),
2445 GetGuidesNetworkErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2446 GetGuidesNetworkErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2447 GetGuidesNetworkErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2448 GetGuidesNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
2449 }
2450 }
2451}
2452impl aws_smithy_types::retry::ProvideErrorKind for GetGuidesNetworkError {
2453 fn code(&self) -> Option<&str> {
2454 GetGuidesNetworkError::code(self)
2455 }
2456 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2457 match &self.kind {
2458 GetGuidesNetworkErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
2459 _ => None,
2460 }
2461 }
2462}
2463impl GetGuidesNetworkError {
2464 pub fn new(kind: GetGuidesNetworkErrorKind, meta: aws_smithy_types::Error) -> Self {
2466 Self { kind, meta }
2467 }
2468
2469 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2471 Self {
2472 kind: GetGuidesNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2473 meta: Default::default(),
2474 }
2475 }
2476
2477 pub fn generic(err: aws_smithy_types::Error) -> Self {
2479 Self {
2480 meta: err.clone(),
2481 kind: GetGuidesNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2482 }
2483 }
2484
2485 pub fn message(&self) -> Option<&str> {
2487 self.meta.message()
2488 }
2489
2490 pub fn meta(&self) -> &aws_smithy_types::Error {
2493 &self.meta
2494 }
2495
2496 pub fn request_id(&self) -> Option<&str> {
2498 self.meta.request_id()
2499 }
2500
2501 pub fn code(&self) -> Option<&str> {
2503 self.meta.code()
2504 }
2505 pub fn is_internal_failure_error(&self) -> bool {
2507 matches!(
2508 &self.kind,
2509 GetGuidesNetworkErrorKind::InternalFailureError(_)
2510 )
2511 }
2512 pub fn is_throttling_error(&self) -> bool {
2514 matches!(&self.kind, GetGuidesNetworkErrorKind::ThrottlingError(_))
2515 }
2516 pub fn is_validation_error(&self) -> bool {
2518 matches!(&self.kind, GetGuidesNetworkErrorKind::ValidationError(_))
2519 }
2520 pub fn is_access_denied_error(&self) -> bool {
2522 matches!(&self.kind, GetGuidesNetworkErrorKind::AccessDeniedError(_))
2523 }
2524 pub fn is_unauthorized_error(&self) -> bool {
2526 matches!(&self.kind, GetGuidesNetworkErrorKind::UnauthorizedError(_))
2527 }
2528 pub fn is_resource_not_found_error(&self) -> bool {
2530 matches!(
2531 &self.kind,
2532 GetGuidesNetworkErrorKind::ResourceNotFoundError(_)
2533 )
2534 }
2535}
2536impl std::error::Error for GetGuidesNetworkError {
2537 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2538 match &self.kind {
2539 GetGuidesNetworkErrorKind::InternalFailureError(_inner) => Some(_inner),
2540 GetGuidesNetworkErrorKind::ThrottlingError(_inner) => Some(_inner),
2541 GetGuidesNetworkErrorKind::ValidationError(_inner) => Some(_inner),
2542 GetGuidesNetworkErrorKind::AccessDeniedError(_inner) => Some(_inner),
2543 GetGuidesNetworkErrorKind::UnauthorizedError(_inner) => Some(_inner),
2544 GetGuidesNetworkErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2545 GetGuidesNetworkErrorKind::Unhandled(_inner) => Some(_inner),
2546 }
2547 }
2548}
2549
2550#[non_exhaustive]
2552#[derive(std::fmt::Debug)]
2553pub struct RevertGuideError {
2554 pub kind: RevertGuideErrorKind,
2556 pub(crate) meta: aws_smithy_types::Error,
2558}
2559impl aws_smithy_http::result::CreateUnhandledError for RevertGuideError {
2560 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2561 Self {
2562 kind: RevertGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
2563 meta: Default::default(),
2564 }
2565 }
2566}
2567#[non_exhaustive]
2569#[derive(std::fmt::Debug)]
2570pub enum RevertGuideErrorKind {
2571 InternalFailureError(crate::error::InternalFailureError),
2573 ThrottlingError(crate::error::ThrottlingError),
2575 ValidationError(crate::error::ValidationError),
2577 AccessDeniedError(crate::error::AccessDeniedError),
2579 UnauthorizedError(crate::error::UnauthorizedError),
2581 ResourceConflictError(crate::error::ResourceConflictError),
2583 BadRequestError(crate::error::BadRequestError),
2585 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2587 Unhandled(crate::error::Unhandled),
2596}
2597impl std::fmt::Display for RevertGuideError {
2598 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2599 match &self.kind {
2600 RevertGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2601 RevertGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2602 RevertGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
2603 RevertGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2604 RevertGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2605 RevertGuideErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
2606 RevertGuideErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2607 RevertGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2608 RevertGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
2609 }
2610 }
2611}
2612impl aws_smithy_types::retry::ProvideErrorKind for RevertGuideError {
2613 fn code(&self) -> Option<&str> {
2614 RevertGuideError::code(self)
2615 }
2616 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2617 match &self.kind {
2618 RevertGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
2619 RevertGuideErrorKind::ResourceConflictError(inner) => {
2620 Some(inner.retryable_error_kind())
2621 }
2622 _ => None,
2623 }
2624 }
2625}
2626impl RevertGuideError {
2627 pub fn new(kind: RevertGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
2629 Self { kind, meta }
2630 }
2631
2632 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2634 Self {
2635 kind: RevertGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2636 meta: Default::default(),
2637 }
2638 }
2639
2640 pub fn generic(err: aws_smithy_types::Error) -> Self {
2642 Self {
2643 meta: err.clone(),
2644 kind: RevertGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2645 }
2646 }
2647
2648 pub fn message(&self) -> Option<&str> {
2650 self.meta.message()
2651 }
2652
2653 pub fn meta(&self) -> &aws_smithy_types::Error {
2656 &self.meta
2657 }
2658
2659 pub fn request_id(&self) -> Option<&str> {
2661 self.meta.request_id()
2662 }
2663
2664 pub fn code(&self) -> Option<&str> {
2666 self.meta.code()
2667 }
2668 pub fn is_internal_failure_error(&self) -> bool {
2670 matches!(&self.kind, RevertGuideErrorKind::InternalFailureError(_))
2671 }
2672 pub fn is_throttling_error(&self) -> bool {
2674 matches!(&self.kind, RevertGuideErrorKind::ThrottlingError(_))
2675 }
2676 pub fn is_validation_error(&self) -> bool {
2678 matches!(&self.kind, RevertGuideErrorKind::ValidationError(_))
2679 }
2680 pub fn is_access_denied_error(&self) -> bool {
2682 matches!(&self.kind, RevertGuideErrorKind::AccessDeniedError(_))
2683 }
2684 pub fn is_unauthorized_error(&self) -> bool {
2686 matches!(&self.kind, RevertGuideErrorKind::UnauthorizedError(_))
2687 }
2688 pub fn is_resource_conflict_error(&self) -> bool {
2690 matches!(&self.kind, RevertGuideErrorKind::ResourceConflictError(_))
2691 }
2692 pub fn is_bad_request_error(&self) -> bool {
2694 matches!(&self.kind, RevertGuideErrorKind::BadRequestError(_))
2695 }
2696 pub fn is_resource_not_found_error(&self) -> bool {
2698 matches!(&self.kind, RevertGuideErrorKind::ResourceNotFoundError(_))
2699 }
2700}
2701impl std::error::Error for RevertGuideError {
2702 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2703 match &self.kind {
2704 RevertGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
2705 RevertGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
2706 RevertGuideErrorKind::ValidationError(_inner) => Some(_inner),
2707 RevertGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
2708 RevertGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
2709 RevertGuideErrorKind::ResourceConflictError(_inner) => Some(_inner),
2710 RevertGuideErrorKind::BadRequestError(_inner) => Some(_inner),
2711 RevertGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2712 RevertGuideErrorKind::Unhandled(_inner) => Some(_inner),
2713 }
2714 }
2715}
2716
2717#[non_exhaustive]
2719#[derive(std::fmt::Debug)]
2720pub struct PublishGuideError {
2721 pub kind: PublishGuideErrorKind,
2723 pub(crate) meta: aws_smithy_types::Error,
2725}
2726impl aws_smithy_http::result::CreateUnhandledError for PublishGuideError {
2727 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2728 Self {
2729 kind: PublishGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
2730 meta: Default::default(),
2731 }
2732 }
2733}
2734#[non_exhaustive]
2736#[derive(std::fmt::Debug)]
2737pub enum PublishGuideErrorKind {
2738 InternalFailureError(crate::error::InternalFailureError),
2740 ThrottlingError(crate::error::ThrottlingError),
2742 ValidationError(crate::error::ValidationError),
2744 AccessDeniedError(crate::error::AccessDeniedError),
2746 UnauthorizedError(crate::error::UnauthorizedError),
2748 ResourceConflictError(crate::error::ResourceConflictError),
2750 BadRequestError(crate::error::BadRequestError),
2752 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2754 Unhandled(crate::error::Unhandled),
2763}
2764impl std::fmt::Display for PublishGuideError {
2765 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2766 match &self.kind {
2767 PublishGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2768 PublishGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2769 PublishGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
2770 PublishGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2771 PublishGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2772 PublishGuideErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
2773 PublishGuideErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2774 PublishGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2775 PublishGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
2776 }
2777 }
2778}
2779impl aws_smithy_types::retry::ProvideErrorKind for PublishGuideError {
2780 fn code(&self) -> Option<&str> {
2781 PublishGuideError::code(self)
2782 }
2783 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2784 match &self.kind {
2785 PublishGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
2786 PublishGuideErrorKind::ResourceConflictError(inner) => {
2787 Some(inner.retryable_error_kind())
2788 }
2789 _ => None,
2790 }
2791 }
2792}
2793impl PublishGuideError {
2794 pub fn new(kind: PublishGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
2796 Self { kind, meta }
2797 }
2798
2799 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2801 Self {
2802 kind: PublishGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2803 meta: Default::default(),
2804 }
2805 }
2806
2807 pub fn generic(err: aws_smithy_types::Error) -> Self {
2809 Self {
2810 meta: err.clone(),
2811 kind: PublishGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
2812 }
2813 }
2814
2815 pub fn message(&self) -> Option<&str> {
2817 self.meta.message()
2818 }
2819
2820 pub fn meta(&self) -> &aws_smithy_types::Error {
2823 &self.meta
2824 }
2825
2826 pub fn request_id(&self) -> Option<&str> {
2828 self.meta.request_id()
2829 }
2830
2831 pub fn code(&self) -> Option<&str> {
2833 self.meta.code()
2834 }
2835 pub fn is_internal_failure_error(&self) -> bool {
2837 matches!(&self.kind, PublishGuideErrorKind::InternalFailureError(_))
2838 }
2839 pub fn is_throttling_error(&self) -> bool {
2841 matches!(&self.kind, PublishGuideErrorKind::ThrottlingError(_))
2842 }
2843 pub fn is_validation_error(&self) -> bool {
2845 matches!(&self.kind, PublishGuideErrorKind::ValidationError(_))
2846 }
2847 pub fn is_access_denied_error(&self) -> bool {
2849 matches!(&self.kind, PublishGuideErrorKind::AccessDeniedError(_))
2850 }
2851 pub fn is_unauthorized_error(&self) -> bool {
2853 matches!(&self.kind, PublishGuideErrorKind::UnauthorizedError(_))
2854 }
2855 pub fn is_resource_conflict_error(&self) -> bool {
2857 matches!(&self.kind, PublishGuideErrorKind::ResourceConflictError(_))
2858 }
2859 pub fn is_bad_request_error(&self) -> bool {
2861 matches!(&self.kind, PublishGuideErrorKind::BadRequestError(_))
2862 }
2863 pub fn is_resource_not_found_error(&self) -> bool {
2865 matches!(&self.kind, PublishGuideErrorKind::ResourceNotFoundError(_))
2866 }
2867}
2868impl std::error::Error for PublishGuideError {
2869 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
2870 match &self.kind {
2871 PublishGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
2872 PublishGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
2873 PublishGuideErrorKind::ValidationError(_inner) => Some(_inner),
2874 PublishGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
2875 PublishGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
2876 PublishGuideErrorKind::ResourceConflictError(_inner) => Some(_inner),
2877 PublishGuideErrorKind::BadRequestError(_inner) => Some(_inner),
2878 PublishGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
2879 PublishGuideErrorKind::Unhandled(_inner) => Some(_inner),
2880 }
2881 }
2882}
2883
2884#[non_exhaustive]
2886#[derive(std::fmt::Debug)]
2887pub struct ChangeGuideVisibilityError {
2888 pub kind: ChangeGuideVisibilityErrorKind,
2890 pub(crate) meta: aws_smithy_types::Error,
2892}
2893impl aws_smithy_http::result::CreateUnhandledError for ChangeGuideVisibilityError {
2894 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
2895 Self {
2896 kind: ChangeGuideVisibilityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
2897 meta: Default::default(),
2898 }
2899 }
2900}
2901#[non_exhaustive]
2903#[derive(std::fmt::Debug)]
2904pub enum ChangeGuideVisibilityErrorKind {
2905 InternalFailureError(crate::error::InternalFailureError),
2907 ThrottlingError(crate::error::ThrottlingError),
2909 ValidationError(crate::error::ValidationError),
2911 AccessDeniedError(crate::error::AccessDeniedError),
2913 UnauthorizedError(crate::error::UnauthorizedError),
2915 ResourceConflictError(crate::error::ResourceConflictError),
2917 BadRequestError(crate::error::BadRequestError),
2919 ResourceNotFoundError(crate::error::ResourceNotFoundError),
2921 Unhandled(crate::error::Unhandled),
2930}
2931impl std::fmt::Display for ChangeGuideVisibilityError {
2932 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2933 match &self.kind {
2934 ChangeGuideVisibilityErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
2935 ChangeGuideVisibilityErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
2936 ChangeGuideVisibilityErrorKind::ValidationError(_inner) => _inner.fmt(f),
2937 ChangeGuideVisibilityErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
2938 ChangeGuideVisibilityErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
2939 ChangeGuideVisibilityErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
2940 ChangeGuideVisibilityErrorKind::BadRequestError(_inner) => _inner.fmt(f),
2941 ChangeGuideVisibilityErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
2942 ChangeGuideVisibilityErrorKind::Unhandled(_inner) => _inner.fmt(f),
2943 }
2944 }
2945}
2946impl aws_smithy_types::retry::ProvideErrorKind for ChangeGuideVisibilityError {
2947 fn code(&self) -> Option<&str> {
2948 ChangeGuideVisibilityError::code(self)
2949 }
2950 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
2951 match &self.kind {
2952 ChangeGuideVisibilityErrorKind::ThrottlingError(inner) => {
2953 Some(inner.retryable_error_kind())
2954 }
2955 ChangeGuideVisibilityErrorKind::ResourceConflictError(inner) => {
2956 Some(inner.retryable_error_kind())
2957 }
2958 _ => None,
2959 }
2960 }
2961}
2962impl ChangeGuideVisibilityError {
2963 pub fn new(kind: ChangeGuideVisibilityErrorKind, meta: aws_smithy_types::Error) -> Self {
2965 Self { kind, meta }
2966 }
2967
2968 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
2970 Self {
2971 kind: ChangeGuideVisibilityErrorKind::Unhandled(crate::error::Unhandled::new(
2972 err.into(),
2973 )),
2974 meta: Default::default(),
2975 }
2976 }
2977
2978 pub fn generic(err: aws_smithy_types::Error) -> Self {
2980 Self {
2981 meta: err.clone(),
2982 kind: ChangeGuideVisibilityErrorKind::Unhandled(crate::error::Unhandled::new(
2983 err.into(),
2984 )),
2985 }
2986 }
2987
2988 pub fn message(&self) -> Option<&str> {
2990 self.meta.message()
2991 }
2992
2993 pub fn meta(&self) -> &aws_smithy_types::Error {
2996 &self.meta
2997 }
2998
2999 pub fn request_id(&self) -> Option<&str> {
3001 self.meta.request_id()
3002 }
3003
3004 pub fn code(&self) -> Option<&str> {
3006 self.meta.code()
3007 }
3008 pub fn is_internal_failure_error(&self) -> bool {
3010 matches!(
3011 &self.kind,
3012 ChangeGuideVisibilityErrorKind::InternalFailureError(_)
3013 )
3014 }
3015 pub fn is_throttling_error(&self) -> bool {
3017 matches!(
3018 &self.kind,
3019 ChangeGuideVisibilityErrorKind::ThrottlingError(_)
3020 )
3021 }
3022 pub fn is_validation_error(&self) -> bool {
3024 matches!(
3025 &self.kind,
3026 ChangeGuideVisibilityErrorKind::ValidationError(_)
3027 )
3028 }
3029 pub fn is_access_denied_error(&self) -> bool {
3031 matches!(
3032 &self.kind,
3033 ChangeGuideVisibilityErrorKind::AccessDeniedError(_)
3034 )
3035 }
3036 pub fn is_unauthorized_error(&self) -> bool {
3038 matches!(
3039 &self.kind,
3040 ChangeGuideVisibilityErrorKind::UnauthorizedError(_)
3041 )
3042 }
3043 pub fn is_resource_conflict_error(&self) -> bool {
3045 matches!(
3046 &self.kind,
3047 ChangeGuideVisibilityErrorKind::ResourceConflictError(_)
3048 )
3049 }
3050 pub fn is_bad_request_error(&self) -> bool {
3052 matches!(
3053 &self.kind,
3054 ChangeGuideVisibilityErrorKind::BadRequestError(_)
3055 )
3056 }
3057 pub fn is_resource_not_found_error(&self) -> bool {
3059 matches!(
3060 &self.kind,
3061 ChangeGuideVisibilityErrorKind::ResourceNotFoundError(_)
3062 )
3063 }
3064}
3065impl std::error::Error for ChangeGuideVisibilityError {
3066 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3067 match &self.kind {
3068 ChangeGuideVisibilityErrorKind::InternalFailureError(_inner) => Some(_inner),
3069 ChangeGuideVisibilityErrorKind::ThrottlingError(_inner) => Some(_inner),
3070 ChangeGuideVisibilityErrorKind::ValidationError(_inner) => Some(_inner),
3071 ChangeGuideVisibilityErrorKind::AccessDeniedError(_inner) => Some(_inner),
3072 ChangeGuideVisibilityErrorKind::UnauthorizedError(_inner) => Some(_inner),
3073 ChangeGuideVisibilityErrorKind::ResourceConflictError(_inner) => Some(_inner),
3074 ChangeGuideVisibilityErrorKind::BadRequestError(_inner) => Some(_inner),
3075 ChangeGuideVisibilityErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
3076 ChangeGuideVisibilityErrorKind::Unhandled(_inner) => Some(_inner),
3077 }
3078 }
3079}
3080
3081#[non_exhaustive]
3083#[derive(std::fmt::Debug)]
3084pub struct ListGuidesError {
3085 pub kind: ListGuidesErrorKind,
3087 pub(crate) meta: aws_smithy_types::Error,
3089}
3090impl aws_smithy_http::result::CreateUnhandledError for ListGuidesError {
3091 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
3092 Self {
3093 kind: ListGuidesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
3094 meta: Default::default(),
3095 }
3096 }
3097}
3098#[non_exhaustive]
3100#[derive(std::fmt::Debug)]
3101pub enum ListGuidesErrorKind {
3102 InternalFailureError(crate::error::InternalFailureError),
3104 ThrottlingError(crate::error::ThrottlingError),
3106 ValidationError(crate::error::ValidationError),
3108 AccessDeniedError(crate::error::AccessDeniedError),
3110 UnauthorizedError(crate::error::UnauthorizedError),
3112 BadRequestError(crate::error::BadRequestError),
3114 Unhandled(crate::error::Unhandled),
3123}
3124impl std::fmt::Display for ListGuidesError {
3125 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3126 match &self.kind {
3127 ListGuidesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
3128 ListGuidesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
3129 ListGuidesErrorKind::ValidationError(_inner) => _inner.fmt(f),
3130 ListGuidesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
3131 ListGuidesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
3132 ListGuidesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
3133 ListGuidesErrorKind::Unhandled(_inner) => _inner.fmt(f),
3134 }
3135 }
3136}
3137impl aws_smithy_types::retry::ProvideErrorKind for ListGuidesError {
3138 fn code(&self) -> Option<&str> {
3139 ListGuidesError::code(self)
3140 }
3141 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
3142 match &self.kind {
3143 ListGuidesErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
3144 _ => None,
3145 }
3146 }
3147}
3148impl ListGuidesError {
3149 pub fn new(kind: ListGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
3151 Self { kind, meta }
3152 }
3153
3154 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
3156 Self {
3157 kind: ListGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3158 meta: Default::default(),
3159 }
3160 }
3161
3162 pub fn generic(err: aws_smithy_types::Error) -> Self {
3164 Self {
3165 meta: err.clone(),
3166 kind: ListGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3167 }
3168 }
3169
3170 pub fn message(&self) -> Option<&str> {
3172 self.meta.message()
3173 }
3174
3175 pub fn meta(&self) -> &aws_smithy_types::Error {
3178 &self.meta
3179 }
3180
3181 pub fn request_id(&self) -> Option<&str> {
3183 self.meta.request_id()
3184 }
3185
3186 pub fn code(&self) -> Option<&str> {
3188 self.meta.code()
3189 }
3190 pub fn is_internal_failure_error(&self) -> bool {
3192 matches!(&self.kind, ListGuidesErrorKind::InternalFailureError(_))
3193 }
3194 pub fn is_throttling_error(&self) -> bool {
3196 matches!(&self.kind, ListGuidesErrorKind::ThrottlingError(_))
3197 }
3198 pub fn is_validation_error(&self) -> bool {
3200 matches!(&self.kind, ListGuidesErrorKind::ValidationError(_))
3201 }
3202 pub fn is_access_denied_error(&self) -> bool {
3204 matches!(&self.kind, ListGuidesErrorKind::AccessDeniedError(_))
3205 }
3206 pub fn is_unauthorized_error(&self) -> bool {
3208 matches!(&self.kind, ListGuidesErrorKind::UnauthorizedError(_))
3209 }
3210 pub fn is_bad_request_error(&self) -> bool {
3212 matches!(&self.kind, ListGuidesErrorKind::BadRequestError(_))
3213 }
3214}
3215impl std::error::Error for ListGuidesError {
3216 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3217 match &self.kind {
3218 ListGuidesErrorKind::InternalFailureError(_inner) => Some(_inner),
3219 ListGuidesErrorKind::ThrottlingError(_inner) => Some(_inner),
3220 ListGuidesErrorKind::ValidationError(_inner) => Some(_inner),
3221 ListGuidesErrorKind::AccessDeniedError(_inner) => Some(_inner),
3222 ListGuidesErrorKind::UnauthorizedError(_inner) => Some(_inner),
3223 ListGuidesErrorKind::BadRequestError(_inner) => Some(_inner),
3224 ListGuidesErrorKind::Unhandled(_inner) => Some(_inner),
3225 }
3226 }
3227}
3228
3229#[non_exhaustive]
3231#[derive(std::fmt::Debug)]
3232pub struct CreateGuideError {
3233 pub kind: CreateGuideErrorKind,
3235 pub(crate) meta: aws_smithy_types::Error,
3237}
3238impl aws_smithy_http::result::CreateUnhandledError for CreateGuideError {
3239 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
3240 Self {
3241 kind: CreateGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
3242 meta: Default::default(),
3243 }
3244 }
3245}
3246#[non_exhaustive]
3248#[derive(std::fmt::Debug)]
3249pub enum CreateGuideErrorKind {
3250 InternalFailureError(crate::error::InternalFailureError),
3252 ThrottlingError(crate::error::ThrottlingError),
3254 ValidationError(crate::error::ValidationError),
3256 AccessDeniedError(crate::error::AccessDeniedError),
3258 ResponseTooLargeError(crate::error::ResponseTooLargeError),
3260 UnauthorizedError(crate::error::UnauthorizedError),
3262 ResourceConflictError(crate::error::ResourceConflictError),
3264 BadRequestError(crate::error::BadRequestError),
3266 ResourceNotFoundError(crate::error::ResourceNotFoundError),
3268 RequestTooLargeError(crate::error::RequestTooLargeError),
3270 Unhandled(crate::error::Unhandled),
3279}
3280impl std::fmt::Display for CreateGuideError {
3281 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3282 match &self.kind {
3283 CreateGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
3284 CreateGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
3285 CreateGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
3286 CreateGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
3287 CreateGuideErrorKind::ResponseTooLargeError(_inner) => _inner.fmt(f),
3288 CreateGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
3289 CreateGuideErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
3290 CreateGuideErrorKind::BadRequestError(_inner) => _inner.fmt(f),
3291 CreateGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
3292 CreateGuideErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
3293 CreateGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
3294 }
3295 }
3296}
3297impl aws_smithy_types::retry::ProvideErrorKind for CreateGuideError {
3298 fn code(&self) -> Option<&str> {
3299 CreateGuideError::code(self)
3300 }
3301 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
3302 match &self.kind {
3303 CreateGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
3304 CreateGuideErrorKind::ResourceConflictError(inner) => {
3305 Some(inner.retryable_error_kind())
3306 }
3307 _ => None,
3308 }
3309 }
3310}
3311impl CreateGuideError {
3312 pub fn new(kind: CreateGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3314 Self { kind, meta }
3315 }
3316
3317 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
3319 Self {
3320 kind: CreateGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3321 meta: Default::default(),
3322 }
3323 }
3324
3325 pub fn generic(err: aws_smithy_types::Error) -> Self {
3327 Self {
3328 meta: err.clone(),
3329 kind: CreateGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3330 }
3331 }
3332
3333 pub fn message(&self) -> Option<&str> {
3335 self.meta.message()
3336 }
3337
3338 pub fn meta(&self) -> &aws_smithy_types::Error {
3341 &self.meta
3342 }
3343
3344 pub fn request_id(&self) -> Option<&str> {
3346 self.meta.request_id()
3347 }
3348
3349 pub fn code(&self) -> Option<&str> {
3351 self.meta.code()
3352 }
3353 pub fn is_internal_failure_error(&self) -> bool {
3355 matches!(&self.kind, CreateGuideErrorKind::InternalFailureError(_))
3356 }
3357 pub fn is_throttling_error(&self) -> bool {
3359 matches!(&self.kind, CreateGuideErrorKind::ThrottlingError(_))
3360 }
3361 pub fn is_validation_error(&self) -> bool {
3363 matches!(&self.kind, CreateGuideErrorKind::ValidationError(_))
3364 }
3365 pub fn is_access_denied_error(&self) -> bool {
3367 matches!(&self.kind, CreateGuideErrorKind::AccessDeniedError(_))
3368 }
3369 pub fn is_response_too_large_error(&self) -> bool {
3371 matches!(&self.kind, CreateGuideErrorKind::ResponseTooLargeError(_))
3372 }
3373 pub fn is_unauthorized_error(&self) -> bool {
3375 matches!(&self.kind, CreateGuideErrorKind::UnauthorizedError(_))
3376 }
3377 pub fn is_resource_conflict_error(&self) -> bool {
3379 matches!(&self.kind, CreateGuideErrorKind::ResourceConflictError(_))
3380 }
3381 pub fn is_bad_request_error(&self) -> bool {
3383 matches!(&self.kind, CreateGuideErrorKind::BadRequestError(_))
3384 }
3385 pub fn is_resource_not_found_error(&self) -> bool {
3387 matches!(&self.kind, CreateGuideErrorKind::ResourceNotFoundError(_))
3388 }
3389 pub fn is_request_too_large_error(&self) -> bool {
3391 matches!(&self.kind, CreateGuideErrorKind::RequestTooLargeError(_))
3392 }
3393}
3394impl std::error::Error for CreateGuideError {
3395 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3396 match &self.kind {
3397 CreateGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
3398 CreateGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
3399 CreateGuideErrorKind::ValidationError(_inner) => Some(_inner),
3400 CreateGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
3401 CreateGuideErrorKind::ResponseTooLargeError(_inner) => Some(_inner),
3402 CreateGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
3403 CreateGuideErrorKind::ResourceConflictError(_inner) => Some(_inner),
3404 CreateGuideErrorKind::BadRequestError(_inner) => Some(_inner),
3405 CreateGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
3406 CreateGuideErrorKind::RequestTooLargeError(_inner) => Some(_inner),
3407 CreateGuideErrorKind::Unhandled(_inner) => Some(_inner),
3408 }
3409 }
3410}
3411
3412#[non_exhaustive]
3414#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
3415pub struct ResponseTooLargeError {
3416 #[doc(hidden)]
3418 pub message: std::option::Option<std::string::String>,
3419 #[allow(missing_docs)] #[doc(hidden)]
3421 pub code: std::option::Option<crate::model::ResponseTooLargeCode>,
3422 #[allow(missing_docs)] #[doc(hidden)]
3424 pub data: std::option::Option<crate::model::ResponseTooLargeData>,
3425}
3426impl ResponseTooLargeError {
3427 #[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&crate::model::ResponseTooLargeCode> {
3429 self.code.as_ref()
3430 }
3431 #[allow(missing_docs)] pub fn data(&self) -> std::option::Option<&crate::model::ResponseTooLargeData> {
3433 self.data.as_ref()
3434 }
3435}
3436impl ResponseTooLargeError {
3437 pub fn message(&self) -> std::option::Option<&str> {
3439 self.message.as_deref()
3440 }
3441}
3442impl std::fmt::Display for ResponseTooLargeError {
3443 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3444 write!(f, "ResponseTooLargeError [ResponseTooLargeException]")?;
3445 if let Some(inner_10) = &self.message {
3446 {
3447 write!(f, ": {}", inner_10)?;
3448 }
3449 }
3450 Ok(())
3451 }
3452}
3453impl std::error::Error for ResponseTooLargeError {}
3454pub mod response_too_large_error {
3456
3457 #[non_exhaustive]
3459 #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
3460 pub struct Builder {
3461 pub(crate) message: std::option::Option<std::string::String>,
3462 pub(crate) code: std::option::Option<crate::model::ResponseTooLargeCode>,
3463 pub(crate) data: std::option::Option<crate::model::ResponseTooLargeData>,
3464 }
3465 impl Builder {
3466 pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
3468 self.message = Some(input.into());
3469 self
3470 }
3471 pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
3473 self.message = input;
3474 self
3475 }
3476 #[allow(missing_docs)] pub fn code(mut self, input: crate::model::ResponseTooLargeCode) -> Self {
3478 self.code = Some(input);
3479 self
3480 }
3481 #[allow(missing_docs)] pub fn set_code(
3483 mut self,
3484 input: std::option::Option<crate::model::ResponseTooLargeCode>,
3485 ) -> Self {
3486 self.code = input;
3487 self
3488 }
3489 #[allow(missing_docs)] pub fn data(mut self, input: crate::model::ResponseTooLargeData) -> Self {
3491 self.data = Some(input);
3492 self
3493 }
3494 #[allow(missing_docs)] pub fn set_data(
3496 mut self,
3497 input: std::option::Option<crate::model::ResponseTooLargeData>,
3498 ) -> Self {
3499 self.data = input;
3500 self
3501 }
3502 pub fn build(self) -> crate::error::ResponseTooLargeError {
3504 crate::error::ResponseTooLargeError {
3505 message: self.message,
3506 code: self.code,
3507 data: self.data,
3508 }
3509 }
3510 }
3511}
3512impl ResponseTooLargeError {
3513 pub fn builder() -> crate::error::response_too_large_error::Builder {
3515 crate::error::response_too_large_error::Builder::default()
3516 }
3517}
3518
3519#[non_exhaustive]
3521#[derive(std::fmt::Debug)]
3522pub struct DeleteGuideError {
3523 pub kind: DeleteGuideErrorKind,
3525 pub(crate) meta: aws_smithy_types::Error,
3527}
3528impl aws_smithy_http::result::CreateUnhandledError for DeleteGuideError {
3529 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
3530 Self {
3531 kind: DeleteGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
3532 meta: Default::default(),
3533 }
3534 }
3535}
3536#[non_exhaustive]
3538#[derive(std::fmt::Debug)]
3539pub enum DeleteGuideErrorKind {
3540 InternalFailureError(crate::error::InternalFailureError),
3542 ThrottlingError(crate::error::ThrottlingError),
3544 ValidationError(crate::error::ValidationError),
3546 AccessDeniedError(crate::error::AccessDeniedError),
3548 UnauthorizedError(crate::error::UnauthorizedError),
3550 ResourceConflictError(crate::error::ResourceConflictError),
3552 ResourceNotFoundError(crate::error::ResourceNotFoundError),
3554 Unhandled(crate::error::Unhandled),
3563}
3564impl std::fmt::Display for DeleteGuideError {
3565 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3566 match &self.kind {
3567 DeleteGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
3568 DeleteGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
3569 DeleteGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
3570 DeleteGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
3571 DeleteGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
3572 DeleteGuideErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
3573 DeleteGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
3574 DeleteGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
3575 }
3576 }
3577}
3578impl aws_smithy_types::retry::ProvideErrorKind for DeleteGuideError {
3579 fn code(&self) -> Option<&str> {
3580 DeleteGuideError::code(self)
3581 }
3582 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
3583 match &self.kind {
3584 DeleteGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
3585 DeleteGuideErrorKind::ResourceConflictError(inner) => {
3586 Some(inner.retryable_error_kind())
3587 }
3588 _ => None,
3589 }
3590 }
3591}
3592impl DeleteGuideError {
3593 pub fn new(kind: DeleteGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3595 Self { kind, meta }
3596 }
3597
3598 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
3600 Self {
3601 kind: DeleteGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3602 meta: Default::default(),
3603 }
3604 }
3605
3606 pub fn generic(err: aws_smithy_types::Error) -> Self {
3608 Self {
3609 meta: err.clone(),
3610 kind: DeleteGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3611 }
3612 }
3613
3614 pub fn message(&self) -> Option<&str> {
3616 self.meta.message()
3617 }
3618
3619 pub fn meta(&self) -> &aws_smithy_types::Error {
3622 &self.meta
3623 }
3624
3625 pub fn request_id(&self) -> Option<&str> {
3627 self.meta.request_id()
3628 }
3629
3630 pub fn code(&self) -> Option<&str> {
3632 self.meta.code()
3633 }
3634 pub fn is_internal_failure_error(&self) -> bool {
3636 matches!(&self.kind, DeleteGuideErrorKind::InternalFailureError(_))
3637 }
3638 pub fn is_throttling_error(&self) -> bool {
3640 matches!(&self.kind, DeleteGuideErrorKind::ThrottlingError(_))
3641 }
3642 pub fn is_validation_error(&self) -> bool {
3644 matches!(&self.kind, DeleteGuideErrorKind::ValidationError(_))
3645 }
3646 pub fn is_access_denied_error(&self) -> bool {
3648 matches!(&self.kind, DeleteGuideErrorKind::AccessDeniedError(_))
3649 }
3650 pub fn is_unauthorized_error(&self) -> bool {
3652 matches!(&self.kind, DeleteGuideErrorKind::UnauthorizedError(_))
3653 }
3654 pub fn is_resource_conflict_error(&self) -> bool {
3656 matches!(&self.kind, DeleteGuideErrorKind::ResourceConflictError(_))
3657 }
3658 pub fn is_resource_not_found_error(&self) -> bool {
3660 matches!(&self.kind, DeleteGuideErrorKind::ResourceNotFoundError(_))
3661 }
3662}
3663impl std::error::Error for DeleteGuideError {
3664 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3665 match &self.kind {
3666 DeleteGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
3667 DeleteGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
3668 DeleteGuideErrorKind::ValidationError(_inner) => Some(_inner),
3669 DeleteGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
3670 DeleteGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
3671 DeleteGuideErrorKind::ResourceConflictError(_inner) => Some(_inner),
3672 DeleteGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
3673 DeleteGuideErrorKind::Unhandled(_inner) => Some(_inner),
3674 }
3675 }
3676}
3677
3678#[non_exhaustive]
3680#[derive(std::fmt::Debug)]
3681pub struct UpdateGuideError {
3682 pub kind: UpdateGuideErrorKind,
3684 pub(crate) meta: aws_smithy_types::Error,
3686}
3687impl aws_smithy_http::result::CreateUnhandledError for UpdateGuideError {
3688 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
3689 Self {
3690 kind: UpdateGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
3691 meta: Default::default(),
3692 }
3693 }
3694}
3695#[non_exhaustive]
3697#[derive(std::fmt::Debug)]
3698pub enum UpdateGuideErrorKind {
3699 InternalFailureError(crate::error::InternalFailureError),
3701 ThrottlingError(crate::error::ThrottlingError),
3703 ValidationError(crate::error::ValidationError),
3705 AccessDeniedError(crate::error::AccessDeniedError),
3707 UnauthorizedError(crate::error::UnauthorizedError),
3709 ResourceConflictError(crate::error::ResourceConflictError),
3711 BadRequestError(crate::error::BadRequestError),
3713 ResourceNotFoundError(crate::error::ResourceNotFoundError),
3715 RequestTooLargeError(crate::error::RequestTooLargeError),
3717 Unhandled(crate::error::Unhandled),
3726}
3727impl std::fmt::Display for UpdateGuideError {
3728 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3729 match &self.kind {
3730 UpdateGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
3731 UpdateGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
3732 UpdateGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
3733 UpdateGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
3734 UpdateGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
3735 UpdateGuideErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
3736 UpdateGuideErrorKind::BadRequestError(_inner) => _inner.fmt(f),
3737 UpdateGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
3738 UpdateGuideErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
3739 UpdateGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
3740 }
3741 }
3742}
3743impl aws_smithy_types::retry::ProvideErrorKind for UpdateGuideError {
3744 fn code(&self) -> Option<&str> {
3745 UpdateGuideError::code(self)
3746 }
3747 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
3748 match &self.kind {
3749 UpdateGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
3750 UpdateGuideErrorKind::ResourceConflictError(inner) => {
3751 Some(inner.retryable_error_kind())
3752 }
3753 _ => None,
3754 }
3755 }
3756}
3757impl UpdateGuideError {
3758 pub fn new(kind: UpdateGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3760 Self { kind, meta }
3761 }
3762
3763 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
3765 Self {
3766 kind: UpdateGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3767 meta: Default::default(),
3768 }
3769 }
3770
3771 pub fn generic(err: aws_smithy_types::Error) -> Self {
3773 Self {
3774 meta: err.clone(),
3775 kind: UpdateGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3776 }
3777 }
3778
3779 pub fn message(&self) -> Option<&str> {
3781 self.meta.message()
3782 }
3783
3784 pub fn meta(&self) -> &aws_smithy_types::Error {
3787 &self.meta
3788 }
3789
3790 pub fn request_id(&self) -> Option<&str> {
3792 self.meta.request_id()
3793 }
3794
3795 pub fn code(&self) -> Option<&str> {
3797 self.meta.code()
3798 }
3799 pub fn is_internal_failure_error(&self) -> bool {
3801 matches!(&self.kind, UpdateGuideErrorKind::InternalFailureError(_))
3802 }
3803 pub fn is_throttling_error(&self) -> bool {
3805 matches!(&self.kind, UpdateGuideErrorKind::ThrottlingError(_))
3806 }
3807 pub fn is_validation_error(&self) -> bool {
3809 matches!(&self.kind, UpdateGuideErrorKind::ValidationError(_))
3810 }
3811 pub fn is_access_denied_error(&self) -> bool {
3813 matches!(&self.kind, UpdateGuideErrorKind::AccessDeniedError(_))
3814 }
3815 pub fn is_unauthorized_error(&self) -> bool {
3817 matches!(&self.kind, UpdateGuideErrorKind::UnauthorizedError(_))
3818 }
3819 pub fn is_resource_conflict_error(&self) -> bool {
3821 matches!(&self.kind, UpdateGuideErrorKind::ResourceConflictError(_))
3822 }
3823 pub fn is_bad_request_error(&self) -> bool {
3825 matches!(&self.kind, UpdateGuideErrorKind::BadRequestError(_))
3826 }
3827 pub fn is_resource_not_found_error(&self) -> bool {
3829 matches!(&self.kind, UpdateGuideErrorKind::ResourceNotFoundError(_))
3830 }
3831 pub fn is_request_too_large_error(&self) -> bool {
3833 matches!(&self.kind, UpdateGuideErrorKind::RequestTooLargeError(_))
3834 }
3835}
3836impl std::error::Error for UpdateGuideError {
3837 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3838 match &self.kind {
3839 UpdateGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
3840 UpdateGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
3841 UpdateGuideErrorKind::ValidationError(_inner) => Some(_inner),
3842 UpdateGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
3843 UpdateGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
3844 UpdateGuideErrorKind::ResourceConflictError(_inner) => Some(_inner),
3845 UpdateGuideErrorKind::BadRequestError(_inner) => Some(_inner),
3846 UpdateGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
3847 UpdateGuideErrorKind::RequestTooLargeError(_inner) => Some(_inner),
3848 UpdateGuideErrorKind::Unhandled(_inner) => Some(_inner),
3849 }
3850 }
3851}
3852
3853#[non_exhaustive]
3855#[derive(std::fmt::Debug)]
3856pub struct GetGuideError {
3857 pub kind: GetGuideErrorKind,
3859 pub(crate) meta: aws_smithy_types::Error,
3861}
3862impl aws_smithy_http::result::CreateUnhandledError for GetGuideError {
3863 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
3864 Self {
3865 kind: GetGuideErrorKind::Unhandled(crate::error::Unhandled::new(source)),
3866 meta: Default::default(),
3867 }
3868 }
3869}
3870#[non_exhaustive]
3872#[derive(std::fmt::Debug)]
3873pub enum GetGuideErrorKind {
3874 InternalFailureError(crate::error::InternalFailureError),
3876 ThrottlingError(crate::error::ThrottlingError),
3878 ValidationError(crate::error::ValidationError),
3880 AccessDeniedError(crate::error::AccessDeniedError),
3882 UnauthorizedError(crate::error::UnauthorizedError),
3884 ResourceNotFoundError(crate::error::ResourceNotFoundError),
3886 Unhandled(crate::error::Unhandled),
3895}
3896impl std::fmt::Display for GetGuideError {
3897 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3898 match &self.kind {
3899 GetGuideErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
3900 GetGuideErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
3901 GetGuideErrorKind::ValidationError(_inner) => _inner.fmt(f),
3902 GetGuideErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
3903 GetGuideErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
3904 GetGuideErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
3905 GetGuideErrorKind::Unhandled(_inner) => _inner.fmt(f),
3906 }
3907 }
3908}
3909impl aws_smithy_types::retry::ProvideErrorKind for GetGuideError {
3910 fn code(&self) -> Option<&str> {
3911 GetGuideError::code(self)
3912 }
3913 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
3914 match &self.kind {
3915 GetGuideErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
3916 _ => None,
3917 }
3918 }
3919}
3920impl GetGuideError {
3921 pub fn new(kind: GetGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3923 Self { kind, meta }
3924 }
3925
3926 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
3928 Self {
3929 kind: GetGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3930 meta: Default::default(),
3931 }
3932 }
3933
3934 pub fn generic(err: aws_smithy_types::Error) -> Self {
3936 Self {
3937 meta: err.clone(),
3938 kind: GetGuideErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
3939 }
3940 }
3941
3942 pub fn message(&self) -> Option<&str> {
3944 self.meta.message()
3945 }
3946
3947 pub fn meta(&self) -> &aws_smithy_types::Error {
3950 &self.meta
3951 }
3952
3953 pub fn request_id(&self) -> Option<&str> {
3955 self.meta.request_id()
3956 }
3957
3958 pub fn code(&self) -> Option<&str> {
3960 self.meta.code()
3961 }
3962 pub fn is_internal_failure_error(&self) -> bool {
3964 matches!(&self.kind, GetGuideErrorKind::InternalFailureError(_))
3965 }
3966 pub fn is_throttling_error(&self) -> bool {
3968 matches!(&self.kind, GetGuideErrorKind::ThrottlingError(_))
3969 }
3970 pub fn is_validation_error(&self) -> bool {
3972 matches!(&self.kind, GetGuideErrorKind::ValidationError(_))
3973 }
3974 pub fn is_access_denied_error(&self) -> bool {
3976 matches!(&self.kind, GetGuideErrorKind::AccessDeniedError(_))
3977 }
3978 pub fn is_unauthorized_error(&self) -> bool {
3980 matches!(&self.kind, GetGuideErrorKind::UnauthorizedError(_))
3981 }
3982 pub fn is_resource_not_found_error(&self) -> bool {
3984 matches!(&self.kind, GetGuideErrorKind::ResourceNotFoundError(_))
3985 }
3986}
3987impl std::error::Error for GetGuideError {
3988 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3989 match &self.kind {
3990 GetGuideErrorKind::InternalFailureError(_inner) => Some(_inner),
3991 GetGuideErrorKind::ThrottlingError(_inner) => Some(_inner),
3992 GetGuideErrorKind::ValidationError(_inner) => Some(_inner),
3993 GetGuideErrorKind::AccessDeniedError(_inner) => Some(_inner),
3994 GetGuideErrorKind::UnauthorizedError(_inner) => Some(_inner),
3995 GetGuideErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
3996 GetGuideErrorKind::Unhandled(_inner) => Some(_inner),
3997 }
3998 }
3999}
4000
4001#[non_exhaustive]
4003#[derive(std::fmt::Debug)]
4004pub struct ListGuideSamplesError {
4005 pub kind: ListGuideSamplesErrorKind,
4007 pub(crate) meta: aws_smithy_types::Error,
4009}
4010impl aws_smithy_http::result::CreateUnhandledError for ListGuideSamplesError {
4011 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4012 Self {
4013 kind: ListGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4014 meta: Default::default(),
4015 }
4016 }
4017}
4018#[non_exhaustive]
4020#[derive(std::fmt::Debug)]
4021pub enum ListGuideSamplesErrorKind {
4022 InternalFailureError(crate::error::InternalFailureError),
4024 ThrottlingError(crate::error::ThrottlingError),
4026 ValidationError(crate::error::ValidationError),
4028 AccessDeniedError(crate::error::AccessDeniedError),
4030 UnauthorizedError(crate::error::UnauthorizedError),
4032 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4034 Unhandled(crate::error::Unhandled),
4043}
4044impl std::fmt::Display for ListGuideSamplesError {
4045 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4046 match &self.kind {
4047 ListGuideSamplesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4048 ListGuideSamplesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4049 ListGuideSamplesErrorKind::ValidationError(_inner) => _inner.fmt(f),
4050 ListGuideSamplesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4051 ListGuideSamplesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4052 ListGuideSamplesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4053 ListGuideSamplesErrorKind::Unhandled(_inner) => _inner.fmt(f),
4054 }
4055 }
4056}
4057impl aws_smithy_types::retry::ProvideErrorKind for ListGuideSamplesError {
4058 fn code(&self) -> Option<&str> {
4059 ListGuideSamplesError::code(self)
4060 }
4061 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4062 match &self.kind {
4063 ListGuideSamplesErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
4064 _ => None,
4065 }
4066 }
4067}
4068impl ListGuideSamplesError {
4069 pub fn new(kind: ListGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
4071 Self { kind, meta }
4072 }
4073
4074 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4076 Self {
4077 kind: ListGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4078 meta: Default::default(),
4079 }
4080 }
4081
4082 pub fn generic(err: aws_smithy_types::Error) -> Self {
4084 Self {
4085 meta: err.clone(),
4086 kind: ListGuideSamplesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4087 }
4088 }
4089
4090 pub fn message(&self) -> Option<&str> {
4092 self.meta.message()
4093 }
4094
4095 pub fn meta(&self) -> &aws_smithy_types::Error {
4098 &self.meta
4099 }
4100
4101 pub fn request_id(&self) -> Option<&str> {
4103 self.meta.request_id()
4104 }
4105
4106 pub fn code(&self) -> Option<&str> {
4108 self.meta.code()
4109 }
4110 pub fn is_internal_failure_error(&self) -> bool {
4112 matches!(
4113 &self.kind,
4114 ListGuideSamplesErrorKind::InternalFailureError(_)
4115 )
4116 }
4117 pub fn is_throttling_error(&self) -> bool {
4119 matches!(&self.kind, ListGuideSamplesErrorKind::ThrottlingError(_))
4120 }
4121 pub fn is_validation_error(&self) -> bool {
4123 matches!(&self.kind, ListGuideSamplesErrorKind::ValidationError(_))
4124 }
4125 pub fn is_access_denied_error(&self) -> bool {
4127 matches!(&self.kind, ListGuideSamplesErrorKind::AccessDeniedError(_))
4128 }
4129 pub fn is_unauthorized_error(&self) -> bool {
4131 matches!(&self.kind, ListGuideSamplesErrorKind::UnauthorizedError(_))
4132 }
4133 pub fn is_resource_not_found_error(&self) -> bool {
4135 matches!(
4136 &self.kind,
4137 ListGuideSamplesErrorKind::ResourceNotFoundError(_)
4138 )
4139 }
4140}
4141impl std::error::Error for ListGuideSamplesError {
4142 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
4143 match &self.kind {
4144 ListGuideSamplesErrorKind::InternalFailureError(_inner) => Some(_inner),
4145 ListGuideSamplesErrorKind::ThrottlingError(_inner) => Some(_inner),
4146 ListGuideSamplesErrorKind::ValidationError(_inner) => Some(_inner),
4147 ListGuideSamplesErrorKind::AccessDeniedError(_inner) => Some(_inner),
4148 ListGuideSamplesErrorKind::UnauthorizedError(_inner) => Some(_inner),
4149 ListGuideSamplesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
4150 ListGuideSamplesErrorKind::Unhandled(_inner) => Some(_inner),
4151 }
4152 }
4153}
4154
4155#[non_exhaustive]
4157#[derive(std::fmt::Debug)]
4158pub struct CreateGuideSampleError {
4159 pub kind: CreateGuideSampleErrorKind,
4161 pub(crate) meta: aws_smithy_types::Error,
4163}
4164impl aws_smithy_http::result::CreateUnhandledError for CreateGuideSampleError {
4165 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4166 Self {
4167 kind: CreateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4168 meta: Default::default(),
4169 }
4170 }
4171}
4172#[non_exhaustive]
4174#[derive(std::fmt::Debug)]
4175pub enum CreateGuideSampleErrorKind {
4176 InternalFailureError(crate::error::InternalFailureError),
4178 ThrottlingError(crate::error::ThrottlingError),
4180 ValidationError(crate::error::ValidationError),
4182 AccessDeniedError(crate::error::AccessDeniedError),
4184 ResponseTooLargeError(crate::error::ResponseTooLargeError),
4186 UnauthorizedError(crate::error::UnauthorizedError),
4188 ResourceConflictError(crate::error::ResourceConflictError),
4190 BadRequestError(crate::error::BadRequestError),
4192 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4194 RequestTooLargeError(crate::error::RequestTooLargeError),
4196 Unhandled(crate::error::Unhandled),
4205}
4206impl std::fmt::Display for CreateGuideSampleError {
4207 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4208 match &self.kind {
4209 CreateGuideSampleErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4210 CreateGuideSampleErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4211 CreateGuideSampleErrorKind::ValidationError(_inner) => _inner.fmt(f),
4212 CreateGuideSampleErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4213 CreateGuideSampleErrorKind::ResponseTooLargeError(_inner) => _inner.fmt(f),
4214 CreateGuideSampleErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4215 CreateGuideSampleErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
4216 CreateGuideSampleErrorKind::BadRequestError(_inner) => _inner.fmt(f),
4217 CreateGuideSampleErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4218 CreateGuideSampleErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
4219 CreateGuideSampleErrorKind::Unhandled(_inner) => _inner.fmt(f),
4220 }
4221 }
4222}
4223impl aws_smithy_types::retry::ProvideErrorKind for CreateGuideSampleError {
4224 fn code(&self) -> Option<&str> {
4225 CreateGuideSampleError::code(self)
4226 }
4227 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4228 match &self.kind {
4229 CreateGuideSampleErrorKind::ThrottlingError(inner) => {
4230 Some(inner.retryable_error_kind())
4231 }
4232 CreateGuideSampleErrorKind::ResourceConflictError(inner) => {
4233 Some(inner.retryable_error_kind())
4234 }
4235 _ => None,
4236 }
4237 }
4238}
4239impl CreateGuideSampleError {
4240 pub fn new(kind: CreateGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4242 Self { kind, meta }
4243 }
4244
4245 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4247 Self {
4248 kind: CreateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4249 meta: Default::default(),
4250 }
4251 }
4252
4253 pub fn generic(err: aws_smithy_types::Error) -> Self {
4255 Self {
4256 meta: err.clone(),
4257 kind: CreateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4258 }
4259 }
4260
4261 pub fn message(&self) -> Option<&str> {
4263 self.meta.message()
4264 }
4265
4266 pub fn meta(&self) -> &aws_smithy_types::Error {
4269 &self.meta
4270 }
4271
4272 pub fn request_id(&self) -> Option<&str> {
4274 self.meta.request_id()
4275 }
4276
4277 pub fn code(&self) -> Option<&str> {
4279 self.meta.code()
4280 }
4281 pub fn is_internal_failure_error(&self) -> bool {
4283 matches!(
4284 &self.kind,
4285 CreateGuideSampleErrorKind::InternalFailureError(_)
4286 )
4287 }
4288 pub fn is_throttling_error(&self) -> bool {
4290 matches!(&self.kind, CreateGuideSampleErrorKind::ThrottlingError(_))
4291 }
4292 pub fn is_validation_error(&self) -> bool {
4294 matches!(&self.kind, CreateGuideSampleErrorKind::ValidationError(_))
4295 }
4296 pub fn is_access_denied_error(&self) -> bool {
4298 matches!(&self.kind, CreateGuideSampleErrorKind::AccessDeniedError(_))
4299 }
4300 pub fn is_response_too_large_error(&self) -> bool {
4302 matches!(
4303 &self.kind,
4304 CreateGuideSampleErrorKind::ResponseTooLargeError(_)
4305 )
4306 }
4307 pub fn is_unauthorized_error(&self) -> bool {
4309 matches!(&self.kind, CreateGuideSampleErrorKind::UnauthorizedError(_))
4310 }
4311 pub fn is_resource_conflict_error(&self) -> bool {
4313 matches!(
4314 &self.kind,
4315 CreateGuideSampleErrorKind::ResourceConflictError(_)
4316 )
4317 }
4318 pub fn is_bad_request_error(&self) -> bool {
4320 matches!(&self.kind, CreateGuideSampleErrorKind::BadRequestError(_))
4321 }
4322 pub fn is_resource_not_found_error(&self) -> bool {
4324 matches!(
4325 &self.kind,
4326 CreateGuideSampleErrorKind::ResourceNotFoundError(_)
4327 )
4328 }
4329 pub fn is_request_too_large_error(&self) -> bool {
4331 matches!(
4332 &self.kind,
4333 CreateGuideSampleErrorKind::RequestTooLargeError(_)
4334 )
4335 }
4336}
4337impl std::error::Error for CreateGuideSampleError {
4338 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
4339 match &self.kind {
4340 CreateGuideSampleErrorKind::InternalFailureError(_inner) => Some(_inner),
4341 CreateGuideSampleErrorKind::ThrottlingError(_inner) => Some(_inner),
4342 CreateGuideSampleErrorKind::ValidationError(_inner) => Some(_inner),
4343 CreateGuideSampleErrorKind::AccessDeniedError(_inner) => Some(_inner),
4344 CreateGuideSampleErrorKind::ResponseTooLargeError(_inner) => Some(_inner),
4345 CreateGuideSampleErrorKind::UnauthorizedError(_inner) => Some(_inner),
4346 CreateGuideSampleErrorKind::ResourceConflictError(_inner) => Some(_inner),
4347 CreateGuideSampleErrorKind::BadRequestError(_inner) => Some(_inner),
4348 CreateGuideSampleErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
4349 CreateGuideSampleErrorKind::RequestTooLargeError(_inner) => Some(_inner),
4350 CreateGuideSampleErrorKind::Unhandled(_inner) => Some(_inner),
4351 }
4352 }
4353}
4354
4355#[non_exhaustive]
4357#[derive(std::fmt::Debug)]
4358pub struct DeleteGuideSampleError {
4359 pub kind: DeleteGuideSampleErrorKind,
4361 pub(crate) meta: aws_smithy_types::Error,
4363}
4364impl aws_smithy_http::result::CreateUnhandledError for DeleteGuideSampleError {
4365 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4366 Self {
4367 kind: DeleteGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4368 meta: Default::default(),
4369 }
4370 }
4371}
4372#[non_exhaustive]
4374#[derive(std::fmt::Debug)]
4375pub enum DeleteGuideSampleErrorKind {
4376 InternalFailureError(crate::error::InternalFailureError),
4378 ThrottlingError(crate::error::ThrottlingError),
4380 ValidationError(crate::error::ValidationError),
4382 AccessDeniedError(crate::error::AccessDeniedError),
4384 UnauthorizedError(crate::error::UnauthorizedError),
4386 ResourceConflictError(crate::error::ResourceConflictError),
4388 BadRequestError(crate::error::BadRequestError),
4390 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4392 Unhandled(crate::error::Unhandled),
4401}
4402impl std::fmt::Display for DeleteGuideSampleError {
4403 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4404 match &self.kind {
4405 DeleteGuideSampleErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4406 DeleteGuideSampleErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4407 DeleteGuideSampleErrorKind::ValidationError(_inner) => _inner.fmt(f),
4408 DeleteGuideSampleErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4409 DeleteGuideSampleErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4410 DeleteGuideSampleErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
4411 DeleteGuideSampleErrorKind::BadRequestError(_inner) => _inner.fmt(f),
4412 DeleteGuideSampleErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4413 DeleteGuideSampleErrorKind::Unhandled(_inner) => _inner.fmt(f),
4414 }
4415 }
4416}
4417impl aws_smithy_types::retry::ProvideErrorKind for DeleteGuideSampleError {
4418 fn code(&self) -> Option<&str> {
4419 DeleteGuideSampleError::code(self)
4420 }
4421 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4422 match &self.kind {
4423 DeleteGuideSampleErrorKind::ThrottlingError(inner) => {
4424 Some(inner.retryable_error_kind())
4425 }
4426 DeleteGuideSampleErrorKind::ResourceConflictError(inner) => {
4427 Some(inner.retryable_error_kind())
4428 }
4429 _ => None,
4430 }
4431 }
4432}
4433impl DeleteGuideSampleError {
4434 pub fn new(kind: DeleteGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4436 Self { kind, meta }
4437 }
4438
4439 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4441 Self {
4442 kind: DeleteGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4443 meta: Default::default(),
4444 }
4445 }
4446
4447 pub fn generic(err: aws_smithy_types::Error) -> Self {
4449 Self {
4450 meta: err.clone(),
4451 kind: DeleteGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4452 }
4453 }
4454
4455 pub fn message(&self) -> Option<&str> {
4457 self.meta.message()
4458 }
4459
4460 pub fn meta(&self) -> &aws_smithy_types::Error {
4463 &self.meta
4464 }
4465
4466 pub fn request_id(&self) -> Option<&str> {
4468 self.meta.request_id()
4469 }
4470
4471 pub fn code(&self) -> Option<&str> {
4473 self.meta.code()
4474 }
4475 pub fn is_internal_failure_error(&self) -> bool {
4477 matches!(
4478 &self.kind,
4479 DeleteGuideSampleErrorKind::InternalFailureError(_)
4480 )
4481 }
4482 pub fn is_throttling_error(&self) -> bool {
4484 matches!(&self.kind, DeleteGuideSampleErrorKind::ThrottlingError(_))
4485 }
4486 pub fn is_validation_error(&self) -> bool {
4488 matches!(&self.kind, DeleteGuideSampleErrorKind::ValidationError(_))
4489 }
4490 pub fn is_access_denied_error(&self) -> bool {
4492 matches!(&self.kind, DeleteGuideSampleErrorKind::AccessDeniedError(_))
4493 }
4494 pub fn is_unauthorized_error(&self) -> bool {
4496 matches!(&self.kind, DeleteGuideSampleErrorKind::UnauthorizedError(_))
4497 }
4498 pub fn is_resource_conflict_error(&self) -> bool {
4500 matches!(
4501 &self.kind,
4502 DeleteGuideSampleErrorKind::ResourceConflictError(_)
4503 )
4504 }
4505 pub fn is_bad_request_error(&self) -> bool {
4507 matches!(&self.kind, DeleteGuideSampleErrorKind::BadRequestError(_))
4508 }
4509 pub fn is_resource_not_found_error(&self) -> bool {
4511 matches!(
4512 &self.kind,
4513 DeleteGuideSampleErrorKind::ResourceNotFoundError(_)
4514 )
4515 }
4516}
4517impl std::error::Error for DeleteGuideSampleError {
4518 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
4519 match &self.kind {
4520 DeleteGuideSampleErrorKind::InternalFailureError(_inner) => Some(_inner),
4521 DeleteGuideSampleErrorKind::ThrottlingError(_inner) => Some(_inner),
4522 DeleteGuideSampleErrorKind::ValidationError(_inner) => Some(_inner),
4523 DeleteGuideSampleErrorKind::AccessDeniedError(_inner) => Some(_inner),
4524 DeleteGuideSampleErrorKind::UnauthorizedError(_inner) => Some(_inner),
4525 DeleteGuideSampleErrorKind::ResourceConflictError(_inner) => Some(_inner),
4526 DeleteGuideSampleErrorKind::BadRequestError(_inner) => Some(_inner),
4527 DeleteGuideSampleErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
4528 DeleteGuideSampleErrorKind::Unhandled(_inner) => Some(_inner),
4529 }
4530 }
4531}
4532
4533#[non_exhaustive]
4535#[derive(std::fmt::Debug)]
4536pub struct UpdateGuideSampleError {
4537 pub kind: UpdateGuideSampleErrorKind,
4539 pub(crate) meta: aws_smithy_types::Error,
4541}
4542impl aws_smithy_http::result::CreateUnhandledError for UpdateGuideSampleError {
4543 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4544 Self {
4545 kind: UpdateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4546 meta: Default::default(),
4547 }
4548 }
4549}
4550#[non_exhaustive]
4552#[derive(std::fmt::Debug)]
4553pub enum UpdateGuideSampleErrorKind {
4554 InternalFailureError(crate::error::InternalFailureError),
4556 ThrottlingError(crate::error::ThrottlingError),
4558 ValidationError(crate::error::ValidationError),
4560 AccessDeniedError(crate::error::AccessDeniedError),
4562 UnauthorizedError(crate::error::UnauthorizedError),
4564 ResourceConflictError(crate::error::ResourceConflictError),
4566 BadRequestError(crate::error::BadRequestError),
4568 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4570 RequestTooLargeError(crate::error::RequestTooLargeError),
4572 Unhandled(crate::error::Unhandled),
4581}
4582impl std::fmt::Display for UpdateGuideSampleError {
4583 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4584 match &self.kind {
4585 UpdateGuideSampleErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4586 UpdateGuideSampleErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4587 UpdateGuideSampleErrorKind::ValidationError(_inner) => _inner.fmt(f),
4588 UpdateGuideSampleErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4589 UpdateGuideSampleErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4590 UpdateGuideSampleErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
4591 UpdateGuideSampleErrorKind::BadRequestError(_inner) => _inner.fmt(f),
4592 UpdateGuideSampleErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4593 UpdateGuideSampleErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
4594 UpdateGuideSampleErrorKind::Unhandled(_inner) => _inner.fmt(f),
4595 }
4596 }
4597}
4598impl aws_smithy_types::retry::ProvideErrorKind for UpdateGuideSampleError {
4599 fn code(&self) -> Option<&str> {
4600 UpdateGuideSampleError::code(self)
4601 }
4602 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4603 match &self.kind {
4604 UpdateGuideSampleErrorKind::ThrottlingError(inner) => {
4605 Some(inner.retryable_error_kind())
4606 }
4607 UpdateGuideSampleErrorKind::ResourceConflictError(inner) => {
4608 Some(inner.retryable_error_kind())
4609 }
4610 _ => None,
4611 }
4612 }
4613}
4614impl UpdateGuideSampleError {
4615 pub fn new(kind: UpdateGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4617 Self { kind, meta }
4618 }
4619
4620 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4622 Self {
4623 kind: UpdateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4624 meta: Default::default(),
4625 }
4626 }
4627
4628 pub fn generic(err: aws_smithy_types::Error) -> Self {
4630 Self {
4631 meta: err.clone(),
4632 kind: UpdateGuideSampleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
4633 }
4634 }
4635
4636 pub fn message(&self) -> Option<&str> {
4638 self.meta.message()
4639 }
4640
4641 pub fn meta(&self) -> &aws_smithy_types::Error {
4644 &self.meta
4645 }
4646
4647 pub fn request_id(&self) -> Option<&str> {
4649 self.meta.request_id()
4650 }
4651
4652 pub fn code(&self) -> Option<&str> {
4654 self.meta.code()
4655 }
4656 pub fn is_internal_failure_error(&self) -> bool {
4658 matches!(
4659 &self.kind,
4660 UpdateGuideSampleErrorKind::InternalFailureError(_)
4661 )
4662 }
4663 pub fn is_throttling_error(&self) -> bool {
4665 matches!(&self.kind, UpdateGuideSampleErrorKind::ThrottlingError(_))
4666 }
4667 pub fn is_validation_error(&self) -> bool {
4669 matches!(&self.kind, UpdateGuideSampleErrorKind::ValidationError(_))
4670 }
4671 pub fn is_access_denied_error(&self) -> bool {
4673 matches!(&self.kind, UpdateGuideSampleErrorKind::AccessDeniedError(_))
4674 }
4675 pub fn is_unauthorized_error(&self) -> bool {
4677 matches!(&self.kind, UpdateGuideSampleErrorKind::UnauthorizedError(_))
4678 }
4679 pub fn is_resource_conflict_error(&self) -> bool {
4681 matches!(
4682 &self.kind,
4683 UpdateGuideSampleErrorKind::ResourceConflictError(_)
4684 )
4685 }
4686 pub fn is_bad_request_error(&self) -> bool {
4688 matches!(&self.kind, UpdateGuideSampleErrorKind::BadRequestError(_))
4689 }
4690 pub fn is_resource_not_found_error(&self) -> bool {
4692 matches!(
4693 &self.kind,
4694 UpdateGuideSampleErrorKind::ResourceNotFoundError(_)
4695 )
4696 }
4697 pub fn is_request_too_large_error(&self) -> bool {
4699 matches!(
4700 &self.kind,
4701 UpdateGuideSampleErrorKind::RequestTooLargeError(_)
4702 )
4703 }
4704}
4705impl std::error::Error for UpdateGuideSampleError {
4706 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
4707 match &self.kind {
4708 UpdateGuideSampleErrorKind::InternalFailureError(_inner) => Some(_inner),
4709 UpdateGuideSampleErrorKind::ThrottlingError(_inner) => Some(_inner),
4710 UpdateGuideSampleErrorKind::ValidationError(_inner) => Some(_inner),
4711 UpdateGuideSampleErrorKind::AccessDeniedError(_inner) => Some(_inner),
4712 UpdateGuideSampleErrorKind::UnauthorizedError(_inner) => Some(_inner),
4713 UpdateGuideSampleErrorKind::ResourceConflictError(_inner) => Some(_inner),
4714 UpdateGuideSampleErrorKind::BadRequestError(_inner) => Some(_inner),
4715 UpdateGuideSampleErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
4716 UpdateGuideSampleErrorKind::RequestTooLargeError(_inner) => Some(_inner),
4717 UpdateGuideSampleErrorKind::Unhandled(_inner) => Some(_inner),
4718 }
4719 }
4720}
4721
4722#[non_exhaustive]
4724#[derive(std::fmt::Debug)]
4725pub struct ListGuideAttachmentsError {
4726 pub kind: ListGuideAttachmentsErrorKind,
4728 pub(crate) meta: aws_smithy_types::Error,
4730}
4731impl aws_smithy_http::result::CreateUnhandledError for ListGuideAttachmentsError {
4732 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4733 Self {
4734 kind: ListGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4735 meta: Default::default(),
4736 }
4737 }
4738}
4739#[non_exhaustive]
4741#[derive(std::fmt::Debug)]
4742pub enum ListGuideAttachmentsErrorKind {
4743 InternalFailureError(crate::error::InternalFailureError),
4745 ThrottlingError(crate::error::ThrottlingError),
4747 ValidationError(crate::error::ValidationError),
4749 AccessDeniedError(crate::error::AccessDeniedError),
4751 UnauthorizedError(crate::error::UnauthorizedError),
4753 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4755 Unhandled(crate::error::Unhandled),
4764}
4765impl std::fmt::Display for ListGuideAttachmentsError {
4766 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4767 match &self.kind {
4768 ListGuideAttachmentsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4769 ListGuideAttachmentsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4770 ListGuideAttachmentsErrorKind::ValidationError(_inner) => _inner.fmt(f),
4771 ListGuideAttachmentsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4772 ListGuideAttachmentsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4773 ListGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4774 ListGuideAttachmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
4775 }
4776 }
4777}
4778impl aws_smithy_types::retry::ProvideErrorKind for ListGuideAttachmentsError {
4779 fn code(&self) -> Option<&str> {
4780 ListGuideAttachmentsError::code(self)
4781 }
4782 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4783 match &self.kind {
4784 ListGuideAttachmentsErrorKind::ThrottlingError(inner) => {
4785 Some(inner.retryable_error_kind())
4786 }
4787 _ => None,
4788 }
4789 }
4790}
4791impl ListGuideAttachmentsError {
4792 pub fn new(kind: ListGuideAttachmentsErrorKind, meta: aws_smithy_types::Error) -> Self {
4794 Self { kind, meta }
4795 }
4796
4797 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4799 Self {
4800 kind: ListGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(
4801 err.into(),
4802 )),
4803 meta: Default::default(),
4804 }
4805 }
4806
4807 pub fn generic(err: aws_smithy_types::Error) -> Self {
4809 Self {
4810 meta: err.clone(),
4811 kind: ListGuideAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(
4812 err.into(),
4813 )),
4814 }
4815 }
4816
4817 pub fn message(&self) -> Option<&str> {
4819 self.meta.message()
4820 }
4821
4822 pub fn meta(&self) -> &aws_smithy_types::Error {
4825 &self.meta
4826 }
4827
4828 pub fn request_id(&self) -> Option<&str> {
4830 self.meta.request_id()
4831 }
4832
4833 pub fn code(&self) -> Option<&str> {
4835 self.meta.code()
4836 }
4837 pub fn is_internal_failure_error(&self) -> bool {
4839 matches!(
4840 &self.kind,
4841 ListGuideAttachmentsErrorKind::InternalFailureError(_)
4842 )
4843 }
4844 pub fn is_throttling_error(&self) -> bool {
4846 matches!(
4847 &self.kind,
4848 ListGuideAttachmentsErrorKind::ThrottlingError(_)
4849 )
4850 }
4851 pub fn is_validation_error(&self) -> bool {
4853 matches!(
4854 &self.kind,
4855 ListGuideAttachmentsErrorKind::ValidationError(_)
4856 )
4857 }
4858 pub fn is_access_denied_error(&self) -> bool {
4860 matches!(
4861 &self.kind,
4862 ListGuideAttachmentsErrorKind::AccessDeniedError(_)
4863 )
4864 }
4865 pub fn is_unauthorized_error(&self) -> bool {
4867 matches!(
4868 &self.kind,
4869 ListGuideAttachmentsErrorKind::UnauthorizedError(_)
4870 )
4871 }
4872 pub fn is_resource_not_found_error(&self) -> bool {
4874 matches!(
4875 &self.kind,
4876 ListGuideAttachmentsErrorKind::ResourceNotFoundError(_)
4877 )
4878 }
4879}
4880impl std::error::Error for ListGuideAttachmentsError {
4881 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
4882 match &self.kind {
4883 ListGuideAttachmentsErrorKind::InternalFailureError(_inner) => Some(_inner),
4884 ListGuideAttachmentsErrorKind::ThrottlingError(_inner) => Some(_inner),
4885 ListGuideAttachmentsErrorKind::ValidationError(_inner) => Some(_inner),
4886 ListGuideAttachmentsErrorKind::AccessDeniedError(_inner) => Some(_inner),
4887 ListGuideAttachmentsErrorKind::UnauthorizedError(_inner) => Some(_inner),
4888 ListGuideAttachmentsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
4889 ListGuideAttachmentsErrorKind::Unhandled(_inner) => Some(_inner),
4890 }
4891 }
4892}
4893
4894#[non_exhaustive]
4896#[derive(std::fmt::Debug)]
4897pub struct CreateGuideAttachmentError {
4898 pub kind: CreateGuideAttachmentErrorKind,
4900 pub(crate) meta: aws_smithy_types::Error,
4902}
4903impl aws_smithy_http::result::CreateUnhandledError for CreateGuideAttachmentError {
4904 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
4905 Self {
4906 kind: CreateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
4907 meta: Default::default(),
4908 }
4909 }
4910}
4911#[non_exhaustive]
4913#[derive(std::fmt::Debug)]
4914pub enum CreateGuideAttachmentErrorKind {
4915 InternalFailureError(crate::error::InternalFailureError),
4917 ThrottlingError(crate::error::ThrottlingError),
4919 ValidationError(crate::error::ValidationError),
4921 AccessDeniedError(crate::error::AccessDeniedError),
4923 ResponseTooLargeError(crate::error::ResponseTooLargeError),
4925 UnauthorizedError(crate::error::UnauthorizedError),
4927 ResourceConflictError(crate::error::ResourceConflictError),
4929 BadRequestError(crate::error::BadRequestError),
4931 ResourceNotFoundError(crate::error::ResourceNotFoundError),
4933 RequestTooLargeError(crate::error::RequestTooLargeError),
4935 Unhandled(crate::error::Unhandled),
4944}
4945impl std::fmt::Display for CreateGuideAttachmentError {
4946 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4947 match &self.kind {
4948 CreateGuideAttachmentErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
4949 CreateGuideAttachmentErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
4950 CreateGuideAttachmentErrorKind::ValidationError(_inner) => _inner.fmt(f),
4951 CreateGuideAttachmentErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
4952 CreateGuideAttachmentErrorKind::ResponseTooLargeError(_inner) => _inner.fmt(f),
4953 CreateGuideAttachmentErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
4954 CreateGuideAttachmentErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
4955 CreateGuideAttachmentErrorKind::BadRequestError(_inner) => _inner.fmt(f),
4956 CreateGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
4957 CreateGuideAttachmentErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
4958 CreateGuideAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
4959 }
4960 }
4961}
4962impl aws_smithy_types::retry::ProvideErrorKind for CreateGuideAttachmentError {
4963 fn code(&self) -> Option<&str> {
4964 CreateGuideAttachmentError::code(self)
4965 }
4966 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
4967 match &self.kind {
4968 CreateGuideAttachmentErrorKind::ThrottlingError(inner) => {
4969 Some(inner.retryable_error_kind())
4970 }
4971 CreateGuideAttachmentErrorKind::ResourceConflictError(inner) => {
4972 Some(inner.retryable_error_kind())
4973 }
4974 _ => None,
4975 }
4976 }
4977}
4978impl CreateGuideAttachmentError {
4979 pub fn new(kind: CreateGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
4981 Self { kind, meta }
4982 }
4983
4984 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
4986 Self {
4987 kind: CreateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
4988 err.into(),
4989 )),
4990 meta: Default::default(),
4991 }
4992 }
4993
4994 pub fn generic(err: aws_smithy_types::Error) -> Self {
4996 Self {
4997 meta: err.clone(),
4998 kind: CreateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
4999 err.into(),
5000 )),
5001 }
5002 }
5003
5004 pub fn message(&self) -> Option<&str> {
5006 self.meta.message()
5007 }
5008
5009 pub fn meta(&self) -> &aws_smithy_types::Error {
5012 &self.meta
5013 }
5014
5015 pub fn request_id(&self) -> Option<&str> {
5017 self.meta.request_id()
5018 }
5019
5020 pub fn code(&self) -> Option<&str> {
5022 self.meta.code()
5023 }
5024 pub fn is_internal_failure_error(&self) -> bool {
5026 matches!(
5027 &self.kind,
5028 CreateGuideAttachmentErrorKind::InternalFailureError(_)
5029 )
5030 }
5031 pub fn is_throttling_error(&self) -> bool {
5033 matches!(
5034 &self.kind,
5035 CreateGuideAttachmentErrorKind::ThrottlingError(_)
5036 )
5037 }
5038 pub fn is_validation_error(&self) -> bool {
5040 matches!(
5041 &self.kind,
5042 CreateGuideAttachmentErrorKind::ValidationError(_)
5043 )
5044 }
5045 pub fn is_access_denied_error(&self) -> bool {
5047 matches!(
5048 &self.kind,
5049 CreateGuideAttachmentErrorKind::AccessDeniedError(_)
5050 )
5051 }
5052 pub fn is_response_too_large_error(&self) -> bool {
5054 matches!(
5055 &self.kind,
5056 CreateGuideAttachmentErrorKind::ResponseTooLargeError(_)
5057 )
5058 }
5059 pub fn is_unauthorized_error(&self) -> bool {
5061 matches!(
5062 &self.kind,
5063 CreateGuideAttachmentErrorKind::UnauthorizedError(_)
5064 )
5065 }
5066 pub fn is_resource_conflict_error(&self) -> bool {
5068 matches!(
5069 &self.kind,
5070 CreateGuideAttachmentErrorKind::ResourceConflictError(_)
5071 )
5072 }
5073 pub fn is_bad_request_error(&self) -> bool {
5075 matches!(
5076 &self.kind,
5077 CreateGuideAttachmentErrorKind::BadRequestError(_)
5078 )
5079 }
5080 pub fn is_resource_not_found_error(&self) -> bool {
5082 matches!(
5083 &self.kind,
5084 CreateGuideAttachmentErrorKind::ResourceNotFoundError(_)
5085 )
5086 }
5087 pub fn is_request_too_large_error(&self) -> bool {
5089 matches!(
5090 &self.kind,
5091 CreateGuideAttachmentErrorKind::RequestTooLargeError(_)
5092 )
5093 }
5094}
5095impl std::error::Error for CreateGuideAttachmentError {
5096 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
5097 match &self.kind {
5098 CreateGuideAttachmentErrorKind::InternalFailureError(_inner) => Some(_inner),
5099 CreateGuideAttachmentErrorKind::ThrottlingError(_inner) => Some(_inner),
5100 CreateGuideAttachmentErrorKind::ValidationError(_inner) => Some(_inner),
5101 CreateGuideAttachmentErrorKind::AccessDeniedError(_inner) => Some(_inner),
5102 CreateGuideAttachmentErrorKind::ResponseTooLargeError(_inner) => Some(_inner),
5103 CreateGuideAttachmentErrorKind::UnauthorizedError(_inner) => Some(_inner),
5104 CreateGuideAttachmentErrorKind::ResourceConflictError(_inner) => Some(_inner),
5105 CreateGuideAttachmentErrorKind::BadRequestError(_inner) => Some(_inner),
5106 CreateGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
5107 CreateGuideAttachmentErrorKind::RequestTooLargeError(_inner) => Some(_inner),
5108 CreateGuideAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
5109 }
5110 }
5111}
5112
5113#[non_exhaustive]
5115#[derive(std::fmt::Debug)]
5116pub struct DeleteGuideAttachmentError {
5117 pub kind: DeleteGuideAttachmentErrorKind,
5119 pub(crate) meta: aws_smithy_types::Error,
5121}
5122impl aws_smithy_http::result::CreateUnhandledError for DeleteGuideAttachmentError {
5123 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
5124 Self {
5125 kind: DeleteGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
5126 meta: Default::default(),
5127 }
5128 }
5129}
5130#[non_exhaustive]
5132#[derive(std::fmt::Debug)]
5133pub enum DeleteGuideAttachmentErrorKind {
5134 InternalFailureError(crate::error::InternalFailureError),
5136 ThrottlingError(crate::error::ThrottlingError),
5138 ValidationError(crate::error::ValidationError),
5140 AccessDeniedError(crate::error::AccessDeniedError),
5142 UnauthorizedError(crate::error::UnauthorizedError),
5144 ResourceConflictError(crate::error::ResourceConflictError),
5146 BadRequestError(crate::error::BadRequestError),
5148 ResourceNotFoundError(crate::error::ResourceNotFoundError),
5150 Unhandled(crate::error::Unhandled),
5159}
5160impl std::fmt::Display for DeleteGuideAttachmentError {
5161 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5162 match &self.kind {
5163 DeleteGuideAttachmentErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
5164 DeleteGuideAttachmentErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
5165 DeleteGuideAttachmentErrorKind::ValidationError(_inner) => _inner.fmt(f),
5166 DeleteGuideAttachmentErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
5167 DeleteGuideAttachmentErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
5168 DeleteGuideAttachmentErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
5169 DeleteGuideAttachmentErrorKind::BadRequestError(_inner) => _inner.fmt(f),
5170 DeleteGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
5171 DeleteGuideAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
5172 }
5173 }
5174}
5175impl aws_smithy_types::retry::ProvideErrorKind for DeleteGuideAttachmentError {
5176 fn code(&self) -> Option<&str> {
5177 DeleteGuideAttachmentError::code(self)
5178 }
5179 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
5180 match &self.kind {
5181 DeleteGuideAttachmentErrorKind::ThrottlingError(inner) => {
5182 Some(inner.retryable_error_kind())
5183 }
5184 DeleteGuideAttachmentErrorKind::ResourceConflictError(inner) => {
5185 Some(inner.retryable_error_kind())
5186 }
5187 _ => None,
5188 }
5189 }
5190}
5191impl DeleteGuideAttachmentError {
5192 pub fn new(kind: DeleteGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
5194 Self { kind, meta }
5195 }
5196
5197 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
5199 Self {
5200 kind: DeleteGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
5201 err.into(),
5202 )),
5203 meta: Default::default(),
5204 }
5205 }
5206
5207 pub fn generic(err: aws_smithy_types::Error) -> Self {
5209 Self {
5210 meta: err.clone(),
5211 kind: DeleteGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
5212 err.into(),
5213 )),
5214 }
5215 }
5216
5217 pub fn message(&self) -> Option<&str> {
5219 self.meta.message()
5220 }
5221
5222 pub fn meta(&self) -> &aws_smithy_types::Error {
5225 &self.meta
5226 }
5227
5228 pub fn request_id(&self) -> Option<&str> {
5230 self.meta.request_id()
5231 }
5232
5233 pub fn code(&self) -> Option<&str> {
5235 self.meta.code()
5236 }
5237 pub fn is_internal_failure_error(&self) -> bool {
5239 matches!(
5240 &self.kind,
5241 DeleteGuideAttachmentErrorKind::InternalFailureError(_)
5242 )
5243 }
5244 pub fn is_throttling_error(&self) -> bool {
5246 matches!(
5247 &self.kind,
5248 DeleteGuideAttachmentErrorKind::ThrottlingError(_)
5249 )
5250 }
5251 pub fn is_validation_error(&self) -> bool {
5253 matches!(
5254 &self.kind,
5255 DeleteGuideAttachmentErrorKind::ValidationError(_)
5256 )
5257 }
5258 pub fn is_access_denied_error(&self) -> bool {
5260 matches!(
5261 &self.kind,
5262 DeleteGuideAttachmentErrorKind::AccessDeniedError(_)
5263 )
5264 }
5265 pub fn is_unauthorized_error(&self) -> bool {
5267 matches!(
5268 &self.kind,
5269 DeleteGuideAttachmentErrorKind::UnauthorizedError(_)
5270 )
5271 }
5272 pub fn is_resource_conflict_error(&self) -> bool {
5274 matches!(
5275 &self.kind,
5276 DeleteGuideAttachmentErrorKind::ResourceConflictError(_)
5277 )
5278 }
5279 pub fn is_bad_request_error(&self) -> bool {
5281 matches!(
5282 &self.kind,
5283 DeleteGuideAttachmentErrorKind::BadRequestError(_)
5284 )
5285 }
5286 pub fn is_resource_not_found_error(&self) -> bool {
5288 matches!(
5289 &self.kind,
5290 DeleteGuideAttachmentErrorKind::ResourceNotFoundError(_)
5291 )
5292 }
5293}
5294impl std::error::Error for DeleteGuideAttachmentError {
5295 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
5296 match &self.kind {
5297 DeleteGuideAttachmentErrorKind::InternalFailureError(_inner) => Some(_inner),
5298 DeleteGuideAttachmentErrorKind::ThrottlingError(_inner) => Some(_inner),
5299 DeleteGuideAttachmentErrorKind::ValidationError(_inner) => Some(_inner),
5300 DeleteGuideAttachmentErrorKind::AccessDeniedError(_inner) => Some(_inner),
5301 DeleteGuideAttachmentErrorKind::UnauthorizedError(_inner) => Some(_inner),
5302 DeleteGuideAttachmentErrorKind::ResourceConflictError(_inner) => Some(_inner),
5303 DeleteGuideAttachmentErrorKind::BadRequestError(_inner) => Some(_inner),
5304 DeleteGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
5305 DeleteGuideAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
5306 }
5307 }
5308}
5309
5310#[non_exhaustive]
5312#[derive(std::fmt::Debug)]
5313pub struct UpdateGuideAttachmentError {
5314 pub kind: UpdateGuideAttachmentErrorKind,
5316 pub(crate) meta: aws_smithy_types::Error,
5318}
5319impl aws_smithy_http::result::CreateUnhandledError for UpdateGuideAttachmentError {
5320 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
5321 Self {
5322 kind: UpdateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
5323 meta: Default::default(),
5324 }
5325 }
5326}
5327#[non_exhaustive]
5329#[derive(std::fmt::Debug)]
5330pub enum UpdateGuideAttachmentErrorKind {
5331 InternalFailureError(crate::error::InternalFailureError),
5333 ThrottlingError(crate::error::ThrottlingError),
5335 ValidationError(crate::error::ValidationError),
5337 AccessDeniedError(crate::error::AccessDeniedError),
5339 UnauthorizedError(crate::error::UnauthorizedError),
5341 ResourceConflictError(crate::error::ResourceConflictError),
5343 BadRequestError(crate::error::BadRequestError),
5345 ResourceNotFoundError(crate::error::ResourceNotFoundError),
5347 RequestTooLargeError(crate::error::RequestTooLargeError),
5349 Unhandled(crate::error::Unhandled),
5358}
5359impl std::fmt::Display for UpdateGuideAttachmentError {
5360 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5361 match &self.kind {
5362 UpdateGuideAttachmentErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
5363 UpdateGuideAttachmentErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
5364 UpdateGuideAttachmentErrorKind::ValidationError(_inner) => _inner.fmt(f),
5365 UpdateGuideAttachmentErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
5366 UpdateGuideAttachmentErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
5367 UpdateGuideAttachmentErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
5368 UpdateGuideAttachmentErrorKind::BadRequestError(_inner) => _inner.fmt(f),
5369 UpdateGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
5370 UpdateGuideAttachmentErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
5371 UpdateGuideAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
5372 }
5373 }
5374}
5375impl aws_smithy_types::retry::ProvideErrorKind for UpdateGuideAttachmentError {
5376 fn code(&self) -> Option<&str> {
5377 UpdateGuideAttachmentError::code(self)
5378 }
5379 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
5380 match &self.kind {
5381 UpdateGuideAttachmentErrorKind::ThrottlingError(inner) => {
5382 Some(inner.retryable_error_kind())
5383 }
5384 UpdateGuideAttachmentErrorKind::ResourceConflictError(inner) => {
5385 Some(inner.retryable_error_kind())
5386 }
5387 _ => None,
5388 }
5389 }
5390}
5391impl UpdateGuideAttachmentError {
5392 pub fn new(kind: UpdateGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
5394 Self { kind, meta }
5395 }
5396
5397 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
5399 Self {
5400 kind: UpdateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
5401 err.into(),
5402 )),
5403 meta: Default::default(),
5404 }
5405 }
5406
5407 pub fn generic(err: aws_smithy_types::Error) -> Self {
5409 Self {
5410 meta: err.clone(),
5411 kind: UpdateGuideAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
5412 err.into(),
5413 )),
5414 }
5415 }
5416
5417 pub fn message(&self) -> Option<&str> {
5419 self.meta.message()
5420 }
5421
5422 pub fn meta(&self) -> &aws_smithy_types::Error {
5425 &self.meta
5426 }
5427
5428 pub fn request_id(&self) -> Option<&str> {
5430 self.meta.request_id()
5431 }
5432
5433 pub fn code(&self) -> Option<&str> {
5435 self.meta.code()
5436 }
5437 pub fn is_internal_failure_error(&self) -> bool {
5439 matches!(
5440 &self.kind,
5441 UpdateGuideAttachmentErrorKind::InternalFailureError(_)
5442 )
5443 }
5444 pub fn is_throttling_error(&self) -> bool {
5446 matches!(
5447 &self.kind,
5448 UpdateGuideAttachmentErrorKind::ThrottlingError(_)
5449 )
5450 }
5451 pub fn is_validation_error(&self) -> bool {
5453 matches!(
5454 &self.kind,
5455 UpdateGuideAttachmentErrorKind::ValidationError(_)
5456 )
5457 }
5458 pub fn is_access_denied_error(&self) -> bool {
5460 matches!(
5461 &self.kind,
5462 UpdateGuideAttachmentErrorKind::AccessDeniedError(_)
5463 )
5464 }
5465 pub fn is_unauthorized_error(&self) -> bool {
5467 matches!(
5468 &self.kind,
5469 UpdateGuideAttachmentErrorKind::UnauthorizedError(_)
5470 )
5471 }
5472 pub fn is_resource_conflict_error(&self) -> bool {
5474 matches!(
5475 &self.kind,
5476 UpdateGuideAttachmentErrorKind::ResourceConflictError(_)
5477 )
5478 }
5479 pub fn is_bad_request_error(&self) -> bool {
5481 matches!(
5482 &self.kind,
5483 UpdateGuideAttachmentErrorKind::BadRequestError(_)
5484 )
5485 }
5486 pub fn is_resource_not_found_error(&self) -> bool {
5488 matches!(
5489 &self.kind,
5490 UpdateGuideAttachmentErrorKind::ResourceNotFoundError(_)
5491 )
5492 }
5493 pub fn is_request_too_large_error(&self) -> bool {
5495 matches!(
5496 &self.kind,
5497 UpdateGuideAttachmentErrorKind::RequestTooLargeError(_)
5498 )
5499 }
5500}
5501impl std::error::Error for UpdateGuideAttachmentError {
5502 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
5503 match &self.kind {
5504 UpdateGuideAttachmentErrorKind::InternalFailureError(_inner) => Some(_inner),
5505 UpdateGuideAttachmentErrorKind::ThrottlingError(_inner) => Some(_inner),
5506 UpdateGuideAttachmentErrorKind::ValidationError(_inner) => Some(_inner),
5507 UpdateGuideAttachmentErrorKind::AccessDeniedError(_inner) => Some(_inner),
5508 UpdateGuideAttachmentErrorKind::UnauthorizedError(_inner) => Some(_inner),
5509 UpdateGuideAttachmentErrorKind::ResourceConflictError(_inner) => Some(_inner),
5510 UpdateGuideAttachmentErrorKind::BadRequestError(_inner) => Some(_inner),
5511 UpdateGuideAttachmentErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
5512 UpdateGuideAttachmentErrorKind::RequestTooLargeError(_inner) => Some(_inner),
5513 UpdateGuideAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
5514 }
5515 }
5516}
5517
5518#[non_exhaustive]
5520#[derive(std::fmt::Debug)]
5521pub struct UpdateAccountConfigError {
5522 pub kind: UpdateAccountConfigErrorKind,
5524 pub(crate) meta: aws_smithy_types::Error,
5526}
5527impl aws_smithy_http::result::CreateUnhandledError for UpdateAccountConfigError {
5528 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
5529 Self {
5530 kind: UpdateAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
5531 meta: Default::default(),
5532 }
5533 }
5534}
5535#[non_exhaustive]
5537#[derive(std::fmt::Debug)]
5538pub enum UpdateAccountConfigErrorKind {
5539 InternalFailureError(crate::error::InternalFailureError),
5541 ThrottlingError(crate::error::ThrottlingError),
5543 ValidationError(crate::error::ValidationError),
5545 AccessDeniedError(crate::error::AccessDeniedError),
5547 UnauthorizedError(crate::error::UnauthorizedError),
5549 ResourceConflictError(crate::error::ResourceConflictError),
5551 BadRequestError(crate::error::BadRequestError),
5553 ResourceNotFoundError(crate::error::ResourceNotFoundError),
5555 RequestTooLargeError(crate::error::RequestTooLargeError),
5557 Unhandled(crate::error::Unhandled),
5566}
5567impl std::fmt::Display for UpdateAccountConfigError {
5568 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5569 match &self.kind {
5570 UpdateAccountConfigErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
5571 UpdateAccountConfigErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
5572 UpdateAccountConfigErrorKind::ValidationError(_inner) => _inner.fmt(f),
5573 UpdateAccountConfigErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
5574 UpdateAccountConfigErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
5575 UpdateAccountConfigErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
5576 UpdateAccountConfigErrorKind::BadRequestError(_inner) => _inner.fmt(f),
5577 UpdateAccountConfigErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
5578 UpdateAccountConfigErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
5579 UpdateAccountConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
5580 }
5581 }
5582}
5583impl aws_smithy_types::retry::ProvideErrorKind for UpdateAccountConfigError {
5584 fn code(&self) -> Option<&str> {
5585 UpdateAccountConfigError::code(self)
5586 }
5587 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
5588 match &self.kind {
5589 UpdateAccountConfigErrorKind::ThrottlingError(inner) => {
5590 Some(inner.retryable_error_kind())
5591 }
5592 UpdateAccountConfigErrorKind::ResourceConflictError(inner) => {
5593 Some(inner.retryable_error_kind())
5594 }
5595 _ => None,
5596 }
5597 }
5598}
5599impl UpdateAccountConfigError {
5600 pub fn new(kind: UpdateAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
5602 Self { kind, meta }
5603 }
5604
5605 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
5607 Self {
5608 kind: UpdateAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
5609 meta: Default::default(),
5610 }
5611 }
5612
5613 pub fn generic(err: aws_smithy_types::Error) -> Self {
5615 Self {
5616 meta: err.clone(),
5617 kind: UpdateAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
5618 }
5619 }
5620
5621 pub fn message(&self) -> Option<&str> {
5623 self.meta.message()
5624 }
5625
5626 pub fn meta(&self) -> &aws_smithy_types::Error {
5629 &self.meta
5630 }
5631
5632 pub fn request_id(&self) -> Option<&str> {
5634 self.meta.request_id()
5635 }
5636
5637 pub fn code(&self) -> Option<&str> {
5639 self.meta.code()
5640 }
5641 pub fn is_internal_failure_error(&self) -> bool {
5643 matches!(
5644 &self.kind,
5645 UpdateAccountConfigErrorKind::InternalFailureError(_)
5646 )
5647 }
5648 pub fn is_throttling_error(&self) -> bool {
5650 matches!(&self.kind, UpdateAccountConfigErrorKind::ThrottlingError(_))
5651 }
5652 pub fn is_validation_error(&self) -> bool {
5654 matches!(&self.kind, UpdateAccountConfigErrorKind::ValidationError(_))
5655 }
5656 pub fn is_access_denied_error(&self) -> bool {
5658 matches!(
5659 &self.kind,
5660 UpdateAccountConfigErrorKind::AccessDeniedError(_)
5661 )
5662 }
5663 pub fn is_unauthorized_error(&self) -> bool {
5665 matches!(
5666 &self.kind,
5667 UpdateAccountConfigErrorKind::UnauthorizedError(_)
5668 )
5669 }
5670 pub fn is_resource_conflict_error(&self) -> bool {
5672 matches!(
5673 &self.kind,
5674 UpdateAccountConfigErrorKind::ResourceConflictError(_)
5675 )
5676 }
5677 pub fn is_bad_request_error(&self) -> bool {
5679 matches!(&self.kind, UpdateAccountConfigErrorKind::BadRequestError(_))
5680 }
5681 pub fn is_resource_not_found_error(&self) -> bool {
5683 matches!(
5684 &self.kind,
5685 UpdateAccountConfigErrorKind::ResourceNotFoundError(_)
5686 )
5687 }
5688 pub fn is_request_too_large_error(&self) -> bool {
5690 matches!(
5691 &self.kind,
5692 UpdateAccountConfigErrorKind::RequestTooLargeError(_)
5693 )
5694 }
5695}
5696impl std::error::Error for UpdateAccountConfigError {
5697 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
5698 match &self.kind {
5699 UpdateAccountConfigErrorKind::InternalFailureError(_inner) => Some(_inner),
5700 UpdateAccountConfigErrorKind::ThrottlingError(_inner) => Some(_inner),
5701 UpdateAccountConfigErrorKind::ValidationError(_inner) => Some(_inner),
5702 UpdateAccountConfigErrorKind::AccessDeniedError(_inner) => Some(_inner),
5703 UpdateAccountConfigErrorKind::UnauthorizedError(_inner) => Some(_inner),
5704 UpdateAccountConfigErrorKind::ResourceConflictError(_inner) => Some(_inner),
5705 UpdateAccountConfigErrorKind::BadRequestError(_inner) => Some(_inner),
5706 UpdateAccountConfigErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
5707 UpdateAccountConfigErrorKind::RequestTooLargeError(_inner) => Some(_inner),
5708 UpdateAccountConfigErrorKind::Unhandled(_inner) => Some(_inner),
5709 }
5710 }
5711}
5712
5713#[non_exhaustive]
5715#[derive(std::fmt::Debug)]
5716pub struct GetAccountConfigError {
5717 pub kind: GetAccountConfigErrorKind,
5719 pub(crate) meta: aws_smithy_types::Error,
5721}
5722impl aws_smithy_http::result::CreateUnhandledError for GetAccountConfigError {
5723 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
5724 Self {
5725 kind: GetAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
5726 meta: Default::default(),
5727 }
5728 }
5729}
5730#[non_exhaustive]
5732#[derive(std::fmt::Debug)]
5733pub enum GetAccountConfigErrorKind {
5734 InternalFailureError(crate::error::InternalFailureError),
5736 ThrottlingError(crate::error::ThrottlingError),
5738 ValidationError(crate::error::ValidationError),
5740 AccessDeniedError(crate::error::AccessDeniedError),
5742 UnauthorizedError(crate::error::UnauthorizedError),
5744 ResourceNotFoundError(crate::error::ResourceNotFoundError),
5746 RequestTooLargeError(crate::error::RequestTooLargeError),
5748 Unhandled(crate::error::Unhandled),
5757}
5758impl std::fmt::Display for GetAccountConfigError {
5759 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5760 match &self.kind {
5761 GetAccountConfigErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
5762 GetAccountConfigErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
5763 GetAccountConfigErrorKind::ValidationError(_inner) => _inner.fmt(f),
5764 GetAccountConfigErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
5765 GetAccountConfigErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
5766 GetAccountConfigErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
5767 GetAccountConfigErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
5768 GetAccountConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
5769 }
5770 }
5771}
5772impl aws_smithy_types::retry::ProvideErrorKind for GetAccountConfigError {
5773 fn code(&self) -> Option<&str> {
5774 GetAccountConfigError::code(self)
5775 }
5776 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
5777 match &self.kind {
5778 GetAccountConfigErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
5779 _ => None,
5780 }
5781 }
5782}
5783impl GetAccountConfigError {
5784 pub fn new(kind: GetAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
5786 Self { kind, meta }
5787 }
5788
5789 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
5791 Self {
5792 kind: GetAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
5793 meta: Default::default(),
5794 }
5795 }
5796
5797 pub fn generic(err: aws_smithy_types::Error) -> Self {
5799 Self {
5800 meta: err.clone(),
5801 kind: GetAccountConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
5802 }
5803 }
5804
5805 pub fn message(&self) -> Option<&str> {
5807 self.meta.message()
5808 }
5809
5810 pub fn meta(&self) -> &aws_smithy_types::Error {
5813 &self.meta
5814 }
5815
5816 pub fn request_id(&self) -> Option<&str> {
5818 self.meta.request_id()
5819 }
5820
5821 pub fn code(&self) -> Option<&str> {
5823 self.meta.code()
5824 }
5825 pub fn is_internal_failure_error(&self) -> bool {
5827 matches!(
5828 &self.kind,
5829 GetAccountConfigErrorKind::InternalFailureError(_)
5830 )
5831 }
5832 pub fn is_throttling_error(&self) -> bool {
5834 matches!(&self.kind, GetAccountConfigErrorKind::ThrottlingError(_))
5835 }
5836 pub fn is_validation_error(&self) -> bool {
5838 matches!(&self.kind, GetAccountConfigErrorKind::ValidationError(_))
5839 }
5840 pub fn is_access_denied_error(&self) -> bool {
5842 matches!(&self.kind, GetAccountConfigErrorKind::AccessDeniedError(_))
5843 }
5844 pub fn is_unauthorized_error(&self) -> bool {
5846 matches!(&self.kind, GetAccountConfigErrorKind::UnauthorizedError(_))
5847 }
5848 pub fn is_resource_not_found_error(&self) -> bool {
5850 matches!(
5851 &self.kind,
5852 GetAccountConfigErrorKind::ResourceNotFoundError(_)
5853 )
5854 }
5855 pub fn is_request_too_large_error(&self) -> bool {
5857 matches!(
5858 &self.kind,
5859 GetAccountConfigErrorKind::RequestTooLargeError(_)
5860 )
5861 }
5862}
5863impl std::error::Error for GetAccountConfigError {
5864 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
5865 match &self.kind {
5866 GetAccountConfigErrorKind::InternalFailureError(_inner) => Some(_inner),
5867 GetAccountConfigErrorKind::ThrottlingError(_inner) => Some(_inner),
5868 GetAccountConfigErrorKind::ValidationError(_inner) => Some(_inner),
5869 GetAccountConfigErrorKind::AccessDeniedError(_inner) => Some(_inner),
5870 GetAccountConfigErrorKind::UnauthorizedError(_inner) => Some(_inner),
5871 GetAccountConfigErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
5872 GetAccountConfigErrorKind::RequestTooLargeError(_inner) => Some(_inner),
5873 GetAccountConfigErrorKind::Unhandled(_inner) => Some(_inner),
5874 }
5875 }
5876}
5877
5878#[non_exhaustive]
5880#[derive(std::fmt::Debug)]
5881pub struct ListX12TransactionSetsError {
5882 pub kind: ListX12TransactionSetsErrorKind,
5884 pub(crate) meta: aws_smithy_types::Error,
5886}
5887impl aws_smithy_http::result::CreateUnhandledError for ListX12TransactionSetsError {
5888 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
5889 Self {
5890 kind: ListX12TransactionSetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
5891 meta: Default::default(),
5892 }
5893 }
5894}
5895#[non_exhaustive]
5897#[derive(std::fmt::Debug)]
5898pub enum ListX12TransactionSetsErrorKind {
5899 InternalFailureError(crate::error::InternalFailureError),
5901 ThrottlingError(crate::error::ThrottlingError),
5903 ValidationError(crate::error::ValidationError),
5905 AccessDeniedError(crate::error::AccessDeniedError),
5907 UnauthorizedError(crate::error::UnauthorizedError),
5909 BadRequestError(crate::error::BadRequestError),
5911 ResourceNotFoundError(crate::error::ResourceNotFoundError),
5913 Unhandled(crate::error::Unhandled),
5922}
5923impl std::fmt::Display for ListX12TransactionSetsError {
5924 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5925 match &self.kind {
5926 ListX12TransactionSetsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
5927 ListX12TransactionSetsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
5928 ListX12TransactionSetsErrorKind::ValidationError(_inner) => _inner.fmt(f),
5929 ListX12TransactionSetsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
5930 ListX12TransactionSetsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
5931 ListX12TransactionSetsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
5932 ListX12TransactionSetsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
5933 ListX12TransactionSetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
5934 }
5935 }
5936}
5937impl aws_smithy_types::retry::ProvideErrorKind for ListX12TransactionSetsError {
5938 fn code(&self) -> Option<&str> {
5939 ListX12TransactionSetsError::code(self)
5940 }
5941 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
5942 match &self.kind {
5943 ListX12TransactionSetsErrorKind::ThrottlingError(inner) => {
5944 Some(inner.retryable_error_kind())
5945 }
5946 _ => None,
5947 }
5948 }
5949}
5950impl ListX12TransactionSetsError {
5951 pub fn new(kind: ListX12TransactionSetsErrorKind, meta: aws_smithy_types::Error) -> Self {
5953 Self { kind, meta }
5954 }
5955
5956 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
5958 Self {
5959 kind: ListX12TransactionSetsErrorKind::Unhandled(crate::error::Unhandled::new(
5960 err.into(),
5961 )),
5962 meta: Default::default(),
5963 }
5964 }
5965
5966 pub fn generic(err: aws_smithy_types::Error) -> Self {
5968 Self {
5969 meta: err.clone(),
5970 kind: ListX12TransactionSetsErrorKind::Unhandled(crate::error::Unhandled::new(
5971 err.into(),
5972 )),
5973 }
5974 }
5975
5976 pub fn message(&self) -> Option<&str> {
5978 self.meta.message()
5979 }
5980
5981 pub fn meta(&self) -> &aws_smithy_types::Error {
5984 &self.meta
5985 }
5986
5987 pub fn request_id(&self) -> Option<&str> {
5989 self.meta.request_id()
5990 }
5991
5992 pub fn code(&self) -> Option<&str> {
5994 self.meta.code()
5995 }
5996 pub fn is_internal_failure_error(&self) -> bool {
5998 matches!(
5999 &self.kind,
6000 ListX12TransactionSetsErrorKind::InternalFailureError(_)
6001 )
6002 }
6003 pub fn is_throttling_error(&self) -> bool {
6005 matches!(
6006 &self.kind,
6007 ListX12TransactionSetsErrorKind::ThrottlingError(_)
6008 )
6009 }
6010 pub fn is_validation_error(&self) -> bool {
6012 matches!(
6013 &self.kind,
6014 ListX12TransactionSetsErrorKind::ValidationError(_)
6015 )
6016 }
6017 pub fn is_access_denied_error(&self) -> bool {
6019 matches!(
6020 &self.kind,
6021 ListX12TransactionSetsErrorKind::AccessDeniedError(_)
6022 )
6023 }
6024 pub fn is_unauthorized_error(&self) -> bool {
6026 matches!(
6027 &self.kind,
6028 ListX12TransactionSetsErrorKind::UnauthorizedError(_)
6029 )
6030 }
6031 pub fn is_bad_request_error(&self) -> bool {
6033 matches!(
6034 &self.kind,
6035 ListX12TransactionSetsErrorKind::BadRequestError(_)
6036 )
6037 }
6038 pub fn is_resource_not_found_error(&self) -> bool {
6040 matches!(
6041 &self.kind,
6042 ListX12TransactionSetsErrorKind::ResourceNotFoundError(_)
6043 )
6044 }
6045}
6046impl std::error::Error for ListX12TransactionSetsError {
6047 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
6048 match &self.kind {
6049 ListX12TransactionSetsErrorKind::InternalFailureError(_inner) => Some(_inner),
6050 ListX12TransactionSetsErrorKind::ThrottlingError(_inner) => Some(_inner),
6051 ListX12TransactionSetsErrorKind::ValidationError(_inner) => Some(_inner),
6052 ListX12TransactionSetsErrorKind::AccessDeniedError(_inner) => Some(_inner),
6053 ListX12TransactionSetsErrorKind::UnauthorizedError(_inner) => Some(_inner),
6054 ListX12TransactionSetsErrorKind::BadRequestError(_inner) => Some(_inner),
6055 ListX12TransactionSetsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
6056 ListX12TransactionSetsErrorKind::Unhandled(_inner) => Some(_inner),
6057 }
6058 }
6059}
6060
6061#[non_exhaustive]
6063#[derive(std::fmt::Debug)]
6064pub struct ListAllPublicGuidesError {
6065 pub kind: ListAllPublicGuidesErrorKind,
6067 pub(crate) meta: aws_smithy_types::Error,
6069}
6070impl aws_smithy_http::result::CreateUnhandledError for ListAllPublicGuidesError {
6071 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
6072 Self {
6073 kind: ListAllPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
6074 meta: Default::default(),
6075 }
6076 }
6077}
6078#[non_exhaustive]
6080#[derive(std::fmt::Debug)]
6081pub enum ListAllPublicGuidesErrorKind {
6082 InternalFailureError(crate::error::InternalFailureError),
6084 ThrottlingError(crate::error::ThrottlingError),
6086 ValidationError(crate::error::ValidationError),
6088 BadRequestError(crate::error::BadRequestError),
6090 ResourceNotFoundError(crate::error::ResourceNotFoundError),
6092 RequestTooLargeError(crate::error::RequestTooLargeError),
6094 Unhandled(crate::error::Unhandled),
6103}
6104impl std::fmt::Display for ListAllPublicGuidesError {
6105 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6106 match &self.kind {
6107 ListAllPublicGuidesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
6108 ListAllPublicGuidesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
6109 ListAllPublicGuidesErrorKind::ValidationError(_inner) => _inner.fmt(f),
6110 ListAllPublicGuidesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
6111 ListAllPublicGuidesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
6112 ListAllPublicGuidesErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
6113 ListAllPublicGuidesErrorKind::Unhandled(_inner) => _inner.fmt(f),
6114 }
6115 }
6116}
6117impl aws_smithy_types::retry::ProvideErrorKind for ListAllPublicGuidesError {
6118 fn code(&self) -> Option<&str> {
6119 ListAllPublicGuidesError::code(self)
6120 }
6121 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
6122 match &self.kind {
6123 ListAllPublicGuidesErrorKind::ThrottlingError(inner) => {
6124 Some(inner.retryable_error_kind())
6125 }
6126 _ => None,
6127 }
6128 }
6129}
6130impl ListAllPublicGuidesError {
6131 pub fn new(kind: ListAllPublicGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
6133 Self { kind, meta }
6134 }
6135
6136 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
6138 Self {
6139 kind: ListAllPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
6140 meta: Default::default(),
6141 }
6142 }
6143
6144 pub fn generic(err: aws_smithy_types::Error) -> Self {
6146 Self {
6147 meta: err.clone(),
6148 kind: ListAllPublicGuidesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
6149 }
6150 }
6151
6152 pub fn message(&self) -> Option<&str> {
6154 self.meta.message()
6155 }
6156
6157 pub fn meta(&self) -> &aws_smithy_types::Error {
6160 &self.meta
6161 }
6162
6163 pub fn request_id(&self) -> Option<&str> {
6165 self.meta.request_id()
6166 }
6167
6168 pub fn code(&self) -> Option<&str> {
6170 self.meta.code()
6171 }
6172 pub fn is_internal_failure_error(&self) -> bool {
6174 matches!(
6175 &self.kind,
6176 ListAllPublicGuidesErrorKind::InternalFailureError(_)
6177 )
6178 }
6179 pub fn is_throttling_error(&self) -> bool {
6181 matches!(&self.kind, ListAllPublicGuidesErrorKind::ThrottlingError(_))
6182 }
6183 pub fn is_validation_error(&self) -> bool {
6185 matches!(&self.kind, ListAllPublicGuidesErrorKind::ValidationError(_))
6186 }
6187 pub fn is_bad_request_error(&self) -> bool {
6189 matches!(&self.kind, ListAllPublicGuidesErrorKind::BadRequestError(_))
6190 }
6191 pub fn is_resource_not_found_error(&self) -> bool {
6193 matches!(
6194 &self.kind,
6195 ListAllPublicGuidesErrorKind::ResourceNotFoundError(_)
6196 )
6197 }
6198 pub fn is_request_too_large_error(&self) -> bool {
6200 matches!(
6201 &self.kind,
6202 ListAllPublicGuidesErrorKind::RequestTooLargeError(_)
6203 )
6204 }
6205}
6206impl std::error::Error for ListAllPublicGuidesError {
6207 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
6208 match &self.kind {
6209 ListAllPublicGuidesErrorKind::InternalFailureError(_inner) => Some(_inner),
6210 ListAllPublicGuidesErrorKind::ThrottlingError(_inner) => Some(_inner),
6211 ListAllPublicGuidesErrorKind::ValidationError(_inner) => Some(_inner),
6212 ListAllPublicGuidesErrorKind::BadRequestError(_inner) => Some(_inner),
6213 ListAllPublicGuidesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
6214 ListAllPublicGuidesErrorKind::RequestTooLargeError(_inner) => Some(_inner),
6215 ListAllPublicGuidesErrorKind::Unhandled(_inner) => Some(_inner),
6216 }
6217 }
6218}
6219
6220#[non_exhaustive]
6222#[derive(std::fmt::Debug)]
6223pub struct GetX12TransactionSetMetadataError {
6224 pub kind: GetX12TransactionSetMetadataErrorKind,
6226 pub(crate) meta: aws_smithy_types::Error,
6228}
6229impl aws_smithy_http::result::CreateUnhandledError for GetX12TransactionSetMetadataError {
6230 fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
6231 Self {
6232 kind: GetX12TransactionSetMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
6233 source,
6234 )),
6235 meta: Default::default(),
6236 }
6237 }
6238}
6239#[non_exhaustive]
6241#[derive(std::fmt::Debug)]
6242pub enum GetX12TransactionSetMetadataErrorKind {
6243 InternalFailureError(crate::error::InternalFailureError),
6245 ThrottlingError(crate::error::ThrottlingError),
6247 ValidationError(crate::error::ValidationError),
6249 AccessDeniedError(crate::error::AccessDeniedError),
6251 UnauthorizedError(crate::error::UnauthorizedError),
6253 BadRequestError(crate::error::BadRequestError),
6255 ResourceNotFoundError(crate::error::ResourceNotFoundError),
6257 Unhandled(crate::error::Unhandled),
6266}
6267impl std::fmt::Display for GetX12TransactionSetMetadataError {
6268 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6269 match &self.kind {
6270 GetX12TransactionSetMetadataErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
6271 GetX12TransactionSetMetadataErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
6272 GetX12TransactionSetMetadataErrorKind::ValidationError(_inner) => _inner.fmt(f),
6273 GetX12TransactionSetMetadataErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
6274 GetX12TransactionSetMetadataErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
6275 GetX12TransactionSetMetadataErrorKind::BadRequestError(_inner) => _inner.fmt(f),
6276 GetX12TransactionSetMetadataErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
6277 GetX12TransactionSetMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
6278 }
6279 }
6280}
6281impl aws_smithy_types::retry::ProvideErrorKind for GetX12TransactionSetMetadataError {
6282 fn code(&self) -> Option<&str> {
6283 GetX12TransactionSetMetadataError::code(self)
6284 }
6285 fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
6286 match &self.kind {
6287 GetX12TransactionSetMetadataErrorKind::ThrottlingError(inner) => {
6288 Some(inner.retryable_error_kind())
6289 }
6290 _ => None,
6291 }
6292 }
6293}
6294impl GetX12TransactionSetMetadataError {
6295 pub fn new(kind: GetX12TransactionSetMetadataErrorKind, meta: aws_smithy_types::Error) -> Self {
6297 Self { kind, meta }
6298 }
6299
6300 pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
6302 Self {
6303 kind: GetX12TransactionSetMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
6304 err.into(),
6305 )),
6306 meta: Default::default(),
6307 }
6308 }
6309
6310 pub fn generic(err: aws_smithy_types::Error) -> Self {
6312 Self {
6313 meta: err.clone(),
6314 kind: GetX12TransactionSetMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
6315 err.into(),
6316 )),
6317 }
6318 }
6319
6320 pub fn message(&self) -> Option<&str> {
6322 self.meta.message()
6323 }
6324
6325 pub fn meta(&self) -> &aws_smithy_types::Error {
6328 &self.meta
6329 }
6330
6331 pub fn request_id(&self) -> Option<&str> {
6333 self.meta.request_id()
6334 }
6335
6336 pub fn code(&self) -> Option<&str> {
6338 self.meta.code()
6339 }
6340 pub fn is_internal_failure_error(&self) -> bool {
6342 matches!(
6343 &self.kind,
6344 GetX12TransactionSetMetadataErrorKind::InternalFailureError(_)
6345 )
6346 }
6347 pub fn is_throttling_error(&self) -> bool {
6349 matches!(
6350 &self.kind,
6351 GetX12TransactionSetMetadataErrorKind::ThrottlingError(_)
6352 )
6353 }
6354 pub fn is_validation_error(&self) -> bool {
6356 matches!(
6357 &self.kind,
6358 GetX12TransactionSetMetadataErrorKind::ValidationError(_)
6359 )
6360 }
6361 pub fn is_access_denied_error(&self) -> bool {
6363 matches!(
6364 &self.kind,
6365 GetX12TransactionSetMetadataErrorKind::AccessDeniedError(_)
6366 )
6367 }
6368 pub fn is_unauthorized_error(&self) -> bool {
6370 matches!(
6371 &self.kind,
6372 GetX12TransactionSetMetadataErrorKind::UnauthorizedError(_)
6373 )
6374 }
6375 pub fn is_bad_request_error(&self) -> bool {
6377 matches!(
6378 &self.kind,
6379 GetX12TransactionSetMetadataErrorKind::BadRequestError(_)
6380 )
6381 }
6382 pub fn is_resource_not_found_error(&self) -> bool {
6384 matches!(
6385 &self.kind,
6386 GetX12TransactionSetMetadataErrorKind::ResourceNotFoundError(_)
6387 )
6388 }
6389}
6390impl std::error::Error for GetX12TransactionSetMetadataError {
6391 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
6392 match &self.kind {
6393 GetX12TransactionSetMetadataErrorKind::InternalFailureError(_inner) => Some(_inner),
6394 GetX12TransactionSetMetadataErrorKind::ThrottlingError(_inner) => Some(_inner),
6395 GetX12TransactionSetMetadataErrorKind::ValidationError(_inner) => Some(_inner),
6396 GetX12TransactionSetMetadataErrorKind::AccessDeniedError(_inner) => Some(_inner),
6397 GetX12TransactionSetMetadataErrorKind::UnauthorizedError(_inner) => Some(_inner),
6398 GetX12TransactionSetMetadataErrorKind::BadRequestError(_inner) => Some(_inner),
6399 GetX12TransactionSetMetadataErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
6400 GetX12TransactionSetMetadataErrorKind::Unhandled(_inner) => Some(_inner),
6401 }
6402 }
6403}
6404
6405#[derive(Debug)]
6414pub struct Unhandled {
6415 source: Box<dyn std::error::Error + Send + Sync + 'static>,
6416}
6417impl Unhandled {
6418 #[allow(unused)]
6419 pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
6420 Self { source }
6421 }
6422}
6423impl std::fmt::Display for Unhandled {
6424 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
6425 write!(f, "unhandled error")
6426 }
6427}
6428impl std::error::Error for Unhandled {
6429 fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
6430 Some(self.source.as_ref() as _)
6431 }
6432}