// 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 `GetX12Connections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12ConnectionsError {
    /// Kind of error that occurred.
    pub kind: GetX12ConnectionsErrorKind,
    /// 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 GetX12ConnectionsError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12ConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12Connections` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12ConnectionsErrorKind {
    /// 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 GetX12ConnectionsError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12ConnectionsErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12ConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12ConnectionsError {
    fn code(&self) -> Option<&str> {
        GetX12ConnectionsError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12ConnectionsErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12ConnectionsErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12ConnectionsErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetX12ConnectionsError {
    /// Creates a new `GetX12ConnectionsError`.
    pub fn new(kind: GetX12ConnectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

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

    /// Creates the `GetX12ConnectionsError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12ConnectionsErrorKind::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 `GetX12ConnectionsErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(&self.kind, GetX12ConnectionsErrorKind::AccessDeniedError(_))
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(&self.kind, GetX12ConnectionsErrorKind::BadRequestError(_))
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ConnectionsErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ConnectionsErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ConnectionsErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ConnectionsErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12ConnectionsErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(&self.kind, GetX12ConnectionsErrorKind::ThrottlingError(_))
    }
    /// Returns `true` if the error kind is `GetX12ConnectionsErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(&self.kind, GetX12ConnectionsErrorKind::UnauthorizedError(_))
    }
}
impl std::error::Error for GetX12ConnectionsError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12ConnectionsErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12ConnectionsErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `CreateX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateX12BucketConnectionError {
    /// Kind of error that occurred.
    pub kind: CreateX12BucketConnectionErrorKind,
    /// 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 CreateX12BucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: CreateX12BucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `CreateX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateX12BucketConnectionErrorKind {
    #[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 CreateX12BucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            CreateX12BucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            CreateX12BucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateX12BucketConnectionError {
    fn code(&self) -> Option<&str> {
        CreateX12BucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            CreateX12BucketConnectionErrorKind::ResourceConflictError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12BucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12BucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            CreateX12BucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl CreateX12BucketConnectionError {
    /// Creates a new `CreateX12BucketConnectionError`.
    pub fn new(kind: CreateX12BucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

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

    /// Creates the `CreateX12BucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: CreateX12BucketConnectionErrorKind::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 `CreateX12BucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::ResourceConflictError`.
    pub fn is_resource_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::ResourceConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `CreateX12BucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            CreateX12BucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for CreateX12BucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            CreateX12BucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::ResourceConflictError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            CreateX12BucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `DeleteX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteX12BucketConnectionError {
    /// Kind of error that occurred.
    pub kind: DeleteX12BucketConnectionErrorKind,
    /// 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 DeleteX12BucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: DeleteX12BucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `DeleteX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteX12BucketConnectionErrorKind {
    #[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 DeleteX12BucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            DeleteX12BucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            DeleteX12BucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteX12BucketConnectionError {
    fn code(&self) -> Option<&str> {
        DeleteX12BucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            DeleteX12BucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12BucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            DeleteX12BucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl DeleteX12BucketConnectionError {
    /// Creates a new `DeleteX12BucketConnectionError`.
    pub fn new(kind: DeleteX12BucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

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

    /// Creates the `DeleteX12BucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: DeleteX12BucketConnectionErrorKind::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 `DeleteX12BucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `DeleteX12BucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            DeleteX12BucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for DeleteX12BucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            DeleteX12BucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            DeleteX12BucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `UpdateX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateX12BucketConnectionError {
    /// Kind of error that occurred.
    pub kind: UpdateX12BucketConnectionErrorKind,
    /// 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 UpdateX12BucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: UpdateX12BucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(
                source,
            )),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `UpdateX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateX12BucketConnectionErrorKind {
    #[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 UpdateX12BucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            UpdateX12BucketConnectionErrorKind::OperationConflictError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            UpdateX12BucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateX12BucketConnectionError {
    fn code(&self) -> Option<&str> {
        UpdateX12BucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            UpdateX12BucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12BucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            UpdateX12BucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl UpdateX12BucketConnectionError {
    /// Creates a new `UpdateX12BucketConnectionError`.
    pub fn new(kind: UpdateX12BucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

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

    /// Creates the `UpdateX12BucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: UpdateX12BucketConnectionErrorKind::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 `UpdateX12BucketConnectionErrorKind::OperationConflictError`.
    pub fn is_operation_conflict_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::OperationConflictError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `UpdateX12BucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            UpdateX12BucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for UpdateX12BucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            UpdateX12BucketConnectionErrorKind::OperationConflictError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            UpdateX12BucketConnectionErrorKind::Unhandled(_inner) => Some(_inner),
        }
    }
}

/// Error type for the `GetX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetX12BucketConnectionError {
    /// Kind of error that occurred.
    pub kind: GetX12BucketConnectionErrorKind,
    /// 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 GetX12BucketConnectionError {
    fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
        Self {
            kind: GetX12BucketConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
            meta: Default::default(),
        }
    }
}
/// Types of errors that can occur for the `GetX12BucketConnection` operation.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetX12BucketConnectionErrorKind {
    /// 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 GetX12BucketConnectionError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match &self.kind {
            GetX12BucketConnectionErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::BadRequestError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
            GetX12BucketConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
        }
    }
}
impl aws_smithy_types::retry::ProvideErrorKind for GetX12BucketConnectionError {
    fn code(&self) -> Option<&str> {
        GetX12BucketConnectionError::code(self)
    }
    fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
        match &self.kind {
            GetX12BucketConnectionErrorKind::QuotaExceededError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12BucketConnectionErrorKind::ServiceUnavailableError(inner) => {
                Some(inner.retryable_error_kind())
            }
            GetX12BucketConnectionErrorKind::ThrottlingError(inner) => {
                Some(inner.retryable_error_kind())
            }
            _ => None,
        }
    }
}
impl GetX12BucketConnectionError {
    /// Creates a new `GetX12BucketConnectionError`.
    pub fn new(kind: GetX12BucketConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
        Self { kind, meta }
    }

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

    /// Creates the `GetX12BucketConnectionError::Unhandled` variant from a `aws_smithy_types::Error`.
    pub fn generic(err: aws_smithy_types::Error) -> Self {
        Self {
            meta: err.clone(),
            kind: GetX12BucketConnectionErrorKind::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 `GetX12BucketConnectionErrorKind::AccessDeniedError`.
    pub fn is_access_denied_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::AccessDeniedError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::BadRequestError`.
    pub fn is_bad_request_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::BadRequestError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::GatewayTimeoutError`.
    pub fn is_gateway_timeout_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::GatewayTimeoutError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::InternalFailureError`.
    pub fn is_internal_failure_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::InternalFailureError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::QuotaExceededError`.
    pub fn is_quota_exceeded_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::QuotaExceededError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::ResourceNotFoundError`.
    pub fn is_resource_not_found_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::ResourceNotFoundError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::ServiceUnavailableError`.
    pub fn is_service_unavailable_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::ServiceUnavailableError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::ThrottlingError`.
    pub fn is_throttling_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::ThrottlingError(_)
        )
    }
    /// Returns `true` if the error kind is `GetX12BucketConnectionErrorKind::UnauthorizedError`.
    pub fn is_unauthorized_error(&self) -> bool {
        matches!(
            &self.kind,
            GetX12BucketConnectionErrorKind::UnauthorizedError(_)
        )
    }
}
impl std::error::Error for GetX12BucketConnectionError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match &self.kind {
            GetX12BucketConnectionErrorKind::AccessDeniedError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::BadRequestError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::InternalFailureError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::QuotaExceededError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::ThrottlingError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::UnauthorizedError(_inner) => Some(_inner),
            GetX12BucketConnectionErrorKind::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 `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 {
    /// 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::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::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::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),
        }
    }
}

///
/// 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 _)
    }
}
