// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// The server response when the authorizer failed to authenticate the caller.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnauthorizedError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl UnauthorizedError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl UnauthorizedError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for UnauthorizedError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "UnauthorizedError [UnauthorizedException]")?;
        if let Some(inner_1) = &self.message {
            {
                write!(f, ": {}", inner_1)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for UnauthorizedError {}
/// See [`UnauthorizedError`](crate::error::UnauthorizedError).
pub mod unauthorized_error {

    /// A builder for [`UnauthorizedError`](crate::error::UnauthorizedError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`UnauthorizedError`](crate::error::UnauthorizedError).
        pub fn build(self) -> crate::error::UnauthorizedError {
            crate::error::UnauthorizedError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl UnauthorizedError {
    /// Creates a new builder-style object to manufacture [`UnauthorizedError`](crate::error::UnauthorizedError).
    pub fn builder() -> crate::error::unauthorized_error::Builder {
        crate::error::unauthorized_error::Builder::default()
    }
}

/// The server response when usage plan or account-level throttling limits exceeded.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl ThrottlingError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl ThrottlingError {
    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
        aws_smithy_types::retry::ErrorKind::ThrottlingError
    }
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for ThrottlingError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ThrottlingError [ThrottlingException]")?;
        if let Some(inner_2) = &self.message {
            {
                write!(f, ": {}", inner_2)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for ThrottlingError {}
/// See [`ThrottlingError`](crate::error::ThrottlingError).
pub mod throttling_error {

    /// A builder for [`ThrottlingError`](crate::error::ThrottlingError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`ThrottlingError`](crate::error::ThrottlingError).
        pub fn build(self) -> crate::error::ThrottlingError {
            crate::error::ThrottlingError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl ThrottlingError {
    /// Creates a new builder-style object to manufacture [`ThrottlingError`](crate::error::ThrottlingError).
    pub fn builder() -> crate::error::throttling_error::Builder {
        crate::error::throttling_error::Builder::default()
    }
}

/// The server cannot handle the request due to technical reasons.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl ServiceUnavailableError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl ServiceUnavailableError {
    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
        aws_smithy_types::retry::ErrorKind::ServerError
    }
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for ServiceUnavailableError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ServiceUnavailableError [ServiceUnavailableException]")?;
        if let Some(inner_3) = &self.message {
            {
                write!(f, ": {}", inner_3)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for ServiceUnavailableError {}
/// See [`ServiceUnavailableError`](crate::error::ServiceUnavailableError).
pub mod service_unavailable_error {

    /// A builder for [`ServiceUnavailableError`](crate::error::ServiceUnavailableError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`ServiceUnavailableError`](crate::error::ServiceUnavailableError).
        pub fn build(self) -> crate::error::ServiceUnavailableError {
            crate::error::ServiceUnavailableError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl ServiceUnavailableError {
    /// Creates a new builder-style object to manufacture [`ServiceUnavailableError`](crate::error::ServiceUnavailableError).
    pub fn builder() -> crate::error::service_unavailable_error::Builder {
        crate::error::service_unavailable_error::Builder::default()
    }
}

/// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl ResourceNotFoundError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl ResourceNotFoundError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for ResourceNotFoundError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ResourceNotFoundError [ResourceNotFoundException]")?;
        if let Some(inner_4) = &self.message {
            {
                write!(f, ": {}", inner_4)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for ResourceNotFoundError {}
/// See [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
pub mod resource_not_found_error {

    /// A builder for [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
        pub fn build(self) -> crate::error::ResourceNotFoundError {
            crate::error::ResourceNotFoundError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl ResourceNotFoundError {
    /// Creates a new builder-style object to manufacture [`ResourceNotFoundError`](crate::error::ResourceNotFoundError).
    pub fn builder() -> crate::error::resource_not_found_error::Builder {
        crate::error::resource_not_found_error::Builder::default()
    }
}

/// The server response for the usage plan quota exceeded error.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QuotaExceededError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl QuotaExceededError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl QuotaExceededError {
    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
        aws_smithy_types::retry::ErrorKind::ThrottlingError
    }
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for QuotaExceededError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "QuotaExceededError [QuotaExceededException]")?;
        if let Some(inner_5) = &self.message {
            {
                write!(f, ": {}", inner_5)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for QuotaExceededError {}
/// See [`QuotaExceededError`](crate::error::QuotaExceededError).
pub mod quota_exceeded_error {

    /// A builder for [`QuotaExceededError`](crate::error::QuotaExceededError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`QuotaExceededError`](crate::error::QuotaExceededError).
        pub fn build(self) -> crate::error::QuotaExceededError {
            crate::error::QuotaExceededError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl QuotaExceededError {
    /// Creates a new builder-style object to manufacture [`QuotaExceededError`](crate::error::QuotaExceededError).
    pub fn builder() -> crate::error::quota_exceeded_error::Builder {
        crate::error::quota_exceeded_error::Builder::default()
    }
}

/// The server response when an unexpected error occurred while processing request.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalFailureError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl InternalFailureError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl InternalFailureError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for InternalFailureError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "InternalFailureError [InternalFailureException]")?;
        if let Some(inner_6) = &self.message {
            {
                write!(f, ": {}", inner_6)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for InternalFailureError {}
/// See [`InternalFailureError`](crate::error::InternalFailureError).
pub mod internal_failure_error {

    /// A builder for [`InternalFailureError`](crate::error::InternalFailureError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`InternalFailureError`](crate::error::InternalFailureError).
        pub fn build(self) -> crate::error::InternalFailureError {
            crate::error::InternalFailureError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl InternalFailureError {
    /// Creates a new builder-style object to manufacture [`InternalFailureError`](crate::error::InternalFailureError).
    pub fn builder() -> crate::error::internal_failure_error::Builder {
        crate::error::internal_failure_error::Builder::default()
    }
}

/// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GatewayTimeoutError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl GatewayTimeoutError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl GatewayTimeoutError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for GatewayTimeoutError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "GatewayTimeoutError [GatewayTimeoutException]")?;
        if let Some(inner_7) = &self.message {
            {
                write!(f, ": {}", inner_7)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for GatewayTimeoutError {}
/// See [`GatewayTimeoutError`](crate::error::GatewayTimeoutError).
pub mod gateway_timeout_error {

    /// A builder for [`GatewayTimeoutError`](crate::error::GatewayTimeoutError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`GatewayTimeoutError`](crate::error::GatewayTimeoutError).
        pub fn build(self) -> crate::error::GatewayTimeoutError {
            crate::error::GatewayTimeoutError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl GatewayTimeoutError {
    /// Creates a new builder-style object to manufacture [`GatewayTimeoutError`](crate::error::GatewayTimeoutError).
    pub fn builder() -> crate::error::gateway_timeout_error::Builder {
        crate::error::gateway_timeout_error::Builder::default()
    }
}

/// The server cannot process the request due to an apparent client error.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl BadRequestError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl BadRequestError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for BadRequestError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "BadRequestError [BadRequestException]")?;
        if let Some(inner_8) = &self.message {
            {
                write!(f, ": {}", inner_8)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for BadRequestError {}
/// See [`BadRequestError`](crate::error::BadRequestError).
pub mod bad_request_error {

    /// A builder for [`BadRequestError`](crate::error::BadRequestError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`BadRequestError`](crate::error::BadRequestError).
        pub fn build(self) -> crate::error::BadRequestError {
            crate::error::BadRequestError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl BadRequestError {
    /// Creates a new builder-style object to manufacture [`BadRequestError`](crate::error::BadRequestError).
    pub fn builder() -> crate::error::bad_request_error::Builder {
        crate::error::bad_request_error::Builder::default()
    }
}

/// The server response for authorization failure.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl AccessDeniedError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl AccessDeniedError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for AccessDeniedError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "AccessDeniedError [AccessDeniedException]")?;
        if let Some(inner_9) = &self.message {
            {
                write!(f, ": {}", inner_9)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for AccessDeniedError {}
/// See [`AccessDeniedError`](crate::error::AccessDeniedError).
pub mod access_denied_error {

    /// A builder for [`AccessDeniedError`](crate::error::AccessDeniedError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`AccessDeniedError`](crate::error::AccessDeniedError).
        pub fn build(self) -> crate::error::AccessDeniedError {
            crate::error::AccessDeniedError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl AccessDeniedError {
    /// Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::error::AccessDeniedError).
    pub fn builder() -> crate::error::access_denied_error::Builder {
        crate::error::access_denied_error::Builder::default()
    }
}

/// Error type for the `ListX12Profiles` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListX12ProfilesError {
    /// Kind of error that occurred.
    pub kind: ListX12ProfilesErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListX12ProfilesError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: ListX12ProfilesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `ListX12Profiles` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListX12ProfilesErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListX12ProfilesError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            ListX12ProfilesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            ListX12ProfilesErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for ListX12ProfilesError {
    fn code(&self) -> Option<&str> {
        ListX12ProfilesError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            ListX12ProfilesErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListX12ProfilesErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListX12ProfilesErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl ListX12ProfilesError {
    /// Creates a new `ListX12ProfilesError`.
    pub fn new(kind: ListX12ProfilesErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `ListX12ProfilesError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: ListX12ProfilesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `ListX12ProfilesError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: ListX12ProfilesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::GatewayTimeoutError(_))
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12ProfilesErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12ProfilesErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12ProfilesErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `ListX12ProfilesErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, ListX12ProfilesErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for ListX12ProfilesError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            ListX12ProfilesErrorKind::AccessDeniedError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::BadRequestError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::InternalFailureError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::QuotaExceededError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::ThrottlingError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::UnauthorizedError(_inner) => Some(_inner),
            ListX12ProfilesErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateX12ProfileError {
    /// Kind of error that occurred.
    pub kind: CreateX12ProfileErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateX12ProfileError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateX12ProfileErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateX12ProfileError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateX12ProfileErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateX12ProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateX12ProfileError {
    fn code(&self) -> Option<&str> {
        CreateX12ProfileError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateX12ProfileErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12ProfileErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12ProfileErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12ProfileErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl CreateX12ProfileError {
    /// Creates a new `CreateX12ProfileError`.
    pub fn new(kind: CreateX12ProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateX12ProfileError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateX12ProfileError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, CreateX12ProfileErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, CreateX12ProfileErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, CreateX12ProfileErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12ProfileErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, CreateX12ProfileErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `CreateX12ProfileErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, CreateX12ProfileErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for CreateX12ProfileError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateX12ProfileErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateX12ProfileErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// The server could not process the request because of conflict in the current state of the resource.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceConflictError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl ResourceConflictError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl ResourceConflictError {
    /// Returns `Some(ErrorKind)` if the error is retryable. Otherwise, returns `None`.
    pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
        aws_smithy_types::retry::ErrorKind::ClientError
    }
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for ResourceConflictError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "ResourceConflictError [ResourceConflictException]")?;
        if let Some(inner_10) = &self.message {
            {
                write!(f, ": {}", inner_10)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for ResourceConflictError {}
/// See [`ResourceConflictError`](crate::error::ResourceConflictError).
pub mod resource_conflict_error {

    /// A builder for [`ResourceConflictError`](crate::error::ResourceConflictError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourceConflictError`](crate::error::ResourceConflictError).
        pub fn build(self) -> crate::error::ResourceConflictError {
            crate::error::ResourceConflictError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl ResourceConflictError {
    /// Creates a new builder-style object to manufacture [`ResourceConflictError`](crate::error::ResourceConflictError).
    pub fn builder() -> crate::error::resource_conflict_error::Builder {
        crate::error::resource_conflict_error::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OperationConflictError {
    /// Human readable exception message.
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
    /// Classification of the exception type.
    #[doc(hidden)]
    pub code: std::option::Option<std::string::String>,
}
impl OperationConflictError {
    /// Classification of the exception type.
    pub fn code(&self) -> std::option::Option<&str> {
        self.code.as_deref()
    }
}
impl OperationConflictError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for OperationConflictError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "OperationConflictError [OperationConflictException]")?;
        if let Some(inner_11) = &self.message {
            {
                write!(f, ": {}", inner_11)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for OperationConflictError {}
/// See [`OperationConflictError`](crate::error::OperationConflictError).
pub mod operation_conflict_error {

    /// A builder for [`OperationConflictError`](crate::error::OperationConflictError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) code: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Human readable exception message.
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// Human readable exception message.
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Classification of the exception type.
        pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
            self.code = Some(input.into());
            self
        }
        /// Classification of the exception type.
        pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.code = input;
            self
        }
        /// Consumes the builder and constructs a [`OperationConflictError`](crate::error::OperationConflictError).
        pub fn build(self) -> crate::error::OperationConflictError {
            crate::error::OperationConflictError {
                message: self.message,
                code: self.code,
            }
        }
    }
}
impl OperationConflictError {
    /// Creates a new builder-style object to manufacture [`OperationConflictError`](crate::error::OperationConflictError).
    pub fn builder() -> crate::error::operation_conflict_error::Builder {
        crate::error::operation_conflict_error::Builder::default()
    }
}

/// Error type for the `DeleteX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteX12ProfileError {
    /// Kind of error that occurred.
    pub kind: DeleteX12ProfileErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteX12ProfileError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteX12ProfileErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteX12ProfileError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteX12ProfileErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteX12ProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteX12ProfileError {
    fn code(&self) -> Option<&str> {
        DeleteX12ProfileError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteX12ProfileErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12ProfileErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12ProfileErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl DeleteX12ProfileError {
    /// Creates a new `DeleteX12ProfileError`.
    pub fn new(kind: DeleteX12ProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteX12ProfileError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteX12ProfileError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12ProfileErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, DeleteX12ProfileErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, DeleteX12ProfileErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12ProfileErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12ProfileErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, DeleteX12ProfileErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12ProfileErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12ProfileErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, DeleteX12ProfileErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `DeleteX12ProfileErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, DeleteX12ProfileErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for DeleteX12ProfileError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteX12ProfileErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteX12ProfileErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateX12ProfileError {
    /// Kind of error that occurred.
    pub kind: UpdateX12ProfileErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateX12ProfileError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateX12ProfileErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateX12ProfileError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateX12ProfileErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateX12ProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateX12ProfileError {
    fn code(&self) -> Option<&str> {
        UpdateX12ProfileError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateX12ProfileErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12ProfileErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12ProfileErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl UpdateX12ProfileError {
    /// Creates a new `UpdateX12ProfileError`.
    pub fn new(kind: UpdateX12ProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateX12ProfileError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateX12ProfileError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12ProfileErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, UpdateX12ProfileErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, UpdateX12ProfileErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12ProfileErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12ProfileErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, UpdateX12ProfileErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12ProfileErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12ProfileErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, UpdateX12ProfileErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `UpdateX12ProfileErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, UpdateX12ProfileErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for UpdateX12ProfileError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateX12ProfileErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateX12ProfileErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12ProfileError {
    /// Kind of error that occurred.
    pub kind: GetX12ProfileErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetX12ProfileError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12Profile` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12ProfileErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetX12ProfileError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12ProfileErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12ProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12ProfileError {
    fn code(&self) -> Option<&str> {
        GetX12ProfileError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12ProfileErrorKind::QuotaExceededError(inner) => Some(inner.retryable_error_kind()),
            GetX12ProfileErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12ProfileErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl GetX12ProfileError {
    /// Creates a new `GetX12ProfileError`.
    pub fn new(kind: GetX12ProfileErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetX12ProfileError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetX12ProfileError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12ProfileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::GatewayTimeoutError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::InternalFailureError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::ResourceNotFoundError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetX12ProfileErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GetX12ProfileErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GetX12ProfileError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12ProfileErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12ProfileErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `ListX12Partnerships` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListX12PartnershipsError {
    /// Kind of error that occurred.
    pub kind: ListX12PartnershipsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListX12PartnershipsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: ListX12PartnershipsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `ListX12Partnerships` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListX12PartnershipsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListX12PartnershipsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            ListX12PartnershipsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            ListX12PartnershipsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for ListX12PartnershipsError {
    fn code(&self) -> Option<&str> {
        ListX12PartnershipsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            ListX12PartnershipsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListX12PartnershipsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListX12PartnershipsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl ListX12PartnershipsError {
    /// Creates a new `ListX12PartnershipsError`.
    pub fn new(kind: ListX12PartnershipsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `ListX12PartnershipsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: ListX12PartnershipsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `ListX12PartnershipsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: ListX12PartnershipsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, ListX12PartnershipsErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, ListX12PartnershipsErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `ListX12PartnershipsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            ListX12PartnershipsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for ListX12PartnershipsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            ListX12PartnershipsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::BadRequestError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::InternalFailureError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::ThrottlingError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            ListX12PartnershipsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateX12PartnershipError {
    /// Kind of error that occurred.
    pub kind: CreateX12PartnershipErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateX12PartnershipError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateX12PartnershipErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateX12PartnershipError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateX12PartnershipErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateX12PartnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateX12PartnershipError {
    fn code(&self) -> Option<&str> {
        CreateX12PartnershipError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateX12PartnershipErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12PartnershipErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12PartnershipErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12PartnershipErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateX12PartnershipError {
    /// Creates a new `CreateX12PartnershipError`.
    pub fn new(kind: CreateX12PartnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateX12PartnershipError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateX12PartnershipError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12PartnershipErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12PartnershipErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateX12PartnershipError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateX12PartnershipErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateX12PartnershipErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteX12PartnershipError {
    /// Kind of error that occurred.
    pub kind: DeleteX12PartnershipErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteX12PartnershipError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteX12PartnershipErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteX12PartnershipError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteX12PartnershipErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteX12PartnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteX12PartnershipError {
    fn code(&self) -> Option<&str> {
        DeleteX12PartnershipError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteX12PartnershipErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12PartnershipErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12PartnershipErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteX12PartnershipError {
    /// Creates a new `DeleteX12PartnershipError`.
    pub fn new(kind: DeleteX12PartnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteX12PartnershipError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteX12PartnershipError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12PartnershipErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12PartnershipErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteX12PartnershipError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteX12PartnershipErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteX12PartnershipErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateX12PartnershipError {
    /// Kind of error that occurred.
    pub kind: UpdateX12PartnershipErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateX12PartnershipError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateX12PartnershipErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateX12PartnershipError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateX12PartnershipErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateX12PartnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateX12PartnershipError {
    fn code(&self) -> Option<&str> {
        UpdateX12PartnershipError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateX12PartnershipErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12PartnershipErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12PartnershipErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateX12PartnershipError {
    /// Creates a new `UpdateX12PartnershipError`.
    pub fn new(kind: UpdateX12PartnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateX12PartnershipError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateX12PartnershipError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12PartnershipErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12PartnershipErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateX12PartnershipError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateX12PartnershipErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateX12PartnershipErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12PartnershipError {
    /// Kind of error that occurred.
    pub kind: GetX12PartnershipErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetX12PartnershipError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12Partnership` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12PartnershipErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetX12PartnershipError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12PartnershipErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12PartnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12PartnershipError {
    fn code(&self) -> Option<&str> {
        GetX12PartnershipError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12PartnershipErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12PartnershipErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12PartnershipErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetX12PartnershipError {
    /// Creates a new `GetX12PartnershipError`.
    pub fn new(kind: GetX12PartnershipErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetX12PartnershipError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetX12PartnershipError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12PartnershipErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GetX12PartnershipErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetX12PartnershipErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetX12PartnershipErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetX12PartnershipErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GetX12PartnershipErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GetX12PartnershipError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12PartnershipErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12PartnershipErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateStediFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateStediFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateStediFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateStediFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateStediFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateStediFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateStediFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateStediFtpConnectionError {
    fn code(&self) -> Option<&str> {
        CreateStediFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateStediFtpConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateStediFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateStediFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateStediFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateStediFtpConnectionError {
    /// Creates a new `CreateStediFtpConnectionError`.
    pub fn new(kind: CreateStediFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateStediFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateStediFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateStediFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateStediFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateStediFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateStediFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateStediFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteStediFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteStediFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteStediFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteStediFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteStediFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteStediFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteStediFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteStediFtpConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteStediFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteStediFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteStediFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteStediFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteStediFtpConnectionError {
    /// Creates a new `DeleteStediFtpConnectionError`.
    pub fn new(kind: DeleteStediFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteStediFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteStediFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteStediFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteStediFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteStediFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteStediFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteStediFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateStediFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateStediFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateStediFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateStediFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateStediFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateStediFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateStediFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateStediFtpConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateStediFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateStediFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateStediFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateStediFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateStediFtpConnectionError {
    /// Creates a new `UpdateStediFtpConnectionError`.
    pub fn new(kind: UpdateStediFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateStediFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateStediFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateStediFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateStediFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateStediFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateStediFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateStediFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetStediFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: GetStediFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetStediFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetStediFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetStediFtpConnectionErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetStediFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetStediFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetStediFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetStediFtpConnectionError {
    fn code(&self) -> Option<&str> {
        GetStediFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetStediFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetStediFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetStediFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetStediFtpConnectionError {
    /// Creates a new `GetStediFtpConnectionError`.
    pub fn new(kind: GetStediFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetStediFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `GetStediFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetStediFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetStediFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetStediFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetStediFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetStediFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetStediFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateRemoteFtpCredentials` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRemoteFtpCredentialsError {
    /// Kind of error that occurred.
    pub kind: UpdateRemoteFtpCredentialsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRemoteFtpCredentialsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateRemoteFtpCredentialsErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateRemoteFtpCredentials` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRemoteFtpCredentialsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRemoteFtpCredentialsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateRemoteFtpCredentialsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpCredentialsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRemoteFtpCredentialsError {
    fn code(&self) -> Option<&str> {
        UpdateRemoteFtpCredentialsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateRemoteFtpCredentialsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateRemoteFtpCredentialsError {
    /// Creates a new `UpdateRemoteFtpCredentialsError`.
    pub fn new(kind: UpdateRemoteFtpCredentialsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateRemoteFtpCredentialsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateRemoteFtpCredentialsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateRemoteFtpCredentialsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateRemoteFtpCredentialsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpCredentialsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpCredentialsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateRemoteFtpCredentialsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateRemoteFtpCredentialsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateRemoteFtpCredentialsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRemoteFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateRemoteFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRemoteFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRemoteFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRemoteFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateRemoteFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRemoteFtpConnectionError {
    fn code(&self) -> Option<&str> {
        CreateRemoteFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateRemoteFtpConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateRemoteFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateRemoteFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateRemoteFtpConnectionError {
    /// Creates a new `CreateRemoteFtpConnectionError`.
    pub fn new(kind: CreateRemoteFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateRemoteFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateRemoteFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateRemoteFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateRemoteFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateRemoteFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateRemoteFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRemoteFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteRemoteFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRemoteFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRemoteFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRemoteFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteRemoteFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRemoteFtpConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteRemoteFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteRemoteFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteRemoteFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteRemoteFtpConnectionError {
    /// Creates a new `DeleteRemoteFtpConnectionError`.
    pub fn new(kind: DeleteRemoteFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteRemoteFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteRemoteFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteRemoteFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteRemoteFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteRemoteFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteRemoteFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRemoteFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateRemoteFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRemoteFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRemoteFtpConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRemoteFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateRemoteFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRemoteFtpConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateRemoteFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateRemoteFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateRemoteFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateRemoteFtpConnectionError {
    /// Creates a new `UpdateRemoteFtpConnectionError`.
    pub fn new(kind: UpdateRemoteFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateRemoteFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateRemoteFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateRemoteFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateRemoteFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateRemoteFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateRemoteFtpConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateRemoteFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRemoteFtpConnectionError {
    /// Kind of error that occurred.
    pub kind: GetRemoteFtpConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRemoteFtpConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetRemoteFtpConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRemoteFtpConnectionErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRemoteFtpConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetRemoteFtpConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRemoteFtpConnectionError {
    fn code(&self) -> Option<&str> {
        GetRemoteFtpConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetRemoteFtpConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetRemoteFtpConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetRemoteFtpConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetRemoteFtpConnectionError {
    /// Creates a new `GetRemoteFtpConnectionError`.
    pub fn new(kind: GetRemoteFtpConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetRemoteFtpConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `GetRemoteFtpConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetRemoteFtpConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetRemoteFtpConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetRemoteFtpConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetRemoteFtpConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetRemoteFtpConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetRemoteFtpConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateOutboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: CreateOutboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateOutboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateOutboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateOutboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            CreateOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateOutboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        CreateOutboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateOutboundX12TransactionSettingsError {
    /// Creates a new `CreateOutboundX12TransactionSettingsError`.
    pub fn new(
        kind: CreateOutboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateOutboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateOutboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateOutboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateOutboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ResourceConflictError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                Some(_inner)
            }
            CreateOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteOutboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: DeleteOutboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteOutboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteOutboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteOutboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteOutboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        DeleteOutboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteOutboundX12TransactionSettingsError {
    /// Creates a new `DeleteOutboundX12TransactionSettingsError`.
    pub fn new(
        kind: DeleteOutboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteOutboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteOutboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteOutboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteOutboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                Some(_inner)
            }
            DeleteOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateOutboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: UpdateOutboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateOutboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateOutboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateOutboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateOutboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        UpdateOutboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateOutboundX12TransactionSettingsError {
    /// Creates a new `UpdateOutboundX12TransactionSettingsError`.
    pub fn new(
        kind: UpdateOutboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateOutboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateOutboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateOutboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateOutboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateOutboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                Some(_inner)
            }
            UpdateOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetOutboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: GetOutboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetOutboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetOutboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetOutboundX12TransactionSettingsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetOutboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            GetOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            GetOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetOutboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        GetOutboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetOutboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetOutboundX12TransactionSettingsError {
    /// Creates a new `GetOutboundX12TransactionSettingsError`.
    pub fn new(
        kind: GetOutboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetOutboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `GetOutboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetOutboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetOutboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetOutboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            GetOutboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            GetOutboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            GetOutboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetOutboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetOutboundX12ControlNumbers` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetOutboundX12ControlNumbersError {
    /// Kind of error that occurred.
    pub kind: GetOutboundX12ControlNumbersErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetOutboundX12ControlNumbersError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetOutboundX12ControlNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetOutboundX12ControlNumbers` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetOutboundX12ControlNumbersErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetOutboundX12ControlNumbersError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetOutboundX12ControlNumbersErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetOutboundX12ControlNumbersErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetOutboundX12ControlNumbersError {
    fn code(&self) -> Option<&str> {
        GetOutboundX12ControlNumbersError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetOutboundX12ControlNumbersErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetOutboundX12ControlNumbersErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetOutboundX12ControlNumbersError {
    /// Creates a new `GetOutboundX12ControlNumbersError`.
    pub fn new(kind: GetOutboundX12ControlNumbersErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetOutboundX12ControlNumbersError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetOutboundX12ControlNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `GetOutboundX12ControlNumbersError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetOutboundX12ControlNumbersErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetOutboundX12ControlNumbersErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetOutboundX12ControlNumbersErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetOutboundX12ControlNumbersError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetOutboundX12ControlNumbersErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::BadRequestError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetOutboundX12ControlNumbersErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `SetOutboundX12ControlNumber` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetOutboundX12ControlNumberError {
    /// Kind of error that occurred.
    pub kind: SetOutboundX12ControlNumberErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetOutboundX12ControlNumberError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: SetOutboundX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `SetOutboundX12ControlNumber` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetOutboundX12ControlNumberErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetOutboundX12ControlNumberError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            SetOutboundX12ControlNumberErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            SetOutboundX12ControlNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for SetOutboundX12ControlNumberError {
    fn code(&self) -> Option<&str> {
        SetOutboundX12ControlNumberError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            SetOutboundX12ControlNumberErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            SetOutboundX12ControlNumberErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl SetOutboundX12ControlNumberError {
    /// Creates a new `SetOutboundX12ControlNumberError`.
    pub fn new(kind: SetOutboundX12ControlNumberErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `SetOutboundX12ControlNumberError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: SetOutboundX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `SetOutboundX12ControlNumberError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: SetOutboundX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `SetOutboundX12ControlNumberErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            SetOutboundX12ControlNumberErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for SetOutboundX12ControlNumberError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            SetOutboundX12ControlNumberErrorKind::OperationConflictError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::AccessDeniedError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::BadRequestError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::InternalFailureError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::QuotaExceededError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::ThrottlingError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::UnauthorizedError(_inner) => Some(_inner),
            SetOutboundX12ControlNumberErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateInboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: CreateInboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateInboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateInboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateInboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            CreateInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateInboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        CreateInboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateInboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateInboundX12TransactionSettingsError {
    /// Creates a new `CreateInboundX12TransactionSettingsError`.
    pub fn new(
        kind: CreateInboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateInboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateInboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateInboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateInboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::ResourceConflictError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            CreateInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: DeleteInboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteInboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            DeleteInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        DeleteInboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteInboundX12TransactionSettingsError {
    /// Creates a new `DeleteInboundX12TransactionSettingsError`.
    pub fn new(
        kind: DeleteInboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteInboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteInboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteInboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteInboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteInboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            DeleteInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateInboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: UpdateInboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateInboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateInboundX12TransactionSettingsErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateInboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => {
                _inner.fmt(f)
            }
            UpdateInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateInboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        UpdateInboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateInboundX12TransactionSettingsError {
    /// Creates a new `UpdateInboundX12TransactionSettingsError`.
    pub fn new(
        kind: UpdateInboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateInboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateInboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateInboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateInboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateInboundX12TransactionSettingsErrorKind::OperationConflictError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            UpdateInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInboundX12TransactionSettingsError {
    /// Kind of error that occurred.
    pub kind: GetInboundX12TransactionSettingsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInboundX12TransactionSettingsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetInboundX12TransactionSettings` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInboundX12TransactionSettingsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInboundX12TransactionSettingsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => {
                _inner.fmt(f)
            }
            GetInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            GetInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInboundX12TransactionSettingsError {
    fn code(&self) -> Option<&str> {
        GetInboundX12TransactionSettingsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetInboundX12TransactionSettingsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetInboundX12TransactionSettingsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetInboundX12TransactionSettingsError {
    /// Creates a new `GetInboundX12TransactionSettingsError`.
    pub fn new(
        kind: GetInboundX12TransactionSettingsErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetInboundX12TransactionSettingsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `GetInboundX12TransactionSettingsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetInboundX12TransactionSettingsErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetInboundX12TransactionSettingsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetInboundX12TransactionSettingsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetInboundX12TransactionSettingsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetInboundX12TransactionSettingsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::BadRequestError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::ResourceNotFoundError(_inner) => {
                Some(_inner)
            }
            GetInboundX12TransactionSettingsErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            GetInboundX12TransactionSettingsErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetInboundX12TransactionSettingsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetConnections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectionsError {
    /// Kind of error that occurred.
    pub kind: GetConnectionsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectionsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetConnections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectionsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectionsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetConnectionsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectionsError {
    fn code(&self) -> Option<&str> {
        GetConnectionsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetConnectionsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetConnectionsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetConnectionsErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl GetConnectionsError {
    /// Creates a new `GetConnectionsError`.
    pub fn new(kind: GetConnectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetConnectionsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetConnectionsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::GatewayTimeoutError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::InternalFailureError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetConnectionsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetConnectionsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetConnectionsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GetConnectionsErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GetConnectionsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetConnectionsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetConnectionsErrorKind::BadRequestError(_inner) => Some(_inner),
            GetConnectionsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetConnectionsErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetConnectionsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetConnectionsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetConnectionsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetConnectionsErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetConnectionsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetConnectionsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateBucketConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateBucketConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateBucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateBucketConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateBucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateBucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateBucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateBucketConnectionError {
    fn code(&self) -> Option<&str> {
        CreateBucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateBucketConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateBucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateBucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateBucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateBucketConnectionError {
    /// Creates a new `CreateBucketConnectionError`.
    pub fn new(kind: CreateBucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateBucketConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateBucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateBucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateBucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateBucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateBucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateBucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteBucketConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteBucketConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteBucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteBucketConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteBucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteBucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteBucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteBucketConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteBucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteBucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteBucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteBucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteBucketConnectionError {
    /// Creates a new `DeleteBucketConnectionError`.
    pub fn new(kind: DeleteBucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteBucketConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteBucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteBucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteBucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteBucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteBucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteBucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateBucketConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateBucketConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateBucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateBucketConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateBucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateBucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateBucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateBucketConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateBucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateBucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateBucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateBucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateBucketConnectionError {
    /// Creates a new `UpdateBucketConnectionError`.
    pub fn new(kind: UpdateBucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateBucketConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateBucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateBucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateBucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateBucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateBucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateBucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetBucketConnectionError {
    /// Kind of error that occurred.
    pub kind: GetBucketConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetBucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetBucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetBucketConnectionErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetBucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetBucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetBucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetBucketConnectionError {
    fn code(&self) -> Option<&str> {
        GetBucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetBucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetBucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetBucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetBucketConnectionError {
    /// Creates a new `GetBucketConnectionError`.
    pub fn new(kind: GetBucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetBucketConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetBucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetBucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetBucketConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetBucketConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetBucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetBucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetBucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetBucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetBucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateAs2Credentials` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAs2CredentialsError {
    /// Kind of error that occurred.
    pub kind: UpdateAs2CredentialsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAs2CredentialsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateAs2CredentialsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateAs2Credentials` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAs2CredentialsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAs2CredentialsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateAs2CredentialsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateAs2CredentialsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAs2CredentialsError {
    fn code(&self) -> Option<&str> {
        UpdateAs2CredentialsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateAs2CredentialsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2CredentialsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2CredentialsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateAs2CredentialsError {
    /// Creates a new `UpdateAs2CredentialsError`.
    pub fn new(kind: UpdateAs2CredentialsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateAs2CredentialsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateAs2CredentialsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateAs2CredentialsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateAs2CredentialsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2CredentialsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2CredentialsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateAs2CredentialsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateAs2CredentialsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateAs2CredentialsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateAs2BasicAuth` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAs2BasicAuthError {
    /// Kind of error that occurred.
    pub kind: UpdateAs2BasicAuthErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAs2BasicAuthError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateAs2BasicAuth` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAs2BasicAuthErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAs2BasicAuthError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateAs2BasicAuthErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateAs2BasicAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAs2BasicAuthError {
    fn code(&self) -> Option<&str> {
        UpdateAs2BasicAuthError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateAs2BasicAuthErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2BasicAuthErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2BasicAuthErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateAs2BasicAuthError {
    /// Creates a new `UpdateAs2BasicAuthError`.
    pub fn new(kind: UpdateAs2BasicAuthErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateAs2BasicAuthError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateAs2BasicAuthError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, UpdateAs2BasicAuthErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, UpdateAs2BasicAuthErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `UpdateAs2BasicAuthErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2BasicAuthErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateAs2BasicAuthError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateAs2BasicAuthErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateAs2BasicAuthErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteAs2BasicAuth` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAs2BasicAuthError {
    /// Kind of error that occurred.
    pub kind: DeleteAs2BasicAuthErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAs2BasicAuthError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteAs2BasicAuth` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAs2BasicAuthErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAs2BasicAuthError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteAs2BasicAuthErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteAs2BasicAuthErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAs2BasicAuthError {
    fn code(&self) -> Option<&str> {
        DeleteAs2BasicAuthError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteAs2BasicAuthErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteAs2BasicAuthErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteAs2BasicAuthErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteAs2BasicAuthError {
    /// Creates a new `DeleteAs2BasicAuthError`.
    pub fn new(kind: DeleteAs2BasicAuthErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteAs2BasicAuthError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteAs2BasicAuthError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteAs2BasicAuthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, DeleteAs2BasicAuthErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, DeleteAs2BasicAuthErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `DeleteAs2BasicAuthErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2BasicAuthErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteAs2BasicAuthError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteAs2BasicAuthErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteAs2BasicAuthErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAs2ConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateAs2ConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAs2ConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAs2ConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAs2ConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateAs2ConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateAs2ConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAs2ConnectionError {
    fn code(&self) -> Option<&str> {
        CreateAs2ConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateAs2ConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateAs2ConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateAs2ConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateAs2ConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateAs2ConnectionError {
    /// Creates a new `CreateAs2ConnectionError`.
    pub fn new(kind: CreateAs2ConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateAs2ConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateAs2ConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, CreateAs2ConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, CreateAs2ConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `CreateAs2ConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateAs2ConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateAs2ConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateAs2ConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateAs2ConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAs2ConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteAs2ConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAs2ConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAs2ConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAs2ConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteAs2ConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteAs2ConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAs2ConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteAs2ConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteAs2ConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteAs2ConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteAs2ConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteAs2ConnectionError {
    /// Creates a new `DeleteAs2ConnectionError`.
    pub fn new(kind: DeleteAs2ConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteAs2ConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteAs2ConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, DeleteAs2ConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, DeleteAs2ConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `DeleteAs2ConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteAs2ConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteAs2ConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteAs2ConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteAs2ConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAs2ConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateAs2ConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAs2ConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAs2ConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAs2ConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateAs2ConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateAs2ConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAs2ConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateAs2ConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateAs2ConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2ConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateAs2ConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateAs2ConnectionError {
    /// Creates a new `UpdateAs2ConnectionError`.
    pub fn new(kind: UpdateAs2ConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateAs2ConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateAs2ConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, UpdateAs2ConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, UpdateAs2ConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `UpdateAs2ConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateAs2ConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateAs2ConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateAs2ConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateAs2ConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAs2ConnectionError {
    /// Kind of error that occurred.
    pub kind: GetAs2ConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAs2ConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetAs2Connection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAs2ConnectionErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAs2ConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetAs2ConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetAs2ConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAs2ConnectionError {
    fn code(&self) -> Option<&str> {
        GetAs2ConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetAs2ConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetAs2ConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetAs2ConnectionErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl GetAs2ConnectionError {
    /// Creates a new `GetAs2ConnectionError`.
    pub fn new(kind: GetAs2ConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetAs2ConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetAs2ConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetAs2ConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GetAs2ConnectionErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetAs2ConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetAs2ConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetAs2ConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, GetAs2ConnectionErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetAs2ConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetAs2ConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetAs2ConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetAs2ConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GetAs2ConnectionErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GetAs2ConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetAs2ConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetAs2ConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `ListGlobalConnections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListGlobalConnectionsError {
    /// Kind of error that occurred.
    pub kind: ListGlobalConnectionsErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListGlobalConnectionsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: ListGlobalConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `ListGlobalConnections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListGlobalConnectionsErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListGlobalConnectionsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            ListGlobalConnectionsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            ListGlobalConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for ListGlobalConnectionsError {
    fn code(&self) -> Option<&str> {
        ListGlobalConnectionsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            ListGlobalConnectionsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListGlobalConnectionsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            ListGlobalConnectionsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl ListGlobalConnectionsError {
    /// Creates a new `ListGlobalConnectionsError`.
    pub fn new(kind: ListGlobalConnectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `ListGlobalConnectionsError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: ListGlobalConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `ListGlobalConnectionsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: ListGlobalConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `ListGlobalConnectionsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            ListGlobalConnectionsErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for ListGlobalConnectionsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            ListGlobalConnectionsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::BadRequestError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::InternalFailureError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::ThrottlingError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            ListGlobalConnectionsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGlobalConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateGlobalConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateGlobalConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGlobalConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server could not process the request because of conflict in the current state of the resource.
    ResourceConflictError(crate::error::ResourceConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateGlobalConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateGlobalConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateGlobalConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGlobalConnectionError {
    fn code(&self) -> Option<&str> {
        CreateGlobalConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateGlobalConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateGlobalConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateGlobalConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateGlobalConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateGlobalConnectionError {
    /// Creates a new `CreateGlobalConnectionError`.
    pub fn new(kind: CreateGlobalConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `CreateGlobalConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: CreateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `CreateGlobalConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateGlobalConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateGlobalConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateGlobalConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateGlobalConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateGlobalConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGlobalConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteGlobalConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteGlobalConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteGlobalConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteGlobalConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteGlobalConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteGlobalConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteGlobalConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteGlobalConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteGlobalConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteGlobalConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteGlobalConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteGlobalConnectionError {
    /// Creates a new `DeleteGlobalConnectionError`.
    pub fn new(kind: DeleteGlobalConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `DeleteGlobalConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: DeleteGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `DeleteGlobalConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteGlobalConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteGlobalConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteGlobalConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteGlobalConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteGlobalConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGlobalConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateGlobalConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateGlobalConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateGlobalConnectionErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateGlobalConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateGlobalConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateGlobalConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateGlobalConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateGlobalConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateGlobalConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateGlobalConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateGlobalConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateGlobalConnectionError {
    /// Creates a new `UpdateGlobalConnectionError`.
    pub fn new(kind: UpdateGlobalConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `UpdateGlobalConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: UpdateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `UpdateGlobalConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateGlobalConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateGlobalConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateGlobalConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateGlobalConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateGlobalConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGlobalConnectionError {
    /// Kind of error that occurred.
    pub kind: GetGlobalConnectionErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetGlobalConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetGlobalConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGlobalConnectionErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetGlobalConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetGlobalConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetGlobalConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGlobalConnectionError {
    fn code(&self) -> Option<&str> {
        GetGlobalConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetGlobalConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetGlobalConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetGlobalConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetGlobalConnectionError {
    /// Creates a new `GetGlobalConnectionError`.
    pub fn new(kind: GetGlobalConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetGlobalConnectionError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GetGlobalConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetGlobalConnectionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetGlobalConnectionErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetGlobalConnectionErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetGlobalConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetGlobalConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetGlobalConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetGlobalConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetGlobalConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `IncrementX12ControlNumber` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct IncrementX12ControlNumberError {
    /// Kind of error that occurred.
    pub kind: IncrementX12ControlNumberErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for IncrementX12ControlNumberError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: IncrementX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `IncrementX12ControlNumber` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum IncrementX12ControlNumberErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    OperationConflictError(crate::error::OperationConflictError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for IncrementX12ControlNumberError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            IncrementX12ControlNumberErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            IncrementX12ControlNumberErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for IncrementX12ControlNumberError {
    fn code(&self) -> Option<&str> {
        IncrementX12ControlNumberError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            IncrementX12ControlNumberErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            IncrementX12ControlNumberErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            IncrementX12ControlNumberErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl IncrementX12ControlNumberError {
    /// Creates a new `IncrementX12ControlNumberError`.
    pub fn new(kind: IncrementX12ControlNumberErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `IncrementX12ControlNumberError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: IncrementX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `IncrementX12ControlNumberError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: IncrementX12ControlNumberErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `IncrementX12ControlNumberErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            IncrementX12ControlNumberErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for IncrementX12ControlNumberError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            IncrementX12ControlNumberErrorKind::OperationConflictError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::AccessDeniedError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::BadRequestError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::InternalFailureError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::QuotaExceededError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::ThrottlingError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::UnauthorizedError(_inner) => Some(_inner),
            IncrementX12ControlNumberErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetX12ProfileByInterchange` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12ProfileByInterchangeError {
    /// Kind of error that occurred.
    pub kind: GetX12ProfileByInterchangeErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetX12ProfileByInterchangeError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12ProfileByInterchangeErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12ProfileByInterchange` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12ProfileByInterchangeErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetX12ProfileByInterchangeError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12ProfileByInterchangeErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12ProfileByInterchangeErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12ProfileByInterchangeError {
    fn code(&self) -> Option<&str> {
        GetX12ProfileByInterchangeError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12ProfileByInterchangeErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12ProfileByInterchangeErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetX12ProfileByInterchangeError {
    /// Creates a new `GetX12ProfileByInterchangeError`.
    pub fn new(kind: GetX12ProfileByInterchangeErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetX12ProfileByInterchangeError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetX12ProfileByInterchangeErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
            meta: Default::default(),
        }
    }

    /// Creates the `GetX12ProfileByInterchangeError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12ProfileByInterchangeErrorKind::Unhandled(crate::error::Unhandled::new(
                err.into(),
            )),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ProfileByInterchangeErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ProfileByInterchangeErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetX12ProfileByInterchangeError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12ProfileByInterchangeErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12ProfileByInterchangeErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetX12PartnershipByInterchanges` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12PartnershipByInterchangesError {
    /// Kind of error that occurred.
    pub kind: GetX12PartnershipByInterchangesErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetX12PartnershipByInterchangesError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12PartnershipByInterchangesErrorKind::Unhandled(
                crate::error::Unhandled::new(source),
            ),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12PartnershipByInterchanges` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12PartnershipByInterchangesErrorKind {
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetX12PartnershipByInterchangesError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12PartnershipByInterchangesErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::ResourceNotFoundError(_inner) => {
                _inner.fmt(f)
            }
            GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError(_inner) => {
                _inner.fmt(f)
            }
            GetX12PartnershipByInterchangesErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12PartnershipByInterchangesErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12PartnershipByInterchangesError {
    fn code(&self) -> Option<&str> {
        GetX12PartnershipByInterchangesError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12PartnershipByInterchangesErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12PartnershipByInterchangesErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetX12PartnershipByInterchangesError {
    /// Creates a new `GetX12PartnershipByInterchangesError`.
    pub fn new(
        kind: GetX12PartnershipByInterchangesErrorKind,
        meta: aws_smithy_types::Error,
    ) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GetX12PartnershipByInterchangesError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GetX12PartnershipByInterchangesErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
            meta: Default::default(),
        }
    }

    /// Creates the `GetX12PartnershipByInterchangesError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12PartnershipByInterchangesErrorKind::Unhandled(
                crate::error::Unhandled::new(err.into()),
            ),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12PartnershipByInterchangesErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12PartnershipByInterchangesErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetX12PartnershipByInterchangesError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12PartnershipByInterchangesErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::ServiceUnavailableError(_inner) => {
                Some(_inner)
            }
            GetX12PartnershipByInterchangesErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12PartnershipByInterchangesErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GenerateEdi` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GenerateEdiError {
    /// Kind of error that occurred.
    pub kind: GenerateEdiErrorKind,
    /// Additional metadata about the error, including error code, message, and request ID.
    pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GenerateEdiError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GenerateEdiErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GenerateEdi` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GenerateEdiErrorKind {
    #[allow(missing_docs)] // documentation missing in model
    JsonTranslationError(crate::error::JsonTranslationError),
    /// The server response for authorization failure.
    AccessDeniedError(crate::error::AccessDeniedError),
    /// The server cannot process the request due to an apparent client error.
    BadRequestError(crate::error::BadRequestError),
    /// The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
    GatewayTimeoutError(crate::error::GatewayTimeoutError),
    /// The server response when an unexpected error occurred while processing request.
    InternalFailureError(crate::error::InternalFailureError),
    /// The server response for the usage plan quota exceeded error.
    QuotaExceededError(crate::error::QuotaExceededError),
    /// The server response when the specified resource cannot be found after an API request passes authentication and authorization.
    ResourceNotFoundError(crate::error::ResourceNotFoundError),
    /// The server cannot handle the request due to technical reasons.
    ServiceUnavailableError(crate::error::ServiceUnavailableError),
    /// The server response when usage plan or account-level throttling limits exceeded.
    ThrottlingError(crate::error::ThrottlingError),
    /// The server response when the authorizer failed to authenticate the caller.
    UnauthorizedError(crate::error::UnauthorizedError),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GenerateEdiError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GenerateEdiErrorKind::JsonTranslationError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GenerateEdiErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GenerateEdiError {
    fn code(&self) -> Option<&str> {
        GenerateEdiError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GenerateEdiErrorKind::QuotaExceededError(inner) => Some(inner.retryable_error_kind()),
            GenerateEdiErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GenerateEdiErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
            _ => None,
        }
    }
}
impl GenerateEdiError {
    /// Creates a new `GenerateEdiError`.
    pub fn new(kind: GenerateEdiErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

    /// Creates the `GenerateEdiError::Unhandled` variant from any error type.
    pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
        Self {
            kind: GenerateEdiErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
            meta: Default::default(),
        }
    }

    /// Creates the `GenerateEdiError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GenerateEdiErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
        }
    }

    /// Returns the error message if one is available.
    pub fn message(&self) -> Option<&str> {
        self.meta.message()
    }

    /// Returns error metadata, which includes the error code, message,
    /// request ID, and potentially additional information.
    pub fn meta(&self) -> &aws_smithy_types::Error {
        &self.meta
    }

    /// Returns the request ID if it's available.
    pub fn request_id(&self) -> Option<&str> {
        self.meta.request_id()
    }

    /// Returns the error code if it's available.
    pub fn code(&self) -> Option<&str> {
        self.meta.code()
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::JsonTranslationError`.
    pub fn is_json_translation_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::JsonTranslationError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::GatewayTimeoutError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::InternalFailureError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::QuotaExceededError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::ResourceNotFoundError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::ServiceUnavailableError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GenerateEdiErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GenerateEdiErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GenerateEdiError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GenerateEdiErrorKind::JsonTranslationError(_inner) => Some(_inner),
            GenerateEdiErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GenerateEdiErrorKind::BadRequestError(_inner) => Some(_inner),
            GenerateEdiErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GenerateEdiErrorKind::InternalFailureError(_inner) => Some(_inner),
            GenerateEdiErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GenerateEdiErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GenerateEdiErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GenerateEdiErrorKind::ThrottlingError(_inner) => Some(_inner),
            GenerateEdiErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GenerateEdiErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct JsonTranslationError {
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub errors: std::option::Option<std::vec::Vec<crate::model::JsonError>>,
    #[allow(missing_docs)] // documentation missing in model
    #[doc(hidden)]
    pub message: std::option::Option<std::string::String>,
}
impl JsonTranslationError {
    #[allow(missing_docs)] // documentation missing in model
    pub fn errors(&self) -> std::option::Option<&[crate::model::JsonError]> {
        self.errors.as_deref()
    }
}
impl JsonTranslationError {
    /// Returns the error message.
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Display for JsonTranslationError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "JsonTranslationError")?;
        if let Some(inner_12) = &self.message {
            {
                write!(f, ": {}", inner_12)?;
            }
        }
        Ok(())
    }
}
impl std::error::Error for JsonTranslationError {}
/// See [`JsonTranslationError`](crate::error::JsonTranslationError).
pub mod json_translation_error {

    /// A builder for [`JsonTranslationError`](crate::error::JsonTranslationError).
    #[non_exhaustive]
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) errors: std::option::Option<std::vec::Vec<crate::model::JsonError>>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `errors`.
        ///
        /// To override the contents of this collection use [`set_errors`](Self::set_errors).
        ///
        pub fn errors(mut self, input: crate::model::JsonError) -> Self {
            let mut v = self.errors.unwrap_or_default();
            v.push(input);
            self.errors = Some(v);
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_errors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::JsonError>>,
        ) -> Self {
            self.errors = input;
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        #[allow(missing_docs)] // documentation missing in model
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`JsonTranslationError`](crate::error::JsonTranslationError).
        pub fn build(self) -> crate::error::JsonTranslationError {
            crate::error::JsonTranslationError {
                errors: self.errors,
                message: self.message,
            }
        }
    }
}
impl JsonTranslationError {
    /// Creates a new builder-style object to manufacture [`JsonTranslationError`](crate::error::JsonTranslationError).
    pub fn builder() -> crate::error::json_translation_error::Builder {
        crate::error::json_translation_error::Builder::default()
    }
}

///
/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
///
/// When logging an error from the SDK, it is recommended that you either wrap the error in
/// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
/// error reporter library that visits the error's cause/source chain, or call
/// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
///
#[derive(Debug)]
pub struct Unhandled {
    source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
    #[allow(unused)]
    pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self { source }
    }
}
impl std::fmt::Display for Unhandled {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
        write!(f, "unhandled error")
    }
}
impl std::error::Error for Unhandled {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        Some(self.source.as_ref() as _)
    }
}
