stedi_sdk_client_guides/
error.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Error type for the `UpdateShareConfig` operation.
3#[non_exhaustive]
4#[derive(std::fmt::Debug)]
5pub struct UpdateShareConfigError {
6    /// Kind of error that occurred.
7    pub kind: UpdateShareConfigErrorKind,
8    /// Additional metadata about the error, including error code, message, and request ID.
9    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/// Types of errors that can occur for the `UpdateShareConfig` operation.
20#[non_exhaustive]
21#[derive(std::fmt::Debug)]
22pub enum UpdateShareConfigErrorKind {
23    /// The server response when an unexpected error occurred while processing request.
24    InternalFailureError(crate::error::InternalFailureError),
25    /// The server response when usage plan or account-level throttling limits exceeded.
26    ThrottlingError(crate::error::ThrottlingError),
27    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
28    ValidationError(crate::error::ValidationError),
29    /// The server response for authorization failure.
30    AccessDeniedError(crate::error::AccessDeniedError),
31    /// The server response when the authorizer failed to authenticate the caller.
32    UnauthorizedError(crate::error::UnauthorizedError),
33    /// The server could not process the request because of conflict in the current state of the resource.
34    ResourceConflictError(crate::error::ResourceConflictError),
35    /// The server cannot process the request due to an apparent client error.
36    BadRequestError(crate::error::BadRequestError),
37    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
38    ResourceNotFoundError(crate::error::ResourceNotFoundError),
39    /// The server response for the request too large error.
40    RequestTooLargeError(crate::error::RequestTooLargeError),
41    ///
42    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
43    ///
44    /// When logging an error from the SDK, it is recommended that you either wrap the error in
45    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
46    /// error reporter library that visits the error's cause/source chain, or call
47    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
48    ///
49    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    /// Creates a new `UpdateShareConfigError`.
85    pub fn new(kind: UpdateShareConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
86        Self { kind, meta }
87    }
88
89    /// Creates the `UpdateShareConfigError::Unhandled` variant from any error type.
90    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    /// Creates the `UpdateShareConfigError::Unhandled` variant from a `aws_smithy_types::Error`.
98    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    /// Returns the error message if one is available.
106    pub fn message(&self) -> Option<&str> {
107        self.meta.message()
108    }
109
110    /// Returns error metadata, which includes the error code, message,
111    /// request ID, and potentially additional information.
112    pub fn meta(&self) -> &aws_smithy_types::Error {
113        &self.meta
114    }
115
116    /// Returns the request ID if it's available.
117    pub fn request_id(&self) -> Option<&str> {
118        self.meta.request_id()
119    }
120
121    /// Returns the error code if it's available.
122    pub fn code(&self) -> Option<&str> {
123        self.meta.code()
124    }
125    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::InternalFailureError`.
126    pub fn is_internal_failure_error(&self) -> bool {
127        matches!(
128            &self.kind,
129            UpdateShareConfigErrorKind::InternalFailureError(_)
130        )
131    }
132    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::ThrottlingError`.
133    pub fn is_throttling_error(&self) -> bool {
134        matches!(&self.kind, UpdateShareConfigErrorKind::ThrottlingError(_))
135    }
136    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::ValidationError`.
137    pub fn is_validation_error(&self) -> bool {
138        matches!(&self.kind, UpdateShareConfigErrorKind::ValidationError(_))
139    }
140    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::AccessDeniedError`.
141    pub fn is_access_denied_error(&self) -> bool {
142        matches!(&self.kind, UpdateShareConfigErrorKind::AccessDeniedError(_))
143    }
144    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::UnauthorizedError`.
145    pub fn is_unauthorized_error(&self) -> bool {
146        matches!(&self.kind, UpdateShareConfigErrorKind::UnauthorizedError(_))
147    }
148    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::ResourceConflictError`.
149    pub fn is_resource_conflict_error(&self) -> bool {
150        matches!(
151            &self.kind,
152            UpdateShareConfigErrorKind::ResourceConflictError(_)
153        )
154    }
155    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::BadRequestError`.
156    pub fn is_bad_request_error(&self) -> bool {
157        matches!(&self.kind, UpdateShareConfigErrorKind::BadRequestError(_))
158    }
159    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::ResourceNotFoundError`.
160    pub fn is_resource_not_found_error(&self) -> bool {
161        matches!(
162            &self.kind,
163            UpdateShareConfigErrorKind::ResourceNotFoundError(_)
164        )
165    }
166    /// Returns `true` if the error kind is `UpdateShareConfigErrorKind::RequestTooLargeError`.
167    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/// The server response for the request too large error.
192#[non_exhaustive]
193#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
194pub struct RequestTooLargeError {
195    /// Human readable exception message.
196    #[doc(hidden)]
197    pub message: std::option::Option<std::string::String>,
198    #[allow(missing_docs)] // documentation missing in model
199    #[doc(hidden)]
200    pub code: std::option::Option<crate::model::RequestTooLargeCode>,
201}
202impl RequestTooLargeError {
203    #[allow(missing_docs)] // documentation missing in model
204    pub fn code(&self) -> std::option::Option<&crate::model::RequestTooLargeCode> {
205        self.code.as_ref()
206    }
207}
208impl RequestTooLargeError {
209    /// Returns the error message.
210    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 {}
226/// See [`RequestTooLargeError`](crate::error::RequestTooLargeError).
227pub mod request_too_large_error {
228
229    /// A builder for [`RequestTooLargeError`](crate::error::RequestTooLargeError).
230    #[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        /// Human readable exception message.
238        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
239            self.message = Some(input.into());
240            self
241        }
242        /// Human readable exception message.
243        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)] // documentation missing in model
248        pub fn code(mut self, input: crate::model::RequestTooLargeCode) -> Self {
249            self.code = Some(input);
250            self
251        }
252        #[allow(missing_docs)] // documentation missing in model
253        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        /// Consumes the builder and constructs a [`RequestTooLargeError`](crate::error::RequestTooLargeError).
261        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    /// Creates a new builder-style object to manufacture [`RequestTooLargeError`](crate::error::RequestTooLargeError).
271    pub fn builder() -> crate::error::request_too_large_error::Builder {
272        crate::error::request_too_large_error::Builder::default()
273    }
274}
275
276/// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
277#[non_exhaustive]
278#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
279pub struct ResourceNotFoundError {
280    /// Human readable exception message.
281    #[doc(hidden)]
282    pub message: std::option::Option<std::string::String>,
283    #[allow(missing_docs)] // documentation missing in model
284    #[doc(hidden)]
285    pub code: std::option::Option<crate::model::NotFoundCode>,
286    #[allow(missing_docs)] // documentation missing in model
287    #[doc(hidden)]
288    pub data: std::option::Option<crate::model::NotFoundData>,
289}
290impl ResourceNotFoundError {
291    #[allow(missing_docs)] // documentation missing in model
292    pub fn code(&self) -> std::option::Option<&crate::model::NotFoundCode> {
293        self.code.as_ref()
294    }
295    #[allow(missing_docs)] // documentation missing in model
296    pub fn data(&self) -> std::option::Option<&crate::model::NotFoundData> {
297        self.data.as_ref()
298    }
299}
300impl ResourceNotFoundError {
301    /// Returns the error message.
302    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 {}
318/// See [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
319pub mod resource_not_found_error {
320
321    /// A builder for [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
322    #[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        /// Human readable exception message.
331        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
332            self.message = Some(input.into());
333            self
334        }
335        /// Human readable exception message.
336        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)] // documentation missing in model
341        pub fn code(mut self, input: crate::model::NotFoundCode) -> Self {
342            self.code = Some(input);
343            self
344        }
345        #[allow(missing_docs)] // documentation missing in model
346        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)] // documentation missing in model
351        pub fn data(mut self, input: crate::model::NotFoundData) -> Self {
352            self.data = Some(input);
353            self
354        }
355        #[allow(missing_docs)] // documentation missing in model
356        pub fn set_data(mut self, input: std::option::Option<crate::model::NotFoundData>) -> Self {
357            self.data = input;
358            self
359        }
360        /// Consumes the builder and constructs a [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
361        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    /// Creates a new builder-style object to manufacture [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
372    pub fn builder() -> crate::error::resource_not_found_error::Builder {
373        crate::error::resource_not_found_error::Builder::default()
374    }
375}
376
377/// The server cannot process the request due to an apparent client error.
378#[non_exhaustive]
379#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
380pub struct BadRequestError {
381    /// Human readable exception message.
382    #[doc(hidden)]
383    pub message: std::option::Option<std::string::String>,
384    #[allow(missing_docs)] // documentation missing in model
385    #[doc(hidden)]
386    pub code: std::option::Option<crate::model::BadRequestCode>,
387    #[allow(missing_docs)] // documentation missing in model
388    #[doc(hidden)]
389    pub field_list: std::option::Option<std::vec::Vec<crate::model::FieldListItem>>,
390}
391impl BadRequestError {
392    #[allow(missing_docs)] // documentation missing in model
393    pub fn code(&self) -> std::option::Option<&crate::model::BadRequestCode> {
394        self.code.as_ref()
395    }
396    #[allow(missing_docs)] // documentation missing in model
397    pub fn field_list(&self) -> std::option::Option<&[crate::model::FieldListItem]> {
398        self.field_list.as_deref()
399    }
400}
401impl BadRequestError {
402    /// Returns the error message.
403    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 {}
419/// See [`BadRequestError`](crate::error::BadRequestError).
420pub mod bad_request_error {
421
422    /// A builder for [`BadRequestError`](crate::error::BadRequestError).
423    #[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        /// Human readable exception message.
432        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
433            self.message = Some(input.into());
434            self
435        }
436        /// Human readable exception message.
437        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)] // documentation missing in model
442        pub fn code(mut self, input: crate::model::BadRequestCode) -> Self {
443            self.code = Some(input);
444            self
445        }
446        #[allow(missing_docs)] // documentation missing in model
447        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        /// Appends an item to `field_list`.
455        ///
456        /// To override the contents of this collection use [`set_field_list`](Self::set_field_list).
457        ///
458        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)] // documentation missing in model
465        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        /// Consumes the builder and constructs a [`BadRequestError`](crate::error::BadRequestError).
473        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    /// Creates a new builder-style object to manufacture [`BadRequestError`](crate::error::BadRequestError).
484    pub fn builder() -> crate::error::bad_request_error::Builder {
485        crate::error::bad_request_error::Builder::default()
486    }
487}
488
489/// The server could not process the request because of conflict in the current state of the resource.
490#[non_exhaustive]
491#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
492pub struct ResourceConflictError {
493    /// Human readable exception message.
494    #[doc(hidden)]
495    pub message: std::option::Option<std::string::String>,
496    #[allow(missing_docs)] // documentation missing in model
497    #[doc(hidden)]
498    pub code: std::option::Option<crate::model::ConflictCode>,
499    #[allow(missing_docs)] // documentation missing in model
500    #[doc(hidden)]
501    pub data: std::option::Option<crate::model::ConflictData>,
502}
503impl ResourceConflictError {
504    #[allow(missing_docs)] // documentation missing in model
505    pub fn code(&self) -> std::option::Option<&crate::model::ConflictCode> {
506        self.code.as_ref()
507    }
508    #[allow(missing_docs)] // documentation missing in model
509    pub fn data(&self) -> std::option::Option<&crate::model::ConflictData> {
510        self.data.as_ref()
511    }
512}
513impl ResourceConflictError {
514    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
515    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
516        aws_smithy_types::retry::ErrorKind::ClientError
517    }
518    /// Returns the error message.
519    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 {}
535/// See [`ResourceConflictError`](crate::error::ResourceConflictError).
536pub mod resource_conflict_error {
537
538    /// A builder for [`ResourceConflictError`](crate::error::ResourceConflictError).
539    #[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        /// Human readable exception message.
548        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
549            self.message = Some(input.into());
550            self
551        }
552        /// Human readable exception message.
553        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)] // documentation missing in model
558        pub fn code(mut self, input: crate::model::ConflictCode) -> Self {
559            self.code = Some(input);
560            self
561        }
562        #[allow(missing_docs)] // documentation missing in model
563        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)] // documentation missing in model
568        pub fn data(mut self, input: crate::model::ConflictData) -> Self {
569            self.data = Some(input);
570            self
571        }
572        #[allow(missing_docs)] // documentation missing in model
573        pub fn set_data(mut self, input: std::option::Option<crate::model::ConflictData>) -> Self {
574            self.data = input;
575            self
576        }
577        /// Consumes the builder and constructs a [`ResourceConflictError`](crate::error::ResourceConflictError).
578        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    /// Creates a new builder-style object to manufacture [`ResourceConflictError`](crate::error::ResourceConflictError).
589    pub fn builder() -> crate::error::resource_conflict_error::Builder {
590        crate::error::resource_conflict_error::Builder::default()
591    }
592}
593
594/// The server response when the authorizer failed to authenticate the caller.
595#[non_exhaustive]
596#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
597pub struct UnauthorizedError {
598    /// Human readable exception message.
599    #[doc(hidden)]
600    pub message: std::option::Option<std::string::String>,
601    #[allow(missing_docs)] // documentation missing in model
602    #[doc(hidden)]
603    pub code: std::option::Option<crate::model::UnauthorizedCode>,
604}
605impl UnauthorizedError {
606    #[allow(missing_docs)] // documentation missing in model
607    pub fn code(&self) -> std::option::Option<&crate::model::UnauthorizedCode> {
608        self.code.as_ref()
609    }
610}
611impl UnauthorizedError {
612    /// Returns the error message.
613    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 {}
629/// See [`UnauthorizedError`](crate::error::UnauthorizedError).
630pub mod unauthorized_error {
631
632    /// A builder for [`UnauthorizedError`](crate::error::UnauthorizedError).
633    #[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        /// Human readable exception message.
641        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
642            self.message = Some(input.into());
643            self
644        }
645        /// Human readable exception message.
646        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)] // documentation missing in model
651        pub fn code(mut self, input: crate::model::UnauthorizedCode) -> Self {
652            self.code = Some(input);
653            self
654        }
655        #[allow(missing_docs)] // documentation missing in model
656        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        /// Consumes the builder and constructs a [`UnauthorizedError`](crate::error::UnauthorizedError).
664        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    /// Creates a new builder-style object to manufacture [`UnauthorizedError`](crate::error::UnauthorizedError).
674    pub fn builder() -> crate::error::unauthorized_error::Builder {
675        crate::error::unauthorized_error::Builder::default()
676    }
677}
678
679/// The server response for authorization failure.
680#[non_exhaustive]
681#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
682pub struct AccessDeniedError {
683    /// Human readable exception message.
684    #[doc(hidden)]
685    pub message: std::option::Option<std::string::String>,
686    #[allow(missing_docs)] // documentation missing in model
687    #[doc(hidden)]
688    pub code: std::option::Option<crate::model::AccessDeniedCode>,
689}
690impl AccessDeniedError {
691    #[allow(missing_docs)] // documentation missing in model
692    pub fn code(&self) -> std::option::Option<&crate::model::AccessDeniedCode> {
693        self.code.as_ref()
694    }
695}
696impl AccessDeniedError {
697    /// Returns the error message.
698    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 {}
714/// See [`AccessDeniedError`](crate::error::AccessDeniedError).
715pub mod access_denied_error {
716
717    /// A builder for [`AccessDeniedError`](crate::error::AccessDeniedError).
718    #[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        /// Human readable exception message.
726        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
727            self.message = Some(input.into());
728            self
729        }
730        /// Human readable exception message.
731        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)] // documentation missing in model
736        pub fn code(mut self, input: crate::model::AccessDeniedCode) -> Self {
737            self.code = Some(input);
738            self
739        }
740        #[allow(missing_docs)] // documentation missing in model
741        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        /// Consumes the builder and constructs a [`AccessDeniedError`](crate::error::AccessDeniedError).
749        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    /// Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::error::AccessDeniedError).
759    pub fn builder() -> crate::error::access_denied_error::Builder {
760        crate::error::access_denied_error::Builder::default()
761    }
762}
763
764/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
765#[non_exhaustive]
766#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
767pub struct ValidationError {
768    /// A summary of the validation failure.
769    #[doc(hidden)]
770    pub message: std::option::Option<std::string::String>,
771    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
772    #[doc(hidden)]
773    pub field_list: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
774}
775impl ValidationError {
776    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
777    pub fn field_list(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
778        self.field_list.as_deref()
779    }
780}
781impl ValidationError {
782    /// Returns the error message.
783    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 {}
799/// See [`ValidationError`](crate::error::ValidationError).
800pub mod validation_error {
801
802    /// A builder for [`ValidationError`](crate::error::ValidationError).
803    #[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        /// A summary of the validation failure.
812        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
813            self.message = Some(input.into());
814            self
815        }
816        /// A summary of the validation failure.
817        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
818            self.message = input;
819            self
820        }
821        /// Appends an item to `field_list`.
822        ///
823        /// To override the contents of this collection use [`set_field_list`](Self::set_field_list).
824        ///
825        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
826        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        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
833        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        /// Consumes the builder and constructs a [`ValidationError`](crate::error::ValidationError).
841        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    /// Creates a new builder-style object to manufacture [`ValidationError`](crate::error::ValidationError).
851    pub fn builder() -> crate::error::validation_error::Builder {
852        crate::error::validation_error::Builder::default()
853    }
854}
855
856/// The server response when usage plan or account-level throttling limits exceeded.
857#[non_exhaustive]
858#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
859pub struct ThrottlingError {
860    /// Human readable exception message.
861    #[doc(hidden)]
862    pub message: std::option::Option<std::string::String>,
863    #[allow(missing_docs)] // documentation missing in model
864    #[doc(hidden)]
865    pub code: std::option::Option<crate::model::ThrottleCode>,
866}
867impl ThrottlingError {
868    #[allow(missing_docs)] // documentation missing in model
869    pub fn code(&self) -> std::option::Option<&crate::model::ThrottleCode> {
870        self.code.as_ref()
871    }
872}
873impl ThrottlingError {
874    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
875    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
876        aws_smithy_types::retry::ErrorKind::ThrottlingError
877    }
878    /// Returns the error message.
879    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 {}
895/// See [`ThrottlingError`](crate::error::ThrottlingError).
896pub mod throttling_error {
897
898    /// A builder for [`ThrottlingError`](crate::error::ThrottlingError).
899    #[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        /// Human readable exception message.
907        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
908            self.message = Some(input.into());
909            self
910        }
911        /// Human readable exception message.
912        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)] // documentation missing in model
917        pub fn code(mut self, input: crate::model::ThrottleCode) -> Self {
918            self.code = Some(input);
919            self
920        }
921        #[allow(missing_docs)] // documentation missing in model
922        pub fn set_code(mut self, input: std::option::Option<crate::model::ThrottleCode>) -> Self {
923            self.code = input;
924            self
925        }
926        /// Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
927        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    /// Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
937    pub fn builder() -> crate::error::throttling_error::Builder {
938        crate::error::throttling_error::Builder::default()
939    }
940}
941
942/// The server response when an unexpected error occurred while processing request.
943#[non_exhaustive]
944#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
945pub struct InternalFailureError {
946    /// Human readable exception message.
947    #[doc(hidden)]
948    pub message: std::option::Option<std::string::String>,
949    #[allow(missing_docs)] // documentation missing in model
950    #[doc(hidden)]
951    pub code: std::option::Option<crate::model::InternalFailureCode>,
952    #[allow(missing_docs)] // documentation missing in model
953    #[doc(hidden)]
954    pub data: std::option::Option<crate::model::InternalFailureData>,
955}
956impl InternalFailureError {
957    #[allow(missing_docs)] // documentation missing in model
958    pub fn code(&self) -> std::option::Option<&crate::model::InternalFailureCode> {
959        self.code.as_ref()
960    }
961    #[allow(missing_docs)] // documentation missing in model
962    pub fn data(&self) -> std::option::Option<&crate::model::InternalFailureData> {
963        self.data.as_ref()
964    }
965}
966impl InternalFailureError {
967    /// Returns the error message.
968    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 {}
984/// See [`InternalFailureError`](crate::error::InternalFailureError).
985pub mod internal_failure_error {
986
987    /// A builder for [`InternalFailureError`](crate::error::InternalFailureError).
988    #[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        /// Human readable exception message.
997        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
998            self.message = Some(input.into());
999            self
1000        }
1001        /// Human readable exception message.
1002        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)] // documentation missing in model
1007        pub fn code(mut self, input: crate::model::InternalFailureCode) -> Self {
1008            self.code = Some(input);
1009            self
1010        }
1011        #[allow(missing_docs)] // documentation missing in model
1012        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)] // documentation missing in model
1020        pub fn data(mut self, input: crate::model::InternalFailureData) -> Self {
1021            self.data = Some(input);
1022            self
1023        }
1024        #[allow(missing_docs)] // documentation missing in model
1025        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        /// Consumes the builder and constructs a [`InternalFailureError`](crate::error::InternalFailureError).
1033        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    /// Creates a new builder-style object to manufacture [`InternalFailureError`](crate::error::InternalFailureError).
1044    pub fn builder() -> crate::error::internal_failure_error::Builder {
1045        crate::error::internal_failure_error::Builder::default()
1046    }
1047}
1048
1049/// Error type for the `ListPublicSharedGuideSamples` operation.
1050#[non_exhaustive]
1051#[derive(std::fmt::Debug)]
1052pub struct ListPublicSharedGuideSamplesError {
1053    /// Kind of error that occurred.
1054    pub kind: ListPublicSharedGuideSamplesErrorKind,
1055    /// Additional metadata about the error, including error code, message, and request ID.
1056    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/// Types of errors that can occur for the `ListPublicSharedGuideSamples` operation.
1069#[non_exhaustive]
1070#[derive(std::fmt::Debug)]
1071pub enum ListPublicSharedGuideSamplesErrorKind {
1072    /// The server response when an unexpected error occurred while processing request.
1073    InternalFailureError(crate::error::InternalFailureError),
1074    /// The server response when usage plan or account-level throttling limits exceeded.
1075    ThrottlingError(crate::error::ThrottlingError),
1076    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1077    ValidationError(crate::error::ValidationError),
1078    /// The server response for authorization failure.
1079    AccessDeniedError(crate::error::AccessDeniedError),
1080    /// The server response when the authorizer failed to authenticate the caller.
1081    UnauthorizedError(crate::error::UnauthorizedError),
1082    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1083    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1084    ///
1085    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1086    ///
1087    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1088    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1089    /// error reporter library that visits the error's cause/source chain, or call
1090    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1091    ///
1092    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    /// Creates a new `ListPublicSharedGuideSamplesError`.
1122    pub fn new(kind: ListPublicSharedGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
1123        Self { kind, meta }
1124    }
1125
1126    /// Creates the `ListPublicSharedGuideSamplesError::Unhandled` variant from any error type.
1127    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    /// Creates the `ListPublicSharedGuideSamplesError::Unhandled` variant from a `aws_smithy_types::Error`.
1137    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    /// Returns the error message if one is available.
1147    pub fn message(&self) -> Option<&str> {
1148        self.meta.message()
1149    }
1150
1151    /// Returns error metadata, which includes the error code, message,
1152    /// request ID, and potentially additional information.
1153    pub fn meta(&self) -> &aws_smithy_types::Error {
1154        &self.meta
1155    }
1156
1157    /// Returns the request ID if it's available.
1158    pub fn request_id(&self) -> Option<&str> {
1159        self.meta.request_id()
1160    }
1161
1162    /// Returns the error code if it's available.
1163    pub fn code(&self) -> Option<&str> {
1164        self.meta.code()
1165    }
1166    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::InternalFailureError`.
1167    pub fn is_internal_failure_error(&self) -> bool {
1168        matches!(
1169            &self.kind,
1170            ListPublicSharedGuideSamplesErrorKind::InternalFailureError(_)
1171        )
1172    }
1173    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::ThrottlingError`.
1174    pub fn is_throttling_error(&self) -> bool {
1175        matches!(
1176            &self.kind,
1177            ListPublicSharedGuideSamplesErrorKind::ThrottlingError(_)
1178        )
1179    }
1180    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::ValidationError`.
1181    pub fn is_validation_error(&self) -> bool {
1182        matches!(
1183            &self.kind,
1184            ListPublicSharedGuideSamplesErrorKind::ValidationError(_)
1185        )
1186    }
1187    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::AccessDeniedError`.
1188    pub fn is_access_denied_error(&self) -> bool {
1189        matches!(
1190            &self.kind,
1191            ListPublicSharedGuideSamplesErrorKind::AccessDeniedError(_)
1192        )
1193    }
1194    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::UnauthorizedError`.
1195    pub fn is_unauthorized_error(&self) -> bool {
1196        matches!(
1197            &self.kind,
1198            ListPublicSharedGuideSamplesErrorKind::UnauthorizedError(_)
1199        )
1200    }
1201    /// Returns `true` if the error kind is `ListPublicSharedGuideSamplesErrorKind::ResourceNotFoundError`.
1202    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/// Error type for the `ListPublicSharedGuideAttachments` operation.
1224#[non_exhaustive]
1225#[derive(std::fmt::Debug)]
1226pub struct ListPublicSharedGuideAttachmentsError {
1227    /// Kind of error that occurred.
1228    pub kind: ListPublicSharedGuideAttachmentsErrorKind,
1229    /// Additional metadata about the error, including error code, message, and request ID.
1230    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/// Types of errors that can occur for the `ListPublicSharedGuideAttachments` operation.
1243#[non_exhaustive]
1244#[derive(std::fmt::Debug)]
1245pub enum ListPublicSharedGuideAttachmentsErrorKind {
1246    /// The server response when an unexpected error occurred while processing request.
1247    InternalFailureError(crate::error::InternalFailureError),
1248    /// The server response when usage plan or account-level throttling limits exceeded.
1249    ThrottlingError(crate::error::ThrottlingError),
1250    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1251    ValidationError(crate::error::ValidationError),
1252    /// The server response for authorization failure.
1253    AccessDeniedError(crate::error::AccessDeniedError),
1254    /// The server response when the authorizer failed to authenticate the caller.
1255    UnauthorizedError(crate::error::UnauthorizedError),
1256    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1257    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1258    ///
1259    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1260    ///
1261    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1262    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1263    /// error reporter library that visits the error's cause/source chain, or call
1264    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1265    ///
1266    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    /// Creates a new `ListPublicSharedGuideAttachmentsError`.
1300    pub fn new(
1301        kind: ListPublicSharedGuideAttachmentsErrorKind,
1302        meta: aws_smithy_types::Error,
1303    ) -> Self {
1304        Self { kind, meta }
1305    }
1306
1307    /// Creates the `ListPublicSharedGuideAttachmentsError::Unhandled` variant from any error type.
1308    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    /// Creates the `ListPublicSharedGuideAttachmentsError::Unhandled` variant from a `aws_smithy_types::Error`.
1318    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    /// Returns the error message if one is available.
1328    pub fn message(&self) -> Option<&str> {
1329        self.meta.message()
1330    }
1331
1332    /// Returns error metadata, which includes the error code, message,
1333    /// request ID, and potentially additional information.
1334    pub fn meta(&self) -> &aws_smithy_types::Error {
1335        &self.meta
1336    }
1337
1338    /// Returns the request ID if it's available.
1339    pub fn request_id(&self) -> Option<&str> {
1340        self.meta.request_id()
1341    }
1342
1343    /// Returns the error code if it's available.
1344    pub fn code(&self) -> Option<&str> {
1345        self.meta.code()
1346    }
1347    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::InternalFailureError`.
1348    pub fn is_internal_failure_error(&self) -> bool {
1349        matches!(
1350            &self.kind,
1351            ListPublicSharedGuideAttachmentsErrorKind::InternalFailureError(_)
1352        )
1353    }
1354    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError`.
1355    pub fn is_throttling_error(&self) -> bool {
1356        matches!(
1357            &self.kind,
1358            ListPublicSharedGuideAttachmentsErrorKind::ThrottlingError(_)
1359        )
1360    }
1361    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::ValidationError`.
1362    pub fn is_validation_error(&self) -> bool {
1363        matches!(
1364            &self.kind,
1365            ListPublicSharedGuideAttachmentsErrorKind::ValidationError(_)
1366        )
1367    }
1368    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::AccessDeniedError`.
1369    pub fn is_access_denied_error(&self) -> bool {
1370        matches!(
1371            &self.kind,
1372            ListPublicSharedGuideAttachmentsErrorKind::AccessDeniedError(_)
1373        )
1374    }
1375    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::UnauthorizedError`.
1376    pub fn is_unauthorized_error(&self) -> bool {
1377        matches!(
1378            &self.kind,
1379            ListPublicSharedGuideAttachmentsErrorKind::UnauthorizedError(_)
1380        )
1381    }
1382    /// Returns `true` if the error kind is `ListPublicSharedGuideAttachmentsErrorKind::ResourceNotFoundError`.
1383    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/// Error type for the `GetPublicSharedGuide` operation.
1407#[non_exhaustive]
1408#[derive(std::fmt::Debug)]
1409pub struct GetPublicSharedGuideError {
1410    /// Kind of error that occurred.
1411    pub kind: GetPublicSharedGuideErrorKind,
1412    /// Additional metadata about the error, including error code, message, and request ID.
1413    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/// Types of errors that can occur for the `GetPublicSharedGuide` operation.
1424#[non_exhaustive]
1425#[derive(std::fmt::Debug)]
1426pub enum GetPublicSharedGuideErrorKind {
1427    /// The server response when an unexpected error occurred while processing request.
1428    InternalFailureError(crate::error::InternalFailureError),
1429    /// The server response when usage plan or account-level throttling limits exceeded.
1430    ThrottlingError(crate::error::ThrottlingError),
1431    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1432    ValidationError(crate::error::ValidationError),
1433    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1434    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1435    /// The server response for the request too large error.
1436    RequestTooLargeError(crate::error::RequestTooLargeError),
1437    ///
1438    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1439    ///
1440    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1441    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1442    /// error reporter library that visits the error's cause/source chain, or call
1443    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1444    ///
1445    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    /// Creates a new `GetPublicSharedGuideError`.
1474    pub fn new(kind: GetPublicSharedGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
1475        Self { kind, meta }
1476    }
1477
1478    /// Creates the `GetPublicSharedGuideError::Unhandled` variant from any error type.
1479    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    /// Creates the `GetPublicSharedGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
1489    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    /// Returns the error message if one is available.
1499    pub fn message(&self) -> Option<&str> {
1500        self.meta.message()
1501    }
1502
1503    /// Returns error metadata, which includes the error code, message,
1504    /// request ID, and potentially additional information.
1505    pub fn meta(&self) -> &aws_smithy_types::Error {
1506        &self.meta
1507    }
1508
1509    /// Returns the request ID if it's available.
1510    pub fn request_id(&self) -> Option<&str> {
1511        self.meta.request_id()
1512    }
1513
1514    /// Returns the error code if it's available.
1515    pub fn code(&self) -> Option<&str> {
1516        self.meta.code()
1517    }
1518    /// Returns `true` if the error kind is `GetPublicSharedGuideErrorKind::InternalFailureError`.
1519    pub fn is_internal_failure_error(&self) -> bool {
1520        matches!(
1521            &self.kind,
1522            GetPublicSharedGuideErrorKind::InternalFailureError(_)
1523        )
1524    }
1525    /// Returns `true` if the error kind is `GetPublicSharedGuideErrorKind::ThrottlingError`.
1526    pub fn is_throttling_error(&self) -> bool {
1527        matches!(
1528            &self.kind,
1529            GetPublicSharedGuideErrorKind::ThrottlingError(_)
1530        )
1531    }
1532    /// Returns `true` if the error kind is `GetPublicSharedGuideErrorKind::ValidationError`.
1533    pub fn is_validation_error(&self) -> bool {
1534        matches!(
1535            &self.kind,
1536            GetPublicSharedGuideErrorKind::ValidationError(_)
1537        )
1538    }
1539    /// Returns `true` if the error kind is `GetPublicSharedGuideErrorKind::ResourceNotFoundError`.
1540    pub fn is_resource_not_found_error(&self) -> bool {
1541        matches!(
1542            &self.kind,
1543            GetPublicSharedGuideErrorKind::ResourceNotFoundError(_)
1544        )
1545    }
1546    /// Returns `true` if the error kind is `GetPublicSharedGuideErrorKind::RequestTooLargeError`.
1547    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/// Error type for the `ListPublicGuides` operation.
1568#[non_exhaustive]
1569#[derive(std::fmt::Debug)]
1570pub struct ListPublicGuidesError {
1571    /// Kind of error that occurred.
1572    pub kind: ListPublicGuidesErrorKind,
1573    /// Additional metadata about the error, including error code, message, and request ID.
1574    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/// Types of errors that can occur for the `ListPublicGuides` operation.
1585#[non_exhaustive]
1586#[derive(std::fmt::Debug)]
1587pub enum ListPublicGuidesErrorKind {
1588    /// The server response when an unexpected error occurred while processing request.
1589    InternalFailureError(crate::error::InternalFailureError),
1590    /// The server response when usage plan or account-level throttling limits exceeded.
1591    ThrottlingError(crate::error::ThrottlingError),
1592    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1593    ValidationError(crate::error::ValidationError),
1594    /// The server cannot process the request due to an apparent client error.
1595    BadRequestError(crate::error::BadRequestError),
1596    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1597    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1598    /// The server response for the request too large error.
1599    RequestTooLargeError(crate::error::RequestTooLargeError),
1600    ///
1601    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1602    ///
1603    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1604    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1605    /// error reporter library that visits the error's cause/source chain, or call
1606    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1607    ///
1608    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    /// Creates a new `ListPublicGuidesError`.
1636    pub fn new(kind: ListPublicGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
1637        Self { kind, meta }
1638    }
1639
1640    /// Creates the `ListPublicGuidesError::Unhandled` variant from any error type.
1641    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    /// Creates the `ListPublicGuidesError::Unhandled` variant from a `aws_smithy_types::Error`.
1649    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    /// Returns the error message if one is available.
1657    pub fn message(&self) -> Option<&str> {
1658        self.meta.message()
1659    }
1660
1661    /// Returns error metadata, which includes the error code, message,
1662    /// request ID, and potentially additional information.
1663    pub fn meta(&self) -> &aws_smithy_types::Error {
1664        &self.meta
1665    }
1666
1667    /// Returns the request ID if it's available.
1668    pub fn request_id(&self) -> Option<&str> {
1669        self.meta.request_id()
1670    }
1671
1672    /// Returns the error code if it's available.
1673    pub fn code(&self) -> Option<&str> {
1674        self.meta.code()
1675    }
1676    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::InternalFailureError`.
1677    pub fn is_internal_failure_error(&self) -> bool {
1678        matches!(
1679            &self.kind,
1680            ListPublicGuidesErrorKind::InternalFailureError(_)
1681        )
1682    }
1683    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::ThrottlingError`.
1684    pub fn is_throttling_error(&self) -> bool {
1685        matches!(&self.kind, ListPublicGuidesErrorKind::ThrottlingError(_))
1686    }
1687    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::ValidationError`.
1688    pub fn is_validation_error(&self) -> bool {
1689        matches!(&self.kind, ListPublicGuidesErrorKind::ValidationError(_))
1690    }
1691    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::BadRequestError`.
1692    pub fn is_bad_request_error(&self) -> bool {
1693        matches!(&self.kind, ListPublicGuidesErrorKind::BadRequestError(_))
1694    }
1695    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::ResourceNotFoundError`.
1696    pub fn is_resource_not_found_error(&self) -> bool {
1697        matches!(
1698            &self.kind,
1699            ListPublicGuidesErrorKind::ResourceNotFoundError(_)
1700        )
1701    }
1702    /// Returns `true` if the error kind is `ListPublicGuidesErrorKind::RequestTooLargeError`.
1703    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/// Error type for the `GetPublicGuide` operation.
1725#[non_exhaustive]
1726#[derive(std::fmt::Debug)]
1727pub struct GetPublicGuideError {
1728    /// Kind of error that occurred.
1729    pub kind: GetPublicGuideErrorKind,
1730    /// Additional metadata about the error, including error code, message, and request ID.
1731    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/// Types of errors that can occur for the `GetPublicGuide` operation.
1742#[non_exhaustive]
1743#[derive(std::fmt::Debug)]
1744pub enum GetPublicGuideErrorKind {
1745    /// The server response when an unexpected error occurred while processing request.
1746    InternalFailureError(crate::error::InternalFailureError),
1747    /// The server response when usage plan or account-level throttling limits exceeded.
1748    ThrottlingError(crate::error::ThrottlingError),
1749    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1750    ValidationError(crate::error::ValidationError),
1751    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1752    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1753    /// The server response for the request too large error.
1754    RequestTooLargeError(crate::error::RequestTooLargeError),
1755    ///
1756    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1757    ///
1758    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1759    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1760    /// error reporter library that visits the error's cause/source chain, or call
1761    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1762    ///
1763    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    /// Creates a new `GetPublicGuideError`.
1790    pub fn new(kind: GetPublicGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
1791        Self { kind, meta }
1792    }
1793
1794    /// Creates the `GetPublicGuideError::Unhandled` variant from any error type.
1795    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    /// Creates the `GetPublicGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
1803    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    /// Returns the error message if one is available.
1811    pub fn message(&self) -> Option<&str> {
1812        self.meta.message()
1813    }
1814
1815    /// Returns error metadata, which includes the error code, message,
1816    /// request ID, and potentially additional information.
1817    pub fn meta(&self) -> &aws_smithy_types::Error {
1818        &self.meta
1819    }
1820
1821    /// Returns the request ID if it's available.
1822    pub fn request_id(&self) -> Option<&str> {
1823        self.meta.request_id()
1824    }
1825
1826    /// Returns the error code if it's available.
1827    pub fn code(&self) -> Option<&str> {
1828        self.meta.code()
1829    }
1830    /// Returns `true` if the error kind is `GetPublicGuideErrorKind::InternalFailureError`.
1831    pub fn is_internal_failure_error(&self) -> bool {
1832        matches!(&self.kind, GetPublicGuideErrorKind::InternalFailureError(_))
1833    }
1834    /// Returns `true` if the error kind is `GetPublicGuideErrorKind::ThrottlingError`.
1835    pub fn is_throttling_error(&self) -> bool {
1836        matches!(&self.kind, GetPublicGuideErrorKind::ThrottlingError(_))
1837    }
1838    /// Returns `true` if the error kind is `GetPublicGuideErrorKind::ValidationError`.
1839    pub fn is_validation_error(&self) -> bool {
1840        matches!(&self.kind, GetPublicGuideErrorKind::ValidationError(_))
1841    }
1842    /// Returns `true` if the error kind is `GetPublicGuideErrorKind::ResourceNotFoundError`.
1843    pub fn is_resource_not_found_error(&self) -> bool {
1844        matches!(
1845            &self.kind,
1846            GetPublicGuideErrorKind::ResourceNotFoundError(_)
1847        )
1848    }
1849    /// Returns `true` if the error kind is `GetPublicGuideErrorKind::RequestTooLargeError`.
1850    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/// Error type for the `ListPublicGuideSamples` operation.
1868#[non_exhaustive]
1869#[derive(std::fmt::Debug)]
1870pub struct ListPublicGuideSamplesError {
1871    /// Kind of error that occurred.
1872    pub kind: ListPublicGuideSamplesErrorKind,
1873    /// Additional metadata about the error, including error code, message, and request ID.
1874    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/// Types of errors that can occur for the `ListPublicGuideSamples` operation.
1885#[non_exhaustive]
1886#[derive(std::fmt::Debug)]
1887pub enum ListPublicGuideSamplesErrorKind {
1888    /// The server response when an unexpected error occurred while processing request.
1889    InternalFailureError(crate::error::InternalFailureError),
1890    /// The server response when usage plan or account-level throttling limits exceeded.
1891    ThrottlingError(crate::error::ThrottlingError),
1892    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
1893    ValidationError(crate::error::ValidationError),
1894    /// The server response for authorization failure.
1895    AccessDeniedError(crate::error::AccessDeniedError),
1896    /// The server response when the authorizer failed to authenticate the caller.
1897    UnauthorizedError(crate::error::UnauthorizedError),
1898    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
1899    ResourceNotFoundError(crate::error::ResourceNotFoundError),
1900    ///
1901    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
1902    ///
1903    /// When logging an error from the SDK, it is recommended that you either wrap the error in
1904    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
1905    /// error reporter library that visits the error's cause/source chain, or call
1906    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
1907    ///
1908    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    /// Creates a new `ListPublicGuideSamplesError`.
1938    pub fn new(kind: ListPublicGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
1939        Self { kind, meta }
1940    }
1941
1942    /// Creates the `ListPublicGuideSamplesError::Unhandled` variant from any error type.
1943    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    /// Creates the `ListPublicGuideSamplesError::Unhandled` variant from a `aws_smithy_types::Error`.
1953    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    /// Returns the error message if one is available.
1963    pub fn message(&self) -> Option<&str> {
1964        self.meta.message()
1965    }
1966
1967    /// Returns error metadata, which includes the error code, message,
1968    /// request ID, and potentially additional information.
1969    pub fn meta(&self) -> &aws_smithy_types::Error {
1970        &self.meta
1971    }
1972
1973    /// Returns the request ID if it's available.
1974    pub fn request_id(&self) -> Option<&str> {
1975        self.meta.request_id()
1976    }
1977
1978    /// Returns the error code if it's available.
1979    pub fn code(&self) -> Option<&str> {
1980        self.meta.code()
1981    }
1982    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::InternalFailureError`.
1983    pub fn is_internal_failure_error(&self) -> bool {
1984        matches!(
1985            &self.kind,
1986            ListPublicGuideSamplesErrorKind::InternalFailureError(_)
1987        )
1988    }
1989    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::ThrottlingError`.
1990    pub fn is_throttling_error(&self) -> bool {
1991        matches!(
1992            &self.kind,
1993            ListPublicGuideSamplesErrorKind::ThrottlingError(_)
1994        )
1995    }
1996    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::ValidationError`.
1997    pub fn is_validation_error(&self) -> bool {
1998        matches!(
1999            &self.kind,
2000            ListPublicGuideSamplesErrorKind::ValidationError(_)
2001        )
2002    }
2003    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::AccessDeniedError`.
2004    pub fn is_access_denied_error(&self) -> bool {
2005        matches!(
2006            &self.kind,
2007            ListPublicGuideSamplesErrorKind::AccessDeniedError(_)
2008        )
2009    }
2010    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::UnauthorizedError`.
2011    pub fn is_unauthorized_error(&self) -> bool {
2012        matches!(
2013            &self.kind,
2014            ListPublicGuideSamplesErrorKind::UnauthorizedError(_)
2015        )
2016    }
2017    /// Returns `true` if the error kind is `ListPublicGuideSamplesErrorKind::ResourceNotFoundError`.
2018    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/// Error type for the `ListPublicGuideAttachments` operation.
2040#[non_exhaustive]
2041#[derive(std::fmt::Debug)]
2042pub struct ListPublicGuideAttachmentsError {
2043    /// Kind of error that occurred.
2044    pub kind: ListPublicGuideAttachmentsErrorKind,
2045    /// Additional metadata about the error, including error code, message, and request ID.
2046    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/// Types of errors that can occur for the `ListPublicGuideAttachments` operation.
2059#[non_exhaustive]
2060#[derive(std::fmt::Debug)]
2061pub enum ListPublicGuideAttachmentsErrorKind {
2062    /// The server response when an unexpected error occurred while processing request.
2063    InternalFailureError(crate::error::InternalFailureError),
2064    /// The server response when usage plan or account-level throttling limits exceeded.
2065    ThrottlingError(crate::error::ThrottlingError),
2066    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2067    ValidationError(crate::error::ValidationError),
2068    /// The server response for authorization failure.
2069    AccessDeniedError(crate::error::AccessDeniedError),
2070    /// The server response when the authorizer failed to authenticate the caller.
2071    UnauthorizedError(crate::error::UnauthorizedError),
2072    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2073    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2074    ///
2075    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2076    ///
2077    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2078    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2079    /// error reporter library that visits the error's cause/source chain, or call
2080    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2081    ///
2082    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    /// Creates a new `ListPublicGuideAttachmentsError`.
2112    pub fn new(kind: ListPublicGuideAttachmentsErrorKind, meta: aws_smithy_types::Error) -> Self {
2113        Self { kind, meta }
2114    }
2115
2116    /// Creates the `ListPublicGuideAttachmentsError::Unhandled` variant from any error type.
2117    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    /// Creates the `ListPublicGuideAttachmentsError::Unhandled` variant from a `aws_smithy_types::Error`.
2127    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    /// Returns the error message if one is available.
2137    pub fn message(&self) -> Option<&str> {
2138        self.meta.message()
2139    }
2140
2141    /// Returns error metadata, which includes the error code, message,
2142    /// request ID, and potentially additional information.
2143    pub fn meta(&self) -> &aws_smithy_types::Error {
2144        &self.meta
2145    }
2146
2147    /// Returns the request ID if it's available.
2148    pub fn request_id(&self) -> Option<&str> {
2149        self.meta.request_id()
2150    }
2151
2152    /// Returns the error code if it's available.
2153    pub fn code(&self) -> Option<&str> {
2154        self.meta.code()
2155    }
2156    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::InternalFailureError`.
2157    pub fn is_internal_failure_error(&self) -> bool {
2158        matches!(
2159            &self.kind,
2160            ListPublicGuideAttachmentsErrorKind::InternalFailureError(_)
2161        )
2162    }
2163    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::ThrottlingError`.
2164    pub fn is_throttling_error(&self) -> bool {
2165        matches!(
2166            &self.kind,
2167            ListPublicGuideAttachmentsErrorKind::ThrottlingError(_)
2168        )
2169    }
2170    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::ValidationError`.
2171    pub fn is_validation_error(&self) -> bool {
2172        matches!(
2173            &self.kind,
2174            ListPublicGuideAttachmentsErrorKind::ValidationError(_)
2175        )
2176    }
2177    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::AccessDeniedError`.
2178    pub fn is_access_denied_error(&self) -> bool {
2179        matches!(
2180            &self.kind,
2181            ListPublicGuideAttachmentsErrorKind::AccessDeniedError(_)
2182        )
2183    }
2184    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::UnauthorizedError`.
2185    pub fn is_unauthorized_error(&self) -> bool {
2186        matches!(
2187            &self.kind,
2188            ListPublicGuideAttachmentsErrorKind::UnauthorizedError(_)
2189        )
2190    }
2191    /// Returns `true` if the error kind is `ListPublicGuideAttachmentsErrorKind::ResourceNotFoundError`.
2192    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/// Error type for the `GetPublicAccountConfig` operation.
2214#[non_exhaustive]
2215#[derive(std::fmt::Debug)]
2216pub struct GetPublicAccountConfigError {
2217    /// Kind of error that occurred.
2218    pub kind: GetPublicAccountConfigErrorKind,
2219    /// Additional metadata about the error, including error code, message, and request ID.
2220    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/// Types of errors that can occur for the `GetPublicAccountConfig` operation.
2231#[non_exhaustive]
2232#[derive(std::fmt::Debug)]
2233pub enum GetPublicAccountConfigErrorKind {
2234    /// The server response when an unexpected error occurred while processing request.
2235    InternalFailureError(crate::error::InternalFailureError),
2236    /// The server response when usage plan or account-level throttling limits exceeded.
2237    ThrottlingError(crate::error::ThrottlingError),
2238    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2239    ValidationError(crate::error::ValidationError),
2240    /// The server response for authorization failure.
2241    AccessDeniedError(crate::error::AccessDeniedError),
2242    /// The server response when the authorizer failed to authenticate the caller.
2243    UnauthorizedError(crate::error::UnauthorizedError),
2244    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2245    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2246    /// The server response for the request too large error.
2247    RequestTooLargeError(crate::error::RequestTooLargeError),
2248    ///
2249    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2250    ///
2251    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2252    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2253    /// error reporter library that visits the error's cause/source chain, or call
2254    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2255    ///
2256    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    /// Creates a new `GetPublicAccountConfigError`.
2287    pub fn new(kind: GetPublicAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
2288        Self { kind, meta }
2289    }
2290
2291    /// Creates the `GetPublicAccountConfigError::Unhandled` variant from any error type.
2292    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    /// Creates the `GetPublicAccountConfigError::Unhandled` variant from a `aws_smithy_types::Error`.
2302    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    /// Returns the error message if one is available.
2312    pub fn message(&self) -> Option<&str> {
2313        self.meta.message()
2314    }
2315
2316    /// Returns error metadata, which includes the error code, message,
2317    /// request ID, and potentially additional information.
2318    pub fn meta(&self) -> &aws_smithy_types::Error {
2319        &self.meta
2320    }
2321
2322    /// Returns the request ID if it's available.
2323    pub fn request_id(&self) -> Option<&str> {
2324        self.meta.request_id()
2325    }
2326
2327    /// Returns the error code if it's available.
2328    pub fn code(&self) -> Option<&str> {
2329        self.meta.code()
2330    }
2331    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::InternalFailureError`.
2332    pub fn is_internal_failure_error(&self) -> bool {
2333        matches!(
2334            &self.kind,
2335            GetPublicAccountConfigErrorKind::InternalFailureError(_)
2336        )
2337    }
2338    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::ThrottlingError`.
2339    pub fn is_throttling_error(&self) -> bool {
2340        matches!(
2341            &self.kind,
2342            GetPublicAccountConfigErrorKind::ThrottlingError(_)
2343        )
2344    }
2345    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::ValidationError`.
2346    pub fn is_validation_error(&self) -> bool {
2347        matches!(
2348            &self.kind,
2349            GetPublicAccountConfigErrorKind::ValidationError(_)
2350        )
2351    }
2352    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::AccessDeniedError`.
2353    pub fn is_access_denied_error(&self) -> bool {
2354        matches!(
2355            &self.kind,
2356            GetPublicAccountConfigErrorKind::AccessDeniedError(_)
2357        )
2358    }
2359    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::UnauthorizedError`.
2360    pub fn is_unauthorized_error(&self) -> bool {
2361        matches!(
2362            &self.kind,
2363            GetPublicAccountConfigErrorKind::UnauthorizedError(_)
2364        )
2365    }
2366    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::ResourceNotFoundError`.
2367    pub fn is_resource_not_found_error(&self) -> bool {
2368        matches!(
2369            &self.kind,
2370            GetPublicAccountConfigErrorKind::ResourceNotFoundError(_)
2371        )
2372    }
2373    /// Returns `true` if the error kind is `GetPublicAccountConfigErrorKind::RequestTooLargeError`.
2374    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/// Error type for the `GetGuidesNetwork` operation.
2397#[non_exhaustive]
2398#[derive(std::fmt::Debug)]
2399pub struct GetGuidesNetworkError {
2400    /// Kind of error that occurred.
2401    pub kind: GetGuidesNetworkErrorKind,
2402    /// Additional metadata about the error, including error code, message, and request ID.
2403    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/// Types of errors that can occur for the `GetGuidesNetwork` operation.
2414#[non_exhaustive]
2415#[derive(std::fmt::Debug)]
2416pub enum GetGuidesNetworkErrorKind {
2417    /// The server response when an unexpected error occurred while processing request.
2418    InternalFailureError(crate::error::InternalFailureError),
2419    /// The server response when usage plan or account-level throttling limits exceeded.
2420    ThrottlingError(crate::error::ThrottlingError),
2421    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2422    ValidationError(crate::error::ValidationError),
2423    /// The server response for authorization failure.
2424    AccessDeniedError(crate::error::AccessDeniedError),
2425    /// The server response when the authorizer failed to authenticate the caller.
2426    UnauthorizedError(crate::error::UnauthorizedError),
2427    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2428    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2429    ///
2430    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2431    ///
2432    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2433    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2434    /// error reporter library that visits the error's cause/source chain, or call
2435    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2436    ///
2437    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    /// Creates a new `GetGuidesNetworkError`.
2465    pub fn new(kind: GetGuidesNetworkErrorKind, meta: aws_smithy_types::Error) -> Self {
2466        Self { kind, meta }
2467    }
2468
2469    /// Creates the `GetGuidesNetworkError::Unhandled` variant from any error type.
2470    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    /// Creates the `GetGuidesNetworkError::Unhandled` variant from a `aws_smithy_types::Error`.
2478    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    /// Returns the error message if one is available.
2486    pub fn message(&self) -> Option<&str> {
2487        self.meta.message()
2488    }
2489
2490    /// Returns error metadata, which includes the error code, message,
2491    /// request ID, and potentially additional information.
2492    pub fn meta(&self) -> &aws_smithy_types::Error {
2493        &self.meta
2494    }
2495
2496    /// Returns the request ID if it's available.
2497    pub fn request_id(&self) -> Option<&str> {
2498        self.meta.request_id()
2499    }
2500
2501    /// Returns the error code if it's available.
2502    pub fn code(&self) -> Option<&str> {
2503        self.meta.code()
2504    }
2505    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::InternalFailureError`.
2506    pub fn is_internal_failure_error(&self) -> bool {
2507        matches!(
2508            &self.kind,
2509            GetGuidesNetworkErrorKind::InternalFailureError(_)
2510        )
2511    }
2512    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::ThrottlingError`.
2513    pub fn is_throttling_error(&self) -> bool {
2514        matches!(&self.kind, GetGuidesNetworkErrorKind::ThrottlingError(_))
2515    }
2516    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::ValidationError`.
2517    pub fn is_validation_error(&self) -> bool {
2518        matches!(&self.kind, GetGuidesNetworkErrorKind::ValidationError(_))
2519    }
2520    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::AccessDeniedError`.
2521    pub fn is_access_denied_error(&self) -> bool {
2522        matches!(&self.kind, GetGuidesNetworkErrorKind::AccessDeniedError(_))
2523    }
2524    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::UnauthorizedError`.
2525    pub fn is_unauthorized_error(&self) -> bool {
2526        matches!(&self.kind, GetGuidesNetworkErrorKind::UnauthorizedError(_))
2527    }
2528    /// Returns `true` if the error kind is `GetGuidesNetworkErrorKind::ResourceNotFoundError`.
2529    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/// Error type for the `RevertGuide` operation.
2551#[non_exhaustive]
2552#[derive(std::fmt::Debug)]
2553pub struct RevertGuideError {
2554    /// Kind of error that occurred.
2555    pub kind: RevertGuideErrorKind,
2556    /// Additional metadata about the error, including error code, message, and request ID.
2557    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/// Types of errors that can occur for the `RevertGuide` operation.
2568#[non_exhaustive]
2569#[derive(std::fmt::Debug)]
2570pub enum RevertGuideErrorKind {
2571    /// The server response when an unexpected error occurred while processing request.
2572    InternalFailureError(crate::error::InternalFailureError),
2573    /// The server response when usage plan or account-level throttling limits exceeded.
2574    ThrottlingError(crate::error::ThrottlingError),
2575    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2576    ValidationError(crate::error::ValidationError),
2577    /// The server response for authorization failure.
2578    AccessDeniedError(crate::error::AccessDeniedError),
2579    /// The server response when the authorizer failed to authenticate the caller.
2580    UnauthorizedError(crate::error::UnauthorizedError),
2581    /// The server could not process the request because of conflict in the current state of the resource.
2582    ResourceConflictError(crate::error::ResourceConflictError),
2583    /// The server cannot process the request due to an apparent client error.
2584    BadRequestError(crate::error::BadRequestError),
2585    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2586    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2587    ///
2588    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2589    ///
2590    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2591    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2592    /// error reporter library that visits the error's cause/source chain, or call
2593    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2594    ///
2595    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    /// Creates a new `RevertGuideError`.
2628    pub fn new(kind: RevertGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
2629        Self { kind, meta }
2630    }
2631
2632    /// Creates the `RevertGuideError::Unhandled` variant from any error type.
2633    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    /// Creates the `RevertGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
2641    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    /// Returns the error message if one is available.
2649    pub fn message(&self) -> Option<&str> {
2650        self.meta.message()
2651    }
2652
2653    /// Returns error metadata, which includes the error code, message,
2654    /// request ID, and potentially additional information.
2655    pub fn meta(&self) -> &aws_smithy_types::Error {
2656        &self.meta
2657    }
2658
2659    /// Returns the request ID if it's available.
2660    pub fn request_id(&self) -> Option<&str> {
2661        self.meta.request_id()
2662    }
2663
2664    /// Returns the error code if it's available.
2665    pub fn code(&self) -> Option<&str> {
2666        self.meta.code()
2667    }
2668    /// Returns `true` if the error kind is `RevertGuideErrorKind::InternalFailureError`.
2669    pub fn is_internal_failure_error(&self) -> bool {
2670        matches!(&self.kind, RevertGuideErrorKind::InternalFailureError(_))
2671    }
2672    /// Returns `true` if the error kind is `RevertGuideErrorKind::ThrottlingError`.
2673    pub fn is_throttling_error(&self) -> bool {
2674        matches!(&self.kind, RevertGuideErrorKind::ThrottlingError(_))
2675    }
2676    /// Returns `true` if the error kind is `RevertGuideErrorKind::ValidationError`.
2677    pub fn is_validation_error(&self) -> bool {
2678        matches!(&self.kind, RevertGuideErrorKind::ValidationError(_))
2679    }
2680    /// Returns `true` if the error kind is `RevertGuideErrorKind::AccessDeniedError`.
2681    pub fn is_access_denied_error(&self) -> bool {
2682        matches!(&self.kind, RevertGuideErrorKind::AccessDeniedError(_))
2683    }
2684    /// Returns `true` if the error kind is `RevertGuideErrorKind::UnauthorizedError`.
2685    pub fn is_unauthorized_error(&self) -> bool {
2686        matches!(&self.kind, RevertGuideErrorKind::UnauthorizedError(_))
2687    }
2688    /// Returns `true` if the error kind is `RevertGuideErrorKind::ResourceConflictError`.
2689    pub fn is_resource_conflict_error(&self) -> bool {
2690        matches!(&self.kind, RevertGuideErrorKind::ResourceConflictError(_))
2691    }
2692    /// Returns `true` if the error kind is `RevertGuideErrorKind::BadRequestError`.
2693    pub fn is_bad_request_error(&self) -> bool {
2694        matches!(&self.kind, RevertGuideErrorKind::BadRequestError(_))
2695    }
2696    /// Returns `true` if the error kind is `RevertGuideErrorKind::ResourceNotFoundError`.
2697    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/// Error type for the `PublishGuide` operation.
2718#[non_exhaustive]
2719#[derive(std::fmt::Debug)]
2720pub struct PublishGuideError {
2721    /// Kind of error that occurred.
2722    pub kind: PublishGuideErrorKind,
2723    /// Additional metadata about the error, including error code, message, and request ID.
2724    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/// Types of errors that can occur for the `PublishGuide` operation.
2735#[non_exhaustive]
2736#[derive(std::fmt::Debug)]
2737pub enum PublishGuideErrorKind {
2738    /// The server response when an unexpected error occurred while processing request.
2739    InternalFailureError(crate::error::InternalFailureError),
2740    /// The server response when usage plan or account-level throttling limits exceeded.
2741    ThrottlingError(crate::error::ThrottlingError),
2742    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2743    ValidationError(crate::error::ValidationError),
2744    /// The server response for authorization failure.
2745    AccessDeniedError(crate::error::AccessDeniedError),
2746    /// The server response when the authorizer failed to authenticate the caller.
2747    UnauthorizedError(crate::error::UnauthorizedError),
2748    /// The server could not process the request because of conflict in the current state of the resource.
2749    ResourceConflictError(crate::error::ResourceConflictError),
2750    /// The server cannot process the request due to an apparent client error.
2751    BadRequestError(crate::error::BadRequestError),
2752    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2753    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2754    ///
2755    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2756    ///
2757    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2758    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2759    /// error reporter library that visits the error's cause/source chain, or call
2760    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2761    ///
2762    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    /// Creates a new `PublishGuideError`.
2795    pub fn new(kind: PublishGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
2796        Self { kind, meta }
2797    }
2798
2799    /// Creates the `PublishGuideError::Unhandled` variant from any error type.
2800    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    /// Creates the `PublishGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
2808    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    /// Returns the error message if one is available.
2816    pub fn message(&self) -> Option<&str> {
2817        self.meta.message()
2818    }
2819
2820    /// Returns error metadata, which includes the error code, message,
2821    /// request ID, and potentially additional information.
2822    pub fn meta(&self) -> &aws_smithy_types::Error {
2823        &self.meta
2824    }
2825
2826    /// Returns the request ID if it's available.
2827    pub fn request_id(&self) -> Option<&str> {
2828        self.meta.request_id()
2829    }
2830
2831    /// Returns the error code if it's available.
2832    pub fn code(&self) -> Option<&str> {
2833        self.meta.code()
2834    }
2835    /// Returns `true` if the error kind is `PublishGuideErrorKind::InternalFailureError`.
2836    pub fn is_internal_failure_error(&self) -> bool {
2837        matches!(&self.kind, PublishGuideErrorKind::InternalFailureError(_))
2838    }
2839    /// Returns `true` if the error kind is `PublishGuideErrorKind::ThrottlingError`.
2840    pub fn is_throttling_error(&self) -> bool {
2841        matches!(&self.kind, PublishGuideErrorKind::ThrottlingError(_))
2842    }
2843    /// Returns `true` if the error kind is `PublishGuideErrorKind::ValidationError`.
2844    pub fn is_validation_error(&self) -> bool {
2845        matches!(&self.kind, PublishGuideErrorKind::ValidationError(_))
2846    }
2847    /// Returns `true` if the error kind is `PublishGuideErrorKind::AccessDeniedError`.
2848    pub fn is_access_denied_error(&self) -> bool {
2849        matches!(&self.kind, PublishGuideErrorKind::AccessDeniedError(_))
2850    }
2851    /// Returns `true` if the error kind is `PublishGuideErrorKind::UnauthorizedError`.
2852    pub fn is_unauthorized_error(&self) -> bool {
2853        matches!(&self.kind, PublishGuideErrorKind::UnauthorizedError(_))
2854    }
2855    /// Returns `true` if the error kind is `PublishGuideErrorKind::ResourceConflictError`.
2856    pub fn is_resource_conflict_error(&self) -> bool {
2857        matches!(&self.kind, PublishGuideErrorKind::ResourceConflictError(_))
2858    }
2859    /// Returns `true` if the error kind is `PublishGuideErrorKind::BadRequestError`.
2860    pub fn is_bad_request_error(&self) -> bool {
2861        matches!(&self.kind, PublishGuideErrorKind::BadRequestError(_))
2862    }
2863    /// Returns `true` if the error kind is `PublishGuideErrorKind::ResourceNotFoundError`.
2864    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/// Error type for the `ChangeGuideVisibility` operation.
2885#[non_exhaustive]
2886#[derive(std::fmt::Debug)]
2887pub struct ChangeGuideVisibilityError {
2888    /// Kind of error that occurred.
2889    pub kind: ChangeGuideVisibilityErrorKind,
2890    /// Additional metadata about the error, including error code, message, and request ID.
2891    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/// Types of errors that can occur for the `ChangeGuideVisibility` operation.
2902#[non_exhaustive]
2903#[derive(std::fmt::Debug)]
2904pub enum ChangeGuideVisibilityErrorKind {
2905    /// The server response when an unexpected error occurred while processing request.
2906    InternalFailureError(crate::error::InternalFailureError),
2907    /// The server response when usage plan or account-level throttling limits exceeded.
2908    ThrottlingError(crate::error::ThrottlingError),
2909    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
2910    ValidationError(crate::error::ValidationError),
2911    /// The server response for authorization failure.
2912    AccessDeniedError(crate::error::AccessDeniedError),
2913    /// The server response when the authorizer failed to authenticate the caller.
2914    UnauthorizedError(crate::error::UnauthorizedError),
2915    /// The server could not process the request because of conflict in the current state of the resource.
2916    ResourceConflictError(crate::error::ResourceConflictError),
2917    /// The server cannot process the request due to an apparent client error.
2918    BadRequestError(crate::error::BadRequestError),
2919    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
2920    ResourceNotFoundError(crate::error::ResourceNotFoundError),
2921    ///
2922    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
2923    ///
2924    /// When logging an error from the SDK, it is recommended that you either wrap the error in
2925    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
2926    /// error reporter library that visits the error's cause/source chain, or call
2927    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
2928    ///
2929    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    /// Creates a new `ChangeGuideVisibilityError`.
2964    pub fn new(kind: ChangeGuideVisibilityErrorKind, meta: aws_smithy_types::Error) -> Self {
2965        Self { kind, meta }
2966    }
2967
2968    /// Creates the `ChangeGuideVisibilityError::Unhandled` variant from any error type.
2969    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    /// Creates the `ChangeGuideVisibilityError::Unhandled` variant from a `aws_smithy_types::Error`.
2979    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    /// Returns the error message if one is available.
2989    pub fn message(&self) -> Option<&str> {
2990        self.meta.message()
2991    }
2992
2993    /// Returns error metadata, which includes the error code, message,
2994    /// request ID, and potentially additional information.
2995    pub fn meta(&self) -> &aws_smithy_types::Error {
2996        &self.meta
2997    }
2998
2999    /// Returns the request ID if it's available.
3000    pub fn request_id(&self) -> Option<&str> {
3001        self.meta.request_id()
3002    }
3003
3004    /// Returns the error code if it's available.
3005    pub fn code(&self) -> Option<&str> {
3006        self.meta.code()
3007    }
3008    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::InternalFailureError`.
3009    pub fn is_internal_failure_error(&self) -> bool {
3010        matches!(
3011            &self.kind,
3012            ChangeGuideVisibilityErrorKind::InternalFailureError(_)
3013        )
3014    }
3015    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::ThrottlingError`.
3016    pub fn is_throttling_error(&self) -> bool {
3017        matches!(
3018            &self.kind,
3019            ChangeGuideVisibilityErrorKind::ThrottlingError(_)
3020        )
3021    }
3022    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::ValidationError`.
3023    pub fn is_validation_error(&self) -> bool {
3024        matches!(
3025            &self.kind,
3026            ChangeGuideVisibilityErrorKind::ValidationError(_)
3027        )
3028    }
3029    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::AccessDeniedError`.
3030    pub fn is_access_denied_error(&self) -> bool {
3031        matches!(
3032            &self.kind,
3033            ChangeGuideVisibilityErrorKind::AccessDeniedError(_)
3034        )
3035    }
3036    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::UnauthorizedError`.
3037    pub fn is_unauthorized_error(&self) -> bool {
3038        matches!(
3039            &self.kind,
3040            ChangeGuideVisibilityErrorKind::UnauthorizedError(_)
3041        )
3042    }
3043    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::ResourceConflictError`.
3044    pub fn is_resource_conflict_error(&self) -> bool {
3045        matches!(
3046            &self.kind,
3047            ChangeGuideVisibilityErrorKind::ResourceConflictError(_)
3048        )
3049    }
3050    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::BadRequestError`.
3051    pub fn is_bad_request_error(&self) -> bool {
3052        matches!(
3053            &self.kind,
3054            ChangeGuideVisibilityErrorKind::BadRequestError(_)
3055        )
3056    }
3057    /// Returns `true` if the error kind is `ChangeGuideVisibilityErrorKind::ResourceNotFoundError`.
3058    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/// Error type for the `ListGuides` operation.
3082#[non_exhaustive]
3083#[derive(std::fmt::Debug)]
3084pub struct ListGuidesError {
3085    /// Kind of error that occurred.
3086    pub kind: ListGuidesErrorKind,
3087    /// Additional metadata about the error, including error code, message, and request ID.
3088    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/// Types of errors that can occur for the `ListGuides` operation.
3099#[non_exhaustive]
3100#[derive(std::fmt::Debug)]
3101pub enum ListGuidesErrorKind {
3102    /// The server response when an unexpected error occurred while processing request.
3103    InternalFailureError(crate::error::InternalFailureError),
3104    /// The server response when usage plan or account-level throttling limits exceeded.
3105    ThrottlingError(crate::error::ThrottlingError),
3106    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
3107    ValidationError(crate::error::ValidationError),
3108    /// The server response for authorization failure.
3109    AccessDeniedError(crate::error::AccessDeniedError),
3110    /// The server response when the authorizer failed to authenticate the caller.
3111    UnauthorizedError(crate::error::UnauthorizedError),
3112    /// The server cannot process the request due to an apparent client error.
3113    BadRequestError(crate::error::BadRequestError),
3114    ///
3115    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
3116    ///
3117    /// When logging an error from the SDK, it is recommended that you either wrap the error in
3118    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
3119    /// error reporter library that visits the error's cause/source chain, or call
3120    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
3121    ///
3122    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    /// Creates a new `ListGuidesError`.
3150    pub fn new(kind: ListGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
3151        Self { kind, meta }
3152    }
3153
3154    /// Creates the `ListGuidesError::Unhandled` variant from any error type.
3155    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    /// Creates the `ListGuidesError::Unhandled` variant from a `aws_smithy_types::Error`.
3163    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    /// Returns the error message if one is available.
3171    pub fn message(&self) -> Option<&str> {
3172        self.meta.message()
3173    }
3174
3175    /// Returns error metadata, which includes the error code, message,
3176    /// request ID, and potentially additional information.
3177    pub fn meta(&self) -> &aws_smithy_types::Error {
3178        &self.meta
3179    }
3180
3181    /// Returns the request ID if it's available.
3182    pub fn request_id(&self) -> Option<&str> {
3183        self.meta.request_id()
3184    }
3185
3186    /// Returns the error code if it's available.
3187    pub fn code(&self) -> Option<&str> {
3188        self.meta.code()
3189    }
3190    /// Returns `true` if the error kind is `ListGuidesErrorKind::InternalFailureError`.
3191    pub fn is_internal_failure_error(&self) -> bool {
3192        matches!(&self.kind, ListGuidesErrorKind::InternalFailureError(_))
3193    }
3194    /// Returns `true` if the error kind is `ListGuidesErrorKind::ThrottlingError`.
3195    pub fn is_throttling_error(&self) -> bool {
3196        matches!(&self.kind, ListGuidesErrorKind::ThrottlingError(_))
3197    }
3198    /// Returns `true` if the error kind is `ListGuidesErrorKind::ValidationError`.
3199    pub fn is_validation_error(&self) -> bool {
3200        matches!(&self.kind, ListGuidesErrorKind::ValidationError(_))
3201    }
3202    /// Returns `true` if the error kind is `ListGuidesErrorKind::AccessDeniedError`.
3203    pub fn is_access_denied_error(&self) -> bool {
3204        matches!(&self.kind, ListGuidesErrorKind::AccessDeniedError(_))
3205    }
3206    /// Returns `true` if the error kind is `ListGuidesErrorKind::UnauthorizedError`.
3207    pub fn is_unauthorized_error(&self) -> bool {
3208        matches!(&self.kind, ListGuidesErrorKind::UnauthorizedError(_))
3209    }
3210    /// Returns `true` if the error kind is `ListGuidesErrorKind::BadRequestError`.
3211    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/// Error type for the `CreateGuide` operation.
3230#[non_exhaustive]
3231#[derive(std::fmt::Debug)]
3232pub struct CreateGuideError {
3233    /// Kind of error that occurred.
3234    pub kind: CreateGuideErrorKind,
3235    /// Additional metadata about the error, including error code, message, and request ID.
3236    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/// Types of errors that can occur for the `CreateGuide` operation.
3247#[non_exhaustive]
3248#[derive(std::fmt::Debug)]
3249pub enum CreateGuideErrorKind {
3250    /// The server response when an unexpected error occurred while processing request.
3251    InternalFailureError(crate::error::InternalFailureError),
3252    /// The server response when usage plan or account-level throttling limits exceeded.
3253    ThrottlingError(crate::error::ThrottlingError),
3254    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
3255    ValidationError(crate::error::ValidationError),
3256    /// The server response for authorization failure.
3257    AccessDeniedError(crate::error::AccessDeniedError),
3258    /// The server response for the request too large error.
3259    ResponseTooLargeError(crate::error::ResponseTooLargeError),
3260    /// The server response when the authorizer failed to authenticate the caller.
3261    UnauthorizedError(crate::error::UnauthorizedError),
3262    /// The server could not process the request because of conflict in the current state of the resource.
3263    ResourceConflictError(crate::error::ResourceConflictError),
3264    /// The server cannot process the request due to an apparent client error.
3265    BadRequestError(crate::error::BadRequestError),
3266    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
3267    ResourceNotFoundError(crate::error::ResourceNotFoundError),
3268    /// The server response for the request too large error.
3269    RequestTooLargeError(crate::error::RequestTooLargeError),
3270    ///
3271    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
3272    ///
3273    /// When logging an error from the SDK, it is recommended that you either wrap the error in
3274    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
3275    /// error reporter library that visits the error's cause/source chain, or call
3276    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
3277    ///
3278    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    /// Creates a new `CreateGuideError`.
3313    pub fn new(kind: CreateGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3314        Self { kind, meta }
3315    }
3316
3317    /// Creates the `CreateGuideError::Unhandled` variant from any error type.
3318    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    /// Creates the `CreateGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
3326    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    /// Returns the error message if one is available.
3334    pub fn message(&self) -> Option<&str> {
3335        self.meta.message()
3336    }
3337
3338    /// Returns error metadata, which includes the error code, message,
3339    /// request ID, and potentially additional information.
3340    pub fn meta(&self) -> &aws_smithy_types::Error {
3341        &self.meta
3342    }
3343
3344    /// Returns the request ID if it's available.
3345    pub fn request_id(&self) -> Option<&str> {
3346        self.meta.request_id()
3347    }
3348
3349    /// Returns the error code if it's available.
3350    pub fn code(&self) -> Option<&str> {
3351        self.meta.code()
3352    }
3353    /// Returns `true` if the error kind is `CreateGuideErrorKind::InternalFailureError`.
3354    pub fn is_internal_failure_error(&self) -> bool {
3355        matches!(&self.kind, CreateGuideErrorKind::InternalFailureError(_))
3356    }
3357    /// Returns `true` if the error kind is `CreateGuideErrorKind::ThrottlingError`.
3358    pub fn is_throttling_error(&self) -> bool {
3359        matches!(&self.kind, CreateGuideErrorKind::ThrottlingError(_))
3360    }
3361    /// Returns `true` if the error kind is `CreateGuideErrorKind::ValidationError`.
3362    pub fn is_validation_error(&self) -> bool {
3363        matches!(&self.kind, CreateGuideErrorKind::ValidationError(_))
3364    }
3365    /// Returns `true` if the error kind is `CreateGuideErrorKind::AccessDeniedError`.
3366    pub fn is_access_denied_error(&self) -> bool {
3367        matches!(&self.kind, CreateGuideErrorKind::AccessDeniedError(_))
3368    }
3369    /// Returns `true` if the error kind is `CreateGuideErrorKind::ResponseTooLargeError`.
3370    pub fn is_response_too_large_error(&self) -> bool {
3371        matches!(&self.kind, CreateGuideErrorKind::ResponseTooLargeError(_))
3372    }
3373    /// Returns `true` if the error kind is `CreateGuideErrorKind::UnauthorizedError`.
3374    pub fn is_unauthorized_error(&self) -> bool {
3375        matches!(&self.kind, CreateGuideErrorKind::UnauthorizedError(_))
3376    }
3377    /// Returns `true` if the error kind is `CreateGuideErrorKind::ResourceConflictError`.
3378    pub fn is_resource_conflict_error(&self) -> bool {
3379        matches!(&self.kind, CreateGuideErrorKind::ResourceConflictError(_))
3380    }
3381    /// Returns `true` if the error kind is `CreateGuideErrorKind::BadRequestError`.
3382    pub fn is_bad_request_error(&self) -> bool {
3383        matches!(&self.kind, CreateGuideErrorKind::BadRequestError(_))
3384    }
3385    /// Returns `true` if the error kind is `CreateGuideErrorKind::ResourceNotFoundError`.
3386    pub fn is_resource_not_found_error(&self) -> bool {
3387        matches!(&self.kind, CreateGuideErrorKind::ResourceNotFoundError(_))
3388    }
3389    /// Returns `true` if the error kind is `CreateGuideErrorKind::RequestTooLargeError`.
3390    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/// The server response for the request too large error.
3413#[non_exhaustive]
3414#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
3415pub struct ResponseTooLargeError {
3416    /// Human readable exception message.
3417    #[doc(hidden)]
3418    pub message: std::option::Option<std::string::String>,
3419    #[allow(missing_docs)] // documentation missing in model
3420    #[doc(hidden)]
3421    pub code: std::option::Option<crate::model::ResponseTooLargeCode>,
3422    #[allow(missing_docs)] // documentation missing in model
3423    #[doc(hidden)]
3424    pub data: std::option::Option<crate::model::ResponseTooLargeData>,
3425}
3426impl ResponseTooLargeError {
3427    #[allow(missing_docs)] // documentation missing in model
3428    pub fn code(&self) -> std::option::Option<&crate::model::ResponseTooLargeCode> {
3429        self.code.as_ref()
3430    }
3431    #[allow(missing_docs)] // documentation missing in model
3432    pub fn data(&self) -> std::option::Option<&crate::model::ResponseTooLargeData> {
3433        self.data.as_ref()
3434    }
3435}
3436impl ResponseTooLargeError {
3437    /// Returns the error message.
3438    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 {}
3454/// See [`ResponseTooLargeError`](crate::error::ResponseTooLargeError).
3455pub mod response_too_large_error {
3456
3457    /// A builder for [`ResponseTooLargeError`](crate::error::ResponseTooLargeError).
3458    #[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        /// Human readable exception message.
3467        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
3468            self.message = Some(input.into());
3469            self
3470        }
3471        /// Human readable exception message.
3472        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)] // documentation missing in model
3477        pub fn code(mut self, input: crate::model::ResponseTooLargeCode) -> Self {
3478            self.code = Some(input);
3479            self
3480        }
3481        #[allow(missing_docs)] // documentation missing in model
3482        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)] // documentation missing in model
3490        pub fn data(mut self, input: crate::model::ResponseTooLargeData) -> Self {
3491            self.data = Some(input);
3492            self
3493        }
3494        #[allow(missing_docs)] // documentation missing in model
3495        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        /// Consumes the builder and constructs a [`ResponseTooLargeError`](crate::error::ResponseTooLargeError).
3503        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    /// Creates a new builder-style object to manufacture [`ResponseTooLargeError`](crate::error::ResponseTooLargeError).
3514    pub fn builder() -> crate::error::response_too_large_error::Builder {
3515        crate::error::response_too_large_error::Builder::default()
3516    }
3517}
3518
3519/// Error type for the `DeleteGuide` operation.
3520#[non_exhaustive]
3521#[derive(std::fmt::Debug)]
3522pub struct DeleteGuideError {
3523    /// Kind of error that occurred.
3524    pub kind: DeleteGuideErrorKind,
3525    /// Additional metadata about the error, including error code, message, and request ID.
3526    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/// Types of errors that can occur for the `DeleteGuide` operation.
3537#[non_exhaustive]
3538#[derive(std::fmt::Debug)]
3539pub enum DeleteGuideErrorKind {
3540    /// The server response when an unexpected error occurred while processing request.
3541    InternalFailureError(crate::error::InternalFailureError),
3542    /// The server response when usage plan or account-level throttling limits exceeded.
3543    ThrottlingError(crate::error::ThrottlingError),
3544    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
3545    ValidationError(crate::error::ValidationError),
3546    /// The server response for authorization failure.
3547    AccessDeniedError(crate::error::AccessDeniedError),
3548    /// The server response when the authorizer failed to authenticate the caller.
3549    UnauthorizedError(crate::error::UnauthorizedError),
3550    /// The server could not process the request because of conflict in the current state of the resource.
3551    ResourceConflictError(crate::error::ResourceConflictError),
3552    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
3553    ResourceNotFoundError(crate::error::ResourceNotFoundError),
3554    ///
3555    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
3556    ///
3557    /// When logging an error from the SDK, it is recommended that you either wrap the error in
3558    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
3559    /// error reporter library that visits the error's cause/source chain, or call
3560    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
3561    ///
3562    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    /// Creates a new `DeleteGuideError`.
3594    pub fn new(kind: DeleteGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3595        Self { kind, meta }
3596    }
3597
3598    /// Creates the `DeleteGuideError::Unhandled` variant from any error type.
3599    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    /// Creates the `DeleteGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
3607    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    /// Returns the error message if one is available.
3615    pub fn message(&self) -> Option<&str> {
3616        self.meta.message()
3617    }
3618
3619    /// Returns error metadata, which includes the error code, message,
3620    /// request ID, and potentially additional information.
3621    pub fn meta(&self) -> &aws_smithy_types::Error {
3622        &self.meta
3623    }
3624
3625    /// Returns the request ID if it's available.
3626    pub fn request_id(&self) -> Option<&str> {
3627        self.meta.request_id()
3628    }
3629
3630    /// Returns the error code if it's available.
3631    pub fn code(&self) -> Option<&str> {
3632        self.meta.code()
3633    }
3634    /// Returns `true` if the error kind is `DeleteGuideErrorKind::InternalFailureError`.
3635    pub fn is_internal_failure_error(&self) -> bool {
3636        matches!(&self.kind, DeleteGuideErrorKind::InternalFailureError(_))
3637    }
3638    /// Returns `true` if the error kind is `DeleteGuideErrorKind::ThrottlingError`.
3639    pub fn is_throttling_error(&self) -> bool {
3640        matches!(&self.kind, DeleteGuideErrorKind::ThrottlingError(_))
3641    }
3642    /// Returns `true` if the error kind is `DeleteGuideErrorKind::ValidationError`.
3643    pub fn is_validation_error(&self) -> bool {
3644        matches!(&self.kind, DeleteGuideErrorKind::ValidationError(_))
3645    }
3646    /// Returns `true` if the error kind is `DeleteGuideErrorKind::AccessDeniedError`.
3647    pub fn is_access_denied_error(&self) -> bool {
3648        matches!(&self.kind, DeleteGuideErrorKind::AccessDeniedError(_))
3649    }
3650    /// Returns `true` if the error kind is `DeleteGuideErrorKind::UnauthorizedError`.
3651    pub fn is_unauthorized_error(&self) -> bool {
3652        matches!(&self.kind, DeleteGuideErrorKind::UnauthorizedError(_))
3653    }
3654    /// Returns `true` if the error kind is `DeleteGuideErrorKind::ResourceConflictError`.
3655    pub fn is_resource_conflict_error(&self) -> bool {
3656        matches!(&self.kind, DeleteGuideErrorKind::ResourceConflictError(_))
3657    }
3658    /// Returns `true` if the error kind is `DeleteGuideErrorKind::ResourceNotFoundError`.
3659    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/// Error type for the `UpdateGuide` operation.
3679#[non_exhaustive]
3680#[derive(std::fmt::Debug)]
3681pub struct UpdateGuideError {
3682    /// Kind of error that occurred.
3683    pub kind: UpdateGuideErrorKind,
3684    /// Additional metadata about the error, including error code, message, and request ID.
3685    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/// Types of errors that can occur for the `UpdateGuide` operation.
3696#[non_exhaustive]
3697#[derive(std::fmt::Debug)]
3698pub enum UpdateGuideErrorKind {
3699    /// The server response when an unexpected error occurred while processing request.
3700    InternalFailureError(crate::error::InternalFailureError),
3701    /// The server response when usage plan or account-level throttling limits exceeded.
3702    ThrottlingError(crate::error::ThrottlingError),
3703    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
3704    ValidationError(crate::error::ValidationError),
3705    /// The server response for authorization failure.
3706    AccessDeniedError(crate::error::AccessDeniedError),
3707    /// The server response when the authorizer failed to authenticate the caller.
3708    UnauthorizedError(crate::error::UnauthorizedError),
3709    /// The server could not process the request because of conflict in the current state of the resource.
3710    ResourceConflictError(crate::error::ResourceConflictError),
3711    /// The server cannot process the request due to an apparent client error.
3712    BadRequestError(crate::error::BadRequestError),
3713    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
3714    ResourceNotFoundError(crate::error::ResourceNotFoundError),
3715    /// The server response for the request too large error.
3716    RequestTooLargeError(crate::error::RequestTooLargeError),
3717    ///
3718    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
3719    ///
3720    /// When logging an error from the SDK, it is recommended that you either wrap the error in
3721    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
3722    /// error reporter library that visits the error's cause/source chain, or call
3723    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
3724    ///
3725    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    /// Creates a new `UpdateGuideError`.
3759    pub fn new(kind: UpdateGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3760        Self { kind, meta }
3761    }
3762
3763    /// Creates the `UpdateGuideError::Unhandled` variant from any error type.
3764    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    /// Creates the `UpdateGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
3772    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    /// Returns the error message if one is available.
3780    pub fn message(&self) -> Option<&str> {
3781        self.meta.message()
3782    }
3783
3784    /// Returns error metadata, which includes the error code, message,
3785    /// request ID, and potentially additional information.
3786    pub fn meta(&self) -> &aws_smithy_types::Error {
3787        &self.meta
3788    }
3789
3790    /// Returns the request ID if it's available.
3791    pub fn request_id(&self) -> Option<&str> {
3792        self.meta.request_id()
3793    }
3794
3795    /// Returns the error code if it's available.
3796    pub fn code(&self) -> Option<&str> {
3797        self.meta.code()
3798    }
3799    /// Returns `true` if the error kind is `UpdateGuideErrorKind::InternalFailureError`.
3800    pub fn is_internal_failure_error(&self) -> bool {
3801        matches!(&self.kind, UpdateGuideErrorKind::InternalFailureError(_))
3802    }
3803    /// Returns `true` if the error kind is `UpdateGuideErrorKind::ThrottlingError`.
3804    pub fn is_throttling_error(&self) -> bool {
3805        matches!(&self.kind, UpdateGuideErrorKind::ThrottlingError(_))
3806    }
3807    /// Returns `true` if the error kind is `UpdateGuideErrorKind::ValidationError`.
3808    pub fn is_validation_error(&self) -> bool {
3809        matches!(&self.kind, UpdateGuideErrorKind::ValidationError(_))
3810    }
3811    /// Returns `true` if the error kind is `UpdateGuideErrorKind::AccessDeniedError`.
3812    pub fn is_access_denied_error(&self) -> bool {
3813        matches!(&self.kind, UpdateGuideErrorKind::AccessDeniedError(_))
3814    }
3815    /// Returns `true` if the error kind is `UpdateGuideErrorKind::UnauthorizedError`.
3816    pub fn is_unauthorized_error(&self) -> bool {
3817        matches!(&self.kind, UpdateGuideErrorKind::UnauthorizedError(_))
3818    }
3819    /// Returns `true` if the error kind is `UpdateGuideErrorKind::ResourceConflictError`.
3820    pub fn is_resource_conflict_error(&self) -> bool {
3821        matches!(&self.kind, UpdateGuideErrorKind::ResourceConflictError(_))
3822    }
3823    /// Returns `true` if the error kind is `UpdateGuideErrorKind::BadRequestError`.
3824    pub fn is_bad_request_error(&self) -> bool {
3825        matches!(&self.kind, UpdateGuideErrorKind::BadRequestError(_))
3826    }
3827    /// Returns `true` if the error kind is `UpdateGuideErrorKind::ResourceNotFoundError`.
3828    pub fn is_resource_not_found_error(&self) -> bool {
3829        matches!(&self.kind, UpdateGuideErrorKind::ResourceNotFoundError(_))
3830    }
3831    /// Returns `true` if the error kind is `UpdateGuideErrorKind::RequestTooLargeError`.
3832    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/// Error type for the `GetGuide` operation.
3854#[non_exhaustive]
3855#[derive(std::fmt::Debug)]
3856pub struct GetGuideError {
3857    /// Kind of error that occurred.
3858    pub kind: GetGuideErrorKind,
3859    /// Additional metadata about the error, including error code, message, and request ID.
3860    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/// Types of errors that can occur for the `GetGuide` operation.
3871#[non_exhaustive]
3872#[derive(std::fmt::Debug)]
3873pub enum GetGuideErrorKind {
3874    /// The server response when an unexpected error occurred while processing request.
3875    InternalFailureError(crate::error::InternalFailureError),
3876    /// The server response when usage plan or account-level throttling limits exceeded.
3877    ThrottlingError(crate::error::ThrottlingError),
3878    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
3879    ValidationError(crate::error::ValidationError),
3880    /// The server response for authorization failure.
3881    AccessDeniedError(crate::error::AccessDeniedError),
3882    /// The server response when the authorizer failed to authenticate the caller.
3883    UnauthorizedError(crate::error::UnauthorizedError),
3884    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
3885    ResourceNotFoundError(crate::error::ResourceNotFoundError),
3886    ///
3887    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
3888    ///
3889    /// When logging an error from the SDK, it is recommended that you either wrap the error in
3890    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
3891    /// error reporter library that visits the error's cause/source chain, or call
3892    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
3893    ///
3894    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    /// Creates a new `GetGuideError`.
3922    pub fn new(kind: GetGuideErrorKind, meta: aws_smithy_types::Error) -> Self {
3923        Self { kind, meta }
3924    }
3925
3926    /// Creates the `GetGuideError::Unhandled` variant from any error type.
3927    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    /// Creates the `GetGuideError::Unhandled` variant from a `aws_smithy_types::Error`.
3935    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    /// Returns the error message if one is available.
3943    pub fn message(&self) -> Option<&str> {
3944        self.meta.message()
3945    }
3946
3947    /// Returns error metadata, which includes the error code, message,
3948    /// request ID, and potentially additional information.
3949    pub fn meta(&self) -> &aws_smithy_types::Error {
3950        &self.meta
3951    }
3952
3953    /// Returns the request ID if it's available.
3954    pub fn request_id(&self) -> Option<&str> {
3955        self.meta.request_id()
3956    }
3957
3958    /// Returns the error code if it's available.
3959    pub fn code(&self) -> Option<&str> {
3960        self.meta.code()
3961    }
3962    /// Returns `true` if the error kind is `GetGuideErrorKind::InternalFailureError`.
3963    pub fn is_internal_failure_error(&self) -> bool {
3964        matches!(&self.kind, GetGuideErrorKind::InternalFailureError(_))
3965    }
3966    /// Returns `true` if the error kind is `GetGuideErrorKind::ThrottlingError`.
3967    pub fn is_throttling_error(&self) -> bool {
3968        matches!(&self.kind, GetGuideErrorKind::ThrottlingError(_))
3969    }
3970    /// Returns `true` if the error kind is `GetGuideErrorKind::ValidationError`.
3971    pub fn is_validation_error(&self) -> bool {
3972        matches!(&self.kind, GetGuideErrorKind::ValidationError(_))
3973    }
3974    /// Returns `true` if the error kind is `GetGuideErrorKind::AccessDeniedError`.
3975    pub fn is_access_denied_error(&self) -> bool {
3976        matches!(&self.kind, GetGuideErrorKind::AccessDeniedError(_))
3977    }
3978    /// Returns `true` if the error kind is `GetGuideErrorKind::UnauthorizedError`.
3979    pub fn is_unauthorized_error(&self) -> bool {
3980        matches!(&self.kind, GetGuideErrorKind::UnauthorizedError(_))
3981    }
3982    /// Returns `true` if the error kind is `GetGuideErrorKind::ResourceNotFoundError`.
3983    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/// Error type for the `ListGuideSamples` operation.
4002#[non_exhaustive]
4003#[derive(std::fmt::Debug)]
4004pub struct ListGuideSamplesError {
4005    /// Kind of error that occurred.
4006    pub kind: ListGuideSamplesErrorKind,
4007    /// Additional metadata about the error, including error code, message, and request ID.
4008    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/// Types of errors that can occur for the `ListGuideSamples` operation.
4019#[non_exhaustive]
4020#[derive(std::fmt::Debug)]
4021pub enum ListGuideSamplesErrorKind {
4022    /// The server response when an unexpected error occurred while processing request.
4023    InternalFailureError(crate::error::InternalFailureError),
4024    /// The server response when usage plan or account-level throttling limits exceeded.
4025    ThrottlingError(crate::error::ThrottlingError),
4026    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4027    ValidationError(crate::error::ValidationError),
4028    /// The server response for authorization failure.
4029    AccessDeniedError(crate::error::AccessDeniedError),
4030    /// The server response when the authorizer failed to authenticate the caller.
4031    UnauthorizedError(crate::error::UnauthorizedError),
4032    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4033    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4034    ///
4035    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4036    ///
4037    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4038    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4039    /// error reporter library that visits the error's cause/source chain, or call
4040    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4041    ///
4042    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    /// Creates a new `ListGuideSamplesError`.
4070    pub fn new(kind: ListGuideSamplesErrorKind, meta: aws_smithy_types::Error) -> Self {
4071        Self { kind, meta }
4072    }
4073
4074    /// Creates the `ListGuideSamplesError::Unhandled` variant from any error type.
4075    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    /// Creates the `ListGuideSamplesError::Unhandled` variant from a `aws_smithy_types::Error`.
4083    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    /// Returns the error message if one is available.
4091    pub fn message(&self) -> Option<&str> {
4092        self.meta.message()
4093    }
4094
4095    /// Returns error metadata, which includes the error code, message,
4096    /// request ID, and potentially additional information.
4097    pub fn meta(&self) -> &aws_smithy_types::Error {
4098        &self.meta
4099    }
4100
4101    /// Returns the request ID if it's available.
4102    pub fn request_id(&self) -> Option<&str> {
4103        self.meta.request_id()
4104    }
4105
4106    /// Returns the error code if it's available.
4107    pub fn code(&self) -> Option<&str> {
4108        self.meta.code()
4109    }
4110    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::InternalFailureError`.
4111    pub fn is_internal_failure_error(&self) -> bool {
4112        matches!(
4113            &self.kind,
4114            ListGuideSamplesErrorKind::InternalFailureError(_)
4115        )
4116    }
4117    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::ThrottlingError`.
4118    pub fn is_throttling_error(&self) -> bool {
4119        matches!(&self.kind, ListGuideSamplesErrorKind::ThrottlingError(_))
4120    }
4121    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::ValidationError`.
4122    pub fn is_validation_error(&self) -> bool {
4123        matches!(&self.kind, ListGuideSamplesErrorKind::ValidationError(_))
4124    }
4125    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::AccessDeniedError`.
4126    pub fn is_access_denied_error(&self) -> bool {
4127        matches!(&self.kind, ListGuideSamplesErrorKind::AccessDeniedError(_))
4128    }
4129    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::UnauthorizedError`.
4130    pub fn is_unauthorized_error(&self) -> bool {
4131        matches!(&self.kind, ListGuideSamplesErrorKind::UnauthorizedError(_))
4132    }
4133    /// Returns `true` if the error kind is `ListGuideSamplesErrorKind::ResourceNotFoundError`.
4134    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/// Error type for the `CreateGuideSample` operation.
4156#[non_exhaustive]
4157#[derive(std::fmt::Debug)]
4158pub struct CreateGuideSampleError {
4159    /// Kind of error that occurred.
4160    pub kind: CreateGuideSampleErrorKind,
4161    /// Additional metadata about the error, including error code, message, and request ID.
4162    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/// Types of errors that can occur for the `CreateGuideSample` operation.
4173#[non_exhaustive]
4174#[derive(std::fmt::Debug)]
4175pub enum CreateGuideSampleErrorKind {
4176    /// The server response when an unexpected error occurred while processing request.
4177    InternalFailureError(crate::error::InternalFailureError),
4178    /// The server response when usage plan or account-level throttling limits exceeded.
4179    ThrottlingError(crate::error::ThrottlingError),
4180    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4181    ValidationError(crate::error::ValidationError),
4182    /// The server response for authorization failure.
4183    AccessDeniedError(crate::error::AccessDeniedError),
4184    /// The server response for the request too large error.
4185    ResponseTooLargeError(crate::error::ResponseTooLargeError),
4186    /// The server response when the authorizer failed to authenticate the caller.
4187    UnauthorizedError(crate::error::UnauthorizedError),
4188    /// The server could not process the request because of conflict in the current state of the resource.
4189    ResourceConflictError(crate::error::ResourceConflictError),
4190    /// The server cannot process the request due to an apparent client error.
4191    BadRequestError(crate::error::BadRequestError),
4192    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4193    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4194    /// The server response for the request too large error.
4195    RequestTooLargeError(crate::error::RequestTooLargeError),
4196    ///
4197    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4198    ///
4199    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4200    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4201    /// error reporter library that visits the error's cause/source chain, or call
4202    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4203    ///
4204    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    /// Creates a new `CreateGuideSampleError`.
4241    pub fn new(kind: CreateGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4242        Self { kind, meta }
4243    }
4244
4245    /// Creates the `CreateGuideSampleError::Unhandled` variant from any error type.
4246    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    /// Creates the `CreateGuideSampleError::Unhandled` variant from a `aws_smithy_types::Error`.
4254    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    /// Returns the error message if one is available.
4262    pub fn message(&self) -> Option<&str> {
4263        self.meta.message()
4264    }
4265
4266    /// Returns error metadata, which includes the error code, message,
4267    /// request ID, and potentially additional information.
4268    pub fn meta(&self) -> &aws_smithy_types::Error {
4269        &self.meta
4270    }
4271
4272    /// Returns the request ID if it's available.
4273    pub fn request_id(&self) -> Option<&str> {
4274        self.meta.request_id()
4275    }
4276
4277    /// Returns the error code if it's available.
4278    pub fn code(&self) -> Option<&str> {
4279        self.meta.code()
4280    }
4281    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::InternalFailureError`.
4282    pub fn is_internal_failure_error(&self) -> bool {
4283        matches!(
4284            &self.kind,
4285            CreateGuideSampleErrorKind::InternalFailureError(_)
4286        )
4287    }
4288    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::ThrottlingError`.
4289    pub fn is_throttling_error(&self) -> bool {
4290        matches!(&self.kind, CreateGuideSampleErrorKind::ThrottlingError(_))
4291    }
4292    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::ValidationError`.
4293    pub fn is_validation_error(&self) -> bool {
4294        matches!(&self.kind, CreateGuideSampleErrorKind::ValidationError(_))
4295    }
4296    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::AccessDeniedError`.
4297    pub fn is_access_denied_error(&self) -> bool {
4298        matches!(&self.kind, CreateGuideSampleErrorKind::AccessDeniedError(_))
4299    }
4300    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::ResponseTooLargeError`.
4301    pub fn is_response_too_large_error(&self) -> bool {
4302        matches!(
4303            &self.kind,
4304            CreateGuideSampleErrorKind::ResponseTooLargeError(_)
4305        )
4306    }
4307    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::UnauthorizedError`.
4308    pub fn is_unauthorized_error(&self) -> bool {
4309        matches!(&self.kind, CreateGuideSampleErrorKind::UnauthorizedError(_))
4310    }
4311    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::ResourceConflictError`.
4312    pub fn is_resource_conflict_error(&self) -> bool {
4313        matches!(
4314            &self.kind,
4315            CreateGuideSampleErrorKind::ResourceConflictError(_)
4316        )
4317    }
4318    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::BadRequestError`.
4319    pub fn is_bad_request_error(&self) -> bool {
4320        matches!(&self.kind, CreateGuideSampleErrorKind::BadRequestError(_))
4321    }
4322    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::ResourceNotFoundError`.
4323    pub fn is_resource_not_found_error(&self) -> bool {
4324        matches!(
4325            &self.kind,
4326            CreateGuideSampleErrorKind::ResourceNotFoundError(_)
4327        )
4328    }
4329    /// Returns `true` if the error kind is `CreateGuideSampleErrorKind::RequestTooLargeError`.
4330    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/// Error type for the `DeleteGuideSample` operation.
4356#[non_exhaustive]
4357#[derive(std::fmt::Debug)]
4358pub struct DeleteGuideSampleError {
4359    /// Kind of error that occurred.
4360    pub kind: DeleteGuideSampleErrorKind,
4361    /// Additional metadata about the error, including error code, message, and request ID.
4362    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/// Types of errors that can occur for the `DeleteGuideSample` operation.
4373#[non_exhaustive]
4374#[derive(std::fmt::Debug)]
4375pub enum DeleteGuideSampleErrorKind {
4376    /// The server response when an unexpected error occurred while processing request.
4377    InternalFailureError(crate::error::InternalFailureError),
4378    /// The server response when usage plan or account-level throttling limits exceeded.
4379    ThrottlingError(crate::error::ThrottlingError),
4380    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4381    ValidationError(crate::error::ValidationError),
4382    /// The server response for authorization failure.
4383    AccessDeniedError(crate::error::AccessDeniedError),
4384    /// The server response when the authorizer failed to authenticate the caller.
4385    UnauthorizedError(crate::error::UnauthorizedError),
4386    /// The server could not process the request because of conflict in the current state of the resource.
4387    ResourceConflictError(crate::error::ResourceConflictError),
4388    /// The server cannot process the request due to an apparent client error.
4389    BadRequestError(crate::error::BadRequestError),
4390    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4391    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4392    ///
4393    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4394    ///
4395    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4396    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4397    /// error reporter library that visits the error's cause/source chain, or call
4398    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4399    ///
4400    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    /// Creates a new `DeleteGuideSampleError`.
4435    pub fn new(kind: DeleteGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4436        Self { kind, meta }
4437    }
4438
4439    /// Creates the `DeleteGuideSampleError::Unhandled` variant from any error type.
4440    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    /// Creates the `DeleteGuideSampleError::Unhandled` variant from a `aws_smithy_types::Error`.
4448    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    /// Returns the error message if one is available.
4456    pub fn message(&self) -> Option<&str> {
4457        self.meta.message()
4458    }
4459
4460    /// Returns error metadata, which includes the error code, message,
4461    /// request ID, and potentially additional information.
4462    pub fn meta(&self) -> &aws_smithy_types::Error {
4463        &self.meta
4464    }
4465
4466    /// Returns the request ID if it's available.
4467    pub fn request_id(&self) -> Option<&str> {
4468        self.meta.request_id()
4469    }
4470
4471    /// Returns the error code if it's available.
4472    pub fn code(&self) -> Option<&str> {
4473        self.meta.code()
4474    }
4475    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::InternalFailureError`.
4476    pub fn is_internal_failure_error(&self) -> bool {
4477        matches!(
4478            &self.kind,
4479            DeleteGuideSampleErrorKind::InternalFailureError(_)
4480        )
4481    }
4482    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::ThrottlingError`.
4483    pub fn is_throttling_error(&self) -> bool {
4484        matches!(&self.kind, DeleteGuideSampleErrorKind::ThrottlingError(_))
4485    }
4486    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::ValidationError`.
4487    pub fn is_validation_error(&self) -> bool {
4488        matches!(&self.kind, DeleteGuideSampleErrorKind::ValidationError(_))
4489    }
4490    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::AccessDeniedError`.
4491    pub fn is_access_denied_error(&self) -> bool {
4492        matches!(&self.kind, DeleteGuideSampleErrorKind::AccessDeniedError(_))
4493    }
4494    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::UnauthorizedError`.
4495    pub fn is_unauthorized_error(&self) -> bool {
4496        matches!(&self.kind, DeleteGuideSampleErrorKind::UnauthorizedError(_))
4497    }
4498    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::ResourceConflictError`.
4499    pub fn is_resource_conflict_error(&self) -> bool {
4500        matches!(
4501            &self.kind,
4502            DeleteGuideSampleErrorKind::ResourceConflictError(_)
4503        )
4504    }
4505    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::BadRequestError`.
4506    pub fn is_bad_request_error(&self) -> bool {
4507        matches!(&self.kind, DeleteGuideSampleErrorKind::BadRequestError(_))
4508    }
4509    /// Returns `true` if the error kind is `DeleteGuideSampleErrorKind::ResourceNotFoundError`.
4510    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/// Error type for the `UpdateGuideSample` operation.
4534#[non_exhaustive]
4535#[derive(std::fmt::Debug)]
4536pub struct UpdateGuideSampleError {
4537    /// Kind of error that occurred.
4538    pub kind: UpdateGuideSampleErrorKind,
4539    /// Additional metadata about the error, including error code, message, and request ID.
4540    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/// Types of errors that can occur for the `UpdateGuideSample` operation.
4551#[non_exhaustive]
4552#[derive(std::fmt::Debug)]
4553pub enum UpdateGuideSampleErrorKind {
4554    /// The server response when an unexpected error occurred while processing request.
4555    InternalFailureError(crate::error::InternalFailureError),
4556    /// The server response when usage plan or account-level throttling limits exceeded.
4557    ThrottlingError(crate::error::ThrottlingError),
4558    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4559    ValidationError(crate::error::ValidationError),
4560    /// The server response for authorization failure.
4561    AccessDeniedError(crate::error::AccessDeniedError),
4562    /// The server response when the authorizer failed to authenticate the caller.
4563    UnauthorizedError(crate::error::UnauthorizedError),
4564    /// The server could not process the request because of conflict in the current state of the resource.
4565    ResourceConflictError(crate::error::ResourceConflictError),
4566    /// The server cannot process the request due to an apparent client error.
4567    BadRequestError(crate::error::BadRequestError),
4568    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4569    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4570    /// The server response for the request too large error.
4571    RequestTooLargeError(crate::error::RequestTooLargeError),
4572    ///
4573    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4574    ///
4575    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4576    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4577    /// error reporter library that visits the error's cause/source chain, or call
4578    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4579    ///
4580    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    /// Creates a new `UpdateGuideSampleError`.
4616    pub fn new(kind: UpdateGuideSampleErrorKind, meta: aws_smithy_types::Error) -> Self {
4617        Self { kind, meta }
4618    }
4619
4620    /// Creates the `UpdateGuideSampleError::Unhandled` variant from any error type.
4621    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    /// Creates the `UpdateGuideSampleError::Unhandled` variant from a `aws_smithy_types::Error`.
4629    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    /// Returns the error message if one is available.
4637    pub fn message(&self) -> Option<&str> {
4638        self.meta.message()
4639    }
4640
4641    /// Returns error metadata, which includes the error code, message,
4642    /// request ID, and potentially additional information.
4643    pub fn meta(&self) -> &aws_smithy_types::Error {
4644        &self.meta
4645    }
4646
4647    /// Returns the request ID if it's available.
4648    pub fn request_id(&self) -> Option<&str> {
4649        self.meta.request_id()
4650    }
4651
4652    /// Returns the error code if it's available.
4653    pub fn code(&self) -> Option<&str> {
4654        self.meta.code()
4655    }
4656    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::InternalFailureError`.
4657    pub fn is_internal_failure_error(&self) -> bool {
4658        matches!(
4659            &self.kind,
4660            UpdateGuideSampleErrorKind::InternalFailureError(_)
4661        )
4662    }
4663    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::ThrottlingError`.
4664    pub fn is_throttling_error(&self) -> bool {
4665        matches!(&self.kind, UpdateGuideSampleErrorKind::ThrottlingError(_))
4666    }
4667    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::ValidationError`.
4668    pub fn is_validation_error(&self) -> bool {
4669        matches!(&self.kind, UpdateGuideSampleErrorKind::ValidationError(_))
4670    }
4671    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::AccessDeniedError`.
4672    pub fn is_access_denied_error(&self) -> bool {
4673        matches!(&self.kind, UpdateGuideSampleErrorKind::AccessDeniedError(_))
4674    }
4675    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::UnauthorizedError`.
4676    pub fn is_unauthorized_error(&self) -> bool {
4677        matches!(&self.kind, UpdateGuideSampleErrorKind::UnauthorizedError(_))
4678    }
4679    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::ResourceConflictError`.
4680    pub fn is_resource_conflict_error(&self) -> bool {
4681        matches!(
4682            &self.kind,
4683            UpdateGuideSampleErrorKind::ResourceConflictError(_)
4684        )
4685    }
4686    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::BadRequestError`.
4687    pub fn is_bad_request_error(&self) -> bool {
4688        matches!(&self.kind, UpdateGuideSampleErrorKind::BadRequestError(_))
4689    }
4690    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::ResourceNotFoundError`.
4691    pub fn is_resource_not_found_error(&self) -> bool {
4692        matches!(
4693            &self.kind,
4694            UpdateGuideSampleErrorKind::ResourceNotFoundError(_)
4695        )
4696    }
4697    /// Returns `true` if the error kind is `UpdateGuideSampleErrorKind::RequestTooLargeError`.
4698    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/// Error type for the `ListGuideAttachments` operation.
4723#[non_exhaustive]
4724#[derive(std::fmt::Debug)]
4725pub struct ListGuideAttachmentsError {
4726    /// Kind of error that occurred.
4727    pub kind: ListGuideAttachmentsErrorKind,
4728    /// Additional metadata about the error, including error code, message, and request ID.
4729    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/// Types of errors that can occur for the `ListGuideAttachments` operation.
4740#[non_exhaustive]
4741#[derive(std::fmt::Debug)]
4742pub enum ListGuideAttachmentsErrorKind {
4743    /// The server response when an unexpected error occurred while processing request.
4744    InternalFailureError(crate::error::InternalFailureError),
4745    /// The server response when usage plan or account-level throttling limits exceeded.
4746    ThrottlingError(crate::error::ThrottlingError),
4747    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4748    ValidationError(crate::error::ValidationError),
4749    /// The server response for authorization failure.
4750    AccessDeniedError(crate::error::AccessDeniedError),
4751    /// The server response when the authorizer failed to authenticate the caller.
4752    UnauthorizedError(crate::error::UnauthorizedError),
4753    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4754    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4755    ///
4756    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4757    ///
4758    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4759    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4760    /// error reporter library that visits the error's cause/source chain, or call
4761    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4762    ///
4763    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    /// Creates a new `ListGuideAttachmentsError`.
4793    pub fn new(kind: ListGuideAttachmentsErrorKind, meta: aws_smithy_types::Error) -> Self {
4794        Self { kind, meta }
4795    }
4796
4797    /// Creates the `ListGuideAttachmentsError::Unhandled` variant from any error type.
4798    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    /// Creates the `ListGuideAttachmentsError::Unhandled` variant from a `aws_smithy_types::Error`.
4808    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    /// Returns the error message if one is available.
4818    pub fn message(&self) -> Option<&str> {
4819        self.meta.message()
4820    }
4821
4822    /// Returns error metadata, which includes the error code, message,
4823    /// request ID, and potentially additional information.
4824    pub fn meta(&self) -> &aws_smithy_types::Error {
4825        &self.meta
4826    }
4827
4828    /// Returns the request ID if it's available.
4829    pub fn request_id(&self) -> Option<&str> {
4830        self.meta.request_id()
4831    }
4832
4833    /// Returns the error code if it's available.
4834    pub fn code(&self) -> Option<&str> {
4835        self.meta.code()
4836    }
4837    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::InternalFailureError`.
4838    pub fn is_internal_failure_error(&self) -> bool {
4839        matches!(
4840            &self.kind,
4841            ListGuideAttachmentsErrorKind::InternalFailureError(_)
4842        )
4843    }
4844    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::ThrottlingError`.
4845    pub fn is_throttling_error(&self) -> bool {
4846        matches!(
4847            &self.kind,
4848            ListGuideAttachmentsErrorKind::ThrottlingError(_)
4849        )
4850    }
4851    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::ValidationError`.
4852    pub fn is_validation_error(&self) -> bool {
4853        matches!(
4854            &self.kind,
4855            ListGuideAttachmentsErrorKind::ValidationError(_)
4856        )
4857    }
4858    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::AccessDeniedError`.
4859    pub fn is_access_denied_error(&self) -> bool {
4860        matches!(
4861            &self.kind,
4862            ListGuideAttachmentsErrorKind::AccessDeniedError(_)
4863        )
4864    }
4865    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::UnauthorizedError`.
4866    pub fn is_unauthorized_error(&self) -> bool {
4867        matches!(
4868            &self.kind,
4869            ListGuideAttachmentsErrorKind::UnauthorizedError(_)
4870        )
4871    }
4872    /// Returns `true` if the error kind is `ListGuideAttachmentsErrorKind::ResourceNotFoundError`.
4873    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/// Error type for the `CreateGuideAttachment` operation.
4895#[non_exhaustive]
4896#[derive(std::fmt::Debug)]
4897pub struct CreateGuideAttachmentError {
4898    /// Kind of error that occurred.
4899    pub kind: CreateGuideAttachmentErrorKind,
4900    /// Additional metadata about the error, including error code, message, and request ID.
4901    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/// Types of errors that can occur for the `CreateGuideAttachment` operation.
4912#[non_exhaustive]
4913#[derive(std::fmt::Debug)]
4914pub enum CreateGuideAttachmentErrorKind {
4915    /// The server response when an unexpected error occurred while processing request.
4916    InternalFailureError(crate::error::InternalFailureError),
4917    /// The server response when usage plan or account-level throttling limits exceeded.
4918    ThrottlingError(crate::error::ThrottlingError),
4919    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
4920    ValidationError(crate::error::ValidationError),
4921    /// The server response for authorization failure.
4922    AccessDeniedError(crate::error::AccessDeniedError),
4923    /// The server response for the request too large error.
4924    ResponseTooLargeError(crate::error::ResponseTooLargeError),
4925    /// The server response when the authorizer failed to authenticate the caller.
4926    UnauthorizedError(crate::error::UnauthorizedError),
4927    /// The server could not process the request because of conflict in the current state of the resource.
4928    ResourceConflictError(crate::error::ResourceConflictError),
4929    /// The server cannot process the request due to an apparent client error.
4930    BadRequestError(crate::error::BadRequestError),
4931    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
4932    ResourceNotFoundError(crate::error::ResourceNotFoundError),
4933    /// The server response for the request too large error.
4934    RequestTooLargeError(crate::error::RequestTooLargeError),
4935    ///
4936    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
4937    ///
4938    /// When logging an error from the SDK, it is recommended that you either wrap the error in
4939    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
4940    /// error reporter library that visits the error's cause/source chain, or call
4941    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
4942    ///
4943    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    /// Creates a new `CreateGuideAttachmentError`.
4980    pub fn new(kind: CreateGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
4981        Self { kind, meta }
4982    }
4983
4984    /// Creates the `CreateGuideAttachmentError::Unhandled` variant from any error type.
4985    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    /// Creates the `CreateGuideAttachmentError::Unhandled` variant from a `aws_smithy_types::Error`.
4995    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    /// Returns the error message if one is available.
5005    pub fn message(&self) -> Option<&str> {
5006        self.meta.message()
5007    }
5008
5009    /// Returns error metadata, which includes the error code, message,
5010    /// request ID, and potentially additional information.
5011    pub fn meta(&self) -> &aws_smithy_types::Error {
5012        &self.meta
5013    }
5014
5015    /// Returns the request ID if it's available.
5016    pub fn request_id(&self) -> Option<&str> {
5017        self.meta.request_id()
5018    }
5019
5020    /// Returns the error code if it's available.
5021    pub fn code(&self) -> Option<&str> {
5022        self.meta.code()
5023    }
5024    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::InternalFailureError`.
5025    pub fn is_internal_failure_error(&self) -> bool {
5026        matches!(
5027            &self.kind,
5028            CreateGuideAttachmentErrorKind::InternalFailureError(_)
5029        )
5030    }
5031    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::ThrottlingError`.
5032    pub fn is_throttling_error(&self) -> bool {
5033        matches!(
5034            &self.kind,
5035            CreateGuideAttachmentErrorKind::ThrottlingError(_)
5036        )
5037    }
5038    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::ValidationError`.
5039    pub fn is_validation_error(&self) -> bool {
5040        matches!(
5041            &self.kind,
5042            CreateGuideAttachmentErrorKind::ValidationError(_)
5043        )
5044    }
5045    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::AccessDeniedError`.
5046    pub fn is_access_denied_error(&self) -> bool {
5047        matches!(
5048            &self.kind,
5049            CreateGuideAttachmentErrorKind::AccessDeniedError(_)
5050        )
5051    }
5052    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::ResponseTooLargeError`.
5053    pub fn is_response_too_large_error(&self) -> bool {
5054        matches!(
5055            &self.kind,
5056            CreateGuideAttachmentErrorKind::ResponseTooLargeError(_)
5057        )
5058    }
5059    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::UnauthorizedError`.
5060    pub fn is_unauthorized_error(&self) -> bool {
5061        matches!(
5062            &self.kind,
5063            CreateGuideAttachmentErrorKind::UnauthorizedError(_)
5064        )
5065    }
5066    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::ResourceConflictError`.
5067    pub fn is_resource_conflict_error(&self) -> bool {
5068        matches!(
5069            &self.kind,
5070            CreateGuideAttachmentErrorKind::ResourceConflictError(_)
5071        )
5072    }
5073    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::BadRequestError`.
5074    pub fn is_bad_request_error(&self) -> bool {
5075        matches!(
5076            &self.kind,
5077            CreateGuideAttachmentErrorKind::BadRequestError(_)
5078        )
5079    }
5080    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::ResourceNotFoundError`.
5081    pub fn is_resource_not_found_error(&self) -> bool {
5082        matches!(
5083            &self.kind,
5084            CreateGuideAttachmentErrorKind::ResourceNotFoundError(_)
5085        )
5086    }
5087    /// Returns `true` if the error kind is `CreateGuideAttachmentErrorKind::RequestTooLargeError`.
5088    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/// Error type for the `DeleteGuideAttachment` operation.
5114#[non_exhaustive]
5115#[derive(std::fmt::Debug)]
5116pub struct DeleteGuideAttachmentError {
5117    /// Kind of error that occurred.
5118    pub kind: DeleteGuideAttachmentErrorKind,
5119    /// Additional metadata about the error, including error code, message, and request ID.
5120    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/// Types of errors that can occur for the `DeleteGuideAttachment` operation.
5131#[non_exhaustive]
5132#[derive(std::fmt::Debug)]
5133pub enum DeleteGuideAttachmentErrorKind {
5134    /// The server response when an unexpected error occurred while processing request.
5135    InternalFailureError(crate::error::InternalFailureError),
5136    /// The server response when usage plan or account-level throttling limits exceeded.
5137    ThrottlingError(crate::error::ThrottlingError),
5138    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
5139    ValidationError(crate::error::ValidationError),
5140    /// The server response for authorization failure.
5141    AccessDeniedError(crate::error::AccessDeniedError),
5142    /// The server response when the authorizer failed to authenticate the caller.
5143    UnauthorizedError(crate::error::UnauthorizedError),
5144    /// The server could not process the request because of conflict in the current state of the resource.
5145    ResourceConflictError(crate::error::ResourceConflictError),
5146    /// The server cannot process the request due to an apparent client error.
5147    BadRequestError(crate::error::BadRequestError),
5148    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
5149    ResourceNotFoundError(crate::error::ResourceNotFoundError),
5150    ///
5151    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
5152    ///
5153    /// When logging an error from the SDK, it is recommended that you either wrap the error in
5154    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
5155    /// error reporter library that visits the error's cause/source chain, or call
5156    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
5157    ///
5158    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    /// Creates a new `DeleteGuideAttachmentError`.
5193    pub fn new(kind: DeleteGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
5194        Self { kind, meta }
5195    }
5196
5197    /// Creates the `DeleteGuideAttachmentError::Unhandled` variant from any error type.
5198    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    /// Creates the `DeleteGuideAttachmentError::Unhandled` variant from a `aws_smithy_types::Error`.
5208    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    /// Returns the error message if one is available.
5218    pub fn message(&self) -> Option<&str> {
5219        self.meta.message()
5220    }
5221
5222    /// Returns error metadata, which includes the error code, message,
5223    /// request ID, and potentially additional information.
5224    pub fn meta(&self) -> &aws_smithy_types::Error {
5225        &self.meta
5226    }
5227
5228    /// Returns the request ID if it's available.
5229    pub fn request_id(&self) -> Option<&str> {
5230        self.meta.request_id()
5231    }
5232
5233    /// Returns the error code if it's available.
5234    pub fn code(&self) -> Option<&str> {
5235        self.meta.code()
5236    }
5237    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::InternalFailureError`.
5238    pub fn is_internal_failure_error(&self) -> bool {
5239        matches!(
5240            &self.kind,
5241            DeleteGuideAttachmentErrorKind::InternalFailureError(_)
5242        )
5243    }
5244    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::ThrottlingError`.
5245    pub fn is_throttling_error(&self) -> bool {
5246        matches!(
5247            &self.kind,
5248            DeleteGuideAttachmentErrorKind::ThrottlingError(_)
5249        )
5250    }
5251    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::ValidationError`.
5252    pub fn is_validation_error(&self) -> bool {
5253        matches!(
5254            &self.kind,
5255            DeleteGuideAttachmentErrorKind::ValidationError(_)
5256        )
5257    }
5258    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::AccessDeniedError`.
5259    pub fn is_access_denied_error(&self) -> bool {
5260        matches!(
5261            &self.kind,
5262            DeleteGuideAttachmentErrorKind::AccessDeniedError(_)
5263        )
5264    }
5265    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::UnauthorizedError`.
5266    pub fn is_unauthorized_error(&self) -> bool {
5267        matches!(
5268            &self.kind,
5269            DeleteGuideAttachmentErrorKind::UnauthorizedError(_)
5270        )
5271    }
5272    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::ResourceConflictError`.
5273    pub fn is_resource_conflict_error(&self) -> bool {
5274        matches!(
5275            &self.kind,
5276            DeleteGuideAttachmentErrorKind::ResourceConflictError(_)
5277        )
5278    }
5279    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::BadRequestError`.
5280    pub fn is_bad_request_error(&self) -> bool {
5281        matches!(
5282            &self.kind,
5283            DeleteGuideAttachmentErrorKind::BadRequestError(_)
5284        )
5285    }
5286    /// Returns `true` if the error kind is `DeleteGuideAttachmentErrorKind::ResourceNotFoundError`.
5287    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/// Error type for the `UpdateGuideAttachment` operation.
5311#[non_exhaustive]
5312#[derive(std::fmt::Debug)]
5313pub struct UpdateGuideAttachmentError {
5314    /// Kind of error that occurred.
5315    pub kind: UpdateGuideAttachmentErrorKind,
5316    /// Additional metadata about the error, including error code, message, and request ID.
5317    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/// Types of errors that can occur for the `UpdateGuideAttachment` operation.
5328#[non_exhaustive]
5329#[derive(std::fmt::Debug)]
5330pub enum UpdateGuideAttachmentErrorKind {
5331    /// The server response when an unexpected error occurred while processing request.
5332    InternalFailureError(crate::error::InternalFailureError),
5333    /// The server response when usage plan or account-level throttling limits exceeded.
5334    ThrottlingError(crate::error::ThrottlingError),
5335    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
5336    ValidationError(crate::error::ValidationError),
5337    /// The server response for authorization failure.
5338    AccessDeniedError(crate::error::AccessDeniedError),
5339    /// The server response when the authorizer failed to authenticate the caller.
5340    UnauthorizedError(crate::error::UnauthorizedError),
5341    /// The server could not process the request because of conflict in the current state of the resource.
5342    ResourceConflictError(crate::error::ResourceConflictError),
5343    /// The server cannot process the request due to an apparent client error.
5344    BadRequestError(crate::error::BadRequestError),
5345    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
5346    ResourceNotFoundError(crate::error::ResourceNotFoundError),
5347    /// The server response for the request too large error.
5348    RequestTooLargeError(crate::error::RequestTooLargeError),
5349    ///
5350    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
5351    ///
5352    /// When logging an error from the SDK, it is recommended that you either wrap the error in
5353    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
5354    /// error reporter library that visits the error's cause/source chain, or call
5355    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
5356    ///
5357    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    /// Creates a new `UpdateGuideAttachmentError`.
5393    pub fn new(kind: UpdateGuideAttachmentErrorKind, meta: aws_smithy_types::Error) -> Self {
5394        Self { kind, meta }
5395    }
5396
5397    /// Creates the `UpdateGuideAttachmentError::Unhandled` variant from any error type.
5398    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    /// Creates the `UpdateGuideAttachmentError::Unhandled` variant from a `aws_smithy_types::Error`.
5408    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    /// Returns the error message if one is available.
5418    pub fn message(&self) -> Option<&str> {
5419        self.meta.message()
5420    }
5421
5422    /// Returns error metadata, which includes the error code, message,
5423    /// request ID, and potentially additional information.
5424    pub fn meta(&self) -> &aws_smithy_types::Error {
5425        &self.meta
5426    }
5427
5428    /// Returns the request ID if it's available.
5429    pub fn request_id(&self) -> Option<&str> {
5430        self.meta.request_id()
5431    }
5432
5433    /// Returns the error code if it's available.
5434    pub fn code(&self) -> Option<&str> {
5435        self.meta.code()
5436    }
5437    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::InternalFailureError`.
5438    pub fn is_internal_failure_error(&self) -> bool {
5439        matches!(
5440            &self.kind,
5441            UpdateGuideAttachmentErrorKind::InternalFailureError(_)
5442        )
5443    }
5444    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::ThrottlingError`.
5445    pub fn is_throttling_error(&self) -> bool {
5446        matches!(
5447            &self.kind,
5448            UpdateGuideAttachmentErrorKind::ThrottlingError(_)
5449        )
5450    }
5451    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::ValidationError`.
5452    pub fn is_validation_error(&self) -> bool {
5453        matches!(
5454            &self.kind,
5455            UpdateGuideAttachmentErrorKind::ValidationError(_)
5456        )
5457    }
5458    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::AccessDeniedError`.
5459    pub fn is_access_denied_error(&self) -> bool {
5460        matches!(
5461            &self.kind,
5462            UpdateGuideAttachmentErrorKind::AccessDeniedError(_)
5463        )
5464    }
5465    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::UnauthorizedError`.
5466    pub fn is_unauthorized_error(&self) -> bool {
5467        matches!(
5468            &self.kind,
5469            UpdateGuideAttachmentErrorKind::UnauthorizedError(_)
5470        )
5471    }
5472    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::ResourceConflictError`.
5473    pub fn is_resource_conflict_error(&self) -> bool {
5474        matches!(
5475            &self.kind,
5476            UpdateGuideAttachmentErrorKind::ResourceConflictError(_)
5477        )
5478    }
5479    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::BadRequestError`.
5480    pub fn is_bad_request_error(&self) -> bool {
5481        matches!(
5482            &self.kind,
5483            UpdateGuideAttachmentErrorKind::BadRequestError(_)
5484        )
5485    }
5486    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::ResourceNotFoundError`.
5487    pub fn is_resource_not_found_error(&self) -> bool {
5488        matches!(
5489            &self.kind,
5490            UpdateGuideAttachmentErrorKind::ResourceNotFoundError(_)
5491        )
5492    }
5493    /// Returns `true` if the error kind is `UpdateGuideAttachmentErrorKind::RequestTooLargeError`.
5494    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/// Error type for the `UpdateAccountConfig` operation.
5519#[non_exhaustive]
5520#[derive(std::fmt::Debug)]
5521pub struct UpdateAccountConfigError {
5522    /// Kind of error that occurred.
5523    pub kind: UpdateAccountConfigErrorKind,
5524    /// Additional metadata about the error, including error code, message, and request ID.
5525    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/// Types of errors that can occur for the `UpdateAccountConfig` operation.
5536#[non_exhaustive]
5537#[derive(std::fmt::Debug)]
5538pub enum UpdateAccountConfigErrorKind {
5539    /// The server response when an unexpected error occurred while processing request.
5540    InternalFailureError(crate::error::InternalFailureError),
5541    /// The server response when usage plan or account-level throttling limits exceeded.
5542    ThrottlingError(crate::error::ThrottlingError),
5543    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
5544    ValidationError(crate::error::ValidationError),
5545    /// The server response for authorization failure.
5546    AccessDeniedError(crate::error::AccessDeniedError),
5547    /// The server response when the authorizer failed to authenticate the caller.
5548    UnauthorizedError(crate::error::UnauthorizedError),
5549    /// The server could not process the request because of conflict in the current state of the resource.
5550    ResourceConflictError(crate::error::ResourceConflictError),
5551    /// The server cannot process the request due to an apparent client error.
5552    BadRequestError(crate::error::BadRequestError),
5553    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
5554    ResourceNotFoundError(crate::error::ResourceNotFoundError),
5555    /// The server response for the request too large error.
5556    RequestTooLargeError(crate::error::RequestTooLargeError),
5557    ///
5558    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
5559    ///
5560    /// When logging an error from the SDK, it is recommended that you either wrap the error in
5561    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
5562    /// error reporter library that visits the error's cause/source chain, or call
5563    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
5564    ///
5565    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    /// Creates a new `UpdateAccountConfigError`.
5601    pub fn new(kind: UpdateAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
5602        Self { kind, meta }
5603    }
5604
5605    /// Creates the `UpdateAccountConfigError::Unhandled` variant from any error type.
5606    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    /// Creates the `UpdateAccountConfigError::Unhandled` variant from a `aws_smithy_types::Error`.
5614    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    /// Returns the error message if one is available.
5622    pub fn message(&self) -> Option<&str> {
5623        self.meta.message()
5624    }
5625
5626    /// Returns error metadata, which includes the error code, message,
5627    /// request ID, and potentially additional information.
5628    pub fn meta(&self) -> &aws_smithy_types::Error {
5629        &self.meta
5630    }
5631
5632    /// Returns the request ID if it's available.
5633    pub fn request_id(&self) -> Option<&str> {
5634        self.meta.request_id()
5635    }
5636
5637    /// Returns the error code if it's available.
5638    pub fn code(&self) -> Option<&str> {
5639        self.meta.code()
5640    }
5641    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::InternalFailureError`.
5642    pub fn is_internal_failure_error(&self) -> bool {
5643        matches!(
5644            &self.kind,
5645            UpdateAccountConfigErrorKind::InternalFailureError(_)
5646        )
5647    }
5648    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::ThrottlingError`.
5649    pub fn is_throttling_error(&self) -> bool {
5650        matches!(&self.kind, UpdateAccountConfigErrorKind::ThrottlingError(_))
5651    }
5652    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::ValidationError`.
5653    pub fn is_validation_error(&self) -> bool {
5654        matches!(&self.kind, UpdateAccountConfigErrorKind::ValidationError(_))
5655    }
5656    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::AccessDeniedError`.
5657    pub fn is_access_denied_error(&self) -> bool {
5658        matches!(
5659            &self.kind,
5660            UpdateAccountConfigErrorKind::AccessDeniedError(_)
5661        )
5662    }
5663    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::UnauthorizedError`.
5664    pub fn is_unauthorized_error(&self) -> bool {
5665        matches!(
5666            &self.kind,
5667            UpdateAccountConfigErrorKind::UnauthorizedError(_)
5668        )
5669    }
5670    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::ResourceConflictError`.
5671    pub fn is_resource_conflict_error(&self) -> bool {
5672        matches!(
5673            &self.kind,
5674            UpdateAccountConfigErrorKind::ResourceConflictError(_)
5675        )
5676    }
5677    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::BadRequestError`.
5678    pub fn is_bad_request_error(&self) -> bool {
5679        matches!(&self.kind, UpdateAccountConfigErrorKind::BadRequestError(_))
5680    }
5681    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::ResourceNotFoundError`.
5682    pub fn is_resource_not_found_error(&self) -> bool {
5683        matches!(
5684            &self.kind,
5685            UpdateAccountConfigErrorKind::ResourceNotFoundError(_)
5686        )
5687    }
5688    /// Returns `true` if the error kind is `UpdateAccountConfigErrorKind::RequestTooLargeError`.
5689    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/// Error type for the `GetAccountConfig` operation.
5714#[non_exhaustive]
5715#[derive(std::fmt::Debug)]
5716pub struct GetAccountConfigError {
5717    /// Kind of error that occurred.
5718    pub kind: GetAccountConfigErrorKind,
5719    /// Additional metadata about the error, including error code, message, and request ID.
5720    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/// Types of errors that can occur for the `GetAccountConfig` operation.
5731#[non_exhaustive]
5732#[derive(std::fmt::Debug)]
5733pub enum GetAccountConfigErrorKind {
5734    /// The server response when an unexpected error occurred while processing request.
5735    InternalFailureError(crate::error::InternalFailureError),
5736    /// The server response when usage plan or account-level throttling limits exceeded.
5737    ThrottlingError(crate::error::ThrottlingError),
5738    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
5739    ValidationError(crate::error::ValidationError),
5740    /// The server response for authorization failure.
5741    AccessDeniedError(crate::error::AccessDeniedError),
5742    /// The server response when the authorizer failed to authenticate the caller.
5743    UnauthorizedError(crate::error::UnauthorizedError),
5744    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
5745    ResourceNotFoundError(crate::error::ResourceNotFoundError),
5746    /// The server response for the request too large error.
5747    RequestTooLargeError(crate::error::RequestTooLargeError),
5748    ///
5749    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
5750    ///
5751    /// When logging an error from the SDK, it is recommended that you either wrap the error in
5752    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
5753    /// error reporter library that visits the error's cause/source chain, or call
5754    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
5755    ///
5756    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    /// Creates a new `GetAccountConfigError`.
5785    pub fn new(kind: GetAccountConfigErrorKind, meta: aws_smithy_types::Error) -> Self {
5786        Self { kind, meta }
5787    }
5788
5789    /// Creates the `GetAccountConfigError::Unhandled` variant from any error type.
5790    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    /// Creates the `GetAccountConfigError::Unhandled` variant from a `aws_smithy_types::Error`.
5798    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    /// Returns the error message if one is available.
5806    pub fn message(&self) -> Option<&str> {
5807        self.meta.message()
5808    }
5809
5810    /// Returns error metadata, which includes the error code, message,
5811    /// request ID, and potentially additional information.
5812    pub fn meta(&self) -> &aws_smithy_types::Error {
5813        &self.meta
5814    }
5815
5816    /// Returns the request ID if it's available.
5817    pub fn request_id(&self) -> Option<&str> {
5818        self.meta.request_id()
5819    }
5820
5821    /// Returns the error code if it's available.
5822    pub fn code(&self) -> Option<&str> {
5823        self.meta.code()
5824    }
5825    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::InternalFailureError`.
5826    pub fn is_internal_failure_error(&self) -> bool {
5827        matches!(
5828            &self.kind,
5829            GetAccountConfigErrorKind::InternalFailureError(_)
5830        )
5831    }
5832    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::ThrottlingError`.
5833    pub fn is_throttling_error(&self) -> bool {
5834        matches!(&self.kind, GetAccountConfigErrorKind::ThrottlingError(_))
5835    }
5836    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::ValidationError`.
5837    pub fn is_validation_error(&self) -> bool {
5838        matches!(&self.kind, GetAccountConfigErrorKind::ValidationError(_))
5839    }
5840    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::AccessDeniedError`.
5841    pub fn is_access_denied_error(&self) -> bool {
5842        matches!(&self.kind, GetAccountConfigErrorKind::AccessDeniedError(_))
5843    }
5844    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::UnauthorizedError`.
5845    pub fn is_unauthorized_error(&self) -> bool {
5846        matches!(&self.kind, GetAccountConfigErrorKind::UnauthorizedError(_))
5847    }
5848    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::ResourceNotFoundError`.
5849    pub fn is_resource_not_found_error(&self) -> bool {
5850        matches!(
5851            &self.kind,
5852            GetAccountConfigErrorKind::ResourceNotFoundError(_)
5853        )
5854    }
5855    /// Returns `true` if the error kind is `GetAccountConfigErrorKind::RequestTooLargeError`.
5856    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/// Error type for the `ListX12TransactionSets` operation.
5879#[non_exhaustive]
5880#[derive(std::fmt::Debug)]
5881pub struct ListX12TransactionSetsError {
5882    /// Kind of error that occurred.
5883    pub kind: ListX12TransactionSetsErrorKind,
5884    /// Additional metadata about the error, including error code, message, and request ID.
5885    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/// Types of errors that can occur for the `ListX12TransactionSets` operation.
5896#[non_exhaustive]
5897#[derive(std::fmt::Debug)]
5898pub enum ListX12TransactionSetsErrorKind {
5899    /// The server response when an unexpected error occurred while processing request.
5900    InternalFailureError(crate::error::InternalFailureError),
5901    /// The server response when usage plan or account-level throttling limits exceeded.
5902    ThrottlingError(crate::error::ThrottlingError),
5903    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
5904    ValidationError(crate::error::ValidationError),
5905    /// The server response for authorization failure.
5906    AccessDeniedError(crate::error::AccessDeniedError),
5907    /// The server response when the authorizer failed to authenticate the caller.
5908    UnauthorizedError(crate::error::UnauthorizedError),
5909    /// The server cannot process the request due to an apparent client error.
5910    BadRequestError(crate::error::BadRequestError),
5911    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
5912    ResourceNotFoundError(crate::error::ResourceNotFoundError),
5913    ///
5914    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
5915    ///
5916    /// When logging an error from the SDK, it is recommended that you either wrap the error in
5917    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
5918    /// error reporter library that visits the error's cause/source chain, or call
5919    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
5920    ///
5921    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    /// Creates a new `ListX12TransactionSetsError`.
5952    pub fn new(kind: ListX12TransactionSetsErrorKind, meta: aws_smithy_types::Error) -> Self {
5953        Self { kind, meta }
5954    }
5955
5956    /// Creates the `ListX12TransactionSetsError::Unhandled` variant from any error type.
5957    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    /// Creates the `ListX12TransactionSetsError::Unhandled` variant from a `aws_smithy_types::Error`.
5967    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    /// Returns the error message if one is available.
5977    pub fn message(&self) -> Option<&str> {
5978        self.meta.message()
5979    }
5980
5981    /// Returns error metadata, which includes the error code, message,
5982    /// request ID, and potentially additional information.
5983    pub fn meta(&self) -> &aws_smithy_types::Error {
5984        &self.meta
5985    }
5986
5987    /// Returns the request ID if it's available.
5988    pub fn request_id(&self) -> Option<&str> {
5989        self.meta.request_id()
5990    }
5991
5992    /// Returns the error code if it's available.
5993    pub fn code(&self) -> Option<&str> {
5994        self.meta.code()
5995    }
5996    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::InternalFailureError`.
5997    pub fn is_internal_failure_error(&self) -> bool {
5998        matches!(
5999            &self.kind,
6000            ListX12TransactionSetsErrorKind::InternalFailureError(_)
6001        )
6002    }
6003    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::ThrottlingError`.
6004    pub fn is_throttling_error(&self) -> bool {
6005        matches!(
6006            &self.kind,
6007            ListX12TransactionSetsErrorKind::ThrottlingError(_)
6008        )
6009    }
6010    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::ValidationError`.
6011    pub fn is_validation_error(&self) -> bool {
6012        matches!(
6013            &self.kind,
6014            ListX12TransactionSetsErrorKind::ValidationError(_)
6015        )
6016    }
6017    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::AccessDeniedError`.
6018    pub fn is_access_denied_error(&self) -> bool {
6019        matches!(
6020            &self.kind,
6021            ListX12TransactionSetsErrorKind::AccessDeniedError(_)
6022        )
6023    }
6024    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::UnauthorizedError`.
6025    pub fn is_unauthorized_error(&self) -> bool {
6026        matches!(
6027            &self.kind,
6028            ListX12TransactionSetsErrorKind::UnauthorizedError(_)
6029        )
6030    }
6031    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::BadRequestError`.
6032    pub fn is_bad_request_error(&self) -> bool {
6033        matches!(
6034            &self.kind,
6035            ListX12TransactionSetsErrorKind::BadRequestError(_)
6036        )
6037    }
6038    /// Returns `true` if the error kind is `ListX12TransactionSetsErrorKind::ResourceNotFoundError`.
6039    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/// Error type for the `ListAllPublicGuides` operation.
6062#[non_exhaustive]
6063#[derive(std::fmt::Debug)]
6064pub struct ListAllPublicGuidesError {
6065    /// Kind of error that occurred.
6066    pub kind: ListAllPublicGuidesErrorKind,
6067    /// Additional metadata about the error, including error code, message, and request ID.
6068    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/// Types of errors that can occur for the `ListAllPublicGuides` operation.
6079#[non_exhaustive]
6080#[derive(std::fmt::Debug)]
6081pub enum ListAllPublicGuidesErrorKind {
6082    /// The server response when an unexpected error occurred while processing request.
6083    InternalFailureError(crate::error::InternalFailureError),
6084    /// The server response when usage plan or account-level throttling limits exceeded.
6085    ThrottlingError(crate::error::ThrottlingError),
6086    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
6087    ValidationError(crate::error::ValidationError),
6088    /// The server cannot process the request due to an apparent client error.
6089    BadRequestError(crate::error::BadRequestError),
6090    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
6091    ResourceNotFoundError(crate::error::ResourceNotFoundError),
6092    /// The server response for the request too large error.
6093    RequestTooLargeError(crate::error::RequestTooLargeError),
6094    ///
6095    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
6096    ///
6097    /// When logging an error from the SDK, it is recommended that you either wrap the error in
6098    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
6099    /// error reporter library that visits the error's cause/source chain, or call
6100    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
6101    ///
6102    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    /// Creates a new `ListAllPublicGuidesError`.
6132    pub fn new(kind: ListAllPublicGuidesErrorKind, meta: aws_smithy_types::Error) -> Self {
6133        Self { kind, meta }
6134    }
6135
6136    /// Creates the `ListAllPublicGuidesError::Unhandled` variant from any error type.
6137    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    /// Creates the `ListAllPublicGuidesError::Unhandled` variant from a `aws_smithy_types::Error`.
6145    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    /// Returns the error message if one is available.
6153    pub fn message(&self) -> Option<&str> {
6154        self.meta.message()
6155    }
6156
6157    /// Returns error metadata, which includes the error code, message,
6158    /// request ID, and potentially additional information.
6159    pub fn meta(&self) -> &aws_smithy_types::Error {
6160        &self.meta
6161    }
6162
6163    /// Returns the request ID if it's available.
6164    pub fn request_id(&self) -> Option<&str> {
6165        self.meta.request_id()
6166    }
6167
6168    /// Returns the error code if it's available.
6169    pub fn code(&self) -> Option<&str> {
6170        self.meta.code()
6171    }
6172    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::InternalFailureError`.
6173    pub fn is_internal_failure_error(&self) -> bool {
6174        matches!(
6175            &self.kind,
6176            ListAllPublicGuidesErrorKind::InternalFailureError(_)
6177        )
6178    }
6179    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::ThrottlingError`.
6180    pub fn is_throttling_error(&self) -> bool {
6181        matches!(&self.kind, ListAllPublicGuidesErrorKind::ThrottlingError(_))
6182    }
6183    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::ValidationError`.
6184    pub fn is_validation_error(&self) -> bool {
6185        matches!(&self.kind, ListAllPublicGuidesErrorKind::ValidationError(_))
6186    }
6187    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::BadRequestError`.
6188    pub fn is_bad_request_error(&self) -> bool {
6189        matches!(&self.kind, ListAllPublicGuidesErrorKind::BadRequestError(_))
6190    }
6191    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::ResourceNotFoundError`.
6192    pub fn is_resource_not_found_error(&self) -> bool {
6193        matches!(
6194            &self.kind,
6195            ListAllPublicGuidesErrorKind::ResourceNotFoundError(_)
6196        )
6197    }
6198    /// Returns `true` if the error kind is `ListAllPublicGuidesErrorKind::RequestTooLargeError`.
6199    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/// Error type for the `GetX12TransactionSetMetadata` operation.
6221#[non_exhaustive]
6222#[derive(std::fmt::Debug)]
6223pub struct GetX12TransactionSetMetadataError {
6224    /// Kind of error that occurred.
6225    pub kind: GetX12TransactionSetMetadataErrorKind,
6226    /// Additional metadata about the error, including error code, message, and request ID.
6227    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/// Types of errors that can occur for the `GetX12TransactionSetMetadata` operation.
6240#[non_exhaustive]
6241#[derive(std::fmt::Debug)]
6242pub enum GetX12TransactionSetMetadataErrorKind {
6243    /// The server response when an unexpected error occurred while processing request.
6244    InternalFailureError(crate::error::InternalFailureError),
6245    /// The server response when usage plan or account-level throttling limits exceeded.
6246    ThrottlingError(crate::error::ThrottlingError),
6247    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
6248    ValidationError(crate::error::ValidationError),
6249    /// The server response for authorization failure.
6250    AccessDeniedError(crate::error::AccessDeniedError),
6251    /// The server response when the authorizer failed to authenticate the caller.
6252    UnauthorizedError(crate::error::UnauthorizedError),
6253    /// The server cannot process the request due to an apparent client error.
6254    BadRequestError(crate::error::BadRequestError),
6255    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
6256    ResourceNotFoundError(crate::error::ResourceNotFoundError),
6257    ///
6258    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
6259    ///
6260    /// When logging an error from the SDK, it is recommended that you either wrap the error in
6261    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
6262    /// error reporter library that visits the error's cause/source chain, or call
6263    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
6264    ///
6265    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    /// Creates a new `GetX12TransactionSetMetadataError`.
6296    pub fn new(kind: GetX12TransactionSetMetadataErrorKind, meta: aws_smithy_types::Error) -> Self {
6297        Self { kind, meta }
6298    }
6299
6300    /// Creates the `GetX12TransactionSetMetadataError::Unhandled` variant from any error type.
6301    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    /// Creates the `GetX12TransactionSetMetadataError::Unhandled` variant from a `aws_smithy_types::Error`.
6311    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    /// Returns the error message if one is available.
6321    pub fn message(&self) -> Option<&str> {
6322        self.meta.message()
6323    }
6324
6325    /// Returns error metadata, which includes the error code, message,
6326    /// request ID, and potentially additional information.
6327    pub fn meta(&self) -> &aws_smithy_types::Error {
6328        &self.meta
6329    }
6330
6331    /// Returns the request ID if it's available.
6332    pub fn request_id(&self) -> Option<&str> {
6333        self.meta.request_id()
6334    }
6335
6336    /// Returns the error code if it's available.
6337    pub fn code(&self) -> Option<&str> {
6338        self.meta.code()
6339    }
6340    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::InternalFailureError`.
6341    pub fn is_internal_failure_error(&self) -> bool {
6342        matches!(
6343            &self.kind,
6344            GetX12TransactionSetMetadataErrorKind::InternalFailureError(_)
6345        )
6346    }
6347    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::ThrottlingError`.
6348    pub fn is_throttling_error(&self) -> bool {
6349        matches!(
6350            &self.kind,
6351            GetX12TransactionSetMetadataErrorKind::ThrottlingError(_)
6352        )
6353    }
6354    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::ValidationError`.
6355    pub fn is_validation_error(&self) -> bool {
6356        matches!(
6357            &self.kind,
6358            GetX12TransactionSetMetadataErrorKind::ValidationError(_)
6359        )
6360    }
6361    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::AccessDeniedError`.
6362    pub fn is_access_denied_error(&self) -> bool {
6363        matches!(
6364            &self.kind,
6365            GetX12TransactionSetMetadataErrorKind::AccessDeniedError(_)
6366        )
6367    }
6368    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::UnauthorizedError`.
6369    pub fn is_unauthorized_error(&self) -> bool {
6370        matches!(
6371            &self.kind,
6372            GetX12TransactionSetMetadataErrorKind::UnauthorizedError(_)
6373        )
6374    }
6375    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::BadRequestError`.
6376    pub fn is_bad_request_error(&self) -> bool {
6377        matches!(
6378            &self.kind,
6379            GetX12TransactionSetMetadataErrorKind::BadRequestError(_)
6380        )
6381    }
6382    /// Returns `true` if the error kind is `GetX12TransactionSetMetadataErrorKind::ResourceNotFoundError`.
6383    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///
6406/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
6407///
6408/// When logging an error from the SDK, it is recommended that you either wrap the error in
6409/// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
6410/// error reporter library that visits the error's cause/source chain, or call
6411/// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
6412///
6413#[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}